Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I resized some partitions today and now GRUB isn't booting Linux properly. When I try, I just get the word "GRUB" at the top of the screen and nothing happens after that. Can alyone tell me what I have to do to repair it?
If it matters, I have a 100MB /boot partition (/dev/hdb1).
fdisk -l
Disk /dev/hda: 46.1 GB, 46103371776 bytes
255 heads, 63 sectors/track, 5605 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 7 56196 1b Hidden Win95 FAT32
/dev/hda2 * 8 5605 44965903+ 7 HPFS/NTFS
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 14 112423+ 83 Linux
/dev/hdb2 15 3202 25607610 83 Linux
/dev/hdb3 3203 3333 1052257+ 82 Linux swap
/dev/hdb4 3334 4865 12305790 c Win95 FAT32 (LBA)
grub.conf
grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hdb1
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-13.9)
root (hd1,0)
kernel /vmlinuz-2.4.20-13.9 ro root=LABEL=/
initrd /initrd-2.4.20-13.9.img
I took a good look at the webpage you hyperlinked; however, it still isn't working even after a reinstall of GRUB (grub-install).
I wrote myself a /etc/lilo.conf file and installed LILO instead, and this seems to be working. It's not the way I wanted to fix the problem, but it'll do for now. At least I don't have to boot with a floppy and I have my GUI back. I couldn't boot into a GUI with my floppy because the Linux kernel on the floppy was older and my video driver was compiled for 2.4.20-13.9
Basically, I've successfully fixed the symptom, but haven't properly diagnosed the problem.
After installing LILO, RHL boots just fine. Oddly enough, however, I tried to reinstall GRUB again (after LILO was installed and working). I figured one of two things would happen at that point: one, GRUB works properly and boots Linux, or two, GRUB doesn't work and doesn't boot Linux. I never thought that option number three would occur: LILO still boots Linux. I don't get it. I'm pretty sure I was installing GRUB correctly with
grub-install --root-directory=/boot /dev/hdb
but it still didn't work. Oh well. Screw it at this point. LILO is working, Linux is booting, and I am happy.
I assume that when you are getting grub boot fail (as you described ar your 1st post) the grub prompt ('grub>') is not available (booting process freezes). I got the same when I pointed improper root partition for grub.
Nope. Black screen, with one word on it in white: GRUB. No prompt. Nothing. Nada. Nichts. Rien. (sorry, I don't know the word for "Nothing" in Polska).
What can I say...
In such case you may prepare boot diskette with grub (see 'info grub -> Installation -> Creating a GRUB boot floppy' for details). It'll allow you to boot grub. You'll see the grub prompt.
Next it will be possible to type in grub commands instead of using grub.conf. So you may check a lot of combinations of 'root....', 'kernel....' etc commands. Anyone has to do. The found commands parameters should be used in grub.conf
I have also two doubts concerning your current grub configuration:
1. why you use 'grub-install --root-directory=/boot /dev/hdb' instead of 'grub-install --root-directory=/boot /dev/hda' ? Is hdb bootable in any way (BIOS setup, Windows driven boot)?
2. I'm not using initrd file so I'm not sure it requires recreating after changes you have made. I think you may just comment this line for the trials.
BTW: Nothing is Nic in my language (pronounced 'nitz' :)
There is a reason that I'm attempting to install GRUB to /dev/hdb.
I am a Linux newbie. I will be for some time. When I made the decision to install Linux, I unfortunately couldn't just drop my Windoze crutch. So I went out and bought a 40GB drive to install Linux on instead of partitioning the hell out of my existing drive.
Then I thought, "Hey, I'm going to need some way of selecting which OS to boot." So I got a hacked copy of PowerQuest's PartitionMagic and BootMagic. I installed BootMagic on C: (oops, er, I mean, um, /dev/hda, heh heh) then installed Linux on /dev/hdb (the new drive). I hadn't realized that Linux would come with a boot selector like GRUB or LILO (more precisely, I had never even heard of GRUB or LILO) and didn't realize that they would do the same exact thing as BootMagic.
I get VERY scared when I have to overwrite an MBR, especially on the drive that contains the sum of everything I've ever done computer-wise in my being, so I just left BootMagic alone and installed my Linux boot manager to /dev/hdb.
It makes sense.
So I see that the booting process starts with Bootmagic. You next choose the OS (Win or Linux), yeah?
I do not know the BootMagic so below info are only my suspicious & doubts :)
I am wondering BootMagic is able to boot MBR from the second drive.
The typical boot loaders are starting from the MBR of first drive (see note below) and next (second stage of boot) give the control of the OS-dependent bootloader located inside chosen OS partition (located usually on 1st sector of OS partition).
So being you I would rather try:
grub-install --root-directory=/boot /dev/hdb1 ---not hdb
You can also try the following:
1)
-enter setup BIOS
-disable first harddrive
-try boot
2)
-enter setup BIOS
-choose the second drive as first boot device
-try boot
--note--
using p (2) you can set the MBR of second drive to act as the fist stage boot, so the Bootmagic should not take part in boot
if it works you can next modify grub.conf to get Windows booted
was what I needed. May the Penguin deliver you many tidings of great joy.
One oddity here, though - the files necessary for booting (vmlinuz, initrd, stage*, menu.lst, grub.conf, etc.) were located in /boot/grub. Now they're in /boot/boot/grub.
After reinstalling GRUB with your aforementioned command and rebooting, I was presented with a grub> prompt, which indicated to me that GRUB couldn't locate the grub.conf file. So I rebooted from floppy and noticed a /boot/boot/grub directory. I copied the menu.lst symlink, the grub.conf file, and the splash.xpm.gz file from /boot/grub to the new directory and GRUB booted just fine.
It looks to me that the reinstallation was relative to /boot and not root. Should I try again without the --root-directory=/boot switch?
Of course you should try 'grub-install --root-directory=/ dev/hdb1' instead. Experiments are the way for knowledge :)
Sorry I've never done 'grub-install'. I've always used grub command line for installing grub.
That was it. GRUB is now looking in /boot/grub for the files it needs instead of /boot/boot/grub.
I certainly agree that experimentation is way to knowledge. However, as I mentioned earlier, I do NOT like to experiment on the MBR of a hard drive.
Thanks so much for all your help. This was one of the reasons that I decided to move over to Linux - because I knew that when I had a problem, one or more friendly, helpful, established members of the Linux community would come to my rescue as you have done. I can only hope that someday I'll be one of the people answering the questions instead of asking them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.