Re: rsync to clone disk - Can it work? grub-install error
chloe K wrote:
I install etch in hda
then I add the hdc which have same partition but not same size in hda
i use rsync to copy data from hda to hdc
I use fedora5 boot disk to boot.
mount /boot and / and chroot to /
but I got error to grub-install /dev/hda
You shouldn't call /sbin/grub-install. Please call
tempnam: No such file or directory
/usr/sbin/grub-install: line 394: $log_file: ambigous redirect
What is the problem?
I do this all the time though usually I'm copying my nice clean install
onto a drive for a second machine but I run grub install from knoppix
after I move the drive  with a command like.
mount -o dev,rw /dev/hda2
root (hd0,1) # or (hd0,0) for hda1 and probably hd2,0 for hdc1
grub --config-file=./boot/grub/menu.lst --boot-drive=/dev/hda --batch
you could try a modified set of those commands, after you've copied the
files over I'd be tempted to pull /dev/hda so you know the second drive
is working independently, it's easy to think you've got it working when
actually grub on hdc is booting the OS in hda1.
On a side note I tend to use file system labels now rather than
partition numbers as then if you have 2 IDE chipsets and they get picked
up in a different order it doesn't matter, if you do that you must
remember to relabel your partitions on hdc as I'm not sure what happens
if you have 2 partitions of the same name.
 I could use dd if=/dev/hda of=/dev/hdc bs=446 count=1 to copy the
boot sector but not the partition table)