Trouble cloning a USB drive running persistent Opensuse 13.2

Hello, my first post and I am very new to Linux. I installed Opensuse 13.2 to a thumb drive so I would have an OS to play in when using a computer that I am otherwise unable to alter (cant install anything to the HD). Its a full install of Opensuse, not a live CD/USB. The boot partition is separate, and the /home, /swap and / are all in an encrypted LVM (named system).

I managed to get everything setup and working, installed my apps and got my favorits and keypass files copyed over. Even setup OpenVPN to my home router. Then I decided to image the thumbdrive so that I would have a backup encase I lost it or messed somthing up. To test my image I loaded it to a second thumb drive (same brand, model and size) and tried to boot it.

After selecting my OS from the Grub2 boot menu, the screen changes and I get the default opensuse green background with the waves, and I expect the password field with the lock beside it to appear at the bottom for me to put in the password for the LVM. But that never happens. I assume the problem is in Grub2, or maybe whatever controls this screen where I unlock the LVM.

Googling and trying different guides, I tried so that I could mount the LVM and open it. I used a Opensuse 13.1 Live DVD for this. (Not 13.2 live, it seemed to have some kind of bug and wouldn’t see the LVM with a ‘pvs’ or ‘lvdisplay’ command). Once in I changed the UUID’s in the grub.cfg file to see if that would help, but it did not.

I then tried this guide: to recreate my Grub2 loader. The actual ‘grub-install’ commands wouldnt work in opensuse, but the bash prompt recommended using the yast2 bootloader tool. So I tried that. It gave an error “/usr/sbin/grub2-probe error failed to get canonical path of ‘overlayfs’”. Haven’t been able to find the cause of this error in google.

Any help in figuring this out would be appreciated.

Thank you.

Below I will paste the contents of the config files I think are relevant to troubleshoot this.

Grub.cfg (the part I think is relevant) =

BEGIN /etc/grub.d/10_linux

menuentry ‘openSUSE’ --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option ‘gnulinux-simple-ff23c3d9-0454-4a2c-8316-95cb51b3f381’ {
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root=‘hd1,msdos1’
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint=‘hd1,msdos1’ a59cefd0-641e-46ae-bf8c-8d9699a411b0
search --no-floppy --fs-uuid --set=root a59cefd0-641e-46ae-bf8c-8d9699a411b0
echo ‘Loading Linux 3.16.7-7-desktop …’
linux /vmlinuz-3.16.7-7-desktop root=UUID=ff23c3d9-0454-4a2c-8316-95cb51b3f381 resume=/dev/system/swap splash=silent quiet showopts
echo ‘Loading initial ramdisk …’
initrd /initrd-3.16.7-7-desktop
} =

(hd1) /dev/sdb
(hd0) /dev/sda

fstab =

/dev/system/swap swap swap defaults 0 0
/dev/system/root / ext4 acl,noatime,nodiratime,user_xattr 1 1
UUID=a59cefd0-641e-46ae-bf8c-8d9699a411b0 /boot ext4 acl,noatime,nodiratime,user_xattr,nofail 1 2
/dev/system/home /home ext4 acl,noatime,nodiratime,user_xattr 1 2
/dev/mapper/cr_storage /storage ext4 acl,user_xattr,nofail 0 2

crypttab =

cr_scsi-1SanDisk.Ultra_Fit…4C530001241227118212-part2 /dev/disk/by-id/scsi-1SanDisk.Ultra_Fit…4C530001241227118212-part2 none none
cr_storage /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF655AY9JG9AGC-part3 none none

You must change the fstab because the drive references change with the device. So you need to edit is and grub.conf after the clone or you could modify the boot on the original to use volume names which are totally device independent. A live DVD image would not have this problem because the fstab is created on the fly. In general the dvd image will make a ore general OS that will run without mod on most hardware. An install fixes many items about the install computer in tables to accelerate booting. This is done in the most part in systemd and to rescan things you need to do a mkinitrd command.

The guides i read did suggest needing to change the fstab to make the system boot. However, give that fstab is located in the \etc\ folder and it is encrypted until after i put in the pass for my LVM, i don’t think its stopping me at this point.

I did try changing the UUID in my grub.cfg file and it didn’t resolve the issue, but maybe i didn’t change it correctly or put in the right value. I will try it again and post my results.


why \etc\ ?
Are you using windows?

Sorry, /etc/fstab
As i said, new to linux.

How are cloning? you may need some things outside the partitions for the encryption.

As gogalthorp suggests,
This is where you should start troubleshooting… what method did you use to clone? If you used block-based cloning, it’s hard to believe you should have a problem, particularly if you are able to at least boot to grub.

