Long range repartitioning plan

@oldcpu :

Just a few things for you to look into:

  • It’s possible to use more than one ESP (e.g. my system has an ESP (256MB) used by MS Windows and a second ESP (1GB) used by openSUSE Tumbleweed).

  • If you are planning to switch your bootloader (in the future) from GRUB2 to something else (e.g. systemd-boot) you need to keep in mind that some bootloaders might expect the kernel(s) and the initrd(s) to be placed on the ESP so it has to be large enough to handle this.

  • I don’t keep /home as a separate partition but have a separate partition (in fact a second SSD) to keep my personal data (documents, pictures, …) on. This partition is encrypted. This allows me to keep my personal data safe, to back it up and syncronize it across several machines quite easily. And if the device fails I do not have to worry to securely erase it.

  • If you don’t use MS Windows regularly but want to keep it “just in case …” you could consider putting it in a VM.

Years ago I used to do this (with an old copy of Windows-XP) in Virtual Box, … but over 5 years ago I stopped doing such.

It mostly boiled down my no longer having to use a custom MS-Windows app (for satellite health monitoring for the office where I used to work) and to MS-Windows licensing, … given I do not want to go through the hassle of either trying to transfer an MS-Windows install license, nor do I want to buy a new MS-windows license. For the amount of time I use MS-Windows (typically only in tax season when filing an income tax return (and having custom MS-Windows app involved)), it was not worth the cost (in my view) to buy an new MS-Windows license.

Given I use an Ultrabook (Lenovo X1 Carbon gen 9) there is no room in this ultrabook for a 2nd SSD.

Having typed that, I recently purchased a separate 1TB SSD, and bought an inexpensive USB-3.1 SSD enclosure, and with the 1TB SSD inside the SSD enclosure, I installed LEAP-15.6 and I tested successfully booting from that SSD enclosure (with the 1TB SSD and LEAP-15.6) from 3 different PCs.

