Gentoo Archives: gentoo-user

From: Simon <turner25@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] InitRAMFS - boot expert sought
Date: Wed, 28 Mar 2012 20:47:19
In Reply to: Re: [gentoo-user] InitRAMFS - boot expert sought by Alex Schuster
1 >
2 > Then
3 > copy /usr over:
4 > mount -o bind / /mnt
5 > mount -o remount,ro /usr
6 > cp -a /usr/* /mnt/
7 > The bind moun t makes the root FS appear in a 2nd place, without /usr
8 > being populated by the content of your /usr partition.
9 > Don't forget to remove /usr from /etc/fstab.
10 >
12 I can recommend using rsync instead of cp. Main advantage is rsync can be
13 stopped (ie. killed) mid-way and resumed later. No big deal, but if your
14 /usr is as large as mine, you might like this! If transfering very large
15 files, instead of restarting the large file from scratch, using the
16 --append option will write the partial data in the destination file. If
17 killed and resumed, rsync will find the dst file is smaller than it should
18 and will continue from where it left. If the data is absolutely crictical
19 important, you can also use the -c option to force rsync to do a checksum
20 of the files to compare, it will recopy anything that's not right. I
21 normally use a -c check if I used --append and had to kill it (because I'm
22 paranoid AND patient). Although I have seen zero cases where the -c found
23 errors.
25 Note the slashes at end of directories mean something with rsync, in my
26 example below, it means make usr and mnt identical, having rsync /usr /mnt/
27 means copy usr into /mnt/ (giving /mnt/usr/).
29 So "cp -a /usr/* /mnt/" becomes:
30 rsync -ah --progress /usr/ /mnt/
32 Enjoy!