Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Moving hard disks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Herodot
Guru
Guru


Joined: 29 Jul 2002
Posts: 429
Location: Professor Xavier's school for gifted youngsters

PostPosted: Tue Aug 20, 2002 7:16 pm    Post subject: Moving hard disks Reply with quote

Hi,

I have gentoo running nicely on hdd. Can I move it to hdb, and have the system working as if nothing happened?

I'll have to edit menu.lst and fstab of course. Anything else? mtab? (I'll admit I don't know what mtab does...)

- Herodot
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Tue Aug 20, 2002 8:20 pm    Post subject: Reply with quote

you might want to have a grub floppy made before you try it...that way if you have to you can reinstall grub and enter the new location of root and setup if it fails to work....i havent tried what your going to do since i only run linux (gentoo) but you can also use the install iso to get back to your system to...but a grub floppy is a nice thing to have just as a tool
Back to top
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Tue Aug 20, 2002 10:33 pm    Post subject: Reply with quote

You need to copy your existing partitions, one by one, to the new disk. First create the new partitions on the new disk (using fdisk or, better still, cfdisk). Next create the filesystems on them with mke2fs [-j for ext3]. Then it would be best to go to single user mode:

Code:
# init 1


Next ummount (umount) all partitions except root.

Now mount the new partitions, one by one, on /mnt and copy the appropriate partition across. For the sake of example, assume you have partition /dev/hda1 as / and /dev/hda3 as /boot, and you want to copy them to /dev/hdb1 and /dev/hdb3:

Code:
# mount /dev/hdb1 /mnt
# cd /
# tar cf - . | (cd /mnt; tar xvf - )
# umount /mnt
# mount /dev/hdb3 /mnt
# mount /boot
# cd /boot
# tar cf - . | (cd /mnt; tar xvf - )


Then set your new root partion to boot, fixup menu.lst and fstab (no need to worry about mtab), and reboot. The advice to create a bootable floppy first is sensible.

Good luck: let us know how you get on.

BS
Back to top
View user's profile Send private message
rojaro
l33t
l33t


Joined: 06 May 2002
Posts: 732

PostPosted: Tue Aug 20, 2002 10:35 pm    Post subject: Reply with quote

well, i would do a 'grep -ri "/dev/hdd" /etc/' just to be sure to modify all files
mtab, is produced by mount, see 'man mount' ..
_________________
A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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