resizing Ubuntu partitions

User discussion and information resource forum for Image products.

resizing Ubuntu partitions

Postby Logman » Thu Mar 16, 2017 8:15 am

Not sure if this is the place for this question but here it is.

I have Ubuntu 16.04.1 on one partition and a Ubuntu swap file on another.

I want to resize the main Ubuntu partition and the swap partition.

I'm using unlimited Primaries and the Ubuntu partitions were both created using with BIBM before the Ubuntu install.

I also have 4 other Windows partitions on the same HD but the Ubuntu ones are at the end of the HD.

Do I resize from BIBM or in Ubuntu, not sure because of the unlimited primaries. ?

I would prefer to keep the installation of Ubuntu if possible rather than reinstalling it.
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Re: resizing Ubuntu partitions

Postby TeraByte Support(PP) » Fri Mar 17, 2017 1:17 pm

Since you are using unlimited primary partitions you should use BIBM or Partition Work in IFL GUI to make the changes. If you use a partitioning program that doesn't support EMBR type disks it may overwrite partitions it doesn't see or otherwise corrupt them.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1087
Joined: Thu Aug 11, 2011 5:51 pm

Re: resizing Ubuntu partitions

Postby Logman » Sat Mar 18, 2017 7:48 am

Thanks for that Paul.

Can I do partition work from the BIBM partition work screen or do I have to do it from an IFL boot disk ?

I did boot from the IFL disk that I just made to make sure it works, and what I want to do is to make the swap partition smaller ( from 20GB to 5GB ) and increase the Ubuntu 80GB to 95GB, but there is no resize option for the swap partition, but there is for the Ubuntu partition.

Do I have to delete the swap partition to enlarge the Ubuntu one, and if so, can I do it from IFL or do I have to do it while in Ubuntu ?
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Re: resizing Ubuntu partitions

Postby TeraByte Support(PP) » Sat Mar 18, 2017 10:50 pm

You should do it from either BIBM or IFL. Delete the swap partition and recreate it at the new location with the new size. After you boot back into Ubuntu you would need to reconfigure the new swap partition for use.

For example, in Ubuntu 16.04:

1. Open a terminal.
2. Run: fdisk -l
3. Find the new "Linux swap" partition. /dev/sda2 will be used here.
4. Run: sudo mkswap /dev/sda2
This will format the partition and return the UUID value. 2fb845bd-ce39-4f94-a942-44631332d0b9 is used here.
5. Run: sudo swapon -U 2fb845bd-ce39-4f94-a942-44631332d0b9
6. Edit the /etc/fstab file and update the swap entry with the new UUID.
Run: sudo gedit /etc/fstab
(Use whichever text file editor you have installed. Could be nano, etc.)
The entry will look something like this (spacing varies):
UUID=2fb845bd-ce39-4f94-a942-44631332d0b9 none swap sw 0 0
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1087
Joined: Thu Aug 11, 2011 5:51 pm

Re: resizing Ubuntu partitions

Postby Logman » Sun Mar 19, 2017 5:32 am

Thanks again Paul, I really appreciate your detailed response !

What about resizing the main Ubuntu partition, I want to make it larger by using the free space from changing the swap partition size.

Can I just resize it from BIBM or IFL or is there a something I have to do in Ubuntu too ?

Sorry for these questions, if it was Windows I would have no trouble doing this at all, but Ubuntu is totally different for me.
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Re: resizing Ubuntu partitions

Postby mashedmitten » Sun Mar 19, 2017 7:58 am

https://www.terabyteunlimited.com/kb/article.php?id=132

I use Defraggler when shrinking to see what's where on a partition and to defrag/move all data to the beginning, if needed, to prevent issues.
mashedmitten
 
Posts: 128
Joined: Sat Dec 03, 2016 7:16 pm

Re: resizing Ubuntu partitions

Postby Logman » Sun Mar 19, 2017 8:41 am

mashedmitten wrote:
> https://www.terabyteunlimited.com/kb/article.php?id=132
>
> I use Defraggler when shrinking to see what's where on a partition and to
> defrag/move all data to the beginning, if needed, to prevent issues.

Thanks for that M, didn't know there was a kb article for partition work in Linux 8-)

Haven't used defraggler for years, and not sure if it would even apply to a Linux partition and unlimited primaries.
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Re: resizing Ubuntu partitions

Postby TeraByte Support(PP) » Sun Mar 19, 2017 6:46 pm

You can resize the Ubuntu partition using either BIBM or IFL. Basically, any partitioning changes (create, delete, resize, slide, etc.) should be done in BIBM or IFL (or something else that supports EMBR disks) since you're using unlimited primary partitions.

You shouldn't need to do anything in Ubuntu for a normal resize. It should see the larger partition.
Assuming you had this:
[...misc. partitions...][Ubuntu 80][swap 20GB]
Delete the swap partition.
[...misc. partitions...][Ubuntu 80GB]
Resize the Ubuntu partition.
[...misc. partitions...][Ubuntu 95GB]
Recreate the swap partition.
[...misc. partitions...][Ubuntu 95GB][swap 5GB]

As with any partitioning changes, having a current backup is recommended before proceeding.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1087
Joined: Thu Aug 11, 2011 5:51 pm

Re: resizing Ubuntu partitions

Postby Logman » Sun Mar 19, 2017 9:05 pm

Thanks again Paul, perfectly clear for me now !! 8-)
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Re: resizing Ubuntu partitions

Postby Logman » Wed Mar 22, 2017 2:44 pm

Thought I'd say the resizing went ok, had trouble with the swap file ( again :roll: ) but when I followed PP's advice re formatting the swap file in a Terminal, it finally worked, resizing the main Ubuntu partition went fine without having to do anything.

Thanks again Paul, great support ! 8-)
Logman
 
Posts: 48
Joined: Fri Jan 16, 2015 11:10 am

Next

Return to Image for DOS/Linux/Windows