Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Moving root filesystem to a new partition
Date: Tue, 24 Nov 2009 00:11:16
Message-Id: 4B0B11EE.6030907@gmail.com
In Reply to: [gentoo-user] Moving root filesystem to a new partition by "Alan E. Davis"
1 Alan E. Davis wrote:
2 > Can someone tell me what steps are necessary to move the / filesystem
3 > to a new partition? I recall someone helping me with this before, but
4 > cannot find the email. The oldest of three drives on my system had my
5 > / partition, /dev/sdc1. One day recently, that partition became
6 > inaccessable. After quickly installing Ubuntu on a different drive,
7 > that root partition eventually showed up again.
8 >
9 > So I've been able to boot Gentoo again off the separate /boot
10 > partition on /dev/sda1. I need to move that / partition. I have
11 > several other partitions mounted off this one, mainly as /usr and
12 > maybe /usr/local/, and some storage partitions mounted to my home
13 > directory.
14 >
15 > I copied the root (/) partition with the new partition at /dev/sdb5
16 > mounted as /newroot, using
17 > # cp -ax / /newroot
18 >
19 > I checked that /proc, /dev, and /sys are there, and empty. I recall
20 > there are some other steps necessary. I changed /etc/fstab, and the
21 > grub2 grub.cfg from ubuntu, the entry for this kernel. The boot
22 > stalls at a certain point.
23 >
24 > May I ask what steps are necessary to do this?
25 >
26 > Thank you,
27 >
28 > Alan Davis
29
30 I have done this in the past. I usually boot the CD, make mount points
31 for old and new, then mount the old and new that I want to copy. Then I
32 do a cp -av /path/to/old /path/to/new/ and let it copy. This can take
33 quite a bit of time tho. It seems those little bitty files take the
34 longest. Maybe omitting the -v option would help on that?
35
36 Once you get it copied over, edit your fstab file as needed on the new
37 side and install the bootloader as well. After that, it usually just works.
38
39 Dale
40
41 :-) :-)
42
43 P. S. Sorry for not including some fancy tarball stuff. ;-)

Replies

Subject Author
Re: [gentoo-user] Moving root filesystem to a new partition Francisco Ares <frares@×××××.com>