Fedora 32 switch root won't start after upgrade

What you have tried to do other did it this way (in the time with success) [in the emergency shell]:

mount - o remount,rw /sysroot
rm -rf /sysroot/etc/os-release
cp /usr/lib/os-release /sysroot/etc
exit
My guess is that your case is different… you would have to do mkdir -p /sysroot/etc before doing the cp… because /sysroot/etc does not exist… because /sysroot is empty… which I guess is a problem (seems /sysroot is what will become your / filesystem I think… after a chroot there… at least this is my feeling)

I took a look at your patebin… one thing that I remarked is:

Apr 30 18:16:37 ds.lenovo.dh systemd-gpt-auto-generator[671]: EFI loader partition unknown, exiting.
Apr 30 18:16:37 ds.lenovo.dh systemd-gpt-auto-generator[671]: (The boot loader did not set EFI variable LoaderDevicePartUUID.)

Maybe you are booting in Inherited BIOS mode… where you could boot in UEFI mode.

Also:

Apr 30 18:16:37 ds.lenovo.dh systemd[1]: Condition check resulted in dracut pre-mount hook being skipped.

But it could be normal… I have no idea.

Hi there, as you can guess I’ve just tried updating Fedora from 31 to 32 and here I am :frowning_face:

Something I should note is that I had the exact same problem last week when I installed the proprietary nvidia drivers. My system wouldn’t boot and I would get the error “[FAILED] Failed to start Switch Root.”.
I then uninstalled the faulty driver using a live-usb to chroot on the partition where my system is.

Unfortunately I don’t have enough knowledge to relate the two instances of this problem but some of you might.

Now I realized your Grub entry seems very anormal:

Apr 30 18:16:19 ds.lenovo.dh kernel: Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.6.7-300.fc32.x86_64

If I compare with something like:

Mar 28 09:12:20 kernel: Command line: BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.5.11-200.fc31.x86_64 root=/dev/mapper/fedora_localhost–live-root ro resume=/dev/mapper/fedora_localhost–live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet
taken from: https://pastebin.com/FaxStfcL (found by Googling)

I begin to ask myself where is your missing part.

[Edit1] Might have a link with the the way we come to use https://freedesktop.org/wiki/Specifications/BootLoaderSpec/
but I think F30 was already using it. [/Edit1]

This issue could be relevant: https://bugzilla.redhat.com/show_bug.cgi?id=1765297
I’ll try the given suggestions tomorrow.

Hey again, as mentioned before, when I try mount -o remount,rw /sysroot I get mount point not mounted or bad option . Not sure what to do with that I must say.

Now we might have a lead with @deadgnom32 Grub’s issues as I had in the past many issues with Grub on this system, already when I upgraded to Fedora 30, in the past.
Edit: investigating further the issue, I have exactly the same values that @pauld pointed out, with the EFI loader partition unknown and weird Grub entry looking the same.

To also share my journalctl entry so we can see if I have the same issue, can I generate the file from Fedora live media? If I generate the file in emergency mode, will it be accessible via Live Media so I can copy paste it?

@antoine59 I imagine you followed this guide, maybe?

I had issues when upgrading to F30 with nvidia drivers breaking my grub as well and following instructions there did the trick at the time (it was a year ago so I’m a bit blurry on the details). I had to fix my grub at some point.

i also noticed the message about efi,
but it doesn’t throw an error. and i have only efi boot, configured, and the partition is marked as such.

i tried to reinstall everything from under chroot and yet, it looks different.
i will investigate this issue later today.
i have a couple ideas on what may cause this problem.

UPD:
I updated the system from chroot. and got grub entries fixed.
I reached the graphical login screen, but couldnt login neither on graphical login nor on tty. root or my user. both fail.
ON tty screen gets reloaded, and i land on

login: 

again and again

no, you generate the file in rescue shell.
then do

mkdir /d 
blkid # look at where your boot ext4 partition is 
mount /dev/$yourBootPartition /d
cd /d 
journalctl -b > journal.txt
reboot

then you have it saved to boot partition

I can confirm I solved my problem following this comment: https://bugzilla.redhat.com/show_bug.cgi?id=1765297#c11
My grubenv didn’t contain the needed arguments to give to the Grub command line.

2 Likes

So I struggled a bit (I think my partitions are a bit messed up on this system, I didn’t do the dual boot installing myself so is a bit confusing, it seems I have two EFI boot partitions on the system) but by regenerating grub files I don’t have the error anymore. But still, Fedora isn’t booting with another problem: after the “Start user manager” I just get a black screen with underscore on the top left corner (so no graphical UI loads) and is stuck there.

