CentOS 8, Failed to switch root, '/sysroot' Empty

Issues related to applications and software problems and general support
Sondergaard
Posts: 4
Joined: 2020/11/03 01:39:41

Re: CentOS 8, Failed to switch root, '/sysroot' Empty

Post by Sondergaard » 2020/12/24 21:43:17

I just updated my kernel for the first time since my problem. The update succeeded and I can boot without the hack to the file in /boot/loader/entries that I described earlier.

Why the problem has resolved, I don't know for sure. I did run grub2-mkconfig -o /boot/grub2/grub.cfg, but I did that the last time. I only changed one thing, and noticed another.
  • What I noticed was that this update included grub2-common-1:2.02-90.el8.noarch. Did this new release of grub2-common make a difference? I don't know.
  • What I changed was that I got rid of the symbolic link that ensured /boot/grub2/grubenv and /boot/efi/EFI/centos/grubenv were the same, and instead used identical copies in both places. I was already doing this with /boot/grub2/grub.cfg and /boot/efi/EFI/centos/grub.cfg, as I had found my system failed reboot if I used a symbolic link there. Is this what made the difference? I don't know that either.
Now that I have CentOS 8 working I guess my next job is to replace it, since now it will not be lasting me seven years but only 12 months.

sml
Posts: 221
Joined: 2020/01/17 09:01:44

Re: CentOS 8, Failed to switch root, '/sysroot' Empty

Post by sml » 2020/12/25 09:34:36

Sondergaard wrote:
2020/12/24 21:43:17
What I noticed was that this update included grub2-common-1:2.02-90.el8.noarch. Did this new release of grub2-common make a difference? I don't know.
I suspect this bit in the changelog:
* Di Aug 11 2020 Javier Martinez Canillas <javierm@redhat.com> - 2.02-88
- Fix a legacy BIOS boot issue when using a config file shared with EFI
  Resolves: rhbz#1850193

User avatar
TrevorH
Forum Moderator
Posts: 30333
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8, Failed to switch root, '/sysroot' Empty

Post by TrevorH » 2020/12/25 10:16:42

I was already doing this with /boot/grub2/grub.cfg and /boot/efi/EFI/centos/grub.cfg, as I had found my system failed reboot if I used a symbolic link there. Is this what made the difference? I don't know that either.
You should not need to do this. Only one copy of the file is used and it depends on whether your machine is in UEFI mode or not as to which one. If /sys/firmware/efi exists then your machine is in UEFI mode and the file under /boot/efi/EFI/centos/grub.cfg is used, if not then it's /boot/grub2/grub.cfg
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

vj82online
Posts: 1
Joined: 2021/01/26 05:42:55

Re: CentOS 8, Failed to switch root, '/sysroot' Empty

Post by vj82online » 2021/01/26 05:46:44

I faced the same issue but was able to fix it after following the post

https://access.redhat.com/solutions/5061041

Post Reply

Return to “CentOS 8 - General Support”