0

All of a sudden my Ubuntu 13.04 (Raring) server does not boot correctly anymore. It stops at a grub command line.

If I type ls, I get

(hd0) (hd0,msdos5) (hd0,msdos1) (fd0) 

i can then ls each individual partition and the only one where it finds something is hd0,msdos1

I hooked up the hard disk to another PC and it seems to me all the data is still there!

How can I boot normally again?

2 Answers 2

1

Looks like there is problem with the grub menu.

Start by booting your ubuntu from a LiveCD or Live USB. You need to re-install grub on the server hard disk device. To know the device address, type in a terminal

sudo fdisk -l

This will list the disks and their volumes in a list. Note the device where you need to install the grub. The size of thee device shall give you a hint. If /dev/sda is the device where grub needs to be installed, go to terminal and type

sudo grub-install /dev/sda

Reboot your server and check if the problem is resolved.

Update : If the above fails, use boot-repair tool to fix issues, or you can try

sudo grub-install /dev/sda --force
3
  • thanks but that gives me the error: Path /boot/grub is not readable by GRUB on boot. Installation is impossible. Aborting.
    – clamp
    Jun 25, 2013 at 20:13
  • I have added an update, try --force, else go for boot-repair Jun 26, 2013 at 6:57
  • boot-repair did the trick
    – clamp
    Jun 26, 2013 at 12:31
0

i guess that happened after making a ubuntu kernel update , so you updated the kernel but not updated grub config , grub tries to boot the old kernel file but it's removed so let's boot manually from grub command line

first try ls (hd0,msdos1)/ and ... and find your /boot partition (or if all in one partition find your ubuntu partition)

when you find "/boot"(if you have separate partition for it) or "/" enter : set root=(hd0,msdosX) this will set the root browsing directory for grub (replace X)

look for a file haveing "vmlinuz" in beginning of it's name and a file having "initrd" in beginnig of its name (they should be on the same folder in /boot or its subfolders, if there are multi files with that names select a pair that have the same version in their name (last is best ) )

now we suppose the files you've found are :vmlinuz-4.19.0-kali4-amd64 & initrd.img-4.19.0-kali4-amd64

in grub command line enter : linux /boot/vmlinuz-4.19.0-kali4-amd64 initrd /boot/initrd.img-4.19.0-kali4-amd64 boot

congratulations you booted your ubuntu(or any other unix) successfully from grub command line manually and should see your OS starting up if you've done these step correctly

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .