How does the installer decide

Liam Proven lproven at gmail.com
Tue May 4 09:54:30 UTC 2021


On Tue, 4 May 2021 at 09:04, Grizzly via ubuntu-users
<ubuntu-users at lists.ubuntu.com> wrote:
>
> I have in the past used gParted to re-size partitions, it always took an age to
> do, but when installing it seems to do the sizeing and moveing about much
> faster?

There are a lot of variables here, and I've noticed that for many
people, this stuff seems to be black magic and they therefore can't
apply logical reasoning to it.

A few pointers:

* Filesystems mostly tend to fill up from beginning to end
- A few files may be put on the end for some reason but they're rare
- Therefore, if you resize the end, it's fast: only a few things need
to move, mostly it's just resetting a few variables for where the end
is. This takes seconds.
- If you move the beginning, or move/copy the whole thing, then many
hundreds of gigabytes must be moved. This takes ages.

* The files that get put at the end are often things like swap files.
These contain nothing useful when the system is not running.
- Therefore, delete them before you start!
- Run Windows Disk Cleanup. Tick all the boxes: delete everything. Run
it. Then do it again but click "clean system files".
- Disable hibernation
- Then run `CHKDSK /F`
- Then shut down and using Linux, delete PAGEFILE.SYS
- Et voila: you've got rid of many tens of gigs and the move takes
half an hour less.

* If you multiboot >1 Linux distros, you can share 1 swap partition
between all of them. You can't do this with swapfiles, so use
partitions. Saves tens of gigs.

• If you multiboot Linux distros, you can share 1 /home partition
between all of them. Just use different user names: result, total
separation.

* Remember, MBR disks can only have 4 primary partitions. Work out if
Windows has created any unused/unneeded partitions. If so, remove
them. Linux can live entirely in logical partitions in an extended
partition, so do that.

[
  /dev/sda1: Windows reserved
]

[
  /dev/sda2: Windows C:
]

[
  Extended partition /dev/sda3
    [
       /dev/sda5: Linux #1 /
    ]
    [
       /dev/sda6: Linux #2 /
    ]
    [
       /dev/sda7: Linux #3 /
    ]
    [
       /dev/sda8: Linux /home
    ]
    [
       /dev/sda9: Linux swap
    ]
]

Easy.

You _can_ duplicate all those /home and swap partitions, but why
bother? It achieves nothing at all, it's more complicated, it's harder
to implement, and it burns disk space even on terabyte-class drives...


-- 
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053




More information about the ubuntu-users mailing list