UPDATE: Copying one HardDisk to another HardDisk
Anwar Saadeh <[email protected]> Fri, 23 Apr 2004 08:31:24 -0700 (PDT)
| Newsgroups | gmane.linux.admin.managers |
|---|---|
| Message-ID | <[email protected]> |
I just want to add more information on this issue: - The /etc/fstab does not have the "LABEL=/" label, I replaced it with /dev/sdx before mounting the 2nd Disk. So both Disks have /dev/sdx. - This time, the 1st and 2nd Disk geometries are the same. But it would be great if this can be done even if the 2nd has a different size. - I am writing a shell script to accomplish all this, it would be great if I don't have to do any manuall work like boot in a rescue mode then install grub from a CD. - I still get the "kernal panic" message. This is driving me crazy. I received some suggestions, all were great but unfortunately none worked. Thank you all for participating, I will summarize > Hi, > > I have a problem making a 2nd HardDisk bootable after copying it from 1st Disk > > - This is done on a RedHat WS release 3, 2.4.21-4.EL > - We do not want to use "dd" to accomplish this task > - The 2nd disk needs to be bootable > - What we need to accomplish is to be able to boot on the 2nd Disk after moving > it to the first slot. > > > Here are the steps am taking: > > 1. partition 2nd Disk > 2. mkfs -t ext2 /dev/sdb1 > mkfs -t ext2 /dev/sdb2 > mkfs -t ext2 /dev/sdb5 > mkswap /dev/sdb3 > > 3. mount /dev/sdb1 /mnt/sdb1 > mount /dev/sdb2 /mnt/sdb2 > mount /dev/sdb5 /mnt/sdb5 > > 4. cd /mnt/sdb1; dump 0f - /dev/sda1 | restore rf - > cd /mnt/sdb2; dump 0f - /dev/sda2 | restore rf - > cd /mnt/sdb5; dump 0f - /dev/sda5 | restore rf - > > I even tried the following: > > rsync -axvPS /boot/ /mnt/sdb1 > rsync -axvPS // /mnt/sdb2 > rsync -axvPS /var/ /mnt/sdb5 > > 5. If I reboot on the 2nd HardDisk at this time, I get this error message: > mkrootdev: label / not found > Mounting root filesystem > mount: error 2 mounting ext3 > pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2 > umount /initrd/proc failed: 2 > Freeing unused kernel memory: 164 freed > Kernel panic: No init found. Try passing init=option to kernel. > > > > 6. I think I have to do something about grub on the 2nd HardDisk: > #grub > >root (hd1,0) > >setup (hd1) > > However, I keep getting the same error message as above: Kernel panic > > What am I doing wrong? Any help is much appreciated. > > Thank you, > Anwar > _______________________________________________ LinuxManagers mailing list - http://www.linuxmanagers.org submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected] subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers