Cloned hard drive won't boot

Hi all, recently I use Clonezilla cloned one hard drive which I installed Opensuse 12.2, include all partitions. When I tried to restore it on another machine (with very similar hardware and same model of hdd), the hard drive won’t boot. I just stuck at a black screen with a “-” mark blinking. No error or any message was given.
On the original machine, I have 1 hdd and 2 SSDs. I created partitions as /, /home, /boot, swap, and choose to use volume label instead of uuid or id in the /etc/fstab. The original system works perfectly but the cloned machine just won’t boot.
I booted with Opensuse live cd to check out with fdisk -l, it shows that /boot was marked to be bootable, so it’s supposed to boot.
When restore on the new machine, in Clonezilla chose “expert” mode there is a “reinstall grub” option, with or without this option been checked, the cloned system just won’t boot.

Do you have any idea about this?

Thanks in advance.

-Tony

If your question is about Clonezilla, you have more chances to get answer on some specialized forums. Otherwise try to reinstall bootloader as described here: http://forums.opensuse.org/content/128-re-install-grub2-dvd-rescue.html

Perhaps take a look here for hints: http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/advanced-how-faq-read-only/407027-cloning-old-drive-new-drive.html

Prior to cloning did you check the /etc/fstab file and the /boot/grub/menu.lst of the old hard drive, to see if it uses disk-by-id identification in the /etc/fstab, the /boot/grub/menu.lst, and the /boot/grub/device.map files ? If it does, IMHO it is best to change the fstab, menu.lst, and device.map files to mount/label more generically (ie not by disk-id) and confirm that works prior to cloning. … In essence one simply needs to type su -c ‘fdisk -l’ (enter root password) to determine how one’s disks are labeled, and also cat /etc/fstab to see what one’s fstab has for mounting on boot.

You can also boot to a liveCD, access those files and edit them as appropriate that way, so that a boot will succeed.

On 2012-10-13 09:16, oldcpu wrote:

> You can also boot to a liveCD, access those files and edit them as
> appropriate that way, so that a boot will succeed.

And perhaps a mkinitrd after a chroot.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Did clonezilla also cloned the MBR?

Thanks for reply.

  1. I used disk-by-label in fstab instead of disk-by-id, because the image will be restored on another hard drive, I think the id will be different since it’s captured by the system.

  2. In /boot/grub I don’t have menu.lst, no device.map neither. Does it mean I’m not using Grub? I only have one OS which is Opensuse on the computer. I do have device.map in /boot/grub2, but it looks like this and doesn’t give any useful info:
    (hd3) /dev/sdd
    (hd0) /dev/sda
    (hd2) /dev/sdc
    (hd1) /dev/sdb

  3. I did fdisk -l with sudo and it shows below, fstab is also shown. I don’t see any problem in it.
    **
    Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x000e7458

    Device Boot Start End Blocks Id System
    /dev/sdc1 2048 629153791 314575872 83 Linux
    /dev/sdc2 1887444992 1952980991 32768000 82 Linux swap / Solaris
    /dev/sdc3 629153792 1887444991 629145600 83 Linux
    /dev/sdc4 * 1952980992 1953523711 271360 83 Linux**

=============================================
fstab:

LABEL=RootPart / ext4 acl,user_xattr 1 1
LABEL=BootPart /boot ext4 acl,user_xattr 1 2
LABEL=SwapPart swap swap defaults 0 0
LABEL=HomePart /home ext4 defaults 1 2
#/dev/disk/by-id/ata-OCZ-SOLID3_OCZ-OQ3T9J604M9488ZI-part1 /mnt/ssd1 ext4 defaults 1 2
#/dev/disk/by-id/ata-OCZ-SOLID3_OCZ-01Q11S5H42Q81QK8-part1 /mnt/ssd2 ext4 defaults 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

Hi, I reinstalled Grub2 as the link you mentioned. Now the system boot and stuck at grub, and I was left in a command line with prompt “Grub2>”.
I checked new generated /boot/grub2 directory, only grubenv is there, along with fonts/, i386-pc/, locale. I don’t see device.map and grub.cfg. How can I build these files so to boot?

You do not need device.map file. To recreate grub.cfg use “grub2-mkconfig -o /boot/grub2/grub.cfg” in addition to other commands in this article. And notice at the very beginning there:

I don’t run grub2-mkconfig -o /boot/grub2/grub.cfg
Because I know it’s already correct

Thanks for reply, but when I build with mkconfig, it give errors about absence of /proc/mounts and can’t read partition list. So it still stuck at Grub>_

Then you likely need in addition

mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc

On 2012-10-13 18:56, blueforce wrote:
>
> Thanks for reply.
> 1. I used disk-by-label in fstab instead of disk-by-id, because the
> image will be restored on another hard drive, I think the id will be
> different since it’s captured by the system.
> 2. In /boot/grub I don’t have menu.lst, no device.map neither. Does it
> mean I’m not using Grub? I only have one OS which is Opensuse on the
> computer. I do have device.map in /boot/grub2, but it looks like this
> and doesn’t give any useful info:
> (HD3) /DEV/SDD

Please, to post computer text here use code tags, and do not alter the
text (like devices in uppercase, that is impossible).

Posting in
Code Tags - A Guide


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Yes I mounted them and mkconfig then got new problem.

 
ERROR: opening path /mounts/instsys/sys/block  
ERROR:failed to discover devices  
No volume group detect
 

After Googlling, as mentioned here, I use

mount -t proc none
mount --rbind /sys
mount --rbind /dev 

but still no luck and go same error.
If mount --bind /mounts /mnt/mounts, the error keeps still. And I find there is no instsys/ in /mounts, that should be there problem. I didn’t find much about this problem.

Finally I found a way out.
The reason why cloned drive won’t boot is that the hard drive is that there are drives not cloned exist in system and take positions of /dev/sda, /dev/sdb, but they don’t have correct entries in fstab and Grub, so Grub can’t boot. So I just change the cabling and make cloned drive be the first one, /dev/sda, and set this to target machine as well, then start to clone and restore without any problem. After restore, system can boot, because all new drives will be detected after /dev/sda, so the boot partition won’t be influenced.