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: Fri, 28 Dec 2007 07:53:46
Message-Id: 4774AA39.5080507@asyr.hopto.org
In Reply to: Re: [gentoo-user] moving my instalation to new hard drive by "Matthew R. Lee"
1 on 12/27/2007 11:05 PM Matthew R. Lee wrote the following:
2 > On Monday 24 December 2007 19:36:13 Neil Bothwick wrote:
3 >> On Mon, 24 Dec 2007 21:28:37 +0000, Stroller wrote:
4 >>> It might be as simple as completing the `dd if=/dev/sda of=/dev/sdb`
5 >>> and then using `fdisk` to delete the last partition, then recreate it
6 >>> with the same start point (and a later end point). The filesystem
7 >>> would then need to be resized. But I don't know if this will work,
8 >> It will, I've done it myself. The main disadvantages are that you can
9 >> only resize the last partition,and it is very slow (because dd copies
10 >> every byte of the source drive, not jut the ones in use). Although I have
11 >> used this method, I wouldn't do it again, I'd set up the partitions,
12 >> copy with rsync and run grub to install it on the new drive.
13 >
14 > Right I'm going to do it this way, in the morning, so if I'm wrong please feel
15 > free to shout at me over night:
16 > 1. make the new partitions and file systems on the new drive /dev/sdb
17 > 2. mount sdb1 (boot) and sdb3 (root)
18 > 3. copy sda1 to sdb1 and sda3 to sdb3 using rsync (I use rsync all the time to
19 > do backups so I'll stick with what I know)
20 I would install grub on the new drive's MBR, before swapping the drives,
21 so I would not have to boot with live cd.
22 See my 1st mail on this thread.
23 But if you feel more comfortable the other way, do it as you say. :-)
24
25 > 4. swap the drives
26 > 5. boot with Live CD
27 > 6. (not sure about this bit) mount the boot partition (will this be sda1 or
28 > sdb1?) and root partition
29 > 7. chroot to the new disk
30 > 8. do env-update and source /etc/profile
31 > 9. install grub (I'm assuming I wont have to change my grub.conf as everything
32 > is in the same place as before, relatively speaking)
33 > 10. reboot and get on with the rest of my day
34 >
35
36 --
37 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] moving my instalation to new hard drive "Matthew R. Lee" <gentoo@××××××××××.org>