chloe K wrote:
Hi all I install etch in hda then I add the hdc which have same partition but not same size in hda /dev/hda1 /boot /dev/hda2 /swap /dev/hda3 / 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/hdaYou shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!tempnam: No such file or directory /usr/sbin/grub-install: line 394: $log_file: ambigous redirect What is the problem? Thank you
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 [0] with a command like.
mount -o dev,rw /dev/hda2 chroot /mnt/hda2 grub root (hd0,1) # or (hd0,0) for hda1 and probably hd2,0 for hdc1 setup (hd0) quit grub --config-file=./boot/grub/menu.lst --boot-drive=/dev/hda --batch grub-installyou 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.
[0] I could use dd if=/dev/hda of=/dev/hdc bs=446 count=1 to copy the boot sector but not the partition table)