Manually booting from a Grub prompt

I installed Ubuntu on a Cisco UCS C250 M2 system with a USB flash drive. The installer attempted installing Grub on the installer drive instead of the system drive. In attempts to have a bootable system, I dropped to a shell and ran:

chroot /target /bin/bash
grub-install /dev/sdb (where sdb is drive you installed on)

The above installed Grub, but didn’t configure it to boot the system. After booting I landed at a grub prompt instead of the system prompt. I was able to boot the system with the steps below.

First, I ran the command below to get the drive’s UUID. Below <tab> is tapping the tab key on the keyboard:

ls (hd0<tab>

This prints out details of the drive; the UUID is needed in the command below.

insmod ext2
set root='hd0,msdos1'
linux /boot/vmlinuz<tab> root=UUID=<insert UUID here>
initrd /boot/initrd<tab>

This properly booted the system. From here, the first thing to do is install Grub properly. Login to the system and run:

grub-install /dev/sda

After a reboot the system booted properly.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s