I’m not sure my grub regeneration fixed everything, or if this an unrelated bug caused by graphics drivers or something like that.

So I guess you can boot on a console (text mode screen) [by pressing Ctrl-Alt-F2 or Ctrl-Alt-F3) and enter your username at login: prompt. If you succeed to login there, you could use “sudo journalctl” command to read error messages near the end. You could return to the black screen with… Alt-F1 or Alt-F7 (not sure which, I sometime try a few until I get to graphical screen… (here black screen, which is not very useful).

Any keyboard command doesn’t seem to respond… I don’t think Gnome or User Manager even starts. It shows just an underscore for a while and then after about 20 seconds it shows an error and loops into it, not sure how I can log this in the journal (I can’t get rescue mode activated here) so I just took a good old picture of the screen, sorry if it’s hard to read:

Thanks @antoine59, this also solved my case!

Well… The first thing that surprised me a bit is the fact that it is stopping… maybe because it detected an error. Second thing is that the kernel say 4.16.3-301.fc28 … Fedora 28… seems quite old… there is no more recent kernel available when you boot? Also I saw that both i915 and nouveau seems loaded… maybe this is a laptop with an onboard i915 and a discrete Nvidia card… there might be a way to select one in particular in the BIOS… like ‘Discrete’ to only use the Nvidia… maybe that could help. The soft lockup on telegraf … I think it is not that much relevant… I think.

I am @deadgnom32, had to create another account to post this because of posting limitations for new users

I Resolved all issues and got my system fully functioning again.

  1. fix grub in any way described in this topic. I have it fixed by chrooting into the system and performing a simple dnf --refresh update which installed some new grub version and with this update grub entries got fixed

  2. afterwards i encountered an additional probem. on login -> root: No Shell: Permission denied -> lighting fast reset of tty -> login:. to see the error, had to make a video of the screen with my phone and play it at 0.1x speed. to FIX this, I chrooted again and did the following

    dnf remove selinux-policy\*
    rm -rf /etc/selinux/targeted /etc/selinux/config
    dnf install selinux-policy-targeted
    dnf install selinux-policy-devel policycoreutils-gui # only if these were uninstalled by dnf remove
    touch /.autorelabel
    
    

then reboot. autorelabeling will take a while, after this the system reboots again. Then everything was fine again.

UPD:
Additional good news:
I have a lenovo with ryzen processor and integrated graphics. And on F31 I had to put an amd_fix.sh script into /etc/profile.d in order to allow the system to boot normally instead of black screen.
With update to F32 I tried to remove this script and the system works fine still.
So if somebody uses this workaround, feel free to remove it.

1 Like

Hello, I updated my MacBook Pro 2014 Late Model to Fedora 32 from Fedora 31 and encountered the switchroot problem. My MacBook Pro is dual boot with MacOS High Sierra using the refind-0.11.5 boot loader. My root partition is located in a LVM2 volume. I solved the issue by following these steps:

  1. Booted my Macbook Pro from a Fedora 32 Live USB
  2. Set up the chroot by following these instructions, https://docs.fedoraproject.org/en-US/Fedora/22/html/Multiboot_Guide/common_operations_appendix.html
  3. Upgraded to kernel-5.6.8-300.fc32 from updates-testing
  4. Reinstalled grub2, sudo dnf reinstall grub2*

Hopefully this will help others with the same issue.

Cheers

1 Like

@deadgnom32 thank’s that helped me a lot :smiley:
Still having an unbootable system but at least I could backuped my data.

As far as I can undestand it or see it (it’s passing by so fast) the kernel is booting but it can’t load the modules and then systemd and co. can’t start. Currently I’m traped in a reboot loop.

Now it works and I can’t tell why :confused:

My system would not boot and gave this same error upon rebooting after some regular updates (not upgrading to a new Fedora release).

/sysroot was empty, and the kernelopts line in boot/grub2/grubenv was nearly empty with just rd.driver.blacklist=nouveau and nothing else, missing the root argument and everything else.

With help from #fedora IRC, I added the contents of the GRUB_CMDLINE_LINUX line in /etc/default/grub and also root=/dev/mapper/[machine-name]-root to the kernelopts line. After that my system booted fine.

I still don’t know what caused it. Like many with this issue, I also use proprietary nvidia drivers and they had gotten upgraded before the doomed reboot. Maybe coincidence? I haven’t been able to pinpoint the culprit.