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.
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.
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.
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
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**
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>_
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).
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.