View previous topic :: View next topic |
Author |
Message |
batkiwi n00b
Joined: 01 Dec 2002 Posts: 12
|
Posted: Tue May 06, 2003 1:22 am Post subject: grub install, then switch harddrives |
|
|
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 |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Tue May 06, 2003 1:53 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|