Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub install, then switch harddrives
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
batkiwi
n00b
n00b


Joined: 01 Dec 2002
Posts: 12

PostPosted: Tue May 06, 2003 1:22 am    Post subject: grub install, then switch harddrives Reply with quote

I have a computer I'm "upgrading" to gentoo.

2 HD's:
hda which is my big drive, which has an LFS 3.2 system on it
hdb which was blank (20gig), now had gentoo on it running in chroot.

What I hope to do is copy everyone's /home to hdb, reboot into gentoo, copy /home to the big drive, change fstab to mount /home from hda1, then reboot. I have all of this figured out, and have done it many times before with no problem.

My problem is that I plan to swap hda and hdb, and need grub to work. (i like having my system drive hda).

So when I install grub, it will go onto hdb, but when it reboots, it will be hda.

Do I do:
root(hd0,0)
setup(hd1)
(ie install into hd1, but tell that bootloader to go to hd0 since tha'ts what it will be when I reboot)

or

root(hd1,0)
setup(hd1)

I know setup will go onto hd1, but don't know what to specify root as. I know lilo writes that stuff at "install" time (hence having to rerun lilo when you change kernel) but don't know how grub works :)
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Tue May 06, 2003 1:53 am    Post subject: Reply with quote

You could use GRUB's device map feature so that GRUB will be installed correctly to the future (hd0) rather than the present one :
Code:
# cd /boot/grub
# nano -w device.map
(hd0)    /dev/hdb
^o ^x

# grub --device-map=device.map
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Now go ahead and swap the drives.
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