public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Moving linux system to another partition
@ 2007-06-08 15:05 Aleksey Kunitskiy
  2007-06-08 15:18 ` Hemmann, Volker Armin
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Aleksey Kunitskiy @ 2007-06-08 15:05 UTC (permalink / raw
  To: gentoo-user

Hi all,

Is it safe to move my linux system by using:
#>cp -rp /mnt/old_part /mnt/new_part
and approriate changes in grub.conf/fstab on new system location ?

-- 
best regards,
Aleksey V. Kunitskiy
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: [gentoo-user] Moving linux system to another partition
@ 2007-06-08 16:40 burlingk
  0 siblings, 0 replies; 27+ messages in thread
From: burlingk @ 2007-06-08 16:40 UTC (permalink / raw
  To: gentoo-user



> -----Original Message-----
> From: Hemmann, Volker Armin 
> [mailto:volker.armin.hemmann@tu-clausthal.de] 
> Sent: Saturday, June 09, 2007 12:19 AM
> To: gentoo-user@lists.gentoo.org
> Subject: Re: [gentoo-user] Moving linux system to another partition
> 
> 
> On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote:
> > Hi all,
> >
> > Is it safe to move my linux system by using:
> > #>cp -rp /mnt/old_part /mnt/new_part
> > and approriate changes in grub.conf/fstab on new system location ?
> 
> nope.
> 
> cp -a if you really want to use copy. But doesn't kill that 
> the ctime/mtime 
> making uninstalling things a pain?
> 
> When I moved around on harddisks some years ago, I followed 
> some instructions 
> found on the suse-hp. And they used tar.

***********WARNING***********
I am probably missing something, so beware.  I am sure people with
more experience will fill in the details, so don't try this till
everyone else has a chance to chime in. :P

I don't know all the details, but from what I understand basically boot
into 
a live disk type environment, tar everything in a way that reserves
permissions
and all the file info, and then untar it in the new root directory.

If grub.conf will be in a new location, then make sure to make the right
Changes in grub.  If you have a separate /boot parition, then that
should
be ok, just make the right changes in grub.conf.

That SHOULD work. ^^;
Make sure not to actually delete anything until you know it works. ^_^


--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread
* RE: [gentoo-user] Moving linux system to another partition
@ 2007-06-08 16:52 burlingk
  0 siblings, 0 replies; 27+ messages in thread
From: burlingk @ 2007-06-08 16:52 UTC (permalink / raw
  To: gentoo-user



> -----Original Message-----
> From: Alan McKinnon [mailto:alan@linuxholdings.co.za] 
> Sent: Saturday, June 09, 2007 12:48 AM
> To: gentoo-user@lists.gentoo.org
> Subject: Re: [gentoo-user] Moving linux system to another partition
> 
> 
> On Friday 08 June 2007, Hemmann, Volker Armin wrote:
> > On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote:
> > > Hi all,
> > >
> > > Is it safe to move my linux system by using:
> > > #>cp -rp /mnt/old_part /mnt/new_part
> > > and approriate changes in grub.conf/fstab on new system location ?
> >
> > nope.
> >
> > cp -a if you really want to use copy. But doesn't kill that the 
> > ctime/mtime making uninstalling things a pain?
> 
> No.
> 
> cp -a is equivalent to cp -dpPR
> 
> and from the man page:
> 
> -p     same as --preserve=mode,ownership,timestamps
> 
> What the OP *will* have a problem with a copying /proc, /dev, 
> /sys and 
> other virtual filesystems. When I do this trick, I usually dd 
> or tar or 
> cp -a entire filesystems and then copy / with this trick:
> 
> mount -o bind / /some/tmp/dir
> cp -a /some/tmp/dir /some/other/dir
> 
> This ensures that only files actually on-disk are copied
> 
> alan
Is it possible to handle the tar process from inside a liveCD
environment, and just tar the mount points (i.e. empty directories)
for the virtual file systems instead of trying to tar the virtaul
file systems themselves?  Afterall, they are recreated at boot
time, aren't they?
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [gentoo-user] Moving linux system to another partition
@ 2007-06-09  0:01 jamesc
  2007-06-09  0:25 ` Albert Hopkins
  0 siblings, 1 reply; 27+ messages in thread
