PDA

View Full Version : [ubuntu] What must I do to boot Ubuntu 10.04 out of GRUB?



JCMB1
July 22nd, 2010, 10:07 PM
I am doing a pure 10.04 Ubuntu installation (no other OS involved) on a NEW hard drive. I am doing this with an alternate install CD.

Like the person in the other post (http://ubuntuforums.org/showthread.php?p=9509692), I am receiving this menu:



GNU GRUB version 1.98-1ubuntu5

Minimal BASH-like line editing is supported. for the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.

grub>_It's an improvement since I was in the grub rescue mode for a while there.

ls command lists the following devices (hd0) and (hd0,1). The root directory is (hd0,1).

I've tried formatting with Parted Magic and the "live CD" doesn't boot.

Could you please give some help which isn't too technical: I really am lacking in patience here as this has been going on for several days. And I've been trying to decode https://help.ubuntu.com/community/Grub2

I can get into the grub.cfg file using Parted Magic and it looks like this:
#
# 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 da1bbbb5-7673-472b-8eab-d7006912ce7e
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 da1bbbb5-7673-472b-8eab-d7006912ce7e
set locale_dir=($root)/boot/grub/locale
set lang=C.UTF-8
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-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set da1bbbb5-7673-472b-8eab-d7006912ce7e
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=da1bbbb5-7673-472b-8eab-d7006912ce7e ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-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 da1bbbb5-7673-472b-8eab-d7006912ce7e
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=da1bbbb5-7673-472b-8eab-d7006912ce7e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-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 da1bbbb5-7673-472b-8eab-d7006912ce7e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set da1bbbb5-7673-472b-8eab-d7006912ce7e
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 ###


Which seems to be in working order to my untrained eye.

Thank you.

dabl
July 22nd, 2010, 10:21 PM
This is a pretty good guide to Grub 2: http://kubuntuforums.net/forums/index.php?topic=3106368.0

How did you partition this hard drive? Don't forget that Grub 2 starts counting partitions at #1, versus Grub legacy which starts with #0.

JCMB1
July 22nd, 2010, 10:29 PM
Thanks, I've been racking my brain on similar guides which aren't helpful to those who are not Ubuntu philes.

It is partitioned as one large hard drive.

Anyway, I know that the root directory is (hd0,1) and have seen the grub.cfg file.

Please note that I have added the grub.cfg info to the original post.

I have to admit a lot of frustration that I have to come along after setting up the installation to try and tweak it to work, when it looks as if it should be up and running per grub.cfg file.

oldfred
July 23rd, 2010, 01:49 AM
From the grub2 link have you tried manual boot. Example below will not have your drive, partition X,Y correct nor linux drive sda5 correct, adjust to your settings:

Manual boot:
Display the drives/partitions known to GRUB 2.

ls (hdX,Y)/
Display the contents of the / folder of the designated drive/partition.

ls (hdX,Y)/boot
Display the contents of the /boot folder. Example: ls (hd0,5)/boot

ls (hdX,Y)/boot/grub
Display the contents of the /boot/grub folder. Example: ls (hd0,5)/boot/grub

insmod ext2
set root=(hd0,2)
linux /boot/vmlinuz-<hit tab to auto-complete> root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img<hit tab to auto-complete>
boot

JCMB1
July 23rd, 2010, 02:50 AM
I have pretty much tried everything regarding boot options.

And when I tried


insmod ext2
set root=(hd0,2)
linux /boot/vmlinuz-<hit tab to auto-complete> root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img<hit tab to auto-complete>
boot

the first time I used the command
initrd /boot/initrd.img<hit tab to auto-complete>

I received the response "cannot find disc"

Hitting boot gave me a black screen on that attempt.

I tried the commands again and received:

mount: mounting /dev/sda2 on root failed: Invalid argument
mount: mounting /dev/ on root failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init
No init found. Try passing init=bootarg


Which placed me in Busybox v1.13.3 with an (initramfs) prompt.

Now what?

oldfred
July 23rd, 2010, 04:42 AM
Just to be sure that everything is in the correct place. Sometimes just a reinstall of grub to the MBR solves issues.

Boot Info Script courtesy of forum member meierfra
Page with instructions and download:
http://bootinfoscript.sourceforge.net/
Paste results.txt, then highlight entire file and click on # in edit panel(code tags) to make it easier to read.
Or You can generate the tags first by pressing the # icon in the post's menu and then paste the contents between the generated [ code][ /code] tags.

JCMB1
July 23rd, 2010, 12:27 PM
The boot info script would work wonderfully...

if I were able to get into Ubuntu. As I said in my first post: the live CD results in a black screen.

I can use the Parted Magic terminal, but I am not sure what commands this would require.

drs305
July 23rd, 2010, 12:45 PM
You should be able to boot from the Grub2 command line, but it shouldn't be (hd0,2) but (hd0,1). oldfred said to adjust your settings to match your system. Since you only have one OS, your boot files should be on sda1 (hd0,1).

Actually, going from the "grub-rescue" prompt to "grub" prompt is a regression. The grub-rescue prompt indicates grub knows where the files are but can't boot for some reason. The 'grub' prompt essentially is saying that Grub2 has no clue what to do.

JCMB1
July 23rd, 2010, 12:57 PM
I did switch to (hd0,1) since that was the only partition.

Nope, it seems that grub is clueless.

What does a black screen mean (which I receive when I try an Ubuntu live CD).

oldfred
July 23rd, 2010, 04:40 PM
Black screen often is a video problem. I have nvidia but the nomodeset works for some others. But many video cards have different settings to set going.

I had to do this:
boot from the cd, press F6 and then select the nomodeset option.
(I edited my grub.cfg in my USB flash as I use grub2 to boot ISO, or in syslinux.cfg or text.cfg in other USB flash setups)
then
On first boot after install, press e on getting the GRUB bootloader.
Using arrow keys navigate to and delete quiet and splash and type the word nomodeset in their place
Press Ctrl and X to boot (low graphics mode)

After I installed nvidia driver (default from pop up) then it has worked without issue.
gksudo nvidia-settings

JCMB1
July 23rd, 2010, 08:55 PM
I'm not sure if I would call this solved, but I was using an alternate CD.

drs305 was very helpful and we managed to get into ubuntu's tty mode, but no desktop.

I am going to try a reinstall using a regular ubuntu install CD.

JCMB1
July 25th, 2010, 06:54 PM
Not really solved

After all the bloody headaches, I finally got Ubuntu 9.10 loaded and it's up and running on the laptop.

Of course, that wasn't without pain as I had the "error: no such device" problem which was easily solved using the forums and this handy bit of advice:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

I deleted the line in the boot script which was like this:
search --no-floppy --fs-uuid --set 86d32ee3-aec6-490b-8dab-e5cfff9c7af9
And the laptop is now up and running beautifully!

Again, thanks for all your help.

I am so happy to be free of the Microsoft Windows tyranny (and not to have had to update the bios on the winbook w320 to recognise the new large capacity hard drive)!:D