Re: [SLUG] Still trying to copy a disk...
I suggest: 1) Try the command I posted. 2) See if it's ok. 3) Expand the partitions. I have Partition Magic, but I believe there's a free software tool to do this as well. Keep your boot disk handy so you can run lilo or fiddle with grub (I don't think you have to). Perhaps it works fine. Cheers, Bret On Sun, 2003-12-07 at 08:58, Peter Vogel wrote: Yes, I am trying to make a copy of the disk as you say, but my new disk is bigger. I wonder if that will cause problems with what you suggest? And if that does work, will I be able to increase a partition to utilise the bigger disk? (these are two different issues, I will be happy just to have a backup in the first instance). On Sun, 07 Dec 2003 08:44:02 +1100 Bret Comstock Waldow [EMAIL PROTECTED] wrote: What are you trying to do? Back up is too vague, there are lots of approaches, with differing physical requirements. My backup is a second disk of the same size. I boot on Tom's RootBoot diskette (so no partitions are mounted) and run: dd if=/dev/hda of=/dev/hdc bs=16384k and then I go to sleep (my 20G drive takes about 2 hours, 40 minutes). When it's complete, I can hook up the backup disk and boot on it immediately, with a complete copy of my system, including any partition changes I made in the original plus the boot sector, and it even backs up my Windows 98 install as well. Everything just works. Curiously, it kills Windows 2000, even on the original disk (I have no idea how the original Windows 2000 disk partition knows it's been backed up, but it is consistently screwed). Windows 98, on the other hand, is fine with this approach. I can try any software experiment I want, and if it fails, I'm up and running in 3 minutes again, and remake my backup over night. Cheers, Bret On Sat, 2003-12-06 at 10:08, Peter Vogel wrote: Thanks for the pointer, but I don't think this will do what I need. It looks like I would need a working system to restore the partitions. I want to make an whole disk copy so I can put the drive in another computer, put the whole computer away, and pull it out if my server dies. Ghost theoretically allows me to put the second drive in teh computer, boot the Ghost floppy, it copies the disk and that;s that. But after doing this GRUB no longer works, and I have been unable to make it work, there are instructions for doing so but I get error messages which I don't understand. I need an idiot's version like Ghost but which works with Linux disks. On Sat, 6 Dec 2003 09:37:36 +1100 Graham Smith [EMAIL PROTECTED] wrote: On Sat, 6 Dec 2003 09:11, Peter Vogel wrote: 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... Try looking at http://www.partimage.org/ Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example), ... Partitions can be saved across the network since version 0.6.0. -- Regards, Graham Smith - -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug Peter Vogel ZapTV Pty Ltd 30 Adeline St, Faulconbridge 2776 Australia Tel: 02 4751 8735 Fax: 02 4751 2601 email: [EMAIL PROTECTED] Peter Vogel ZapTV Pty Ltd 30 Adeline St, Faulconbridge 2776 Australia Tel: 02 4751 8735 Fax: 02 4751 2601 email: [EMAIL PROTECTED] -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Still trying to copy a disk...
find ./ -xdev | cpio -p -d -m -v /mnt/hdc5/ returns cpio: invalid option --p I can't see why it's a problem...?? On Sat, 6 Dec 2003 10:18:01 +1100 (EST) Grant Parnell [EMAIL PROTECTED] wrote: 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? Peter Vogel ZapTV Pty Ltd 30 Adeline St, Faulconbridge 2776 Australia Tel: 02 4751 8735 Fax: 02 4751 2601 email: [EMAIL PROTECTED] -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Still trying to copy a disk...
Hi Peter, you could try http://gag.sourceforge.net/ for a nice boot manager. I'm not very familiar with grub but GAG seems to find all the partitions. maybe it will help. Ben -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Still trying to copy a disk...
On Sat, 6 Dec 2003 09:11, Peter Vogel wrote: 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... Try looking at http://www.partimage.org/ Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example), ... Partitions can be saved across the network since version 0.6.0. -- Regards, Graham Smith - -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Still trying to copy a disk...
Thanks for the pointer, but I don't think this will do what I need. It looks like I would need a working system to restore the partitions. I want to make an whole disk copy so I can put the drive in another computer, put the whole computer away, and pull it out if my server dies. Ghost theoretically allows me to put the second drive in teh computer, boot the Ghost floppy, it copies the disk and that;s that. But after doing this GRUB no longer works, and I have been unable to make it work, there are instructions for doing so but I get error messages which I don't understand. I need an idiot's version like Ghost but which works with Linux disks. On Sat, 6 Dec 2003 09:37:36 +1100 Graham Smith [EMAIL PROTECTED] wrote: On Sat, 6 Dec 2003 09:11, Peter Vogel wrote: 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... Try looking at http://www.partimage.org/ Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example), ... Partitions can be saved across the network since version 0.6.0. -- Regards, Graham Smith - -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug Peter Vogel ZapTV Pty Ltd 30 Adeline St, Faulconbridge 2776 Australia Tel: 02 4751 8735 Fax: 02 4751 2601 email: [EMAIL PROTECTED] -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
Re: [SLUG] Still trying to copy a disk...
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