PDA

View Full Version : [ubuntu] New install and after reboot get "GRUB>" only



mick01
December 6th, 2010, 03:37 PM
Hi All,

I'm new to ubuntu. After playing around with the live CD for a bit I made an attempt today to install 10.04 to my old IBM thinkpad (which was running Win XP). I selected the option to install ubuntu on a new partition so I could retain XP. Anyway, the installation seemed to go fine. At the end it asked to reboot, but when I rebooted all I got was a "GRUB>" command prompt. It seems that I'm now unable to boot to XP or ubuntu from the hard drive, although when I re-run the live CD I can see the partitions are there. I've run the boot script I saw referred to in other threads. Results below. Appreciate any help or guidance on fixing this problem

Cheers,
mick



Boot Info Script 0.55 dated February 15th, 2010

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

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #5 for /boot/grub.

sda1: __________________________________________________ _______________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /BOOT.INI /ntldr /NTDETECT.COM

sda2: __________________________________________________ _______________________

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

sda5: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04.1 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda6: __________________________________________________ _______________________

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

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

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 66,065,167 66,065,105 7 HPFS/NTFS
/dev/sda2 66,066,430 78,139,391 12,072,962 5 Extended
/dev/sda5 66,066,432 77,510,655 11,444,224 83 Linux
/dev/sda6 77,512,704 78,139,391 626,688 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 6454DF4E54DF221A ntfs IBM_PRELOAD
/dev/sda2: PTTYPE="dos"
/dev/sda5 6e6f3c23-c41d-4071-b27e-4c75d04299f6 ext4
/dev/sda6 65e8e961-90a0-47a0-8fcf-f1783e36cc91 swap
/dev/sda: PTTYPE="dos"

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

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sda1 /media/IBM_PRELOAD fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_ permissions)
/dev/sda5 /media/6e6f3c23-c41d-4071-b27e-4c75d04299f6 ext4 (rw,nosuid,nodev,uhelper=udisks)


================================ sda1/BOOT.INI: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn

=========================== sda5/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,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
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,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
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-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=6e6f3c23-c41d-4071-b27e-4c75d04299f6 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=6e6f3c23-c41d-4071-b27e-4c75d04299f6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 6e6f3c23-c41d-4071-b27e-4c75d04299f6
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 6454df4e54df221a
drivemap -s (hd0) ${root}
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 ###

=============================== sda5/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 nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=6e6f3c23-c41d-4071-b27e-4c75d04299f6 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=65e8e961-90a0-47a0-8fcf-f1783e36cc91 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

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


34.4GB: boot/grub/core.img
37.2GB: boot/grub/grub.cfg
34.5GB: boot/initrd.img-2.6.32-24-generic
34.4GB: boot/vmlinuz-2.6.32-24-generic
34.5GB: initrd.img
34.4GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda2

00000000 6e 3c ae 76 05 50 83 e2 11 04 01 07 04 00 41 42 |n<.v.P........AB|
00000010 bb 86 6e 3c ae 76 05 50 83 e3 11 04 01 07 04 00 |..n<.v.P........|
00000020 41 42 bb 86 6e 3c ae 76 05 50 83 e4 11 04 01 07 |AB..n<.v.P......|
00000030 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 e5 11 04 |..AB..n<.v.P....|
00000040 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 e6 |....AB..n<.v.P..|
00000050 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 |......AB..n<.v.P|
00000060 83 e7 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 |........AB..n<.v|
00000070 05 50 83 e8 11 04 01 07 04 00 41 42 bb 86 6e 3c |.P........AB..n<|
00000080 ae 76 05 50 83 e9 11 04 01 07 04 00 41 42 bb 86 |.v.P........AB..|
00000090 6e 3c ae 76 05 50 83 ea 11 04 01 07 04 00 41 42 |n<.v.P........AB|
000000a0 bb 86 6e 3c ae 76 05 50 83 eb 11 04 01 07 04 00 |..n<.v.P........|
000000b0 41 42 bb 86 6e 3c ae 76 05 50 83 ec 11 04 01 07 |AB..n<.v.P......|
000000c0 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 ed 11 04 |..AB..n<.v.P....|
000000d0 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 ee |....AB..n<.v.P..|
000000e0 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 |......AB..n<.v.P|
000000f0 83 ef 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 |........AB..n<.v|
00000100 05 50 83 f0 11 04 01 07 04 00 41 42 bb 86 6e 3c |.P........AB..n<|
00000110 ae 76 05 50 83 f1 11 04 01 07 04 00 41 42 bb 86 |.v.P........AB..|
00000120 6e 3c ae 76 05 50 83 f2 11 04 01 07 04 00 41 42 |n<.v.P........AB|
00000130 bb 86 6e 3c ae 76 05 50 83 f3 11 04 01 07 04 00 |..n<.v.P........|
00000140 41 42 bb 86 6e 3c ae 76 05 50 83 f4 11 04 01 07 |AB..n<.v.P......|
00000150 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 f5 11 04 |..AB..n<.v.P....|
00000160 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 83 f6 |....AB..n<.v.P..|
00000170 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 05 50 |......AB..n<.v.P|
00000180 83 f7 11 04 01 07 04 00 41 42 bb 86 6e 3c ae 76 |........AB..n<.v|
00000190 05 50 83 f8 11 04 01 07 04 00 41 42 bb 86 6e 3c |.P........AB..n<|
000001a0 ae 76 05 50 83 f9 11 04 01 07 04 00 41 42 bb 86 |.v.P........AB..|
000001b0 6e 3c ae 76 05 50 83 fa 11 04 01 07 04 00 00 fe |n<.v.P..........|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 a0 ae 00 00 fe |................|
000001d0 ff ff 05 fe ff ff 02 a0 ae 00 00 98 09 00 00 00 |................|
000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

