Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I screwed up the grub.cfg file in ubuntu and now i cant boot to that partition. What do i need to put in the file to be able to boot from that partition?

share|improve this question

migrated from stackoverflow.com Jul 5 '12 at 13:29

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

    
What version of grub are you using? –  Conner Jul 3 '12 at 19:02

1 Answer 1

If you're using grub2 you can just run a sudo update-grub to find the correct OSes and generate a new cfg.

From a live CD, you'll have to mount your partition:

sudo mkdir /mnt/root
sudo mount -t ext3 <your ubuntu partition, example /dev/sda4> /mnt/root
sudo mount -t proc none /mnt/root/proc
sudo mount -o bind /dev /mnt/root/dev
sudo chroot /mnt/root /bin/bash
sudo update-grub
share|improve this answer
    
so i'm using grub2. but i'm in a live cd at the moment. –  user1450296 Jul 3 '12 at 19:10
    
Result: Sudo: update-grub: command not found –  user1450296 Jul 3 '12 at 20:01
2  
@user1450296: that makes no sense. Conner is perfectly right. He explained all the steps to get into the system from a live CD or an ordinary boot CD. Grub2 wouldn't be installed without also having update-grub. –  0xC0000022L Jul 5 '12 at 13:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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