Hi roger,
following up a private mail where i was asking for language:
i have had in 2016 a suse 11.4 with bad hdd, so i have made a ddrescue, fix it in the virual diskfile, and copy it back to a new harddisk. in 2017 i have copy a entire hard disk from a old 32bit computer suse 11.4 to a virtual disk using dd and running it in a kvm virtual machine. so i think it is the same thing you need. because i always write down the steps i do, here is what i have done, hopefully it will help you. i have not used a chroot enviorement here, i changed all files by hand. for searching of consent in files, i use always the midnight commander. booting the pc with bad harddrive and with good harddrive i would use "systemrescue cd". could be burned to cd and there is also a howto to burn it on sticks. http://www.system-rescue-cd.org/ =============================================================== BUT maybe its not neccesarry to boot with another system, see at the end of this text, for copy a harddrive to virtual system, i have found a solution to boot with the "not running system" i think this could work also in real. ================================================================ here is the german and my bad english "interpertion" of all infos i have written down. take care, my first run was not sucessfull, because of inserting wrong names, see at the end of the info's here: changing of harddrives opensuse 11.4 austauschen von festplatten (opensuse 11.4): ============================================================ after changing system did not boot because initramdisk and others have wrong names. (inside /dev there are the corret ones, see later in this text) nach austausch laeuft der rechner nicht mehr hoch, da ihm die korrekte platte zum weiterbooten nach initramdisk fehlt: (nun auf jeden fall die vorhandenen namen im /dev... (siehe unten) nochmals anschauen!!!!!) ============================================================ for the new and the old harddrive names look inside /dev/disk/by-id/ (ll > names-of-drives) do it once with old, once with new plate attached, now its clear what has to be changed. fuer die neuen und alten platten am einfachsten im. /dev/disk/by-id/ ein ll > irgendwas.txt machen da stehen die alten namen dann drin, das gleiche mit den neuen platten auch machen, nun weiss man was mit was ausgetauscht werden muss. ====================== search where this name is inside (with midnight commander): suche wo ueberall die falschen platten drin stehen: ******change****** /boot/grub device.map ****geaendert**** /boot grub menue.lst ****geaendert**** on some systems also: etc/sysconfig/bootloader (in diesem falle hier nichts drin - andere rechner schon) etc/fstab ****geaendert**** (not neccesarry to change) etc/fstab.yast2save (das vermutlich nicht aendern) (don't know, maybe ignore) etc/lvm/cache (das vermutlich ignorieren) ======================= now search for the initramdrive and copy to a save place: nun die initramdisk suchen und kopieren: /boot/initrd symbolic link to initrd-3.0.101-102-desktop /boot/vmlinuz symlink to vmlinuz-3.0.101-102-desktop ======================= according to a guide from: nach der anleitung von: http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-i... http://backreference.org/2010/07/04/modifying-initrdinitramfs-files/ check how it is packed, what version: schauen was es fuer eine version, wie gepackt ist: gunzip -c initrd-3.0.101-102-desktop |file - result: ergibt: ASCII cpio archive (SVR4 with no CRC) (it is first packed with gz (always) and then with cpio processed, but its a filestructure) (ist also erstmal mit gz gepackt (immer) und dann ncoh durch cpio weiterverwurstelt, aber eigentlich eine filestruktur) unpack it and process it with cpio daher entpacken und entwursteln mit: make a new directory, 'initram-unpacked' and copy the initrd to it neues verzeichnis machen, 'initram-entpackt' das initrd dort rein kopieren gunzip -c initrd-3.0.101-102-desktop | cpio -i delte the initrd file in side this directory das initrd file loeschen!!!!!!!! now here search again where all is the haddrive id is in and change: hier drin nun wieder suchen wo ueberall die platten drin sind und austauschen: ****changed****** ./run_all.sh ****geaendert**** ./config/mount.sh ****geaendert**** ./config/storage.sh ****geaendert**** now pack it together: nun packen mit: find . | cpio -H newc -o | gzip -9 > /home/yourdir/yourpath/modified/initrd-3.0.101-102-desktop ============================================= copy all back alles zurueck kopieren: ============================================= bad result, system will still not start (because:) geht nicht (weil:) inside boot-promt do im boot-promt mittels cd /dev cd disk cd cd by-id ls -l it seems, that the system as: stelle fest dass er aus: WDC_WD1004FBYZ-01YCBB1_WD-WMC6M0D1W5ME only by scsu-sata nur beim scsi-SATA the middle part 01YCBB1 was ignored. ????????? das mittelstueck 01YCBB1 weggelassen hat ??????????? do the same again, now with correct name. mache obigen mit neuen namen success!! jetzt laeufts. ============================= what i have done to run the virtual system in virtuellen machen: (maybe interresting, because i was able to boot the "not running system" and make an mkinitrd on the running system) if system did not start because of harddrives wenn er meckert dass er die platten nicht findet (becherer1 -> nach virtuell) say "n" to all for the questions, you will end in the promt change dir to /dev/disk/by-id mv nameexisten(you see) name_old_harddrive with all entrys dann alles mit "n" bestaetigen. danach ins dev/disk/by-id gehen und dort mv nameexistent name-alt machen mit allen. now type "exit" system will now boot dann exit. system bootet dann. now change etc/fstab and boot/grub/menu.1st to /dev/sda1 danach etc/fstab und boot/grub/menu.1st alles in /dev/sda1 etc. umbenennen. now use the command mkinitrd (dont ask abvout the correct syntax). das geht hier. habe danach noch mkinitrd gemacht allerdings bringt er ne i still have a warning abut different names, but system boots. warnung ueber ungleiche namen, laeuft aber nach wie vor hoch. now i changed boot/grub/device.map danach als versuch noch im boot/grub/device.map geaendert. again, command mkinitrd jetzt noachmals mkinitrd jetzt ohne meckern abgeschlossen. succes, system boot without problems laeuft hoch. ============================ hope this will help you, simoN -- www.becherer.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org