6

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..??

Community
  • 1
  • 1
Himanshu Sourav
  • 700
  • 1
  • 10
  • 35
  • 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 Jan 04 '16 at 20:07
  • 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 Jan 05 '16 at 14:46
  • @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 Jan 06 '16 at 06:36
  • @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 Jan 06 '16 at 06:37
  • Did you try mounting the volumes manually in the dracut shell? – Matt Jan 06 '16 at 19:21
  • @Matt it says either "mount point does not exist" or "special device file does not exist" when try to mount manually.. would be great if you could advise on how to mount manually in dracut shell... I can see the existing mountpoints via mount command – Himanshu Sourav Jan 28 '16 at 10:55

3 Answers3

2

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.

  • vgscan command is not recognized. how does one explicitly enter the emergency shell..? when it fails to boot it automatically drops to emergency shell right..? – Himanshu Sourav Jan 06 '16 at 09:11
  • Yes that's right, it's the one in your second screenshot. – Adam J Richardson Jan 06 '16 at 09:56
  • why it vgscan not recognized then..? what should be done to make it work in emergency shell..? – Himanshu Sourav Jan 07 '16 at 04:13
  • Hmm... according to `which vgscan` on a Linux system I happen to have handy, `vgscan` lives in `/sbin`. Perhaps if you try `/sbin/vgscan` it will work? – Adam J Richardson Jan 07 '16 at 16:24
  • no @Adam there is no vgscan inside sbin. I am on centos-7 – Himanshu Sourav Jan 28 '16 at 10:43
  • Sorry, but we've reached the limits of my experience. If you can't find `vgscan` anywhere in your initrd then you will need to fix or rebuild the initrd. Perhaps you could boot from a Live distro, mount your partitions correctly, `chroot` into the environment and re-run `dracut`? – Adam J Richardson Jan 29 '16 at 14:34
  • I am not letting go of this problem. I installed a fresh debian based distro and found my way to vgscan afte5r following the entire process of building and then failing on boot-dropping to emergency shell. now when I do a vgscan it says "no matching volumes found" then did a pvscan "no matching physical volumes found". @Adam your help would be deeply appreciated. how to move forward now. – Himanshu Sourav Feb 02 '16 at 12:25
0

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!

Ray Bae
  • 89
  • 1
  • 4
  • 10
  • mkinitcpio command is not recognized. I have ubuntu and centos but not archlinux in guest machines – Himanshu Sourav Jan 06 '16 at 09:12
  • Ah. Did you check for the `GRUB` option I mentioned? It could fail to boot because it's expecting a different format. – Ray Bae Jan 06 '16 at 13:44
  • yes @Ray I had already updated it, ran it quite a few times but didn't help :( – Himanshu Sourav Jan 07 '16 at 04:12
  • Open GParted, go to the properties of the volume you want to boot. There should be an older style UUID like this: `GHG54-85NFG-FG985` Try using that in your `GRUB` instead of `/dev/disk/sda3` – Ray Bae Jan 07 '16 at 15:40
0

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]

Community
  • 1
  • 1
Himanshu Sourav
  • 700
  • 1
  • 10
  • 35