Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2695  / 2 Years ago, tue, january 18, 2022, 2:32:00

I've installed windows 7 and then Ubuntu 11.10, and then set up everything on easyBCD.



When I select Ubuntu on the boot menu, I end-up in grub prompt (like "grub>" in a black screen) instead of loading Ubuntu directly.



I have to run:



grub>  root (dh0,4)
grub> kernel /vmlinuzblahblah root=/dev/sda6
grub> boot


Every time to boot Ubuntu(where vmlinuz is a long filename I always tab).



How could I skip this process?


More From » boot

 Answers
2

My "Fix-Grub-routine" is as follows:




  1. Boot from an Ubuntu LiveCD (USB key usually)

  2. Mount the /root and /boot partition of my original install in the live environment. Lets say my root is mounted in /tmp/myRoot/ and boot in /tmp/myBoot/

  3. Mount/bind a few important directories

    sudo mount --bind /dev /tmp/myRoot/dev

    sudo mount --bind /proc /tmp/myRoot/proc

    sudo mount --bind /sys /tmp/myRoot/sys

    sudo mount --bind /tmp/myBoot /tmp/myRoot/boot

  4. Chroot into my original installation

    sudo chroot /tmp/myRoot/

  5. Now I'd usually do update-grub but since you messed up your bootsystem using some weird third-party application, I think it might be better to re-install grub using grub-install /dev/sda *.

  6. When done, exit the chroot and reboot the system (without your live-media)




Note: Replace /dev/sda with the drive you want grub to be installed on!



Note2: Most of this information used to be on an Ubuntu wikipage called RecoveringUbuntuAfterInstallingWindows. While finding this page to link to in this post I noticed the page has had quite a change. The chrooting and stuff is not described anymore but instead a boot-repair utility is available on some live cds. I have not experience with it, but I suppose it's worth a shot.



[#40126] Wednesday, January 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utschang

Total Points: 357
Total Questions: 120
Total Answers: 119

Location: Croatia
Member since Sat, May 2, 2020
4 Years ago
;