On Wed, May 31, 2000 at 02:17:40PM +0200, Andre Berger wrote: > The "really clean" solution without any Apple stuff has convinced > me. Could you perhaps give an example how to use cpio to backup my > ext2-partition, the usage seems quite complicated to me... im not a cpio guru but the method i used was: find /usr | cpio -padmv /mnt/usr the main thing to be aware of when doing this is if you start from / you get into a recursion problem, find recurses into /mnt and copies what your are copying into where your copying ;-) since you have a monolithic / partition right now its not so bad do like so: mount /dev/target /mnt find / -mount | cpio -padmv /mnt which will cause find to NOT recurse past mountpoints. when you restore it will be easier if you root to another filesystem, say boot floppy filesystem, then mount your backup on /source and your new root and any sub partitions in /target/ and /target/usr /target/home etc. then a find /source | cpio -padmv /target should take care of the restore. i am sure there are other ways to do this, this worked for me, and i just did a quick test cpioing /etc into /var/tmp/etc and it works ok. just be careful and you should probably read the cpio man page for yourself. my advice is under the GPL, you may modify it as you like but it comes with ABSOLUTLY NO WARRANTY ;-) (btw drop the `v' switch to cpio if you dont like seeing zillions of filenames flying by on the console) > And, which tool did you use for partitioning, mac-fdisk? yes, mac-fdisk is what you use. when you start it run the `i' command to clear the table and create a new empty one. beware though that mac-fdisk has some funny ideas about how simple math works, with large disks it often gets the idea that they are really 500GB instead of 20GB so what you should do is this: [eb@socrates eb]$ cat /proc/partitions | grep hda$ 3 0 20044080 hda [eb@socrates eb]$ 20044080 * 2 = 40088160 mac-fdisk /dev/hda -- print table [blah blah blah] Block size=512, Number of Blocks=40088160 ^^^^^^^^ in english i got the kernels idea of how many 1K blocks the device has, and multiplied it by 2 to get the number of 512 byte blocks. when you use the `i' command to mac-fdisk it will prompt for the number of blocks, the default value should be correct, (ie match what you calculated from /proc/partitions) if its something stupid like 20 quadrillion enter the correct value for number of blocks. now that thats done go about partitioning as you normally would, if you have not used mac-fdisk before go look at my quick 'n dirty tutorial at http://www.alaska.net/~erbenson/debian/ it will tell you the exact sequence for creating the bootstrap partition (C ; Apple_Bootstrap ; bootstrap ; 1P ; 800K) which is the most complicated step. for the rest just use the regular ol `c' command. when you have copied over the new system you will probably want to use ybin to fix your bootstrap partition, something like this should do: mkofboot -b /dev/hda2 -C /target/etc/yaboot.conf -m /target/boot/ofboot.b -i /target/boot/yaboot be sure to fix /target/etc/yaboot.conf for the new partition layout! reset OF to defaults by holding command option p r on a cold boot should make it boot right into linux without any intervention. good luck! and don't forget to edit /etc/fstab ;-) -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgpvIOdc85s4x.pgp
Description: PGP signature