-1

I have installed Centos Stream 9 on a new hard drive. After running sudo update-grub from my ubuntu 20.04 system, an entry got created in the grub. However when i try to select the entry from the startup menu it gives me error error file /boot/linuz-xx not found you need to load kernel first

From the grub menu when I run the command ls (hd0,gpt3) it gives me no known file system detected. However I am able to see all the other folders of other OS (manjaro) on other drives.

When I change the Boot order in BIOS and set the Centos HDD as the first one I am able to login without issues.

Is there a way I can fix this issue?

below is the output of command lsblk -f

sda
├─sda1      vfat                 
├─sda2      xfs                  
└─sda3      LVM2_member          
  ├─cs-swap swap                 
  ├─cs-home xfs                  
  └─cs-root xfs                  
sdb
├─sdb1      vfat        
└─sdb2      ext4        
nvme1n1
├─nvme1n1p1 ntfs        
├─nvme1n1p2 vfat        
├─nvme1n1p3
└─nvme1n1p4 ntfs        
nvme0n1
├─nvme0n1p1 vfat        
└─nvme0n1p2 ext4
  • You've not provided any file-system details; as some are much harder for other OSes to pick up & correctly deal with (is the file-system ext4? zfs? btrfs? etc - it matters, and that is likely your issue & thus how to fix it; at least in my experience) – guiverc Feb 16 '22 at 10:18
  • Added output of lsblk command @guiverc – mac_new Feb 16 '22 at 10:56
  • I don't think GRUB identifies other operating systems by default. That's what the BIOS is for. – Logan Feb 16 '22 at 20:36

1 Answers1

-1

I think you may be able to fix this issue using OS-Prober.

As This article explains, open a Terminal and do

sudo apt install os-prober

(it should be preinstalled but I suggest you do it anyways), followed by a

sudo os-prober

. You should get a message that a centos partition was found in /dev/xxx. Then simply mount that partition by using

sudo mkdir /mnt/centos
sudo mount /dev/xxx /mnt/centos

. Now just update your GRUB config by using

sudo grub-mkconfig -o /path/to/your/grub/config (for example /boot/grub/grub.cfg)

and reboot.

I hope I could help you with this one.

Greetings, Eric

Letsric
  • 64
  • Grub is turning off os-prober for a secuity reason. Os-prober now turned off by default Dec 2021 https://ubuntuforums.org/showthread.php?t=2469993 You probably need lvm2 driver in Ubuntu and if encrypted sudo apt-get update && sudo apt-get install lvm2 cryptsetup Then mount lvm before running os-prober. Or copy boot stanza from centos' grub to 40_custom in Ubuntu. You still need drivers. Or use configfile https://askubuntu.com/questions/344125/how-to-add-a-grub2-menu-entry-for-booting-installed-ubuntu-on-a-usb-drive/344359#344359 – oldfred Feb 16 '22 at 19:50
  • Thanks everyone. The problem was as stated by @guiverc. I reinstalled the OS, this time manually setting the file system to ext4. Ran grub-update from Ubuntu without any errors and now the newly generated menu entry works perfectly. – mac_new Feb 16 '22 at 22:01