I have been trying for a few days to clone a HDD as I have run out of space.
I used clonezilla to do the copying. Change the /etc/fstab
But things have changed and opensuse no longer seems to use the sda1 etc nomenclature and one has to edit the fstab to put in the new uuid.
My system has another hdd which is in the fstab with its own uuid. Change the /boot/grub2/device.map
Here I am unsure of how to get the device name for (hd0). I took the number from the hardware info - which seems to be a bit short.
What else should be changed with respect to ethernet or NAS ?
At the moment, the system is not booting up fully and seems to hang in this boot process.
> I have been trying for a few days to clone a HDD as I have run out of
> I used clonezilla to do the copying.
> Change the /etc/fstab
> But things have changed and opensuse no longer seems to use the sda1 etc
> nomenclature and one has to edit the fstab to put in the new uuid.
You need not stick to defaults in fstab. You can use old-fashioned device
names as well as device IDs, UUIDs, and what I most often use, labels. If you
like what you’re used to, keep using it, just with knowledge of limitations
of the various methods, all of which need some manner of manipulation when
you’re cloning and then rebooting with both source and clone in the same
system at the same time.
> My system has another hdd which is in the fstab with its own uuid.
> Change the /boot/grub2/device.map
> Here I am unsure of how to get the device name for (hd0). I took the
> number from the hardware info - which seems to be a bit short.
Devices are enumerated several ways in /dev/. Most are in /dev/disk/, which
you can browse to determine what’s what, or you can use blkid. If the two
disks are different brands or sizes, it’s usually very easy to tell which is
which by browsing through by-id/.
> What else should be changed with respect to ethernet or NAS ?
Neither of those two should need changing unless the original and clone will
be booted simultaneously.
> At the moment, the system is not booting up fully and seems to hang in
> this boot process.
Unless something has changed relatively recently in Clonezilla, it makes true
clones. True cloning means nothing gets changed copying between source and
target. Nothing changed means when done you have multiple devices with
non-unique UUIDs. You need to change the UUIDs of the volumes involved, than
match the new ones with their corresponding boot menu and fstab entries. For
EXT2/3/4 partitions, I change UUIDs e.g. thus: ‘tune2fs -U random /dev/sda1’,
or better yet including a volume name thus: ‘tune2fs -U random -L ST500P02
The wise are known for their understanding, and pleasant
words are persuasive.
Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!
On 2014-08-01 11:23, Felix Miata wrote:
> On 2014-08-01 08:46 (GMT) Alastairo composed:
> You need not stick to defaults in fstab. You can use old-fashioned
> device names as well as device IDs, UUIDs, and what I most often use,
Keep in mind that, depending on the actual hardware present, device
names can change between boots (it happens on my computer, after
hotplugging an (e)SATA device). That’s why using device names in fstab
If you use labels or uuids, they are cloned across.
In fact I am doing the same thing yesterday. I didn’t use clone but the simple method “copy”.
What I did after was fixing the fstab using UUID (it was device ID originally), then I did a grub rescue too.
So far I still have the fatal grub error when booting “can’t find /boot/…/normal.mod”. But I remember that when I tried the grub rescue there was an error in the end, telling me efi partition is not included etc.
I think I need to repair the grub in a non-efi booted OS as the original os I’m trying to clone is not efi supported.
Up and running. This is what I did:
I cloned using clonezilla in expert mode and in addition to the standard, ticked the box “force sector by sector cloning”. It took about 10X that of a normal clone.
Then got uuid from /dev/disk/by-id/ and placed the 3 uuids into /etc/fstab
Then also got the device identifier from /dev/disk/by-id and replaced that into (hd0) in /boot/grub2/device.map spot. Then booted to check that it was working.
Then shutdown and extended the partition using gparted on a live disk.
Thanks for the help.
Hi Alastairo, can you tell me how to replace that device.map thing? I think I’m having exactly the problem there. Grub said it can’t find the UUID I copy pasted. So I guess it’s searching on a wrong disk.
If you to /dev/disk/by-id, you will get a long list and should be able to find it in that list. You have to be in su mode.
You will see the long name. Use the long name in the (hdo) slot
To get the uuid use blkid in root:
/dev/sda1: UUID=“a0636e74-fd98-48d6-99a5-ceb22890d2e9” TYPE=“swap”
/dev/sda2: UUID=“6153bb26-848f-4422-94b4-fd929867cec0” TYPE=“ext4” PTTYPE=“dos”
/dev/sda3: UUID=“4234a248-e684-456f-af8a-cef6c1bf5679” TYPE=“ext3”
remove the quotation marks.
In /dev/disk/by-id, I used the highlighted text for the device.map
Thank you, this definitely helped. I modified the device.map accordingly and then successfully boot into a sluggish system and there were many errors. I have to look into this new problem. Thank you for your teaching.
Edit: and yes I forgot to ask, why did you use clone rather than just copy? And what’s the benefit of sector to sector clone in this scenario?