PDA

View Full Version : [ubuntu] Ubuntu Boots intro Grub after Upgrade



shreyas22
May 21st, 2010, 07:48 PM
Hi ,

I Upgraded ubuntu 9 to 10.4 and i started having issues after that , first i was unable to boot after the kernel upgrade .
I then reinstalled the grub but now when i boot it directly goes into the grub prompt .

grub > boot i get an error " kernel must be loaded before booting "

grub > kernel \vmlinuz
grub > initrd \initrd.img

after that it stays in the initramfs and does nothing .

I am not sure what should i do next , any help would be good

darkod
May 21st, 2010, 07:51 PM
Run the script as explained and post the content of your results file for more details:
http://ubuntuforums.org/showpost.php?p=8844901&postcount=4

shreyas22
May 21st, 2010, 08:09 PM
Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 0.97 is installed in the MBR of /dev/sda and looks on the same drive
in partition #1 for /boot/grub/stage2 and /boot/grub/menu.lst.
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
partition #1 for /boot/grub.

sda1: __________________________________________________ _______________________

File system: ext4
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda1 and
looks at sector 271719 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

sdb1: __________________________________________________ _______________________

File system: ext3
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sdb1 and
looks at sector 271719 of the same hard drive for
core.img, but core.img can not be found at this
location.
Operating System:
Boot files/dirs:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 146.8 GB, 146815733760 bytes
255 heads, 63 sectors/track, 17849 cylinders, total 286749480 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000080

Partition Boot Start End Size Id System

/dev/sda1 * 63 275,016,734 275,016,672 83 Linux
/dev/sda2 275,016,735 286,744,184 11,727,450 5 Extended
/dev/sda5 275,016,798 286,744,184 11,727,387 82 Linux swap / Solaris


Drive: sdb ___________________ __________________________________________________ ___

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000081

Partition Boot Start End Size Id System

/dev/sdb1 63 1,953,520,064 1,953,520,002 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 b786efef-ff07-4f82-b0cf-5b44b633585b ext4
/dev/sda5 0fcd322c-7de1-4a15-8d26-90827fdee99a swap
/dev/sdb1 ca538954-cd1c-4276-8409-17fe07ded42d ext3

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (rw)
/dev/loop0 /rofs squashfs (rw)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
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
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.32-22-generic ...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.31-21-generic ...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.31-20-generic ...'
linux /boot/vmlinuz-2.6.31-20-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-19-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.31-19-generic ...'
linux /boot/vmlinuz-2.6.31-19-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-19-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-17-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-17-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.31-17-generic ...'
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-17-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-14-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro vga=792 quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry 'Ubuntu, with Linux 2.6.31-14-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
echo 'Loading Linux 2.6.31-14-generic ...'
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=b786efef-ff07-4f82-b0cf-5b44b633585b ro single vga=792
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b786efef-ff07-4f82-b0cf-5b44b633585b
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

=============================== sda1/etc/fstab: ===============================

# /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 defaults 0 0
# / was on /dev/sda1 during installation
UUID=b786efef-ff07-4f82-b0cf-5b44b633585b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=0fcd322c-7de1-4a15-8d26-90827fdee99a none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sdb1 /data ext3 defaults 0 0
tungsten.nimh.nih.gov:/tungsten2/evansjw /W nfs defaults 0 0


=================== sda1: Location of files loaded by Grub: ===================


.1GB: boot/grub/core.img
3.1GB: boot/grub/grub.cfg
.1GB: boot/grub/stage2
2.1GB: boot/initrd.img-2.6.31-14-generic
2.0GB: boot/initrd.img-2.6.31-17-generic
2.0GB: boot/initrd.img-2.6.31-19-generic
2.0GB: boot/initrd.img-2.6.31-20-generic
2.1GB: boot/initrd.img-2.6.31-21-generic
2.0GB: boot/initrd.img-2.6.32-22-generic
.1GB: boot/vmlinuz-2.6.31-14-generic
.2GB: boot/vmlinuz-2.6.31-17-generic
.4GB: boot/vmlinuz-2.6.31-19-generic
2.0GB: boot/vmlinuz-2.6.31-20-generic
1.7GB: boot/vmlinuz-2.6.31-21-generic
33.4GB: boot/vmlinuz-2.6.32-22-generic
2.0GB: initrd.img
2.1GB: initrd.img.old
33.4GB: vmlinuz
1.7GB: vmlinuz.old

darkod
May 21st, 2010, 08:49 PM
First in BIOS set to boot from the 146GB hdd as first hdd choice.
Then boot the 10.04 cd in live mode and reinstall grub2 to /dev/sda with:

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

Restart and see if you will get a working grub2. You have grub1 on one disk, and grub2 on the other but both look broken.

shreyas22
May 24th, 2010, 03:52 PM
That worked very well .

Than you so much for your help