ronparent
December 6th, 2010, 04:31 PM
Just taking a cursory look at your results.txt everything looks fine. I would suggest you first do a grub 2 reinstall on the premise that an installation quirk could have messed up grub. It's easy but if that doesn't work we can dig deeper. The reference for grub 2 tells you how: https://help.ubuntu.com/community/Grub2#Reinstalling GRUB 2

Form the 10.04 live cd first mount the partition you install 10.04 to:

sudo mount /dev/sda5 /mnt

Then run the grub-install:

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

Let us know how you make out.

lindsay7
December 6th, 2010, 04:34 PM
see if this helps

http://www.webupd8.org/2009/12/how-to-recover-grub2-linux.html

mick01
December 7th, 2010, 01:50 AM
Thanks for the suggestions. Have tried them but no luck unfortunately. Still getting the grub prompt when I re-boot. Didn't get any errors using the suggested commands except for the steps that lindsay7 linked to. For the last step I got this...

sudo update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).

I then tried mounting sda1 and sda5 but still get the above error when I enter sudo update-grub

Anything else I can try?


mick

Quackers
December 7th, 2010, 02:09 AM
When you entered the second command

sudo grub-install --root-directory=/mnt/ /dev/sda
can you remember what the terminal screen said?

sudo update-grub won't do anything from the live cd. That command is to be run from your Ubuntu system when it's booted (unless you have chrooted into your installed system first)

mick01
December 7th, 2010, 02:31 AM
It came back with "Installation finished. No error reported."


This is the full transcript..



To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
Installation finished. No error reported.
ubuntu@ubuntu:~$

Quackers
December 7th, 2010, 02:42 AM
Thanks for that. By the way I edited my post above regarding the sudo update-grub error. You may not have seen it.
As ronparent said earlier everything looks ok with the installation.
Sometimes it can be necessary to purge and re-install grub after chrooting into your installed system from the Live cd. The details for that are in the link below in the "Why chroot" section of that guide.
If your problem is a grub installation problem, that will fix it.

http://ubuntuforums.org/showthread.php?t=1581099

gamecraziness
December 7th, 2010, 02:49 AM
Just taking a cursory look at your results.txt everything looks fine. I would suggest you first do a grub 2 reinstall on the premise that an installation quirk could have messed up grub. It's easy but if that doesn't work we can dig deeper. The reference for grub 2 tells you how: https://help.ubuntu.com/community/Grub2#Reinstalling GRUB 2

Form the 10.04 live cd first mount the partition you install 10.04 to:

sudo mount /dev/sda5 /mntThen run the grub-install:

sudo grub-install --root-directory=/mnt/ /dev/sdaLet us know how you make out.
Just wanted to thank you. I had a similar problem and this fixed it. :D

matt_symes
December 7th, 2010, 03:39 AM
Hi

At the GRUB> command prompt type these commands


set prefix=(hd0,5)/boot/grub
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro
initrd /initrd.img
bootDoes this boot you into Ubuntu?

If it does not please copy the output of



ls
ls /
and paste here.

Kind regards

mick01
December 7th, 2010, 04:23 AM
If your problem is a grub installation problem, that will fix it.

http://ubuntuforums.org/showthread.php?t=1581099

Thanks, I followed all the chroot steps at that link. I'm one step closer now I think. When I rebooted I got an error "out of disk", but it continued to load and ubuntu came up. So that's something. However I didn't get an option to boot into Win XP. So I guess the next question is, how do I get it to give me the choice of OS at boot up. And also, is the "error out of disk" warning something I need to worry about


cheers,
mick

mick01
December 7th, 2010, 04:28 AM
Hi

At the GRUB> command prompt type these commands



Sorry, I didn't see your post while I was busy running the chroot commands referenced above. I guess it's probably too late to try that now?


mick

matt_symes
December 7th, 2010, 04:45 AM
Hi


Sorry, I didn't see your post while I was busy running the chroot commands referenced above. I guess it's probably too late to try that now?For that set of commands, yes.

Open a terminal and type

sudo nano /boot/grub/grub.cfg

then enter your password. Find the line i have highlighted below and remove it. save the file (using ctrl o and exit using ctrl x)

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 6454df4e54df221a
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Then restart. Do you get the XP entry?

Kind regards

wilee-nilee
December 7th, 2010, 04:55 AM
Hi

At the GRUB> command prompt type these commands


set prefix=(hd0,5)/boot/grub
set root=(hd0,5)
linux /vmlinuz root=/dev/sda5 ro
initrd /initrd.img
bootDoes this boot you into Ubuntu?

If it does not please copy the output of



ls
ls /
and paste here.

Kind regards

+1 here is the same procedure but using the tab to complete.
Manual boot from grub prompt for grub2
set root=(hd0,X) X=the partition # of OS
linux /boot/vmlinuz(tab=kernel) root=/dev/sdaX
initrd /boot/initrd(tab, then enter)
boot (enter)

Notice the space in the second line after the tab to bring up the kernel before the root=/dev/sdaX.

I use the tab basically as if you have made a mistake the tab will not bring up what your looking for.