Stuck on "GRUB_" Screen - Will boot from Live CD "Boot from first hard disk" option
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Stuck on "GRUB_" Screen - Will boot from Live CD "Boot from first hard disk" option
Hello there,
I know that there have been many other people that have been having this problem, as I have spent the past few days browsing through forums and google searches trying to figure this out. I am new to Linux, and am working with a Ubuntu 8.10 distro on this particular system, a Toshiba M30-YSJ (Linked to show specs, if it really matters). The only changes to this system is adding in another 512 MB stick of RAM.
So here is my problem, or as much of it as I can figure out. I've gone through and set up grub to install on the MBR of the HD, as I only want this system to boot to Ubuntu. While re-installing the OS, hoping that an option in the loader might fix this issue, I noticed that the hard drive was being identified as a SCSI drive. (This seems weird to me, but I think it's shown itself as part of the problem) As in the title, the system will boot fine if I boot off of the ubuntu disk, then select "Boot from first hard disk" option. I boot into the harddrive and can make changes.
What I can see from looking at some of the files in the system... (I'm typing this out by hand on a different system, so please ignore any typos, and omitted the UUID's to save my sanity)
So what I see here, by the /dev/sda1, and from what I read, is that the HD is regarded as a SCSI drive, right?
Now, when I load into grub in the terminal, any attempt to set the grub root to (sd0,0) or (sd0,1)... results in an Error 23: Error while parsing number.
However, when I enter in root (hd0,0), no error is generated, and a 'setup (hd0)' command returns:
Checking if "boot/grub/stage1" exists... yes
Checking if "boot/grub/stage2" exists... yes
Checking if "boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1_16 p (hd0,0) /boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
Upon rebooting, my system seems to remain at the same place, stuck on the GRUB_ screen, with booting from the CD option "Boot from first hard disk" working fine,and showing the GRUB prompts as it boots.
So if anyone out there can lend assistance, it would be greatly appreciated. In looking at this, might the problem be with my /dev/sda1 drive not being the mounting point for /root? Or has my investigation into this matter taken me on a whole different route?
Thanks
*Edit - I also saw some comments on a GRUB page that suggested updating the BIOS for the system. It is at the most current one availiable on Toshiba's website, 1.5*
Ubuntu Intrepid actually lists all HDDs as /dev/sd* whether they are IDE, SATA, USB, etc, so it's OK that your HDD is listed as sda. About Grub, Grub is the opposite because it lists all HDDs as (hdX,Y) whether the drive is IDE, SATA, USB, etc; so there is no (sdX,Y) in Grub's Convoluted World. Have you tried reinstalling Grub to the MBR (Master Boot Record) of your HDD using the Super Grub Disk? I've found that sometimes using just a slightly different version of Grub can make a difference in situations like yours where Grub boots only under certain restrictive circumstances, so I would first give Super Grub a try. If that doesn't change anything, how about downloading the Boot Info Script to your Ubuntu desktop, open a terminal (Applications > Accessories > Terminal) and do:
Code:
sudo bash ~/Desktop/boot_info_script*.sh
That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of that file to your next post, highlight the copied text, and click the pound sign # graphic in the linuxquestions.org forum message box so that the text will get "code" tags put around it. The results of that script will help clarify your setup and maybe give some clues about your booting problem.
And lastly, what are your HDD-related settings in BIOS? If you can go into your BIOS, try looking for settings like "auto-detect", LBA, CHS, RAID, AHCI/HCI/EHCI vs. IDE, IDE-emulation, ACPI, DMA, etc for your HDD, and please let me know what your current settings are. We can work from there if you want.
CJS,
Thanks for giving me a hand with this. It's greatly appreciated! So, I downloaded and burned the Super Grub Disk, and ran it on that system. The option that I selected was "GRUB => MBR & !Linux! (1) Auto ;-))) off of the Super Grub Disk options.
This is what it generated:
Code:
Booting command-list
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=~~~~ ro
Error 13: Invalid or unsupported executable format
Press any key to continue...
When trying to load the (recovery) kernel, the same error was generated.
I went back into SGD into the following menu system:
Choose Language and Help
GNU/Linux
Fix Boot of GNU/Linux (GRUB)
which then loads the following screen:
Code:
<---- BACK (Error 6 is OK)
N IDE SCSI GRUB HURD TYPE SIZE OS
1 hda1 sda1 (hd0,0) hd0s1 ext2fs 71GB Ubuntu 8.10 \n \l
/boot/grub/stage1
So I select the 3rd line, starting with 1.... SGD returns with SGD has Succeeded!
After rebooting the system, the problem still remains, so I went ahead and downloaded the Boot Info Script. The results are as follows:
Code:
============================= Boot Info Summary: ==============================
=> Grub0.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.
sda1: _________________________________________________________________________
File system: ext3
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 8.10
Boot files/dirs: /boot/grub/menu.lst /etc/fstab
sda2: _________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sda5: _________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
=========================== Drive/Partition Info: =============================
Drive sda: _____________________________________________________________________
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x1fc42245
Partition Boot Start End Size Id System
/dev/sda1 * 63 150,255,944 150,255,882 83 Linux
/dev/sda2 150,255,945 156,296,384 6,040,440 5 Extended
/dev/sda5 150,256,008 156,296,384 6,040,377 82 Linux swap / Solaris
blkid -c /dev/null: ____________________________________________________________
/dev/sda1: UUID="b0f2a9a6-528d-47ad-9799-bd7362270628" TYPE="ext3"
/dev/sda5: UUID="0a22cc3a-df1f-47e8-b737-90b59048f271" TYPE="swap"
=============================== "mount" output: ===============================
/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,nosuid,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
lrm on /lib/modules/2.6.27-7-generic/volatile type tmpfs (rw,mode=755)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/jean/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jean)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,utf8,user=jean)
=========================== sda1/boot/grub/menu.lst: ===========================
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=b0f2a9a6-528d-47ad-9799-bd7362270628 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=b0f2a9a6-528d-47ad-9799-bd7362270628
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-7-generic
uuid b0f2a9a6-528d-47ad-9799-bd7362270628
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=b0f2a9a6-528d-47ad-9799-bd7362270628 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid b0f2a9a6-528d-47ad-9799-bd7362270628
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=b0f2a9a6-528d-47ad-9799-bd7362270628 ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid b0f2a9a6-528d-47ad-9799-bd7362270628
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
=============================== sda1/etc/fstab: ===============================
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=b0f2a9a6-528d-47ad-9799-bd7362270628 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=0a22cc3a-df1f-47e8-b737-90b59048f271 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
=================== sda1: Location of files loaded by Grub: ===================
6.7GB: boot/grub/menu.lst
6.8GB: boot/grub/stage2
6.7GB: boot/initrd.img-2.6.27-7-generic
6.8GB: boot/vmlinuz-2.6.27-7-generic
6.7GB: initrd.img
6.8GB: vmlinuz
As for the HDD-related settings in the bios? There are none. Being a commercial laptop, the BIOS is totally dumbed down to little more than date/time options, display modes, WOL settings, and LAN boot protocols; so unfortunately, there is nothing I can help with there.
According to all the information from the Boot Info Script, Grub is installed correctly to your sda drive as we would expect. Is there any way you could get a BIOS upgrade for that computer, or is that out of the question? If you can't get a BIOS upgrade, you might have to live with just booting from a CD, but for convenience you could make a dedicated Grub CD that would boot your HDD automatically. That way to boot into Ubuntu, you could just pop your dedicated Grub CD in and away you go. Or another option that might work is if your BIOS supports USB booting, you could install Grub to a USB stick and boot with that. That's about all I can suggest, because without having any HDD BIOS parameters to tweak, it's usually really difficult trying to circumvent strange Grub behavior like you are experiencing (at least in my experience). In case you want to make a dedicated Grub boot CD or USB stick, let me know, and I can give you specific directions.
if you love ubuntu do a clean re-install not a rescue.
a rescue may have stuffed things up...and I see others have suggested a number of things and grub is supposed to be easy to fix...if its a grub issue...but grub can not self solve a borked partition table.
------------------------------------------------------------------------------
If you agree to take my advice...boot a live cd and do this
open a terminal
Code:
su
dd if=/dev/zero of=/dev/sda bs=512 count=1
then a good live cd will have fdisk or cfdisk or sfdisk or qtparted or gparted on them
create PRIMARY partitions only....I hate ubuntu for deciding to make your extended when you only needed 2 partitions
then boot up your ubuntu.....or get it over and done with and come to sidux heh heh
I think you are misinterpreting the output of the Boot Info Script. His sda1 partition is about 77 GB, and the above info you quote is for the physical location of the boot files; all the boot files are within the 77 GB partition, so that is as expected and has nothing to do with his partition table.
I just want to say thank you to everyone for all the help!
I was messing around with everything last night, and it does seem to have been an issue with the partions/partition table of the drive. I tried everything down the list till I got to aus9's post, when I went and did a full wipe of the drive, re-did the partition table, and re-installed Ubuntu. After this, the system seems to be booting just fine!
Thanks again for the help! It's been great to see such helpful people on these forums!
Hi Aus9, the script gives the physical location of the boot files from the beginning of the drive, not from the beginning of the partition where they are in. That is intentional, because that info is for troubleshooting when you get a Grub error 18:
Quote:
Originally Posted by Grub Manual
Grub Error 18: Selected cylinder exceeds maximum supported by BIOS
This error is returned when a read is attempted at a linear block address beyond the end of the BIOS translated area.
In other words, some computers have older BIOSes that can't access anything on the HDD past either 8.4 GB or 137 GB, depending on the limitation of the BIOS. That means if any of Grub's boot files or the linux boot files are beyond that range, you will get a Grub error 18 for computers with that BIOS limitation. So whenever you get a Grub error 18, in my experience I have found the first thing to look at is where the boot files are physically located on the drive, and then it usually becomes clear if it is a true Grub error 18; in more rare instances, I have found sometimes there is some other factor that causes a Grub error 18, but you have to know first whether the boot files are within either the 8.4 GB or 137 GB range to have any clues. Hope that helps clarify it some.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.