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.
Ive been having problems with grub. im a real noob to linux but good with windows. my scenario is i downloaded and burned redhat 9 and installed it on my computer fine and set it to use grub. I formatted and installed redhat on my hdd2 and have windows on hdd1. now when i try to boot from my linux harddrive it says "grub" and stays there forever. I cant get past that and im really mad, any help would be appreciated.
If it objects to a line try varying it. For instance loose devfs=mount from the first line. (Grub counts from 0, the first hard drive is hd0, etc.)
Below is the sort of stuff grub expects, but should usually add 'boot' to the end as above. This may well be bollocks.
# the following is the origional file from Mandrake, as it were. Saved as menu.lst.origional, in this directory.
#timeout 10
#color black/cyan yellow/cyan
#i18n (hd0,0)/boot/grub/messages
#altconfigfile (hd0,0)/boot/grub/menu.once
#default 0
#title linux
#kernel (hd0,0)/boot/vmlinuz root=/dev/hda1 devfs=mount
#initrd (hd0,0)/boot/initrd.img
That should let the windows boot manager find Linux...but make sure you have an entry in the boot manager for linux (there's a utility to do this in windows, I can't remember what it's called...bootfix maybe?).
There's a Dual-Boot how-to on tldp.org I think, that helped me figure all this stuff out when I was having problems with it.
Last edited by marcheikens; 01-19-2004 at 02:57 PM.
Oops, Windows boots fine...when you boot for the first time, you see the windows boot manager then, right? Then you need to do the dd if=.... command. Don't do the first part (grub-install), or you'll overwrite the windows boot manager, which is easily fixable but why mess with something that works, right?
Last edited by marcheikens; 01-19-2004 at 03:03 PM.
If hdd2 isn't valid, you have to find out where your /boot/grub/ directory is. If you had only one partition for Linux it should be whatever your / partition is, so if you start up in rescue mode from the cd and type 'mount' alone, it should tell you (whichever partition is mounted at /mnt/sysimage). Use that, and type the 'dd if=....' command, substituting that partition for the if= part ('if' means 'input file').
Here's what I did, long hand:
Linux /boot was /dev/hde1 and Linux / was /dev/hde2. Installed Windows on /dev/hde3. (/dev/hde4 was swap, doesn't matter.) Started up from Linux cd, linux rescue. Then mounted my XP partition to /mnt/win/, typed 'dd if=/dev/hde1 of=/mnt/win/Linux.bin bs=512 count=1'. Before rebooting, edited grub.conf to have:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-6)
root (hd0,0)
kernel /vmlinux-2.4.20-6 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-6.img
title WinXP
rootnoverify (hd0,2)
chainloader +1
Note that if you have only one partition, the above needs to be changed to reflect that--so before /grub, /vmlinux, and /initrd you need a /boot. Plus, note that (I think) when you install a bootloader on a drive that's not "normally" the first drive seen, like hdd instead of hda, I am pretty sure that one becomes (hd0,0). The first number in that set is the drive number, as grub numbers them, and the second one is the partition number, starting at 0. So if Linux is indeed on /dev/hdd2, then you'll want to use (hd0,1), while for Windows on /dev/hdd1 you'll want (hd0,0).
Next, also before rebooting, vi /mnt/win/boot.ini and made boot.ini look something like this:
[boot loader]
timout=30
default=c:\linux.bin
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS\"Windows on /dev/hdXX"
c:\linux.bin="Linux on /dev/hdYY"
I think you should only have to change the number after partition, and the XX and YY just for your information, they're just labels. If windows is on hdd1, then partition(1), hdXX should be hdd1, and hdYY should be hdd2.
Just a suggestion: while I've done this about three times (wanted to get things working 'just right' for my computer), the only reason I could remember it was because I wrote down my steps when I got it to work. Keep a journal of the major things you do, that way if/when things go south you can quickly get back to where you were. Oh and don't forget, with the windows boot manager and grub, if things get messed up and don't boot, don't worry, there's always a way to fix it, in my experience. Just start up from your windows or Linux boot disk, and start over. I was wrong above, starting up from the XP install CD doesn't do crap, you need to use a boot disk, then look for commands relating to the boot loader. I think it is bootfix though. It should guide you through a process of fixing the boot loader.
One more thing, whichever you fix last, grub or windows, will be the default one you start up from. I prefer grub first, so I installed that last. I manufactured it so that I get grub at startup, and then if I select windows, it gives me the windows bootloader, where (if I made a mistake) I can select Linux and go back to grub.
Please tell me this helped. It's late and I'm tired, and if I've made serious mistakes then I apologize.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.