But that was driven by a desire for that 1TB SSD to be my ‘backup’ PC (when used with my wife’s backup PC (running MS-Widows), which is a Lenovo-X1-Carbon-gen-4.

My wife and I now thus share the same ultrabook as our ‘backup PC’.

Previously, as my ‘backup laptop’, I had an ancient Toshiba Z930 ultrabook with openSUSE (old, but it had a core-i7 and good sized SSD) which I liked a lot !! , but my wife decided we had to give the Toshiba away to charity BEFORE it was too old.

So that drove me to go for the external SSD (for openSUSE) as my ‘backup’ and share my wife’s backup laptop (Lenovo X1 carbon generation-4) with her. So she can boot that ‘backup’ laptop using the internal SSD (with Windows-10) and I boot that ‘backup’ laptop using the external USB-3.1 enclosure SSD (with LEAP-15.6). … The enclosure is INCREDIBLY small, making this suitable.

Sometimes family aspects come into play more than what might otherwise appear to be a more logical course of action.

Interesting. I had not considered that approach. It suggests I could move from this:

Device            Size Type
/dev/nvme0n1p1    260M EFI System
/dev/nvme0n1p2     16M Microsoft reserved
/dev/nvme0n1p3    78.1G Microsoft basic data
/dev/nvme0n1p4    25.1G Linux filesystem ( / ) 
/dev/nvme0n1p5    1000M Windows recovery environment
/dev/nvme0n1p6    16.4G Linux swap
/dev/nvme0n1p7     833G Linux filesystem ( / home)

to this:

Device            Size Type
/dev/nvme0n1p1    260M EFI System (for MS-Windows)
/dev/nvme0n1p2     16M Microsoft reserved
/dev/nvme0n1p3    100G Microsoft basic data (Windows-10)
/dev/nvme0n1p4   1000M Windows recovery environment
/dev/nvme0n1p5      2G EFI System (for LEAP-16.0 and newer LEAP versions)
/dev/nvme0n1p6      50G Linux filesystem (/ )
/dev/nvme0n1p7   ~ 797G Linux filesystem (/home)

I believe it would thus mean I only have to remove the Linux partitions ( /swap , / and /home) where I have a LOT of confidence to remove, repartition, and install, and I then only need to move the “1000 M Windows recovery environment” by about 22GB to make space for the 78.1G Microsoft basic data (which is Windows-10) to expand to 100 GB.

That might mean (I suspect) that the MS-Windows BCD file (in /boot/EFI ) could still find the Windows-10 boot code. In that case perhaps Windows-10 would only complain after booting about an increase in its partition size, but not need a Windows recovery USB to be ‘happy’ with the new configuration.

But I wonder thou, if then the “1000 M Windows recovery environment” would be unusable (with its partition not find-able), in which case maybe the MS-Windows recovery boot USB may still be needed.

I think it might be a good idea for me to search on this (and learn about this) so that I can better evaluate this possibility.

I have a new partitioning proposal (based on the input given to me in this thread) … that being to preserve the start position of the MS-windows partitions and only increase in size the Windows-10 partitions. And as suggested above in this thread, have GNU/Linux work around it with a separate EFIs for Windows and Linux (I will need how to research that … in terms of mount locations, although I have some ideas).
.
Hence I am now considering:
.

Device            Size Type
/dev/nvme0n1p1    260M EFI System (for Windows-10)
/dev/nvme0n1p2     16M Microsoft reserved
/dev/nvme0n1p3  101.2G Microsoft basic data (Windows-10) [same start position ~ ]
/dev/nvme0n1p4    2.0G EFI System (for Linux)
/dev/nvme0n1p5   1000M Windows recovery environment [same start position ! ]
/dev/nvme0n1p6      50G Linux filesystem ( / ) (openSUSE-LEAP-15.6)
/dev/nvme0n1p7   799.4G Linux filesystem ( / home)

This gives MS-Windows 1.2G more than I intended, but I can live with that.

If my math is correct, then the ONLY MS-Windows partition that will change is the Windows-10 partition which will be increased in size. The others will remain in the exact same location on the SSD.

I think this is very doable with gparted live USB. Likely I will have to clean up thou the old openSUSE files that are in the 260M EFI partition (which will be reserved for MS-Windows-10’s files … a bit of an overkill for size but I can live with that also).

Please don’t get me wrong. I have no intention to bother you or to talk you into something. I just want to point you to some aspects you might not have considered yet.

There is a tool which converts an existing MS Windows installation into a VM image.

If the MS Windows license key is hidden in the UEFI it can be retrieved with

strings '/sys/firmware/acpi/tables/MSDM'

Using a second SSD is just a “nice to have”. A separate partition will do.

My aim is to strictly separate personal data from any system data. So my /home is just a directory within the root partition which only keeps the configuration data for plasma, firefox, etc. and the “real” data is sym-linked from my data partition to directories beneath my /home directory.

This allows me to encrypt just my personal data (and I have to open this encryption only when I want to use this personal data).

That is basically what one of my systems looks like except that I do keep a separate data partition and no separate partition for /home.

I have GRUB2 on my second ESP (your /dev/nvme0n1p5) and can boot MS Windows (your /dev/nvme0n1p3) and openSUSE (your /dev/nvme0n1p6) from the GRUB2 menu.

However I’m just beginning to learn about BLS-bootloaders like systemd-boot and therefore can’t tell if those will be able to do the same.

Nice, that way you are also less likely to corrupt or overwrite the NTFS mirror Master File Table, since it will stay within the boundary of the new NTFS filesystem.
(See ntfs.com for additional details)

I think I will make a small modification to my partition planning, which surprises me I did not think of it before.

I rarely use MS-Windows. Mainly I use it in April every year at tax season to run a certain application, and every now and then (i.e. a couple times/year) I may boot it to do security updates. I had windows-10 down to 78GB and I found it too painful as I reduced the file size too much. So in an bit of an arbitrary fashion I decided in my plan to choose to increase the MS-windows-10 partition to 100 GB. I also selected in create a 2.0 GB EFI system (FAT32 format) for GNU/Linux.

But when I did the ‘math’ (which I concede is approximate) it worked out to 101.2 GB for Windows-10, and as noted the above gave this (which I posted prior on this thread):

Device            Size Type
/dev/nvme0n1p1    260M EFI System (for Windows-10)
/dev/nvme0n1p2     16M Microsoft reserved [same start/end position ~ ]
/dev/nvme0n1p3  101.2G Microsoft basic data (Windows-10) [same start position ~ ]
/dev/nvme0n1p4    2.0G EFI System (for Linux)
/dev/nvme0n1p5   1000M Windows recovery environment [same start/end position ! ]
/dev/nvme0n1p6      50G Linux filesystem ( / ) (openSUSE-LEAP-15.6)
/dev/nvme0n1p7   799.4G Linux filesystem ( / home)

Again, I posted the above earlier in this thread also (I repost here to make any comparision easier).

But sometimes I tend to be a bit slow. I think I was too fixated on ONLY allocating 2GB for the EFI system (FAT32 partition) for Linux. It occurred to me last night, when walking after dinner (for exercise) that I should keep MS-Windows at 100GB like originally planned and instead slightly increase the Linux EFI FAT32 partition even more. My logic being that I boot daily to openSUSE and rarely use MS-Windows. So put the extra space in the place that I use a lot more.

So my new, slightly tuned plan is (with larger EFI FAT32 partition and smaller Windows-10 partitions):

Device            Size Type
/dev/nvme0n1p1    260M EFI System (for Windows-10)
/dev/nvme0n1p2     16M Microsoft reserved [same start position ~ ]
/dev/nvme0n1p3    100G Microsoft basic data (Windows-10) [same start position ~ ]
/dev/nvme0n1p4    3.2G EFI System (for Linux)
/dev/nvme0n1p5   1000M Windows recovery environment [same start position ! ]
/dev/nvme0n1p6      50G Linux filesystem ( / ) (openSUSE-LEAP-15.6 or LEAP-16.0)
/dev/nvme0n1p7   799.4G Linux filesystem ( / home)

I am still surprised at myself for not considering this earlier.

Again, the start position of the MS-Windows partitions will remain unchanged, and only Windows-10 will change size (getting larger).

There are still 3 months before I attempt the above, so I am asking myself, how many more times will I change my mind? :smiley:
.
And as a side note, I asked myself, is my 1000M Windows recovery environment actually functional? It would be silly to spend time trying to preserve it if it doesn’t work.

So last night I booted to Windows, and followed some key sequence (which I now forget) to launch the Windows recovery environment, going to an MS-Windows-10 troubleshooting mode. At that point, I stopped, so not to break my current GNU/Linux install, but I think that confirmed the 1000M Windows recovery environment on this laptop is still alive and well, and my past GNU/Linux installs on the laptop never broke that.
.

As tckosvic already mentioned above, I would change the size of Win partitions with the Win utilities. I once tried to trim one (to get free space to install Mageia) with gparted, and that didn’t work out too well. But that’s a few years ago, so things might have changed.

1 Like

That is your personal opinion (non technical FUD). Slightly advanced users know how to use other filesystems.

Every partition size is fixed as it is limited by the physical drive size (except you use LVM, but that is also fixed due to the amount of used drives).

Every filesystem has it advantages and disadvantages. And every user/admin has other needs and strategys. This includes having fixed size partitions, even if some users don’t want to aknowledge that.

1 Like

Thanks for the suggestion. LVM indeed may be a good approach for most. …

But …

But I want maximum speed with the SSD for video processing on this laptop (with scripts that use ffmpeg and also many heavy read/write operations to SSD).

My understanding is LVM typically entails a 0.1-0.5% overhead - which is the price one pays for the superb flexibility in partitioning that LVM provides. … i know - insignificant difference for most - but … I prefer the very very very small speed increase by avoiding LVM - making me a bit unusual in that regard.

I also prefer EXT4 over BTRFS which also makes me a bit unusual (where I believe EXT4 can be as much as 10-20% faster than BTRFS for large video file operations).

This is VERY specific to me. I believe most could be better off adopting BTRFS.
.

@oldcpu the only real way is to try the different filesystems in say some separate partitions and do some benchmarking and tweak as required eg io schedulers, cpu tuning on your hardware. I suspect the out of tree zfs filesystem may help.

Did you consider to buy a new 2TB SSD instead (So you don’t have to shrink anything)? Actually I have two 2TB SSDs in my laptop, configured as RAID (VMD/IRST). That allows to configure “logical drives” (unfortunately only two), So I made one drive for Windows and another driver for Linux. So from BIOS I can boot from either “disk”, and it’s easier to make Windows leave Linux alone, and vice versa.
Unfortunately Leap still insists to overwrite the Windows boot sector with GRUB as if BIOS can’t bot from the second disk these days.

A word of Warning: Converting Windows from non-RAID to VMD-RAID was a very painful experience (believe it or not: Latest Windows does not have the necessary drivers included, so it won’t find a disk to install to. And when restoring a backup onto the VMD RAID sucessfully, Windows still can’t boot as it doesn’t have the drivers to access the RAID)

I did (consider).

A great idea I think.

However - lol ! my wife takes a dim view toward my some of my computer acquisitions … :slight_smile: … and my hope also is to replace this Lenovo Generation-9 with a new laptop (in a year or so), possibly the Lenovo Generation-13, although at present that Generation-13 Lenovo laptop has webcam issues with GNU/Linux.

If I purchased a 2 TB now, I would have difficult time convincing my wife in one year’s time I need a new laptop … :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.