Gentoo Archives: gentoo-user

From: Tim Allingham <deserted@×××××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Moving linux system to another partition
Date: Fri, 08 Jun 2007 16:54:26
Message-Id: 1181321003.6827.3.camel@localhost
In Reply to: Re: [gentoo-user] Moving linux system to another partition by Alan McKinnon
1 On Fri, 2007-06-08 at 17:48 +0200, Alan McKinnon wrote:
2 > On Friday 08 June 2007, Hemmann, Volker Armin wrote:
3 > > On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote:
4 > > > Hi all,
5 > > >
6 > > > Is it safe to move my linux system by using:
7 > > > #>cp -rp /mnt/old_part /mnt/new_part
8 > > > and approriate changes in grub.conf/fstab on new system location ?
9 > >
10 > > nope.
11 > >
12 > > cp -a if you really want to use copy. But doesn't kill that the
13 > > ctime/mtime making uninstalling things a pain?
14 >
15 > No.
16 >
17 > cp -a is equivalent to cp -dpPR
18 >
19 > and from the man page:
20 >
21 > -p same as --preserve=mode,ownership,timestamps
22 >
23 > What the OP *will* have a problem with a copying /proc, /dev, /sys and
24 > other virtual filesystems. When I do this trick, I usually dd or tar or
25 > cp -a entire filesystems and then copy / with this trick:
26 >
27 > mount -o bind / /some/tmp/dir
28 > cp -a /some/tmp/dir /some/other/dir
29 >
30 > This ensures that only files actually on-disk are copied
31 >
32 > alan
33 >
34 >
35 > --
36 > Optimists say the glass is half full,
37 > Pessimists say the glass is half empty,
38 > Developers say wtf is the glass twice as big as it needs to be?
39 >
40 > Alan McKinnon
41 > alan at linuxholdings dot co dot za
42 > +27 82, double three seven, one nine three five
43
44 I generally prefer to do this with dd, from a remote environment
45
46 dd if=/dev/<source partition> of=/dev/<destination partition>
47
48 Tim Allingham
49 tim -at- datafirst-it.com.au

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Moving linux system to another partition Hans-Werner Hilse <hilse@×××.de>