I'm a bit concerned about running out of RAM whilst copying, maybe there's options for reducing the buffer sizes or something like that.
Anyway, generally speaking there's no substitute for understanding the PC boot sequence and partitioning. In a nutshell if you have /dev/hda as the master and /dev/hdc as the backup. I would manually partition /dev/hdc and try to ensure the /boot partition is the same. This may involve convincing the BIOS of the 'correct' disk geometry. Sometimes the BIOS will look at the partition table first! IE I've had the same model drive come up with 2 different cylinder/head/sector counts on the same machine. To fix use fdisk and go into extended mode and set the C/H/S sizes and create a couple of partitions from scratch, then reboot, you might have several goes at this. The X86 linux kernels need to be re-started when the partition tables change, particularly if the size/order of the partitions change. Anyway, back on track. You can now format the target partitions, EG mkswap /dev/hdc2 mke2fs /dev/hdc1 mke2fs /dev/hdc5 /boot on /dev/hda1 can be directly copied with dd if=/dev/hda1 of=/dev/hdc1 Other partitions could be copied the same way but you're going to be copying the empty space too which will take a while. I prefer to use cpio instead. For this the relevant partitions will need to be mounted somewhere. mkdir /mnt/hdc1 mkdir /mnt/hdc2 mkdir /mnt/hdc5 mount -t ext3 /dev/hdc1 /mnt/hdc1 mount -t ext3 /dev/hdc2 /mnt/hdc2 mount -t ext3 /dev/hdc5 /mnt/hdc5 Now the copy, assuming hda5 is /home for example cd /home find ./ -xdev | cpio -p -d -m -v /mnt/hdc5/ The only thing left to do which gives me the shits is to write the boot sector on the /dev/hdc device. Theoretically you could dd the data but I don't know where to start and how much to copy. As a precaution, make a boot floppy disk mkbootdisk --device /dev/fd0 2.4.20-8 Now shutdown and disconnect /dev/hda, plug the backup drive into primary IDE controller so it's now /dev/hda and boot off the boot disk. If your boot system uses lilo just run lilo to fix. Otherwise use grub-install /dev/hda Ensure your system boots off the backup drive. Now you could write a backup script to just mke2fs /dev/hdcN find .... | cpio ..... on a semi-regular basis. I've got a client that had 3 backup drives. One kept at home, one kept at the office, one in the machine for next backup. These are then rotated weekly. On Sat, 6 Dec 2003, Peter Vogel wrote: > Having wasted days trying to make GRUB work again after ghosting a disk, > I bought Partition Commander today, as it was advertised as > understanding GRUB when making copies. > > Then I tried to copy a whole disk of Redhat 8 Linux > > The procedure runs okay for a few minutes, then I get a message saying > that the boot sector LILO or GRUB will need to be rebuilt if the boot is > "on this partition" - how should I know if it is or not when it does not > say which partition it's copying?? > > Then I tell it to continue and a few minutes later I get "Problem: not > enough RAM ... etc etc. > > I thought Partition Commander would work with GRUB seemlessly? is > anyone familar with Partition Commander? > > Any suggestions much appreciated. > > And back to my original original question, what is the foolproof (i.e. > me-proof) way of backing up a whole system for disaster recovery > purposes? > > I can SAMBA all the files off the Linux box onto my Windows box, but > then what? There must be an equivalent to Ghost that works with Linux... > > Thanks > > Peter Vogel > ZapTV Pty Ltd > 30 Adeline St, Faulconbridge 2776 > Australia > Tel: 02 4751 8735 > Fax: 02 4751 2601 > email: [EMAIL PROTECTED] > > -- ---<GRiP>--- Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber, BMX rider, Walker, Raver & rave music lover, Big kid that refuses to grow up. I'd make a good family pet, take me home today! Do people actually read these things? -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug