Originally Posted by
AbleTassie
[/B][/U]QUESTION: I am thinking that since LVM can be modified on the fly, I may be able to set up my LVM with my current Lubuntu/Windows 10 dual boot, rather than wipe out the Lubuntu and Windows > then set up my LVM > then install Lubuntu and Windows. Is this correct?
If this is correct, do you (or others) have any suggestions as to how to do this without screwing up my present dual boot?
I don't dual boot and haven't in over a decade. I put MS-Windows into a VM.
I think laptops need to be encrypted. All portable devices do and doing encryption for multiple booting OSes is just too much hassle for me. So, on a laptop, I simply check the "Encrypt + LVM" checkbox and let the installer do its thing (wiping the storage completely is step 1).
Post-install, I boot from the live-boot-installer, mount the LUKS partition, then lvreduce the "root" LV, add a "home" LV, add a "var" LV and mount those where needed, carefully moving over any files that were placed on /var and /home during the install. I'll delete the "swap" LV and create a new "swap01" LV of the size I want (always 4.1GB for non-servers), and finally, I'll fix the fstab for the installed area to mount these LVs using /dev/{vgname}/{lvname} links.
Here's the last df -Th output from the last time I booted the laptop with all the junk removed (loop and fake storage items). It has been over a year now.
Code:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 25G 19G 4.3G 82% /
/dev/sda2 721M 261M 424M 39% /boot
/dev/sda1 511M 4.5M 507M 1% /boot/efi
/dev/mapper/ubuntu--vg-stuff 99G 65G 30G 69% /stuff
/dev/mapper/ubuntu--vg-home--lv 74G 23G 48G 33% /home
That storage on the laptop was setup in 2018, so I've changed how I do it. As part of my backups, I capture some storage information. Back then, I'd dump lvdisplay to a file. The egrep 'LV Path|LV Size' lvdisplay.txt important things:
Code:
LV Path /dev/ubuntu-vg/root
LV Size 25.00 GiB
LV Path /dev/ubuntu-vg/swap_1
LV Size <4.46 GiB
LV Path /dev/ubuntu-vg/home-lv
LV Size 75.00 GiB
LV Path /dev/ubuntu-vg/stuff
LV Size 100.00 GiB
The storage in that system is a 500G SATA SSD. As you can see, I've allocated less than 50% and I'm using about 50% of that. "stuff" is an area that doesn't get backed up. It is for temporary workspace. For me, a laptop is never a trusted system. It can be wiped without any real data loss expected. Important data is kept elsewhere, unless it is being actively worked.
lvreduce is a hassle and dangerous, so it is best handled immediately after install when the risks for data loss are smallest. I think I have a diagram showing this ... see attached.
Hope this helps.
As for MS-Windows, run that in a virtual machine. I run it on a VM on a Ryzen system not on a laptop. Remote access using SPICE into the Windows VM is easy to setup. SPICE makes remote access nearly as fast as local access and only works for KVM-based VMs. Most of the time, I'll use an LV for the storage of each VM, but I don't do that with MS-Windows. My Windows VM is from 2008-ish, so migrating it from file-based storage has some risks. OTOH, I've migrated it from system to system 3+ times and not needed to 'reactivate' it thanks to KVM virtualization.
With Linux, the migration between systems is nearly risk free, assuming you have good backups. No license validation needed or license tracking for paid software. That is very freeing.
Anyway, I don't have the best advice for someone who feels dual booting is a good idea.