For the last couple of kernel upgrades, I have been unable to boot my new kernel installations.
I receive the following fail messages:
Failed to switch root: Specified switch root path ‘/sysroot’ does not seem to be an OS tree. os-release file is missing.
and
Failed to start initrd-switch-root.service - switch Root.
I have looked at this thread: https://discussion.fedoraproject.org…tch-root/75275 which seem to be the same issue.
However,
My /sysroot is empty
I have no /boot folder
I have no /etc/default folder
I have no /etc/kernel folder
My last working installation was FC38 6.4.7, which is unfortunately also broken now.
My latest installed kernel is FC38 6.5.10
Any help to get this fixed will be appreciated.
Thank you
This seems to imply you are running one of the immutable variants and not the vanilla Workstation release. You also fail to tell us which version, which kernel, etc.
Even the one line output from the command uname -a would be more informative than what has been posted so far. The output of inxi -Fzxx would be even better.
Hi Jeff, thank you for looking into this.
uname - a gives this:
Linux localhost.localdomain 6.5.10-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 2 19:59:55 UTC 2023 x86_64 GNU/Linux
The inxi command isn’t installed, it returns “command not found”
When it shows command not found it should also suggest installing the appropriate package for that command. The inxi command is in the inxi package.
The 6.5.10 kernel is behind the latest in F38. You have not stated which spin of fedora you are using so we still cannot tell exactly what the problem is.
Try using sudo dnf upgrade --refresh then post that command and all the following output so we can actually see the errors. Of course if you are using a spin that uses ostree then the dnf command won’t work.
Hi Jeff
I am sure that I am using a standard installation of Fedora workstation.
Normally, sudo and dnf would run on my setup, but in the emergency mode I have access to, both sudo and dnf responds with “command not found”
Do you have an install media usb device that may be used to boot to a live environment where repairs may be done?
If you do then please boot from the usb and we may attempt repairs that way. What I would like to see from the live system is lsblk -f. Now that I understand you are in emergency mode it is easier to plan the repair.
[liveuser@localhost-live ~]$ sudo vgscan
Found volume group “fedora_localhost-live” using metadata type lvm2
[liveuser@localhost-live ~]$ sudo lvscan
ACTIVE ‘/dev/fedora_localhost-live/swap’ [<7.86 GiB] inherit
ACTIVE ‘/dev/fedora_localhost-live/home’ [406.90 GiB] inherit
ACTIVE ‘/dev/fedora_localhost-live/root’ [50.00 GiB] inherit
[liveuser@localhost-live ~]$ sudo mount /dev/mapper/fedora_localhost–live-root /mnt
[liveuser@localhost-live ~]$ cd /mnt
[liveuser@localhost-live mnt]$ ls
afs bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys @System.solv tmp usr var
[liveuser@localhost-live mnt]$
Please us the preformatted text button </> when posting text. It retains the formatting as seen on screen where the block quote does not.
This shows mine.
On yours I see
initramfs for rescue, 6.4.7, 6.5.7, 6.5.8, & 6.5.10
config for 6.4.7, 6.5.7, 6.5.8, & 6.5.10
vmlinuz for rescue, 6.4.7, & 6.5.10
symvers for 6.5.7, 6.5.8, & 6.5.10
System.map for 6.5.7, & 6.5.8
Assuming the default system config for kernels:
There should be 3 entries each for symvers, config, & System.map
There should be 4 entries each for initramfs & vmlinuz
This clearly shows that the upgrade was somehow corrupted so it will be necessary to complete it.
The following steps should work.
Starting from where you are.
for i in proc sys run dev ; do mount -o bind /$i /mnt/$i ; done
chroot /mnt
mount -a
dnf upgrade --refresh
Wait until that competes then a couple more minutes before rebooting.
Rebooting will involve exiting the chroot environment with exit then perform a normal reboot and let us know the results if there is failure at any step. Especially let us know if there is success.
Also, please post the output of ls /boot/efi while in the chroot environment.
Reboot done, results in the same situation as the other kernels, with failure of initrd-switch-root.service, and only having access to emergency mode …