[SOLVED] How to restore boot loader on Ubuntu 11.04 - 2011
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks Andrew, I went there previously and followed , and I felt its just way to complicated to go through and its really too way drawn out.
I know that I can go through a whole new reinstall of Ubuntu and resolve this issue, but I'm being stubborn and I'm holding out for a possibly quick fix.
Reinstall the grub packages. Here is what will happen:
You will be given the opportunity to add extra kernel options to the kernel line. If you don't know, you probably don't need them ; TAB to highlight "<OK>" and press ENTER.
Read the installation notes. TAB to "<OK>" to continue.
When presented with the device option, use the UP/DN keys to select the correct drive (sdX).
Make sure the installation drive[*] /dev/sdX has an asterisk next to it ( example:[*] /dev/sda ). If it doesn't, highlight it and press the SPACE bar to select it.
Do not select a partition ( example: [ ] /dev/sda5 , etc).
TAB to "<OK>" and press ENTER. When it has finishing the installation, you should have Grub 2 installed.
Okay, I followed all that is this is where I am at -
Creating config file /etc/default/grub with new version
Setting up grub-gfxpayload-lists (0.2) ...
stan@stan-GeForce6100PM-M2:~$ sudo update-grub
Generating grub.cfg ...
cat: /boot/grub/video.lst: No such file or directory
Found linux image: /boot/vmlinuz-2.6.38-8-generic
Found initrd image: /boot/initrd.img-2.6.38-8-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
Ok Andrew, I followed you last post and purged it and now I cant boot at all, the only way I can boot is using my live ubuntu cd or using Super Grub and now it only sees windows and allows me to boot there.
What command must I do to restore boot loader, and I am on live ubuntu cd...?
"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.
Identifying MBRs...
Computing Partition Table of /dev/sda...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sda5 for information...
Searching sda6 for information...
Searching sda7 for information...
Searching sda8 for information...
Searching sda9 for information...
Finished. The results are in the file "RESULTS.txt"
located in "/home/ubuntu/Downloads/".
============================= Boot Info Summary: ===============================
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos8)/boot/grub on this drive.
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
true
}
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 85032c9e-8499-480e-9be3-843590f12180
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 85032c9e-8499-480e-9be3-843590f12180
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=85032c9e-8499-480e-9be3-843590f12180 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 85032c9e-8499-480e-9be3-843590f12180
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=85032c9e-8499-480e-9be3-843590f12180 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 85032c9e-8499-480e-9be3-843590f12180
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 85032c9e-8499-480e-9be3-843590f12180
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 286803116802DE06
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda8 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda9 during installation
UUID=f72a940c-bf59-4ce5-9111-ab0b61c6d68e none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
--------------------------------------------------------------------------------
=================== sda8: Location of files loaded by Grub: ====================
I finally caved into pressure and did a completely new reinstall of Ubuntu, it did see my windows OS during the install process and I went through the motions of installing Ubuntu 11.04 all over again, and I still get that same black screen and no ability to scroll or boot.
I am totally clueless as to why this issue still persists...
All I can say is Ubuntu 11.04 sucks, big time....!!!!
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Well, on the install that you had first, you some how had mixed grub (grub-legacy) and grub-pc (grub2). This was possible by accident in Ubuntu 9.10 and (I believe)10.04 but not since then. That had something to do with one of your unlisted tweeks.
Also on that install you needed to simply run the command to install grub on the mbr before rebooting. The grub mentioned in your second boot info script is the grub you purged, no wonder it can't find the files.
That problem was simple to correct from a live cd by chrooting in and running the command.
While I agree that 11.04 sucks I do not think this is the basic problem. One of the interesting things on your boot info script is the existence of 3 swap partitions, 1 ext3 partition and 1 ext4 partition. I seriously doubt the installer, in spite of Ubuntus "improvements" to it ever did that on its own.
Reinstalling may satisfy that urge of all MS users to reinstall but it will never teach you a thing. I hope that when you did the reinstall you cleaned up that partition table.
Ok Andrew, I followed you last post and purged it and now I cant boot at all, the only way I can boot is using my live ubuntu cd or using Super Grub and now it only sees windows and allows me to boot there.
What command must I do to restore boot loader, and I am on live ubuntu cd...?
Interesting..if it's version fault try previous 10.10 .iso(under text is links) and follow this grub reinstall guide which is way more simple and easy than above cocktail.
I had to run "gksu nautilus" or "gedit /etc/defaults/grub"
The VBE resolution was messed up , I wasn't getting any resolution when loading up and that is why my screen would go black during boot stage, so I had to change the VBE resolution to 640X480 manually then run "update-grub".
Now when I boot, I can see the boot-loader for ubuntu and windows7 like I should. and scroll to it.
Your right Andrew, I did not have to do a reinstall, I just grew impatient.
I am not sure how the VBE resolution got messed up and why it wouldn't correct itself during new reinstall.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.