6
votes

While trying to compile/build and boot custom kernel inside vmware workstation, while booting new kernel, it fails and falls to shell with error "failed to find disk by uuid". I tried this with both ubuntu and centos.


Things I tried but didn't help


  1. check mapping by uuid in boot entry and existence in directory.
  2. initramfs-update
  3. replaced root=uuid=<> with /dev/disk/sda3

enter image description here

is it issue with vmware workstation? how can it be rectified..??

3
Can you see /dev/disk/sda3 or /dev/sda3 in the dracut shell? Try looking through the dmesg to see if there are any errors. - Matt
Does the command ls -fa not show the uuid it's looking for? This looks less like a kernel build failure and more like a boot issue, you may want to target your drive in terms of /dev/sd[a-z][1-4] in your bootloader. - u8sand
@Matt I can see them in dracut shell, trie modifying them in commandline as well but didn't help. dmesg gives the same error as mention in question itself. - Himanshu Sourav
@u8sand as mentioned in question already tried replaced root=uuid=<> with /dev/disk/sda3 didn't help. it is surely a boot issue indeed. - Himanshu Sourav
Did you try mounting the volumes manually in the dracut shell? - Matt

3 Answers

2
votes

I had a similar fault with my own attempts to bootstrap Fedora 22 onto a blank partition using a Centos install on another partition. I never did solve it completely, but I did find the problem was in my initrd rather than the kernel.

The problem is the initrd isn't starting LVM because dracut didn't tell the initrd that it needs LVM. Therefore if you start LVM manually you should be able to boot into your system to fix it.

I believe this is the sequence of commands I ran from the emergency shell to start LVM:

vgscan
vgchange -ay
lvs

this link helped me remember

Followed by exit to resume normal boot.

You might have to mount your LVM /etc/fstab entries manually, I don't recall whether I did or not.

0
votes

Try this:

sudo update-grub

Then:

mkinitcpio -p linux

It won't hurt to check your fstab file. There, you should find the UUID of your drive. Make sure you have the proper flags set in the fstab.

Also, there's a setting in the grub.cfg that has has GRUB use the old style of hexadecimal UUIDs. Check that out as well!

0
votes

The issue is with creation of initramfs, after doing a

make oldconfig

and choosing default for new options, make sure the ENOUGH diskspace is available for the image to be created. in my case the image created was not correct and hence it was failing to mount the image at boot time.


when compared; the image size was quite less than the existing image of lower version, so I added another disk with more than sufficient size and then

make bzImage

make modules

make modules_install

make install

starts working like a charm. I wonder why the image creation got completed earlier and resulted in corrupt image (with less size) without throwing any error [every single time]