I am trying to install Ubuntu server but it always gets stuck at the last stage while updating grub.I cancelled the process and rebooted my system, it took me to the grub command prompt grub> .

I tried a manualboot from here:

root=(hd1,gpt5)       # Ubuntu root partition
linux   /boot/vmlinuz-something-   root=/devlsda5
initrd    /boot/initramfs-something-

After some boot message scroll, it dropped me in the

Busybox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3) built-in. shell (ash) 

with the initramfs> prompt. From here I did an exit And it showed me the kernel panic! with the following two hints.

mount: mounting/says on /root/says failed : No such file or directory
mount: mounting /process on /root/process failed: No such file or directory

Not a solution but a couple of Workarounds. Apparently, that's a bug in os-prober . I personally tried the second one and it works! To quote from the link:

Workaround 1: (proaction)

When you are reaching
the “Install the GRUB boot loader to the master boot record?” prompt, (in my case, no such prompt appeared but i figured out timing of the grub-install) switch to a console (ctrl+alt+[f2-f6]), and remove this file:

rm /target/etc/grub.d/30_os-prober

This will prevent update-grub from running os-prober, which should avoid running into this issue. Of course, other operating systems won't be listed, but at least that should prevent the installation process from getting entirely stuck. I've tested this successfully in a VM with guided (unencrypted) LVM, and standard plus ssh tasks (which is how I initially reproduced your issue).

Workaround 2: (reaction)

Otherwise, once the process is stuck, locate the process identifier (PID) on the first column of the ps output:

ps | grep 'dmsetup create'

then kill this dmsetup process. With your output above, that'd be:

kill 19676

(Tested successfully in a VM with the same setup/choices as above.)


  • I had to kill it twice, but it's unstuck now. I'll report back if I discover any side effects. – musicin3d Jun 20 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.