Probably the most recommended way to clone is to just dd, and IMO if possible you should dd directly from your source to target thumb drives without an intermediate location (although it shouldn’t make a diff, it introduces some extra possibilities).
Other methods <may> work, but you need to be descriptive.


To make my image, i used this program in windows = It makes a bit level copy of the entire disk.

As for editing the files and updating the UUID’s, i just booted up my live CD and ran a blkid command from bash with the new thumb attached. It looks like the UUID’s haven’t changed from the ones linked above. What ones should i be looking for? sda1 and sda2 are my boot partition and LVM.

BLKID from New Thumb =

linux:/home/linux # blkid
/dev/cdrom: UUID=“2013-11-06-15-55-46-00” LABEL=“openSUSE 13.1 KDE Live” TYPE=“udf” PTTYPE=“dos”
/livecd/openSUSE-13.1-livecd-kde-read-only.x86_64-2.8.0: TYPE=“squashfs”
/dev/ram1: UUID=“67084ca3-8130-4396-9a59-6dea1b607f91” TYPE=“ext3”
/dev/loop7: TYPE=“squashfs”
/dev/sda1: UUID=“a59cefd0-641e-46ae-bf8c-8d9699a411b0” TYPE=“ext4” PTTYPE=“dos”
/dev/sda2: UUID=“0b3b9b20-29af-429d-bb04-7cd8987f6823” TYPE=“crypto_LUKS”

I just noticed one line in the grub config above with a UUID i didn’t recognize.

linux /vmlinuz-3.16.7-7-desktop root=UUID=ff23c3d9-0454-4a2c-8316-95cb51b3f381 resume=/dev/system/swap splash=silent quiet showopts

What does this UUID represent, should it be changed?

UUID is a hopefully unique ID designation of a partition. You can also use labels but then you have to label the partitions or you could use by-id or by-path but I recommend if you intend to clone to other hardware you use labels. That means you need to add a label to the partitions. this can be done in yast -partition management. This assures that all is totally hardware independent. Down side is you can’t mount two partition with the same labels at one time so it would be tricky to use one clone as a rescue for another clone.

Tho i am cloning these drives, i wont be using them with other hardware. This is just to make a single backup encase i lose the primary.

Do you have any idea what partition or hardware is being referenced with the UUID in that grub config i linked? the 2 UUID’s i got from my ‘blkid’ command match on both thumbdrives, so i am not sure where that one comes from.

You have a boot partition and a LVM right??

Correct, /dev/sda1 is a 500mb boot, and /dev/sda2 is the encrypted LVM.

What’s your partition scheme? While it might be a good idea to encrypt /home, it’s generally not a good idea to encrypt / itself. Also you would need a swap partition.

lvm is an extensibel container that may hold multiple partitions

I still suspect you miss something in your copying. I don’t trust Windows programs since Windows often hides stuff that may be useful. I’d use dd myself it is a low level raw copying tool

You may be on to something here. I will try a copy made with dd and post the results here tomorrow.

OK, just finished a copy from my good thunbdrive to my test one using the command

dd if=/dev/sdb of=/dev/sda

After the copy I gave it a boot, exact same issue. Still never get the password prompt to un-encrypt the LVM after the grub screen.

Still continuing to work on this, but not getting anywere…

i tried the blkid command with the encrypted LVM mounted in a live CD and the sub partitions mounted, this gave me the UUID in the grub config posted from my first post.

Roaming1:/home/user1 # blkid -o list

 device                                                      fs_type         label            mount point                                                     UUID
 /dev/sda1                                                          ext4                               /boot                                                                   a59cefd0-641e-46ae-bf8c-8d9699a411b0
 /dev/sda2                                                          crypto_LUKS                        (in use)                                                                0b3b9b20-29af-429d-bb04-7cd8987f6823
                                                                    LVM2_member                        (in use)                                                                1Cmmfy-ANL0-AZQD-b0P8-6erj-xAMC-5CuuCO
 /dev/mapper/system-swap                                            swap                               <swap>                                                                  61ff108f-a00c-46f0-85dd-bc91192e6a97
 /dev/mapper/system-root                                            ext4                               /                                                                       ff23c3d9-0454-4a2c-8316-95cb51b3f381
 /dev/mapper/system-home                                            ext4                               /home                                                                   507d1146-3579-4f00-90f1-c752a230d34e
 Roaming1:/home/user1# ^C


The UUID for root ending in f381 is the one that the grub boot loader points to for booting opensuse in normal mode. So this tells me all the UUID’s are software based and were copied with my dd command.

Could my problem be with the crypt config, could that one be referencing the hardware in some way? What config files do i need to look at to verify?