[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Are the assigned capacities sufficient for my setup?



On Wed 29 Jul 2020 at 09:38:56 (-0700), Charlie Gibbs wrote:
> On Wed Jul 29 08:39:26 2020 Andrew Cater <amacater@gmail.com> wrote:
> 
> > You _can_ use guided partitioning as a guide. Use Windows to
> > reduce the amount of space it takes on the disk. Use Windows
> > tools to format the second half of the disk, or whatever to vfat.
> 
> Note that with NTFS you can't shrink the Windows partition to less
> than half its size.  NTFS creates a Master File Table smack in the
> middle of the partition, and it's immovable.  Well, generally -
> if you go to https://www.raxco.com you'll find a utility called
> PerfectDisk, which with minor handwaving and a reboot or two can
> move the MFT.  You can download a demo that will work long enough
> to do the job.  Repeat as necessary; I shrank the NTFS partition
> on my formerly Windows-only laptop from 250GB down to 45GB.

I would call that a little pessimistic (though not your end-result).
I reclaimed 61% of a Windows partition using only its own tools.

Here are my notes (indented) of what I did, and some annotations:

    Type here to search → Control Panel
    System and Security
    Administrative Tools
    Free up disk space, then Defragment and optimise drives
    https://technet.microsoft.com/en-us/library/cc731894(v=ws.11).aspx

BTW I have no idea what "optimise drives" means or does.

    Type here to search → Disk Manager
    Create and format hard disk partitions
    Click on C:
    RightClick on C:
    Shrink Volume…

    gives ~38GB

ie, a small amount so far, indeed.

    I haven't managed to force shrink to attempt to move a file and
    reveal which file is causing the problem.

But this was sufficient to hold the owner's most important files, so …

    Click on free space
    RightClick on free space
    New Simple Volume
    M:
    NTFS

    File manager
    Copy selected directories of [owner]'s files to M:
    Deleted the originals on C: (in Documents)

    Using
    https://www.disk-partition.com/articles/shrink-volume-with-unmovable-files-4348.html

    Type here to search → System Protection
    Set no protection on C:
    Delete all existing checkpoints

    That was enough to be able to shrink the partition sufficiently.

… by repeating the first steps above.

I copied the files back to C: afterwards, of course, and deleted M:.

The following was repeated five times …

    A new partition was made in windows and formatted at exFAT with
    the name linuxlinux for identification purposes.

    In Disk Manager, Click on the free space, then RightClick on it.
    New Simple Volume
    Set the size
    Assign no letter
    exFAT or FAT as offered
    Volume Name as appropriate (will be changed later)
    Finish

    Repeat as necessary.

… to convert one Windows partition into:

5          4892672       347348991   163.3 GiB   0700  Basic data partition
6        347348992       429268991   39.1 GiB    8300  Linux-A
7        429268992       511188991   39.1 GiB    8300  Linux-B
8        511188992       883275775   177.4 GiB   8300  Linux-Home
9        883275776       883292159   8.0 MiB     EF02  Linux-BIOS-Boot ¹
10       883292160       892084223   4.2 GiB     8200  Linux-Swap

where 5 is the remaining shrunken remnant, 39% of the original.
Note that all the heavy lifting was done with Windows' own software,
so that it would have no reason to be unhappy with the result.
I then changed the partition information (type code, LABEL and
PARTLABEL) in linux, and returned to Windows to tell it to
completely ignore these partitions. This last is to avoid Windows
nagging about wanting to reformat these strange partitions.)

> As for partition sizing, I set up my machines with three partitions:
> /, /home, and swap.  If you're going to be installing lots of software
> on your machine (especially games), I'd recommend setting aside 20 or
> 30 gigabytes for /, since /usr can get pretty large.  I learned this
> the hard way after getting caught behind the 8-ball after a kernel
> upgrade.  Fortunately, gparted came to the rescue, allowing me to
> shave 10GB off /home and give it to /.

I made my (twin) root partitions a little on the generous side, as
I intended at some time in the future to wipe the rest of the disk
and devote it to linux. During the ascendancy of this laptop, both
root filesystems (one stretch, the other buster) have hosted the
apt-cacher-ng cache for jessie/stretch/buster i386/amd64 installations.

(With hardware rot, the machine's future is no longer so assured.
It no longer runs my apt-cacher-ng cache.)

> I use the old rule of thumb
> of twice memory size for swap, and give what's left to /home.

OTOH I think I was rather generous with swap (1 x 4GB memory).
About the only thing that disturbs it is xpdf's current memory
leak (#926501/#942086/#945188).

> You definitely want /home in its own partition - it makes life
> much easier when doing upgrades, since you can completely wipe
> out / while leaving /home intact.

Agreed. It also simplifies encrypting /home if it's in a separate
partition (swap too). I don't encrypt root because it complicates
remote booting/unlocking.

> (Needless to say, though, I
> back up /home regularly, plus /etc and /usr for good measure.)
> 
> BTW please don't top-post.  Not all of us are Jeopardy fans.

¹ I boot linux with the BIOS, so Grub needs this reserved area
  for its Stage 2.

Cheers,
David.


Reply to: