1 |
on 12/24/2007 08:38 PM Thanasis wrote the following: |
2 |
> I would first create the new partitions on the new disk keeping the same |
3 |
> sequence (and increasing swap partition to 1GB), and then format them. |
4 |
> Say the new drive is /dev/sdb. I would go like this (mind the spaces): |
5 |
> |
6 |
> mkdir /mnt/dst /mnt/src |
7 |
> |
8 |
> mount /dev/sdb3 /mnt/dst |
9 |
> mount -o bind / /mnt/src && cd / && tar cfp - . |tar xfp - -C |
10 |
> /mnt/dst (to copy the / partition) |
11 |
> mount /dev/sdb1 /mnt/dst/boot && cd /boot && tar cfp - . |tar xfp - -C |
12 |
> /mnt/dst/boot (to copy the /boot partition) |
13 |
> |
14 |
> then install new grub on sdb's MBR: |
15 |
> |
16 |
> mount -t proc none /mnt/dst/proc |
17 |
> mount -o bind /dev /mnt/dst/dev |
18 |
> chroot /mnt/dst /bin/bash |
19 |
> env-update && source /etc/profile |
20 |
> grub |
21 |
> |
22 |
>> device (hd0) /dev/sdb |
23 |
>> root (hd0,0) |
24 |
>> setup (hd0) |
25 |
>> quit |
26 |
>> |
27 |
> |
28 |
> exit |
29 |
> |
30 |
> unmount all previous (the reverse sequence) and shutdown and swap disks :-) |
31 |
> |
32 |
> |
33 |
Please correct above to |
34 |
|
35 |
mount -o bind / /mnt/src && cd /mnt/src && tar cfp - . |tar xfp - -C /mnt/dst |
36 |
|
37 |
|
38 |
-- |
39 |
gentoo-user@g.o mailing list |