System will only boot if bouth cloned HD are installed
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
System will only boot if bouth cloned HD are installed
The system setup is this:
There is a PCI sata card with 2 sata slots. Conected to each slot is a hard drive. Bouth hard drives have the same data on them, as I just cloned them with dd.
one is a Western Digital, I don't know what the other one is(lets call it HD2).
If I connect the WD to slot 2 and HD2 to slot 1 the system boots using the boot partition on the WD drive and then LVM uses the second partition on the WD as /.
however
If I connect HD2 to slot 2 and connect WD to slot 1 the system still boots using the boot partition on WD(bad) but LVM uses the second partition of HD2 as /(good)
Any configuration with only one drive fails before GRUB with something like:
Boot Failure:System halted
You probably need to change some of the information in /boot/grub/menu.lst on the clone. If the menu.lst is the same on both drives it means that the clone is probably referencing files on the original drive when it should be referencing the same files on the cloned drive.
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.10.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.10.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.1.10.el5.img
title CentOS (2.6.18-92.1.6.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.6.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.1.6.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
Here is my /boot/grub/grub.conf
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.10.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.10.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.1.10.el5.img
title CentOS (2.6.18-92.1.6.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.6.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.1.6.el5.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
Here is my /boot/grub/device.map
Code:
# this device map was generated by anaconda
(hd0) /dev/sda
You didn't say if, when booted with the original HD, you can read the contents of the 2nd disk alright. A dd clone tends to work only if the geometries (cylinders, blocks, and total size) are exactly identical. Please check if you can mount the partitions on your cloned /dev/sdb disk alright. If that fails, please post back what fdisk /dev/sdb (and then "p" for a description of the partition table) gives.
Then, the root device is made by LVM (root=/dev/VolGroup00/LogVol00 in the grub config). That is set up in the initial ramdisk, and I'm not sure that this works on the clone the same way. Do you know how to look at the contents of that initial ramdisk?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.