From: jamesc @ 2007-06-09  0:01 UTC (permalink / raw
  To: gentoo-user

On Fri Jun  8 16:38 , Dale <dalek@exceedtech.net> sent:

>This is something I have done several times.  This is how I do it. 
>Boot the Gentoo CD or some other live CD, Knoppix should work.  After
>you get booted up, mount the partitions, old and new, then use this
>command:  cp -av /path/to/old /path/to/new and sit back and watch it
>all scroll by.  It may take a good while depending on how much stuff
>you have to copy.
>
>
>
>I'm not saying that someone else doesn't have a better idea.  I have
>seen where people tar the stuff then untar it to the new drive.  To me,
>it is a useless step.  What I use has worked for me every time and I
>have done it quite a bit.


Yeah, that's me, I do exactly the same until you issue the cp command where I do:
$>cd /mnt/oldstuff && tar cvjpf /pathtosomewhere/mystuff.tbz ./
and then extract to the new directory.  I do this out of habit mostly and, yes,
it is a useless step unless you want to store a copy somewhere for whatever reason...

--James
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [gentoo-user] Moving linux system to another partition
@ 2007-06-09  0:18 jamesc
  0 siblings, 0 replies; 27+ messages in thread
From: jamesc @ 2007-06-09  0:18 UTC (permalink / raw
  To: gentoo-user

On Fri Jun  8 12:09 , Benno Schulenberg <benno.schulenberg@gmail.com> sent:

>The -p option only does something when extracting an archive, so 
>that first -p is pointless.

Cool.  I thought you were mistaken however, upon consulting the man page, you are
absolutely correct.  Thanks for that.

--James
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [gentoo-user] Moving linux system to another partition
@ 2007-06-09  0:43 jamesc
  0 siblings, 0 replies; 27+ messages in thread
From: jamesc @ 2007-06-09  0:43 UTC (permalink / raw
  To: gentoo-user

On Fri Jun  8 18:25 , Albert Hopkins <marduk@gentoo.org> sent:

>On Fri, 2007-06-08 at 19:01 -0500, jamesc@reliant-data.com wrote:
>> On Fri Jun  8 16:38 , Dale dalek@exceedtech.net> sent:
>
>> 
>> Yeah, that's me, I do exactly the same until you issue the cp command where I do:
>> $>cd /mnt/oldstuff && tar cvjpf /pathtosomewhere/mystuff.tbz ./
>> and then extract to the new directory.  I do this out of habit mostly and, yes,
>> it is a useless step unless you want to store a copy somewhere for whatever
reason...
>> 
>> --James
>
>The one thing I mentioned is that I actually pipe tar to tar (tar -c ...
>| tar -x ...) which seems even more useless, but as I said I'm used to
>doing some things out of habit.  Then I thought about why: the '-a' flag
>is not available on all *nices... I believe it's a GNU extension.  So I
>probably got used to using the tar trick on a non-GNU system and got
>used to it because it works whether I'm using Linux or not.  But if
>you're on a Linux system (that has rsync installed) then rsync is
>probably the nicer option.  It's got even more options than GNU's cp.  I
>actually 'alias cp="rsync"' on my Gentoo systems.

Ha.  This is a good day.  I have to laugh at myself for not utilizing rsync more;
for the last few years I've just been using rsync to backup/restore my /home and
key config files to my fileserver (while at home).  Never even considered using
it for local operations.  Nice.  I have the habit, also, of using the most basic
stuff since I'm usually on all manner of UNIX{like} boxes during the day.

Thanks,
--James


--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-06-11 15:10 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 15:05 [gentoo-user] Moving linux system to another partition Aleksey Kunitskiy
2007-06-08 15:18 ` Hemmann, Volker Armin
2007-06-08 15:48   ` Alan McKinnon
2007-06-08 15:59     ` Albert Hopkins
2007-06-08 16:21       ` Aleksey Kunitskiy
2007-06-08 16:43     ` Tim Allingham
2007-06-08 18:52       ` Hans-Werner Hilse
2007-06-09 18:25         ` Tim Allingham
2007-06-11  7:24         ` Mick
2007-06-11  8:58           ` Hans-Werner Hilse
2007-06-11 15:18             ` Randy Barlow
2007-06-11 14:54               ` Alan McKinnon
2007-06-11 15:00               ` Hans-Werner Hilse
2007-06-08 22:38     ` Dale
     [not found]   ` <200706081839.07324.alexey.kv@gmail.com>
2007-06-08 15:59     ` Mauro Faccenda
2007-06-08 15:54 ` Albert Hopkins
2007-06-08 16:01   ` Mauro Faccenda
2007-06-08 18:09     ` Benno Schulenberg
2007-06-08 16:25 ` [gentoo-user] " Remy Blank
2007-06-09  8:45 ` [gentoo-user] " Vladimir Rusinov
  -- strict thread matches above, loose matches on Subject: below --
2007-06-08 16:40 burlingk
2007-06-08 16:52 burlingk
2007-06-09  0:01 jamesc
2007-06-09  0:25 ` Albert Hopkins
2007-06-09  8:14   ` Florian Philipp
2007-06-09  0:18 jamesc
2007-06-09  0:43 jamesc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox