Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing from red hat
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Jarjar
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 265
Location: Sweden

PostPosted: Mon Jul 22, 2002 1:59 pm    Post subject: Installing from red hat Reply with quote

Okay.
I've booted off my primary master, 1.2GB slow HD with red hat 7.2.
I partitioned (fdisk of course) my other HD, secondary master, 4GB with 3 partitions for gentoo.
mkdir /mnt/gentoo, /mnt/gentoo/boot, mount the partitions, and follow the installation guide (regular), with mkswap, mke2fs and stuff.
Then I untar:ed the stage1 tgz, and now I'm going to install Gentoo on my other (hdb) harddrive.
My question is, can I move the harddrives after the gentoo install? I want the 4GB as my primary master... but I'm afraid it won't work.
Will it? ;)

Briefly:
Install gentoo on secondary master, grub in MBR
Move secondary master -> primary master and primary master -> secondary.
Boot gentoo from my "new" primary master.
Should this work?
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 22, 2002 2:13 pm    Post subject: Reply with quote

It should be not real problem. However, you need to watch out for a few things:
- set up fstab assuming that you would have moved the partitions. That is, entries would be /dev/hdaX instead of /dev/hdbX
- grub set up may be interesting. I would put grub on a floppy and install grub on the MBR after you are done moving. You can specify boot options from the grub menu when you are booting from the floppy. More info here:

http://www.gnu.org/manual/grub/html_node/Creating-a-GRUB-boot-floppy.html

Grub on disk would lead to something like this:
If you are going to boot from the new primary master, you would need to write the grub bootloader on to the secondary master before the move (the "setup" step in grub). However, your "root" command in grub would point to the (hd0,X) boot partition which would be the state after the move. Remember that the kernel root option in grub would need to point to /dev/hdaX too to reflect the state after the move. This is all very confusing and probably error-prone :)
Back to top
View user's profile Send private message
Jarjar
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 265
Location: Sweden

PostPosted: Mon Jul 22, 2002 2:20 pm    Post subject: Reply with quote

Well, at least I have another computer so I can be on IRC and the forums. ;)
Thanks, I would never have thought of fstab otherwise.

BTW, concerning the GRUB boot floppy, is that all I have to do, and reboot? I guess I have to setup a menu.lst and stuff first?
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 22, 2002 2:24 pm    Post subject: Reply with quote

Also, I would strongly suggest doing grub on the floppy first. It is too easy to blow away a partition by doing things like "setup (hd0,0)" etc. Once you have things straightened out after the move, you can put grub on the MBR if you need/want to.
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jul 22, 2002 2:28 pm    Post subject: Reply with quote

Bah. Switching hard drives is easy -- play with Gentoo however long you want in the existing setup, and when you want to move, just set aside ten minutes or so and get a screwdriver.

Pop open your computer and switch jumpers (master <-> slave) or switch cables or whatnot to get your drives the way you want them. Boot off the install CD, mount your root partition, mount your boot partition, update /etc/fstab to reflect the disk swap, update /boot/grub/menu.lst to give the new root= kernel parameter. Run grub, root [your new /boot], setup (hd0), quit grub. Then, cd /, umount -a, Ctrl-Alt-Del. All done!

(BTW, the reason we switch drives beforehand is because Grub's root () is stored in the MBR; if you say root (hd1,0) it'll look at the wrong drive.)
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 22, 2002 2:35 pm    Post subject: Reply with quote

I think you should be able to use "rootnoverify" in grub (or even root) without having to switch drives first. I have not tried this though.

After doing one or two "setup (hd0,X)", I have kept well away from grub on hard drives... :)
delta407 wrote:
...(BTW, the reason we switch drives beforehand is because Grub's root () is stored in the MBR; if you say root (hd1,0) it'll look at the wrong drive.)
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jul 22, 2002 2:39 pm    Post subject: Reply with quote

Okay, here. setup (hd0,_) installs Grub into the first sector of the partition, not the MBR. Hence, various things in the partition can and will be overwritten, which tends to be a Bad Thing™. rootnoverify tells Grub not to worry about the fact that it can't read the partition and to boot off of it anyway; this is handy when booting, say, Windows 2000 off of an NTFS drive.

Naan Yaar wrote:
I think you should be able to use "rootnoverify" in grub (or even root) without having to switch drives first. I have not tried this though.

I have no idea what you are trying to say. ;)
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Jul 22, 2002 2:44 pm    Post subject: Reply with quote

Yes... I do know that. Putting in a typo in the setup line has toasted my partitions and hence my preference for grub on floppy. This was the point I was trying to make... not very clearly, I guess.
delta407 wrote:
Okay, here. setup (hd0,_) installs Grub into the first sector of the partition, not the MBR. Hence, various things in the partition can and will be overwritten, which tends to be a Bad Thing...


Bringing up "rootnoverify" was related to the "fact" that you could set up grub prior to actually moving the drives. That is, the "root..." step can point to (hd0,X) even though the drives haven't moved yet, I think. I was commenting on your point that you need to do the grub setup after the drives were swapped.
Quote:

rootnoverify tells Grub not to worry about the fact that it can't read the partition and to boot off of it anyway; this is handy when booting, say, Windows 2000 off of an NTFS drive.

Naan Yaar wrote:
I think you should be able to use "rootnoverify" in grub (or even root) without having to switch drives first. I have not tried this though.

I have no idea what you are trying to say. ;)


It is a common complaint :).
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Mon Jul 22, 2002 2:56 pm    Post subject: Reply with quote

Naan Yaar wrote:
Bringing up "rootnoverify" was related to the "fact" that you could set up grub prior to actually moving the drives. That is, the "root..." step can point to (hd0,X) even though the drives haven't moved yet, I think. I was commenting on your point that you need to do the grub setup after the drives were swapped.


Ah, I see. It's just as easy to swap first, and then Grub makes sure you're giving it a valid partition... either way, I guess.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Jarjar
Apprentice
Apprentice


Joined: 21 Jul 2002
Posts: 265
Location: Sweden

PostPosted: Mon Jul 22, 2002 5:55 pm    Post subject: Reply with quote

Well, I don't need any help anymore - I fixed the cdrom instead. :)
My CMOS battery seemed to be "empty", so I got a new one. Did it help? Noo. Then I tried to move a few jumpers, when I suddently remembered that my "main" motherboard needs a jumper to actually use the battery. I tried to put a jumper there, and I could boot from cdrom! Wee! (or rather, my BIOS settings were saved - with CDROM first in the boot order ;))
I'm bootstrapping right now.. and after that emerge system... On a 225MMX. :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum