stuck at GRUB prompt
Results 1 to 3 of 3

Thread: stuck at GRUB prompt

  1. #1
    Join Date
    May 2005
    Location
    canada
    Posts
    206

    stuck at GRUB prompt

    hi,

    i'm running debian, i think 2.6. i did updates last saturday and when i rebooted after, the computer got stuck at the GRUB prompt.

    i've tried rebooting but it never gets past this. i also cannot ssh/telnet into the computer so i'm not sure what to do to get this computer to boot.

    i have some basic unix/linux knowledge but i have never dealt with GRUB.

    thanks,
    dave

  2. #2
    Join Date
    Aug 2010
    Location
    Southern ON Canada
    Posts
    442
    Download and burn this little program to a CD or whatever you like, and boot to it and see if it will help you.



    http://download.berlios.de/supergrub...rid-1.98s1.iso

  3. #3
    Join Date
    May 2005
    Location
    canada
    Posts
    206
    hi cdroman,

    thanks for the tip, i ended up finding my solution. i'm posting it here in case someone else finds it useful:

    Manual Load Process
    Still Having Issues...
    If you still get the Grub prompt, we can load the kernel manually.
    First we need to find out where the kernel files are located. Again, SLES puts the kernel files in the /boot/ directory as with most distros. Then we need to set "root" to its proper disk device, tell Grub which kernel to use and then which initrd to use
    Note: The word "root" is used here to represent a starting point. It has nothing to do with the user “root”.
    We remember from above, that the Grub files are located on (hd0,1), but I will show the find command again for consistency.
    grub> find /boot/grub/stage1
    (hd0,0)

    Now that we know the hard disk partition that the kernel files are located, we can set the root location.
    The root will be on the same hard disk and partition that we found the Grub file /boot/grub/stage1 on. The "root" would be on (hd0,0). To set this we enter the root command,
    grub> root (hd0,0)
    Filesystem type is ext2fs, partition type 0x83

    We can see that grub has found a Linux file system EXT3, and set root to it. It says EXT2 but it’s really EXT3.
    Next we need to tell Grub which kernel file to load and where it’s located. We use the “kernel” command. One thing I know is, I have no idea the name of the kernel file to load. Like working in Bash, the Tab key can help us. We want to specify our “root” as part of the path, otherwise Grub won’t know which device partition to use.
    grub> kernel (hd0,0)/boot/
    Possible files are: map grub initrd-2.6.32.12-0.7-pae symvers-2.6.32.12-0.7-pae.gz
    Kerntypes-2.6.32.12-0.7-pae config-2.6.32.12-0.7-pae vmlinuz-2.6.32.12-0.7-pae initrd
    backup_mbr symtypes-2.6.32.12-0.7-pae.gz vmlinuz vmlinux-2.6.32.12-0.7-pae.gz
    System.map-2.6.32.12-0.7-pae
    grub> kernel (hd0,1)/boot/

    I look for the file, (for SLES), that starts with vmlinux for my server. I see three possible choices.
    vmlinuz-2.6.32.12-0.7-pae
    vmlinuz
    vmlinux-2.6.32.12-0.7-pae.gz
    The file that ends in “gz” is a compressed version of my kernel and “vmlinux” is really a symlink to the real kernel file, so our choice is vmlinuz-2.6.32.12-0.7-pae
    We then enter the command to load the kernel file.
    grub> kernel (hd0,0)/boot/vmlinuz-2.6.32.12-0.7-pae root=/dev/sda1
    [Linux-bzImage, setup=0x1400, size=0x12c945]
    grub>

    I added the additional “root=/dev/sda1” because this kernel needs to know which device has the root file system (/).
    After that loads, we need to load the initrd (Initial RAMdisk) file. Some kernels do not need it, it is default in SLES so we’ll load it also. It is important to know that the initrd file will have the same numeric version as the kernel. Using the listing above, we can see that the file is named, initrd-2.6.32.12-0.7-pae, but you can use the Tab key here also.
    grub> initrd (hd0,0)/boot/initrd-2.6.32.12-0.7-pae
    [Linux-initrd @ 0x3c8000, 0x27dcb bytes]
    grub>

    If anything is not right, at this point you will probably experience a Kernel Panic and have to power cycle the server.
    Otherwise, we have one last critical step, booting the server.
    At the Grub prompt, enter the boot command.
    grub> boot

    If you’ve provided the proper information, then the kernel should take over control and you should see familiar processes scroll and your server boot. When complete, if you need to re-install Grub or repair your disks, you will need to do so at that time.


    Re-installing Grub from within Linux
    You need to get yourself a shell command prompt up (either open a terminal window or press Ctrl Alt F1 to get a text only console - Ctrl Alt F7 will return you to the GUI), and you will need to be the root (su -) user (either logon as root or enter su - followed by the root password).

    From that command prompt you will need to enter the grub-install command. This takes one parameter - the name of the hard disk whose master boor record (mbr) will be having grub installed on it. This being Linux, you will need to use the Linux way of naming hard disk drives (see my aside, above, for an explanation on naming standards) . There is no need specify the hard disk partition that has the /boot/grub/ folder, as the one on the Linux that you are running will be used (this can, if needed, be overridden , see "info grub" for information).

    So, if I want to use the mbr on the first hard disk (that is, the hard disk that is master on the first IDE cable) I would type (note, I've deliberately left the command prompt in my example, please don't type it) :-

    Code:
    [root@localhost root]# grub-install /dev/sda1
    Installation finished. No error reported.
    This is the contents of the device map /boot/grub/device.map.
    Check if this is correct or not. If any of the lines is incorrect,
    fix it and re-run the script `grub-install'.

    # this device map was generated by anaconda
    (fd0) /dev/fd0
    (hd0) /dev/hda
    And that's all there is to it.

    ---------------------------

    dave

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •