Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: NESnerd on 23 July 2002, 08:59

Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 08:59
Uh, I'm stupid...help me. ;)

I installed Redhat 7.3, and I need to install GRUB as my bootloader (which I think I know how to do, just need to do it), but I want to dual boot between that and ::cough::Windows::cough::. Anyway, both operating systems are on a seperate hard drive, (linux on my second one) and I wanted to make sure I did it right, as I tend to f^ck things up easily. So uhm, yeah. What do I do.
Title: Help Configure GRUB
Post by: Master of Reality on 23 July 2002, 21:20
man grub
man grub-install
the man pages are always a must look.
to install grub on the first HD you would need to do 'grub-install /dev/hda' i think.

Before you do that you need to add the appropriate OSes to the grub.conf.

I think the entry for redhat should look like:

title redhat /*the title that will be in the menu*/
root (hd1,0) /*root of the boot parition which is second harddrive first partition, grub starts counting at zero*/
kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/hdb1 hdd=ide-scsi /*where your kernel image is.. this is just what mine looks like*/
initrd /boot/initrd-2.4.7-10.img

this is what the windows entry should be:

title windoze
root (hd0,0)
makeactive /*makes the partition active*/
chainloader +1 */grub hands off the rest of loading to the partition*/

I am almost positive about the windows entry and not so sure about the redhat entry.

[ July 23, 2002: Message edited by: Master of Reality / Bob ]

Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 21:23
http://www.gnu.org/manual/grub/html_mono/grub.html (http://www.gnu.org/manual/grub/html_mono/grub.html)
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 10:38
Windows doesn't seem to want to boot. GRUB is all configured and i have Linux and Windows popping up, but when I try to boot into Windows nothing happens, it goes to a blackscreen and then back to the GRUB interface...
Title: Help Configure GRUB
Post by: Master of Reality on 23 July 2002, 10:40
you probably have set it to the wrong partition or have a typo in grub.conf ?
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 11:15
I think it's the 'chainloader +1' part. When I check the thing for errors (or I think that's what I'm doing), the only thing I get a bad response on is that...

Uh, wait, I'm just dumb. With the root (hd0,0) it says about how the filesystem is FAT, partition type 0xc...

[ July 23, 2002: Message edited by: NESnerd ]

Title: Help Configure GRUB
Post by: Master of Reality on 23 July 2002, 11:24
you might have to add 'root noverify' for the windows parition.
if you dont have chainloader +1, grub wont use a chainloader and will try to load windows all by itself by looking for the kernel to load... since windows isnt linux it wont work.
Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 11:29
Yes, the Windows portion of your grub.conf should look like this:

Code: [Select]

assuming that your C: drive is the first partition on your first IDE drive.
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 11:35
I actually thought I might need the noverify once I was looking around, but the F key on that keyboard doesn't work. I suppose I can go in thru the GUI and find one to copy and paste or something. ::roars at old keyboard::
Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 11:39
You don't have an extra keyboard lying around?  How the hell do you get to Forum.Fuckmicrosoft.com without the 'F'? Hell, a new one is like 10 bucks.
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 11:46
Because I'm on a different computer right now! ;)

Yeah, well I hadn't been on that computer in a while, so I hadn't really noticed the bad f key anyway.

But yeah, so I did that, and now, when I go to Windows...it reboots my machine. :-/ I must be stupid or something.
Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 12:09
Can you copy/paste your grub.conf file into a message on this forum.  And can you also copy/paste the output from this command:

/sbin/fdisk -l /dev/hda

The above command should be run as root and the "-l" is a lower case "L".

[ July 23, 2002: Message edited by: VoidMain ]

Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 12:30
I'm sorry, but as of now I cannot. It's on a seperate computer that doesn't have access to the internet on, and I tried to use a floppy to put something on there, and I don't know what happened. But I went in from a boot disk into DOS, and I can't see any of my files on my C drive now, and I don't know what that's from. I sure hope I didn't lose all my work though. That would freak me out.
Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 12:38
What version of Windows is on your drive, and what file system are you running it on? i.e. FAT16, FAT32, or NTFS?  If it's FAT32 or NTFS you will not be able to see anything on your C: drive from a "DOS" boot floppy, you'll need to boot from a floppy with FAT32 or NTFS support. If it's FAT32 you can always mount the Windows partition from your Linux side and view your files.

You can copy/paste the info I asked for into a file and copy it to a DOS formatted floppy, then move to your other machine and paste it into a message.  Or if the machines are near each other just type in the info, it's not that much.
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 12:50
It's a Win98 boot disk, I had been able to see my files there before.

I tried using a floppy, but I was dumb and frustrated.

My current concern is getting back into Windows, for now...

I think I mounted my other hard drive on accident, except it's talking about like a 'hdf', which I had seen earlier, like it didn't refer to it as hda like I would have thought. Anyway, I don't know if it did or not, but if it did and I didn't unmount it, I suppose that could be bad?

[ July 23, 2002: Message edited by: NESnerd ]

Title: Help Configure GRUB
Post by: Calum on 23 July 2002, 13:27
quote:
My current concern is getting back into Windows, for now...

!!! yes, i'd be concerned about that too, best to make 100% sure that you won't be getting back into windows ...

