resizing Ubuntu partitions

User discussion and information resource forum for Image products.
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

Back for more advice, and thought it would be appropriate to have the discussion here being as it's related.

I would now like to resize the 80GB partition I created in the original topic above to 40 GB to make room for Linux Mint.

Is it okay to leave the 5GB swap file that I have at the end of the HD and use it for both installations, or should it be deleted and use 2 different swap file partitions for each version of Linux, or do I have to delete the swap file partition and recreate it after resizing the main Ubuntu partition, creating the new Mint partition, and use just the one swap file partition for both versions of Linux. ?

I'm assuming I can resize the Ubuntu partition the same way that PP recommended, without having to delete it, of course, goes without saying I'll have everything backed up before doing anything.
mashedmitten
Posts: 151
Joined: Sun Dec 04, 2016 2:16 am

Re: resizing Ubuntu partitions

Post by mashedmitten »

I've never re-sized with TB software so I don't know if it's intelligent. IOW, if contents that occupied the abandoned section are moved to the good. Like spiltting an audio file, cut in half and nothing moves. You still have data on both parts. Like I said earlier, IIRC, I use a program to see exactly where data is on a partition and if needed, another to move it to the safe zone. As others said, I don't know if it works on Linux formatted partitions. Anyway, this is the danger I forsee, but as you are prepared for that it shouldn't hit you that hard.

As to the Swap partition, seems more of a Linux question. Seems like common sense it would work like any data partition in Windows, any OS can see/access it, but common sense isn't always the winner. IIRC, you can point each Linux install to the desired Swap partition inside each OS. Seeing no permanent data is stored there from any OS, I see no reason not being able to share one.

Having said all that, you've got your ducks in order if all goes sideways, just do it and report back with the results. :mrgreen:
DrTeeth
Posts: 1289
Joined: Fri Aug 12, 2011 6:58 pm

Re: resizing Ubuntu partitions

Post by DrTeeth »

On Thu, 6 Apr 2017 05:25:37 PDT, just as I was about to take a herb,
Logman disturbed my reverie and wrote:

>Is it okay to leave the 5GB swap file that I have at the end of the HD and use it for both installations

YES! I have one swap file/partition for 7 distros. The trick is not to
format the swapfile during the install as that number will be
changed and only the last installed distro will recognise it and you
will need to do some clever terminal command line stuff to fix it.

When installing, just point to the install to the pre-existing swap
file. I used to have a swapfile per distro...but that is for noobs,
LOLZ.
--
Cheers,

DrT

"If you want to find out what is wrong
with democracy, spend five minutes with
the average voter." - Winston Churchill
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

mashedmitten wrote:
> I've never re-sized with TB software so I don't know if it's intelligent.

I used BIBM before to resize the original 40Gig to 80 and it worked great, better than Acronis IMHO, now I'm going backwards and resizing it back to 40, Getting old makes you do strange things :lol:

I'm debating about just getting a larger HD as the original in this machine is 500 GB and I have 4 Windows OS's, plus the Ubuntu, Swap & BIBM ones, there is lots of space on some of the other 4 HDs, but I prefer to keep all the OS's on the first one.


> Having said all that, you've got your ducks in order if all goes sideways,
> just do it and report back with the results. :mrgreen:

Will do...
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

DrTeeth wrote:
> On Thu, 6 Apr 2017 05:25:37 PDT, just as I was about to take a herb,
> Logman disturbed my reverie and wrote:
>
> >Is it okay to leave the 5GB swap file that I have at the end of the HD and
> use it for both installations
>
> YES! I have one swap file/partition for 7 distros. The trick is not to
> format the swapfile during the install as that number will be
> changed and only the last installed distro will recognise it and you
> will need to do some clever terminal command line stuff to fix it.
>
> When installing, just point to the install to the pre-existing swap
> file. I used to have a swapfile per distro...but that is for noobs,
> LOLZ.
> --
> Cheers,
>
> DrT
>
Thanks for the reply DrT !

That's good to know I can use the same swapfile for different distros 8-)
mashedmitten
Posts: 151
Joined: Sun Dec 04, 2016 2:16 am

Re: resizing Ubuntu partitions

Post by mashedmitten »

Could the swap partition be located on a separate disk? That would free up OS drive space. Just curious.
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

mashedmitten wrote:
> Could the swap partition be located on a separate disk? That would free up
> OS drive space. Just curious.

It's only a 5Gb one, and the Ubuntu 16.04.1 is using it so it makes sense to leave it for both, I don't know if you can have the swap file on another HD, if so I have lots of room on the other 4 HD's.
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

New situation, I bought a new 1TB HD to replace the 500GB HD0: drive as I was getting tired of running out of room for new OS's.

What is the best procedure, copy the whole HD ( don't have an external drive, but lots of free space on other internal drives ) with IFD or make an image of each partition and restore them in order, like I've done before ?

Currently have 7 Primary partitions ( using unlimited primaries obviously ) .

Only reason I ask is I've only restored back to the original HD before, but being as the new HD is twice the capacity I want to make sure I'm not missing something.
mashedmitten
Posts: 151
Joined: Sun Dec 04, 2016 2:16 am

Re: resizing Ubuntu partitions

Post by mashedmitten »

Check out the SSD won't boot thread, there are two methods covered, a 1 system and 2 system. I can't bring myself to look for links in that thread, still too painful. Besides, the other pain in my brain is telling me I better not. Just scan for links and read what's associated. Reading the whole thread is not advised if you value sanity.

The new drive is bigger, so I don't see any issues there.

With your setup, I'd go the 1 system route. For that, in that thread it gives an example where there's only one internal slot for HDD so one has to be external. With your internals, it might be as easy as changing boot order, setting new HDD as boot device after optical/ USB and removing the boot tick for the old. Then booting via Image media and doing the copy. Then switch physical locations of the drives in the case if you didn't do it at first or desired.
Logman
Posts: 112
Joined: Fri Jan 16, 2015 6:10 pm

Re: resizing Ubuntu partitions

Post by Logman »

mashedmitten wrote:
> The new drive is bigger, so I don't see any issues there.
>
> With your setup, I'd go the 1 system route. For that, in that thread it
> gives an example where there's only one internal slot for HDD so one has to
> be external. With your internals, it might be as easy as changing boot
> order, setting new HDD as boot device after optical/ USB and removing the
> boot tick for the old. Then booting via Image media and doing the copy.
> Then switch physical locations of the drives in the case if you didn't do
> it at first or desired.

After copying the old HD, either using full disk copy, or individual partitions, I was planning on taking the old HD out and putting the new one in and then restoring from the backups.

My motherboard, Asus P5K Deluxe, has 6 SATA slots, all occupied with 5 HD's and one Optical drive.
I'd have to remove one HD no matter which method I use for a restore so figured what I planned above was the simplest way.
Post Reply