Gentoo Archives: gentoo-user

From: Thanasis <thanasis@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] moving my instalation to new hard drive
Date: Mon, 24 Dec 2007 18:43:54
Message-Id: 476FFC97.2010603@asyr.hopto.org
In Reply to: [gentoo-user] moving my instalation to new hard drive by "Matthew R. Lee"
1 I would first create the new partitions on the new disk keeping the same
2 sequence (and increasing swap partition to 1GB), and then format them.
3 Say the new drive is /dev/sdb. I would go like this (mind the spaces):
4
5 mkdir /mnt/dst /mnt/src
6
7 mount /dev/sdb3 /mnt/dst
8 mount -o bind / /mnt/src && cd / && tar cfp - . |tar xfp - -C
9 /mnt/dst (to copy the / partition)
10 mount /dev/sdb1 /mnt/dst/boot && cd /boot && tar cfp - . |tar xfp - -C
11 /mnt/dst/boot (to copy the /boot partition)
12
13 then install new grub on sdb's MBR:
14
15 mount -t proc none /mnt/dst/proc
16 mount -o bind /dev /mnt/dst/dev
17 chroot /mnt/dst /bin/bash
18 env-update && source /etc/profile
19 grub
20 > device (hd0) /dev/sdb
21 > root (hd0,0)
22 > setup (hd0)
23 > quit
24
25 exit
26
27 unmount all previous (the reverse sequence) and shutdown and swap disks :-)
28
29 --
30 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] moving my instalation to new hard drive Thanasis <thanasis@××××××××××.org>