From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SCzm3-0007jX-LT for garchives@archives.gentoo.org; Wed, 28 Mar 2012 20:47:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE672E0E10; Wed, 28 Mar 2012 20:47:05 +0000 (UTC) Received: from mail-gx0-f181.google.com (mail-gx0-f181.google.com [209.85.161.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 2CC37E0D72 for ; Wed, 28 Mar 2012 20:44:36 +0000 (UTC) Received: by ggni4 with SMTP id i4so1277279ggn.40 for ; Wed, 28 Mar 2012 13:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=T8/YQmffC6HUj3UbfxSaXqCxFxQ0VyoX60uQ4Lpw17o=; b=Q5IA3ZPXU4QSmRqSqVS8qCk+bOzqlC9nY1wy/9cLevAW4joseHXbKnfJTSL8oN3DTi OEoNDCVHqRfckk7DL1Y2XiNNjVlfTGakoLyvXaGoO6ahQyEK8wePVRQdLLJsxR9k1Nry rJDTUj8Rgbff0wtZ8VWM50/UReSsMuMZ7hWwjLSY5lHLyi/vv62Ro37B9I1dJg4V/JKA DMzYjQDef7VS2SV7l/O31zU1s31x9GSCBsxmabV/kHO9AfRXWqpKcmLl2Z8uPBrV0Jsd QlkvnYeYOfsICI4BvE9+9QWYsJ89MSDFLCU9QPFUUwCynWvium/HdTBnqYxOdsYrW9LL IEZg== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.50.158.227 with SMTP id wx3mr432440igb.31.1332967476455; Wed, 28 Mar 2012 13:44:36 -0700 (PDT) Received: by 10.231.61.14 with HTTP; Wed, 28 Mar 2012 13:44:35 -0700 (PDT) In-Reply-To: <20120328184112.227f4252@weird.wonkology.org> References: <1332844604.4130.0@numa-i> <4F71BE44.3080206@kutulu.org> <4F71E865.30800@hadt.biz> <4F71F182.5010709@gmail.com> <4F7224B8.1050806@gmail.com> <4F723842.4000501@gmail.com> <20120328001421.7c65a401@khamul.example.com> <20120328184112.227f4252@weird.wonkology.org> Date: Wed, 28 Mar 2012 16:44:35 -0400 Message-ID: Subject: Re: [gentoo-user] InitRAMFS - boot expert sought From: Simon To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=14dae9340b7fee694e04bc53acd7 X-Archives-Salt: 9b9c17ec-4f64-4fac-9f26-d062fe0d9824 X-Archives-Hash: 3f5783fd8124432443190fc817cb437e --14dae9340b7fee694e04bc53acd7 Content-Type: text/plain; charset=ISO-8859-1 > > Then > copy /usr over: > mount -o bind / /mnt > mount -o remount,ro /usr > cp -a /usr/* /mnt/ > The bind moun t makes the root FS appear in a 2nd place, without /usr > being populated by the content of your /usr partition. > Don't forget to remove /usr from /etc/fstab. > I can recommend using rsync instead of cp. Main advantage is rsync can be stopped (ie. killed) mid-way and resumed later. No big deal, but if your /usr is as large as mine, you might like this! If transfering very large files, instead of restarting the large file from scratch, using the --append option will write the partial data in the destination file. If killed and resumed, rsync will find the dst file is smaller than it should and will continue from where it left. If the data is absolutely crictical important, you can also use the -c option to force rsync to do a checksum of the files to compare, it will recopy anything that's not right. I normally use a -c check if I used --append and had to kill it (because I'm paranoid AND patient). Although I have seen zero cases where the -c found errors. Note the slashes at end of directories mean something with rsync, in my example below, it means make usr and mnt identical, having rsync /usr /mnt/ means copy usr into /mnt/ (giving /mnt/usr/). So "cp -a /usr/* /mnt/" becomes: rsync -ah --progress /usr/ /mnt/ Enjoy! --14dae9340b7fee694e04bc53acd7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Then
copy /usr over:
=A0 =A0 =A0 =A0mount -o bind / /mnt
=A0 =A0 =A0 =A0mount -o remount,ro /usr
=A0 =A0 =A0 =A0cp -a /usr/* /mnt/
The bind moun t makes the root FS appear in a 2nd place, without /usr
being populated by the content of your /usr partition.
Don't forget to remove /usr from /etc/fstab.

I can recommend using rsync instead of cp.=A0 Main a= dvantage is rsync can be stopped (ie. killed) mid-way and resumed later.=A0= No big deal, but if your /usr is as large as mine, you might like this!=A0= If transfering very large files, instead of restarting the large file from= scratch, using the --append option will write the partial data in the dest= ination file.=A0 If killed and resumed, rsync will find the dst file is sma= ller than it should and will continue from where it left.=A0 If the data is= absolutely crictical important, you can also use the -c option to force rs= ync to do a checksum of the files to compare, it will recopy anything that&= #39;s not right.=A0 I normally use a -c check if I used --append and had to= kill it (because I'm paranoid AND patient).=A0 Although I have seen ze= ro cases where the -c found errors.

Note the slashes at end of directories mean something with rsync, in my= example below, it means make usr and mnt identical, having rsync /usr /mnt= / means copy usr into /mnt/ (giving /mnt/usr/).

So "cp -a /usr/= * /mnt/" becomes:
rsync -ah --progress /usr/ /mnt/

Enjoy!
--14dae9340b7fee694e04bc53acd7--