July 10, 2018

Genius degenerates rule this world

Genius degenerates rule this world

No one argues that Linux developers are genius. They did tons of work and gave us a complete OS bundled with thousands of programs for all walks of life and tasks. Genius!

But at the same time those geniuses are degenerates, because they do all this fabulous work without considering the needs of their user, and end up releasing junk OSs not good for any serious application.

It pisses me off that when Fedora is installed using LVM with full disk LUKS encryption, every bloody Fedora version names the volume group just that: fedora. It should have occurred to those geniuses, that they just crossed over any possibility for a version upgrade for everyone using LUKS, as there can be no two volume groups active at the same time with the same name! I.e. if we cave in to constant pressure to stay at the bleeding edge and continue upgrading the OS major version every year, we would need to move our files from the old system to the new one (as in Linux upgrades never work - a new install is required). But moving files is not possible, as while LUKS volume is open, no other volume can be open if it lives on the volume group with the same name!!!

So the upgrade turns into a nightmare of entering dozens of commands with GUID parameters, bearing high risk of irreparably damaging both old and new system (as in Linux every command may have catastrophic results).

One of the critical commands is vgs and it is used to determine the GUID of the volume group to rename. Guess what: it does not tell you which group is which in its output! If you are looking at two records named 'fedora' and your drives happen to be the same size (as it often happens at organizations), making a mistake is very easy.

Genius? Most certainly. Degenerates? Damn right! Name the [expletive] volume groups at least after the Fedora version: fedora25, fedora26... Too hard? You are already using those stupid GUIDs, why making a U turn at the same time?

So now for something completely different: steps to make your new Fedora installation the tiny bit usable...

There is no such guide for Fedora that I am aware of, but the guide for CentOS (from the same obnoxious trolls at RedHat) will leave you dead in water as it does not mention the most important part: removing the swap references from grub.cfg file. If you leave them there, the system will not boot past entering LUKS password.

If after the install you know you do not need swap due to having enough physical RAM, you can perform the following steps:

su -
Password:
swapoff /dev/fedora/swap
vgremove /dev/fedora/swap
vgextend -l 100%FREE fedora /dev/fedora/home
resize2fs /dev/fedora/home
vgrename fedora fedoraN

Where N is the release version number and some random text, for instance 28a to uniquely identify this volume group and finally make work those popups in KDE and Mate which appear when you attach a drive from another Fedora to your system. Without renaming the volume group those popups do nothing after entering the password, and there is no error message - they just close without mounting anything in the best traditions of the "open source community" whatever it is.

The last steps are to remove mounting of the swap partition from /etc/fstab and most important references to fedora/swap from /boot/grub2/grub.cfg and change /dev/fedora to /dev/fedoraN where N is what you have used to rename the VG.

Now when comes upgrade time and you put the future new version on a new hard drive or SSD, and attach the old one to move your files, those password popups will actually result in mounting of the old drive's volumes under /run/media/username and allow you to use Dolphin, Caja, MC or command line to migrate without having to jump through the hoops to try mounting the old volume.

Posted by: LinuxLies at 09:49 AM | No Comments | Add Comment
Post contains 662 words, total size 4 kb.




What colour is a green orange?




17kb generated in CPU 0.0077, elapsed 0.0383 seconds.
35 queries taking 0.0334 seconds, 126 records returned.
Powered by Minx 1.1.6c-pink.