Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 11 Mar 1996 08:52:18 -0600 (CST) | From | Bill Powers <> | Subject | Re: Duplicating disks |
| |
On Mon, 11 Mar 1996, Richard van Hees wrote:
> The first step is to let Linux detect your new disk!!! (see startup message) > - check all the disk parameters.... > - decide how you want to use your disk, before you are going to use fdisk... > - create partitions on the disk (fdisk man-pages): required are the root > partition, but you probably also want to create a home, swap and /usr/local > partition. And these are only your Linux partitions (what about DOS, OS/2, > etc.) > - now you can start mounting these partition. I prefere to mount them one by > one, but it has the disadvantage that you can not use cp -a / /mnt, because > this would copy your whole disk to the root partition. The advantage is that > you can carefully select what to copy to your new root directory. I also > prefere not to copy the contents of /dev, but just copy MAKEDEV to /mnt/dev > and use this script to create the devices you really need. > > An Example (just as a gide line!): > The partition table of your new disk > /dev/hdb1 100Mb (your new root partition) > /dev/hdb2 16Mb (your new swap partiton) > /dev/hdb3 150Mb (your new /usr/local partition) > /dev/hdb5 600Mb (your new home partition) > > mount /dev/hdb1 as /mnt > cp -a /usr /mnt/. > rm -rf /mnt/usr/local > cp /sbin /mnt/. > cp /bin /mnt/. > cp -a /etc /mnt/. > cp -a /var /mnt/. > cd /mnt > mkdir /proc /dev /usr/local /home /mnt /floppy > << give them the right permisions >> > cp /vmlinuz . > cd dev > cp /dev/MAKEDEV . > << use MAKEDEV >> > cd / > umount > mount /dev/hdb3 as /mnt > umount > cp /usr/local /mnt/. > mount /dev/hdb5 as /mnt > cp /home /mnt > umount > > NOTE THAT I JUST WRITE THIS DOWN SITTING BEHIND MY POWERMAC AT WORK, I CAN > NOT CHECK ANYTHING, BUT THIS IS MORE OR LESS THE WAY I DID IT. >
If you use the slackware boot/root disks, or any other boot disk, you can mount both partitions and copy them directly using cp -a or the old tar trick without getting into recursion problems. I personally suggest mounting the 'from' partition as read-only as insurance against the wayward keystroke syndrome.
Bill Powers wepprop@nettap.com Linux: Resistance is futile...
| ![\](/images/icornerr.gif) |