Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having an issue and I hope someone can help me,

I installed ubuntu 12.10 on my computer (along side windows 7) from a live cd, but when I rebooted my computer after a succefull installation, I get grub prompt, when I type boot in it, it prints "Error 8: Kernel must be loaded before booting".

So I searched and I found this link : Loading Ubuntu From Grub, but when I type linux /vmlinuz root=/dev/sda5 I get this message "Warning! No such command: linux"

Does anybody have any idea about what I should do ?

Note that I reinstalled ubuntu but still get the same issue, and that this is not my first time installing ubuntu (I installed a lot of versions a dozen of times before and this is the first time I face this issue).

Edit :

When I type : kernel /vmlinuz root=/dev/sda5 instead of : linux /vmlinuz root=/dev/sda5 I get Error 15: File not found (I also tried sda4 since find /vmlinuz is printing hd(0,4))

share|improve this question

migrated from Oct 30 '12 at 18:12

This question came from our site for professional and enthusiast programmers.

Do you have any access to a shell? If so, try to locate the grub using this simple command -> <whereis grub> The command should return something like this -> grub: /usr/sbin/grub /etc/grub.conf /usr/lib/grub /usr/share/man/man8/grub.8.gz Then try to read your grub.conf file, perhaps you can solve the problem with this file.. If possible post your grub.conf file here.. – B4NZ41 Oct 30 '12 at 11:58
Thank you for your response. I used the live cd to access a terminal and mounted the /dev/sda5 where my installation is, the command gave me this output : grub : /etc/grub.d /usr/lib/grub /usr/share/grub (I think these are the grub files for the live cd no ?), I executed I searched for grub.conf using find but I could not find it. – Yazmat Oct 30 '12 at 12:17
Try to use the information in this address -> – B4NZ41 Oct 30 '12 at 17:46
thank you, I will try it asap and give you a feed back – Oussama Oct 31 '12 at 12:08

SCSI disk partitions numbering starts from 1, grub partition numbering starts from 0, therefore /dev/sda5 and hd(0,4) are the same.

What you wanted to say in the grub shell is

root (hd0,4)
kernel /vmlinuz root=/dev/sda5
initrd /initrd 

It is likely that your Ubuntu installation did not complete. You may want to reinstall.

share|improve this answer
I did reinstall it but still same issue – Yazmat Oct 30 '12 at 15:41

Well, another alternative might be to re-install grub. Boot using a live disk and open a terminal.

$sudo mount /dev/sdax /mnt #x is the partition in which you have intalled ubuntu
$chroot /mnt
$grub-install --boot-directory=DIR /dev/sda  

#DIR is the directory where your boot/grub2 folder is in my case it is /dev/sda6/boot/grub2 . In your case it must be a different sdx. You have to figure it out.

share|improve this answer
There is no grub2-install command, there is grub-install, I tried executing it and it gives me : "Path '/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting" – Yazmat Oct 30 '12 at 15:50
I'm sorry grub2-install is in fedora. In ubuntu it is just grub-install. The error that you are reporting arises when your boot folder is in different partition than the one in which your / is . This is the same reason as to why you are unable to boot from grub rescue. It is possible, but it is a bit tricky. For my method, you can see my updated post. – Nehal J. Wani Oct 30 '12 at 17:08
It would be helpful if you could post the output of the command sudo fdisk -l – Nehal J. Wani Oct 30 '12 at 17:11
Did you use these set of commands? (i)set root=(hd0,4) (ii)linux /vmlinuz root=/dev/sda4 (iii)initrd /initrd.img (iv)boot – Nehal J. Wani Oct 30 '12 at 17:19
I did try those commands (see my edit in my question), as for your previous comment, I will try that asap and tell you what I get. thank you for your help – Oussama Oct 31 '12 at 12:07

You must log in to answer this question.

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