Quote:
Originally posted by Electro
Using mkisofs will not keep permissions, so you may want to use tar. With tar, permissions are kept and you can make a fixed size.
|
Electro, mkisofs will preserve file permissions if you use the -R flag. The following is from the mkisofs man page:
Code:
mkisofs is capable of generating the System Use Sharing
Protocol records (SUSP) specified by the Rock Ridge Inter-
change Protocol. This is used to further describe the
files in the iso9660 filesystem to a unix host, and pro-
vides information such as longer filenames, uid/gid, posix
permissions, symbolic links, block and character devices.
Code:
-R Generate SUSP and RR records using the Rock Ridge
protocol to further describe the files on the
iso9660 filesystem.
That being said, I agree that tar would be a better solution.
bentman78, execute the following commands:
cd /
tar -cf filesystem.tar bin/ boot/ dev/ etc/ home/ lib/ mnt/ opt/ root/ sbin/ tmp/ usr/ var/
gzip filesystem.tar
Note that you don't include the /proc/ directory. You will now have a file called filesystem.tar.gz which you can burn to a CD just like any other file. Then you can boot your target machine with a rescue disk (I like
Tom's root/boot); fdisk, format, and mount the target disk; mount your CD; copy, unzip, and untar the file system to the target disk. Now just chroot and run lilo, and your new system should be ready to boot.
Another (simpler) solution would be to physically install the drive from your target system into your existing system; fdisk, format, and mount it; then run the following commands:
cd /
cp -a bin boot dev etc home lib mnt opt root sbin tmp usr var /mnt/point/of/newdrive/
Then re-install the drive in your new system, boot with Tom's, then chroot and run lilo.
Though the second solution is simpler, the first will provide a nice portable, (semi-)permanent back-up of your shiny, new system. Personally, I don't trust CD-Rs to last, so I copied my latest LFS system to an old 2GB HDD as a back-up. The choice is yours.
Enjoy!
--- Cerbere