Sorry, i would help, but i don't know anything about grub.
Title: Help Configure GRUB
Post by: voidmain on 23 July 2002, 20:39
Well I don't know what to tell you unless you answer my questions about the output of "/sbin/fdisk -l /dev/hda" and "/sbin/fdisk -l /dev/hdb".
Title: Help Configure GRUB
Post by: NESnerd on 23 July 2002, 23:57
hda and hdb do nothing, it only works as hdf and hde. But here's what I got. And I put in the grub.conf file too. (When I try to go into Windows, it's doing the thing about the file system is FAT, partition type 0xc, and then I have to reset my machine...)


Disk /dev/hdf: 255 heads, 63 sectors, 784 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdf1   *         1         6     48163+  83  Linux
/dev/hdf2             7       687   5470132+  83  Linux
/dev/hdf3           688       784    779152+  82  Linux swap

Disk /dev/hde: 255 heads, 63 sectors, 1870 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hde1   *         1      1870  15020743+   c  Win95 FAT32 (LBA)


Here's my grub.con  ile

# 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/hdf2
#          initrd /initrd-version.img
#boot=/dev/hde
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)
   root (hd1,0)
   kernel /vmlinuz-2.4.18-3 ro root=/dev/hdf2 hdc=ide-scsi
   initrd /initrd-2.4.18-3.img

title Windows
   root (hd0,0)
   makeactive
   chainloader +1

...hope that helps. I was tired last night and getting frustrated easily, so if I sounded like an ass or anything I'm sorry.
Title: Help Configure GRUB
Post by: Master of Reality on 24 July 2002, 01:56
i am confoozled now.
Title: Help Configure GRUB
Post by: NESnerd on 24 July 2002, 05:18
Me too. Heheh.
Title: Help Configure GRUB
Post by: voidmain on 24 July 2002, 06:46
The naming of your hard drives is very strange.  It looks like you must have them hooked up on the secondary IDE channel.  You have nothing on the primary IDE channel, like your CD-ROM drive(s)?  I've never seen it put the first and second drives on anything other than /dev/hda and /dev/hdb, but then I always hook up my drives as the first items on the primary channel and hook the CDs up to the secondary so I am not sure what they would do otherwise.

However, it should not be a problem. It appears that your Linux drive is indeed the second hard drive and you have grub properly set up to access it as hd(1) so your Win drive should be accessed as hd(0) which you do. However, you do not have the Windows settings like I said:

rootnoverify (hd0,0)
chainloader +1

You shouldn't need the "makeactive" tag.

Now, if it just plain will not boot with the above settings you can try a couple of things to get back to your WIN system.

1) Try accessing your Win files from your Linux installation by:

# mkdir /windows
# mount -t vfat /dev/hde1 /windows -o ro

This will mount your Windows drive under the "/windows" directory so you can see if you can see your files.  The "-o ro" option makes the mount "read only" so you can't accidentally erase anything from your Windows drive.  You can browse around under the "/windows" directory to see if your files are in tact.

2) Remove the second Linux hard drive and set your jumper on your first drive so it is configured for a "single drive". You may have to put the jumper on the "cable select" jumper depending on the drive.  Then see if it will boot.  If it does not make sure your Windows parition is set "active" in FDISK.  If that does not work, you can restore your boot sector by booting from a Win95 floppy with a copy of FDISK.EXE on it and type "FDISK /MBR" (it will restore the master boot record for the drive).  The MBR is a 512 byte boot sector. It actually copies the second good Win copy of the MBR and overwrites the first copy, the one that GRUB/LILO would have overwritten when installed.

NOTE: You may also have to turn off the second drive in your CMOS/BIOS configuration on your computer.

Then see if it will boot.  It should, as long as you can see all of your files when you mounted the partition in Linux from the first step.

[ July 23, 2002: Message edited by: VoidMain ]

Title: Help Configure GRUB
Post by: NESnerd on 24 July 2002, 21:34
Just changing it to rootnoverify and taking out makeactive, it takes me to a screen that says...

Booting 'Windows'

rootnoverify (hd0,0).
chainloader +1

GRUB

And doesn't let me type anything, and won't let me escape out and it just sits there. I'll have to try the rest of that tomorrow or someting.

And uhm, I'm only 14. I just got this computer when the family got a new one. So I don't know how it's set up or anything. I'm pretty ignorant on the whole topic.
Title: Help Configure GRUB
Post by: choasforages on 24 July 2002, 11:08
after the chainloading thing in the grub.conf file
add

boot

and it should work
Title: Help Configure GRUB
Post by: choasforages on 24 July 2002, 11:10
and i a started using linux like several years ago, and im only about 16
Title: Help Configure GRUB
Post by: NESnerd on 24 July 2002, 11:30
I'll try it.

Also I'm not using my age as an excuse for my lack of knowledge on the subject...well yeah, I am. But in all honesty I don't know much about how computers work, I just ask a lot of questions.

Anyway I'll go see if I get that to work right, and then probably head to bed for the night. I'll post an update tomorrow.
Title: Help Configure GRUB
Post by: sporkme on 24 July 2002, 13:03
quote:
Originally posted by Calum:
!!! yes, i'd be concerned about that too, best to make 100% sure that you won't be getting back into windows ...

Sorry, i would help, but i don't know anything about grub.



CLASSIC!!!!!! CALUM YOU RULE!
Title: Help Configure GRUB
Post by: sporkme on 24 July 2002, 13:08
i would just plug that sucker into your other pc, save the files, put it back, reinstall winders (or don't) and put yer linux distro.

breaking it is how you learn.  stupid people don't ask.
Title: Help Configure GRUB
Post by: NESnerd on 25 July 2002, 03:08
I mounted the hard drive, and my files are all still there. I haven't done anything else Void. But I appreciate all your help. Thank you much.