Image restore to new hardware?

I am trying to restore an image backup of my SSD systemdrive (sdc) to an “identical” drive with different ID using
dd if=… | gunzip | of=/dev/sdc

All partitions are restored ok in one go including GRUB.

I do have eliminated all by-id references from my fstab by mounting everything by label - including the SWAP.

However, my USB-mouse driver is being loaded before the file-system is mounted and the path to the driver involves
/dev/by-id/<drive ID>.

Obviously, this path is not found after I have restored to the new hardware. I am asked whether I want to fall back on the old hardware and -
whatever I have tried to answer I end up with a “$”-prompt.

I am in no acute emergency but would like to avoid any hardware-ID being mentioned in any of my boot skripts in order to make my image backup portable to new hardware.

I do not believe that this is a new problem but searching this forum for “by-id” did not help.

Could someone please supply a link to the info that I need?

Hi there,

Hummm . . . that is an interesting one.

Can you procvide what you are seeing in dmesg, etc.? I’d like to see exactly what is report.

Honestly I am not aware of any by-id reference in scripts or drivers, so this is interesting.

Cheers,
Lews Therin

Hi Lews,
I cannot answer your question because at the bootstage where I hang, there is no /bin/dmesg file. I guess I am still on a RAM-disk.

I did make some headway by editing the menu.lst file in the GRUB on my SUSE partition:
Replacing
root=/dev/disk/by-id/ata-MTRON_MSD-SATA3525_0HL3341240781-part3
by
root=/dev/disk/by-label/SUSE
where SUSE is the label of my SUSE partition.
This got me to the login prompt.

However, this works only with “noresume”.
the “resume=” parameter in the failsave boot option in GRUB specifies my SWAPpartition:

resume=/dev/disk/by-id/ata-MTRON_MSD-SATA3525_0HL3341240781-part6

That partition has no label and with Gparted (my Puppy-Linux Partitioner from which I can examine the disk) I do not know how to put a label on any (umount/swapoff-ed of course) partition.

Try to just stream-edit the new serial number
by
dd if=/mnt/sda1/20091005Mtron.Pudd.gz ibs=4096 |gunzip|sed ‘s/0HL3341240781/AH3PD41210016/g’ | dd of=/dev/sdc

You find the correct serial number by looking at the /dev/disk/by-id inventory!

This solves the problem halfway.

I still would like to have the SUSE-produced GRUB use partition labels for mounting from /dev/disk/by-label rather than from /dev/disk/by-id

Here is the list of files in my opensuse11.1 system partition where the disk/by-id/ paths contain the serial number of the disk
(apart from the grub and the logs)
/etc/lvm/.cache
/etc/sysconfig/bootloader
/var/lib/hardware/udi/org/freedesktop/Hal/devices/storage_serial_SATA_MTRON_MSD_SATA3_AH3PD41210016
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_part4_size_1024
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_uuid_13fba445_de60_49bb_9755_b55f5ffe5372
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_uuid_547ca2e2_a430_457c_a90c_e43bd3af8a63
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_uuid_5dc05ed6_d510_411f_b45a_fc8955d2bd52
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_uuid_715cc28f_871e_4e1e_a1e4_e45d9f502554
/var/lib/hardware/udi/org/freedesktop/Hal/devices/volume_uuid_bc4d7649_d9ea_4faa_b6a2_80ab69cb26f6
/var/lib/locatedb

So far the cloned system appears to run - I just keep my fingers crossed that the UUIDs and hwinfo… parameters in those files have not been generated by some checksum of the serial number.

Please, do you know any wise answer to that?