You are not logged in.

#1 2004-12-10 18:35:40

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Installing grub

I have Windows on an IDE HDD, and Arch Linux on a SATA HDD.  The SATA drive is HDD1, which means the IDE drive is HDD0.  Windows was already installed on hdd0.   The original Windows mbr is still intact.

After installing arch linux, even after reading the tips and hints here, I can't figure out how to install grub.  Main reason I'm asking now is because in my own experience, linux boot records are extremely persistent so I don't want to do something to screw up my Windows install again and run the zero drive test to erase the drive and start over.   This takes alot of time,  and I don't like doing that, so please help!   tongue  (I don't mind zeroing the drive later if I want to change system configuration, but I don't want to go through reinstalling another operating system just so I can't back here and yell, "Help!"  lol )

I came here after reading the line where it wanted me to specify the root, and I knew something was wrong when it auto-detected hd0 partition3.  I'm quite sure that will screw up the Windows drive and arch will still not boot.

Offline

#2 2004-12-10 19:15:39

kipper
Member
Registered: 2003-08-03
Posts: 49

Re: Installing grub

I would install grub to the mbr of hd0.  Then configure grub along the lines of :

default 0
timeout 30
# 0 - Arch
root (hd1,1)
kernel = (hd1,1)/vmlinuz26 root=/dev/discs/disc0/part3 ro

# 1 - windows
root (hd0,0)
chainloader +1

The problem with this setup though, is that if you decide for some reason to remove linux and grub, you will have to fix the mbr to use the windows ntldr.

Offline

#3 2004-12-10 19:23:10

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Installing grub

kipper wrote:

I would install grub to the mbr of hd0.  Then configure grub along the lines of :

default 0
timeout 30
# 0 - Arch
root (hd1,1)
kernel = (hd1,1)/vmlinuz26 root=/dev/discs/disc0/part3 ro

# 1 - windows
root (hd0,0)
chainloader +1

The problem with this setup though, is that if you decide for some reason to remove linux and grub, you will have to fix the mbr to use the windows ntldr.

you'll probably need "makeactive" on the windows line

Offline

#4 2004-12-10 19:44:34

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

Cool.  What's also confusing me is how to specify the mbr of hd0.  I assume these are the changes I need to make to the line it asks me to specify the root.  Is this basically gonna be hdd0 partition 1 or just hdd 0?

Offline

#5 2004-12-10 19:56:54

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

Enter the full devfs path to your root drive
/dev/discs/disc0/part3

Am I just crazy or is that not wrong?  And beside that, what the heck is it asking for?

Offline

#6 2004-12-10 20:24:30

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Installing grub

Bysshe wrote:

Enter the full devfs path to your root drive
/dev/discs/disc0/part3

Am I just crazy or is that not wrong?  And beside that, what the heck is it asking for?

devFS is kinda out the window now... the default grub config is setup for an autoprepared harddrive... so make sure to adjust it...

feel free to use /dev/hda0 and whatnot....

also, (at least on my system) you can specify "root (hd0)" for just the mbr...

oh and the full path to the root drive is whichever partition will be "/" - usually  1 is "/boot", 2 is swap, and 3+ are miscellaneous mount points... but one of them has to be "/"

Offline

#7 2004-12-10 22:13:24

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

Okay, so the interesting thing is that now if I try to edit or write grub I get nothing but an empty file.  Also, I noticed that grub will refuse to "install" (of course, it's not installing anything, because if I open menu1st with vi, the file is empty) unless the root drive "/dev/discs/disc0/part3" is adhered to.

So now, the question turns to "How do I install Arch Linux".  Thanks for all the input!

Offline

#8 2004-12-11 05:37:55

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

HA!  Just killed my Windows install again.  LOL.  This is definately the most difficult part about Linux.  Trying to learn how to set it up.  Mandrake, of course, need not apply.

LOL.

Anyway, if you were wondering, that's why I was gone for awhile.  But I'm a persistent S.O.B.  If you guys are still game, I'm all ears still.

New project:  Installing Arch Linux on the same drive in the unpartitioned space.  I have Windows set up on a 12gb partition, next is 1gb partition for the swap, and a 35gb storage partition.  Plenty left for Arch Linux, but I simply can't figure out how to partition the drive.   Again, the documentation isn't helping.  Can someone here give me a hand?  I think if I can figure out the partitioning, I can do the grub thing, but I'm really not sure considering I'm 0 for 5 or more in getting arch past install mode.
Oh, well.  It's a long road.

Offline

#9 2004-12-11 06:30:14

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

More detailed questions:

It's now set up like this:

disk6=boot primary partition 32 mb format: ext2
disk7=swap extended 256mb
disk8=remaing space extended 30+mb ext3

After toying around with it, my current roadblock is that I can't reformat the boot parition.  Also, I'm wondering if I need to mess with the "Boot" designations under the partitioning program.  I noticed changing the boot partition to boot doesn't do anything, and I'm reluctant to change the Windows mbr.  Anyway, I guess if I have to, I'll have to delete the current partitions and start over.  I tried to reformat everything because there was an error loading grub into /, or what I had designated the linux boot partition (disk 6).  So, I know you guys can tell me where I'm messing up.

I added, and intend to add these lines to the end of the configuration file:

# (1) Windows XP
title Windows XP
root noverify (0,0)
makeactive
chainloader +1

of course, after performing :wq command in vi, installing grub, there is an error installing it to disk6.

I assume this should help you help me.  So...help me!  smile  lol

LOL.  thanks again!

Offline

#10 2004-12-11 09:44:14

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Installing grub

I'd stick with lilo

Set up your lilo.conf and just change

boot=/dev/hda

to

boot=/dev/fd0

then run lilo with a spare floppy disk loaded.

This is not the same as creating a rescue disk and loading an entire kernel from floppy.

My son uses Windows XP most of the time and his PC boots straight into it from hard drive. He also has a bit of his 120GB disk as a linux partition he rarely uses. When he does, he pops in a floppy and as his boot sequence is "floppy, HD", the boot process checks for a floppy and it doesn't slow the boot process down much reading a single block.

Offline

#11 2004-12-11 14:56:08

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: Installing grub

I boot my W2000 with:

rootnoverify (hd0,0)
chainloader +1

But for you there's no point since you're not putting GRUB on the MBR.  The Windows bootloader is on the MBR and it's certainly not going to start GRUB for you.

Do you have a root partition?  You only listed boot and swap.  When you say disk6 you mean part6 as in devfs?  Personally I don't use boot partitions on more modern machines since they don't have the 1024 cylinder problem anymore.

Offline

#12 2004-12-12 00:29:53

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

I remember back when using lilo, I found that it sometimes causes problems with not only upgrading, but I remember that there was some kind of software that just didn't work right if the bootloader wasn't grub.  Does that make sense?

Anyway, even if the latter part is impossible, I do know that managing the system ought to be easier with grub.  I'm just totally lost as for setting up dual-booting XP with grub.  I'll do whatever it takes to accomplish that.   So, I don't really need a boot partition for Linux?  Is it possible to replace the Windows mbr?  Either way, I'll wipe out Windows if I have to.  I basically have nothing to lose at this point anyway.

So, correct me if I'm wrong...grub has to be in place of the Windows boot loader, and I need to point it to the Linux root partition.  Best way to do this?  I'm sorry if it was already pointed out, but I believe I'm completely missing a step somewhere.  Never in my life setup linux partitions manually.   yikes

Offline

#13 2004-12-12 14:10:37

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: Installing grub

You only need the boot partition if your machine has an older BIOS with the 1024 cylinder limit - ie the bootloader must be within the first 1024 cylinders.  Most machines with the LBA features shouldn't have this problem.  You'll still have a boot directory but within the root partition.

Replacing the MBR is almost required for a dual boot.  Note that the MBR is not within a partion so it won't blow away the Windows partition.  I say "almost required" since apparently you can configure the Windows boot loader to start other OS's but I've never tried it.

The MBR holds a "dumb" 512 byte program that knows where the bootloader is, loads it, and then runs it.  The bootloader could be the Win bootloader, LILO, GRUB, the FREEBSD loader, etc.  This lives in the "boot" partition of the OS: so the Win loader lives in the Win partition, GRUB lives in boot or root partition, etc.  The loader may present the user with a menu then starts an OS.

Windows installs it's own MBR loader which starts the Windows bootloader.  For dual boot you need to replace it with the GRUB MBR loader which will start the GRUB bootloader.  Then with the proper Windows config in the GRUB menu the GRUB bootloader can "chainload" the Windows bootloader - hence the chainloader command - Windows never knows GRUB was even run.

For simplicity I'd try just a root partition and a swap partition to start out.  So in your case the end result would be:
MBR: GRUB MBR loader
part1: windows bootloader & windows
part6: GRUB bootloader & Arch
part7: swap

During installation edit menu.lst and add Windows then allow GRUB to be installed on the MBR.  Note that menu.lst in this case does not describe where to install GRUB but how to start OS's.  GRUB installation is done by the Arch installation so leave the Arch stanza alone.

Hope that helps.  Good luck.

Offline

#14 2004-12-12 18:27:13

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: Installing grub

Well, got it installed, windows is fine, it boots to the Arch login screen.  and well, as you may well have guessed I have alot of reading to do and forum searching to do.

There's many things extremely odd about the Arch installation procedure, but it's alot simpler than I was making it.  I didn't realize the quick install in the wiki was exact instruction I was looking for, more or less.

Anyway, what I learned was the partitioning section really only designates logical drive sizes.  It doesn't do anything else despite all the useless it options it apparently claims to have.  LOL.  That's one place that's easy to waste time on.  Next, I learned that setting the moint points leads to formatting the partitions, and that it tells you to first choose a swap space for it to automatically format, then you mount and format the root drive where you have control of the format, which I believe I correctly chose ext3.  Next, I learned that in selecting packages, the spacebar is the toggle switch for selecting/deselecting that it doesn't mention until it comes time to install. But for some reason, after wringing my hands a bit and pressing every key on the keyboard that I faintly remember the spacebar as a universal toggle switch.  But it was nice that it told me after the fact.  LOL.  anyway, the wiki for quick install of arch Linux was finally discovered by my illiterate self, which held my hand almost adequately in spite of my dumbfoundedness, and the rest is history. 

The real work comes next.  I appreciate all your help.  This time I will be sure to read everything before I come to ask another question.

Offline

#15 2004-12-12 18:55:03

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: Installing grub

If you can think of any improvements/suggestions to the install docs I'm quite sure the devs would like to hear about it.  Or you can try editing the Wiki pages yourself.

Glad to help.

Offline

Board footer

Powered by FluxBB