View Full Version : how do you back up linux from hda5 to hdb1

26th April 2004, 01:21 PM
I am trying to make a backup (working) from hda5 to hdb1 so that I have a working version that I can fiddle with. I tried copying hda5 to hdb1 but some files would not copy

My other problem is getting grub to boot the second hard drive

from what I can remember doing I copied the
kernel (hd0,4) etc part of the grub.conf file pasted it lower, changed the label to linux 2 and then changed the (hd0,4) to (hd1,0) and the root=/dev/hda5 to root=dev/hdb1 etc

as i'm not logged in as root I cann't read what I did

I hope this is enough info


26th April 2004, 11:16 PM
For an exact copy of the disk you can use dd. I'm not familiar with it, however. You should be able to use the device name of the primary drive as the input and the backup device as the output file.

Run "man dd" and "info dd" in a terminal for the documentation.

29th April 2004, 02:21 AM
dd is a waste, it copies blocks, not data.. have a 40GB hdd and just using 2GB? dd would create a 40GB backup image.

Just mount both partitions and use tar. Simple and effective.
See the tar manpage, but your syntax will probably resemble something to the effect of:
tar czvf /path/to/backup.tar.gz files

tar also supports incremental backups, scanning your current backup and just saving what's changed.

4th May 2004, 04:23 AM
sorry I think I did not explain myself properly
what I am looking to do is copy a partition (/) of a 40 gig drive and copy it to an 80 gig drive then install grub or lilo and have a functioning linux system after removing the 40 gig drive

Hermiston Photos on Instagram - Sinanju Travel Photos - Den Chai