LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   odd GRUB issues (https://www.linuxquestions.org/questions/linux-software-2/odd-grub-issues-761166/)

irkkaaja 10-11-2009 10:31 AM

odd GRUB issues
 
I'm trying to reinstall grub to my disk after installing winxp in an unallocated partition (which deleted it to begin with).
I followed the directions here more or less exactly, but I get thrown into a GRUB prompt instead of seeing a menu.

I can't figure out how to boot from the prompt or configure GRUB to show a menu.

For what it's worth, /dev/sda1 points to winxp in a primary partition and /dev/sda5 points to Zenwalk 6.2 in a logical partition

Ahmed 10-11-2009 12:57 PM

You need a configuration file for grub so that it knows what kind of OSes it can boot. Usually it's placed under /boot/grub/menu.lst . You can find out more here:

http://www.gnu.org/software/grub/man...#Configuration

Note: In the line of the root partition, sda1 would be written as

Code:

root (hd0,0)
And sda5 would be

Code:

root (hd0,4)
-A

hurry_hui 10-11-2009 01:19 PM

To manually boot your OS from grub prompt:

for windows
Code:

rootnoverify (hd0,0) [press ENTER]
chainloader +1 [press ENTER]
boot [press ENTER]

for zenwalk
Code:

root (hd0,4) [press ENTER]
kernel /boot/[press TAB to see available kernel, type the one you want][insert space]root=/dev/sda5 [type another options here or just press ENTER]
boot [press ENTER]

Btw, you might want to add 'initrd' line before 'boot' in zenwalk stanza.

CMIIW

AwesomeMachine 10-11-2009 02:37 PM

If you boot into a rescue system from the install CD:

linux # rescue

There is usually an option to reinstall grub, update grub, and/or install grub. I'm not sure about slackware. I haven't used that distro recently. But rescue is a pretty standard of part of install CDs. You can also boot from a linux live cd, and chroot to the root partition of the hard drive, and install grub:

From a Knoppix CD, say you mount the hard drive root at /mnt/hda2. You launch a terminal window, and:

chroot /mnt/hda2

and the root in your hard drive installation becomes the root in the live cd. Then you can reinstall grub to the proper root partition. There are also some live CDs just for rescue. Grub should find the Windows installation and put it in the menu choices.

irkkaaja 10-11-2009 04:50 PM

Grub is configured, and winxp boots fine; however, zenwalk panics on boot, complaining that none of the available drivers will mount the root filesystem. I know the fs isn't corrupted, though, because it mounts just fine (as xfs) from a livecd, so, er, what's up with that?

menu.lst contains:

Code:

title  Zenwalk
root    (hd0,4)
kernel  /boot/vmlinuz

For what it's worth, /boot/vmlinuz is a symlink ->vmlinuz-2.6.30.5. Zenwalk boots by default from LILO, not GRUB, same as Slackware, so there might be some finagling required to make it work with GRUB, though I'm not sure what that would be.

Ahmed 10-11-2009 05:11 PM

Quote:

Originally Posted by irkkaaja (Post 3715792)
Grub is configured, and winxp boots fine; however, zenwalk panics on boot, complaining that none of the available drivers will mount the root filesystem. I know the fs isn't corrupted, though, because it mounts just fine (as xfs) from a livecd, so, er, what's up with that?

Usually when that happened to me, it was because I had compiled a kernel where the support for my fs was not built into the kernel, but compiled as a module - of course conveniently stored on the same file system it was supposed to open. Kind of like locking your car keys into the car..

Either that, or you need an initrd image. But I get along very well without one in Slackware, so I suppose you should as well.

So my suggestion: Check whether you have a kernel image on the system with built-in XFS support. The kernel config files are usually stored in /boot (Search for the line with CONFIG_XFS_FS, and see if it's set to "y"), and see if that kernel boots up. If you don't have any, (re)compile one yourself.

Good luck!

-A


All times are GMT -5. The time now is 11:53 AM.