First the good news:
SUCCESS !!
I used Clonezilla v1.2.2-31 to save an image to a samba machine, turned off the hardware, swapped out the hard drive with the new one, powered up, and restored. After reboot, I was rocking openSUSE like the good old days (no more disk fail messages, which were plaguing the old drive). It was that easy. No learning curve with Clonezilla, I simply accepted the defaults, and everything went smooth as clockwork.
Now the bad/great news:
BEWARE !!
I ran into a major pain-in-the-butt problem when restoring. Bad news for me because I thrashed around all day Sunday attempting to resolve the issue without success.
Great news for everyone else, because
I resolved the issue this morning, and will explain the problem/solution to you all right now.
As you know, I am running openSUSE 11.0 on this old machine (which is critical to my operations here, tweaked to perfection, and chock full of good data). The Maxtor drive started experiencing a hard drive fail (the OS was warning me of bad sectors and imminent failure), so I need to move everything onto a new hard drive. I had a spare Western Digital device at the ready (identical in specifications, but a different make/model).
After the save/restore with Clonezilla, during boot, the boot process failed with an error to the effect:
Code:
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 cannot be found....
(I'm sorry, I do not remember the exact phrase). The boot process would offer a fallback option, but no choice taken would make any difference, and the boot failed. I tried the openSUSE install disk repair option, and thrashed around trying every possible option. That did not help at all. After a google search, I found this was a common problem when moving an openSUSE install to a new physical drive, but had a difficult time finding an explicit solution. The most useful resource was here:
http://forums.opensuse.org/install-b...hdd-names.html
Here is my solution
It seems that openSUSE is a little funky in the way in which it installs and configures the boot menu and fstab files, choosing to identify drives by a unique ID generated from the drive's information (through a combination of manufacturer name, model, and serial number), and this was causing my problem. All that gobbledygook (scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2) is referencing the old Maxtor drive, and was stopping me from installing on the new Western Digital drive. A different drive will have different ID info, even if the drive is same in every other respect. I even believe the same manufacturer and model would have a unique serial. Restoring to the exact same drive from which the image is made will work (naturally), no problem.
Trying to restore to any other drive will fail. I don't know why the good people at openSUSE chose to identify drives this way, but this is the way it is.
The solution is simply this:
BEFORE you use Clonezilla to create an image, you must prepare the source system by removing explicit references to the hard drive. This can be done as follows:
- Back up the system with Clonezilla (just in case you screw something up - there is never a problem restoring to the same exact hard drive). This will be for temporary purposes, and is not intended to be the final image.
- Boot your old source system
- Edit the menu.lst file:
- Open a root shell, cd to //boot/grub/
- kwrite (or the editor of your choice) menu.lst
If you're like me, you should see something like this:
Code:
# Modified by YaST2. Last modification on Wed Aug 26 13:18:00 PDT 2009
default 0
timeout 4
gfxmenu (hd0,1)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 resume=/dev/sda1 splash=silent showopts vga=0x31a
initrd /boot/initrd-2.6.25.20-0.5-pae
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
initrd /boot/initrd-2.6.25.20-0.5-pae
Modify the disk references, so the file will read something like this:
Code:
# Modified by YaST2. Last modification on Wed Aug 26 13:18:00 PDT 2009
default 0
timeout 4
gfxmenu (hd0,1)/boot/message
##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/sda2 resume=/dev/sda1 splash=silent showopts vga=0x31a
initrd /boot/initrd-2.6.25.20-0.5-pae
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
root (hd0,1)
kernel /boot/vmlinuz-2.6.25.20-0.5-pae root=/dev/sda2 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off x11failsafe vga=0x31a
initrd /boot/initrd-2.6.25.20-0.5-pae
The key is replacing the root= references to /dev/sda2.
- Save the edited menu.lst file.
- Edit the fstab file:
- cd //etc/
- kwrite (or the editor of your choice) fstab
If you're like me the first three lines should read something like this:
Code:
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part1 swap swap defaults 0 0
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part2 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120P0_Y46HM2YE-part3 /home ext3 acl,user_xattr 1 2
Again, modify the disk references so these lines read something like this:
Code:
/dev/sda1 swap swap defaults 0 0
/dev/sda2 / ext3 acl,user_xattr 1 1
/dev/sda3 /home ext3 acl,user_xattr 1 2
- Save the edited fstab file.
- Check nothing catastrophic happened by rebooting your system. Everything should boot just like before. If not, you can always restore...
If everything works, NOW you are ready to create/migrate your disk image to a new hard drive. Run Clonezilla, save the disk image, power down, swap the hard drives over, restore to the new hard drive, and boot.
Again, this is no doubt an openSUSE only issue, so hopefully I have helped other souls with this little post.
Thanks, again! And a very Happy New Year to you all...