this post was submitted on 24 Aug 2023
17 points (94.7% liked)

Linux

48185 readers
1174 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I suddenly got the same problem in /efi/loader/entries all conf files reverted to previous uuid (first post ). To change uuid I just edited all conf files with the correct uuid for root.

I don't know if manually changing was correct or if I should use some sort command.

Bootctl status

UUID in status is wrong.

I have no idea what is reverting UUID back to the wrong one after updating system.

I could just reinstall but if possible I would like to try to fix this and learn.

Edit: Problem was that in /etc/kernel/cmdline had wrong UUID. Changed it to correct one and dracut-rebuild uses correct UUID.

top 22 comments
sorted by: hot top controversial new old
[–] krnl386@lemmy.ca 10 points 1 year ago (4 children)

I presume these are filesystem UUIDs. I also presume from your other post, that you used a live USB to fix nvidia drivers? Note that nvidia driver installers/packages trigger a initrd rebuild, and if you do that in a live environment, it’s possible that you will get the UUID of your live USB filesystem and not your actual boot drive… at least that’s my guess.

If you booted into a live USB you need to make sure that you chroot into your install on your disk whenever doing any operations on the boot loader. That involves mounting your actual disk (eg, /dev/nvme0p1) somewhere on the live USB (eg, /mnt/example), then bind-mounting the proc, sys, dev, tempfs filesystems under /mnt/example/proc, /mnt/example/sys, etc. You may also need to mount /efi under /mnt/example/efi or boot/efi (wherever you have it in your system). Next, chroot to /mnt/example. You should now have a fully functional install you normally boot into, with the only difference being that the kernel booted off the USB drive. Now you can try reinstalling drivers, rebuilding initrd, reconfiguring the bootloader, etc. Since you’re chrooted, the system should see the proper UUIDs, in theory…

If you want a more comprehensive tutorial on how to do this, look for bootloader fixing tutorials.

[–] 30021190@lemmy.cloud.aboutcher.co.uk 3 points 1 year ago (2 children)

I think the gentoo install guide will be helpful for this chrooting...

[–] krnl386@lemmy.ca 3 points 1 year ago

Gentoo and Arch docs in general are amazing.

[–] Endrom@lemmy.ml 0 points 1 year ago

Will have a look.

[–] Endrom@lemmy.ml 2 points 1 year ago (1 children)

I managed to find a problem and fix it. The problem was that /etc/kernel/cmd had the wrong UUID. Thanks for giving advice about initrd and bootloader reconfiguring, might not have found a solution without it.

[–] krnl386@lemmy.ca 2 points 1 year ago (1 children)

Ah, that would break things! Any idea how the incorrect UUID got into the kernel boot parameters?

[–] Endrom@lemmy.ml 2 points 1 year ago* (last edited 1 year ago) (1 children)

It probably happened when I was messing with SSDs. I wanted a smaller one to be root and a bigger one as home.

Edit: Kind of happy that i managed to break something and fix it.

[–] krnl386@lemmy.ca 2 points 1 year ago

That is how you learn! Actually one of the best ways to learn, IMHO.

[–] BradleyUffner@lemmy.world 2 points 1 year ago (2 children)

Your post is incredibly informative and helpful, so this isn't aimed at you at all, but this kind of fix is why Linux is not ready for the everyday average user.

[–] mvirts@lemmy.world 3 points 1 year ago (1 children)

Meh, it could be done in a repair utility, but there's no central power to distribute it and systems can be setup in too many different ways for it to make sense. This is part of the advanced Linux learning curve, not necessary for regular use. Windows can get hosed as well but requires a reinstall because tools like this are not easily available (or you fix windows with Linux).

[–] krnl386@lemmy.ca 2 points 1 year ago (2 children)

Windows is difficult to repair mainly because of the registry, IMHO. Microsoft’s claims that it should never require cleanup doesn’t really make sense… it’s the most practical advice given how convoluted it is, but the fact that a database that keeps getting written to constantly doesn’t ever need any kind of maintenance just doesn’t make sense to me.

[–] mvirts@lemmy.world 2 points 1 year ago (1 children)

I still don't understand why windows has the registry as well as per user appdata and some configuration files buried in windir. Even if the registry was just dumped into files, the space requirements would be minimal by today's standards (yeah it's a lot of small files, so maybe there's something to be done there, but still a file based system would do) aaand caching and hashing will still work just fine.

[–] krnl386@lemmy.ca 2 points 1 year ago

Legacy API and app behaviour support. Ironically replacing the registry with something more straightforward would be relatively easy, unlike adding support for storing home directories on a drive other than C. Technically you can mount a different filesystem under c:/users to achieve this, but AFAIK that’s neither supported nor trivial to do.

I tried doing it, and gave up. Sure, most software will respect the path changes in the user’s registry hive, however, every once in a while a program will just assume that your home dir lives under c:\documents and settings$username - and that’s when it all goes south. Really frustrating this lack of consistency.

All in all, the OS is riddled with hacks and “supports” for legacy runtimes and behaviours. Heck, my username is poking fun at the fact that Windows 7 had support for the 386 (yes, Intel’s 80386 processor from the late 80’s) enhanced API. Windows 7…. My username is a “tribute” to a file called krnl386.exe that implemented a bunch of legacy API calls like how much RAM a system has or whether or not the OS is running in “386 enhanced mode” that were relevant back in Windows 3.x days… and still supported in Windows 7. That pretty much sums up why Windows is, and always will be, a hot mess.

[–] mvirts@lemmy.world 1 points 1 year ago

Lol we need regfs, so we can edit the registry with awk and sed.

[–] krnl386@lemmy.ca 1 points 1 year ago

To be fair, average users would never (or should never) encounter such an issue. The person asking uses Arch (I think?) which is by far not an “average person” distribution.

[–] Endrom@lemmy.ml 1 points 1 year ago (1 children)

I used arch-chroot. I mounted efi to efi dir with mount and used mount -o subvol=@subvolname to sub vol dir. Just incase i will reinstall nvidia drivers when booted normally. I will read about initrd. Thanks for all the info.

[–] krnl386@lemmy.ca 2 points 1 year ago* (last edited 1 year ago) (1 children)

I think the key would be figuring out where this extra UUID is coming from. Maybe next time you try this, make a note of all the UUIDs on your system (including the bootable USB) and see which one ends up in the bootloader config.

Knowing what’s happening can help guide your Googling to find out why it’s happening and how to fix it.

[–] Endrom@lemmy.ml 2 points 1 year ago (1 children)

I used gparted, blkid, checked fstab and by-uuid dir and no partition or drive had that UUID.

[–] krnl386@lemmy.ca 2 points 1 year ago (1 children)

Weird… the only thing I can think of is that maybe the UUID changes on every boot with live USBs, since the root filesystem is ephemeral …

[–] Endrom@lemmy.ml 1 points 1 year ago

I think I found what changes root UUID. When I used dracut-rebuild all entrie UUIDs changed to the wrong one. Now I have to find how to stop that.

[–] BCsven@lemmy.ca 2 points 1 year ago (1 children)

I'm out of my element here, but is it something about running grub-mkconfig

[–] Endrom@lemmy.ml 1 points 1 year ago

I have systemd-boot.