Cloning a SD-card ends up with an unbootable partition?!

Hi folks,

I got a 4 GB SD-card that does work well with my BeagleBoard xM, see attachment “BeagleBoard booting SuSE on 4GB-SD ok.txt“. I cloned that card just to have a backup if that card gets corrupted one day. I did so using dd and ended up with a clone that boots just a bit. Booting the clone fails as soon as disc mmc-00000_0x0f4de006-part2 has to bee mounted, see attachment “BeagleBoard booting SuSE on 8GB-SD fails.txt”.

I don’t have the slightest idea what is going wrong. The original 4 GB works just fine but the same image cloned / transferred to an 8 GB card (that should easily do) fails?! Could anybody help me out with just an idea what do to or where to search?

Beat regards

Christian

BeagleBoard booting SuSE on 4GB-SD ok.txt

fdisk -l /dev/sdc

Platte /dev/sdc: 3974 MByte, 3974103040 Byte
255 Köpfe, 63 Sektoren/Spur, 483 Zylinder, zusammen 7761920 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x64c9641e

Gerät boot. Anfang Ende Blöcke Id System
/dev/sdc1 * 2048 411655 204804 83 Linux
/dev/sdc2 411656 6731235 3159790 83 Linux
/dev/sdc3 6731240 7759394 514077+ 82 Linux Swap / Solaris

OMAP SD/MMC: 0

U-Boot 2013.04-rc2 (Apr 17 2013 - 07:41:39)

OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment

In: serial
Out: serial
Err: serial
Beagle xM Rev C
No EEPROM on expansion board
Die ID #452000029ff800000168580217028015
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 1.800
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 480ab000 using PIO, IRQ 0
Net: usb_ether
Hit any key to stop autoboot: 0
mmc0 is current device
gpio: pin 173 (gpio 173) value is 0
gpio: pin 4 (gpio 4) value is 0
SD/MMC found on device 0
** File not found uEnv.txt **
1516 bytes read in 9 ms (164.1 KiB/s)
Running bootscript from mmc0 …

Executing script at 80200000

kerneladdr=0x80200000
ramdiskaddr=0x81000000
mmc0 is current device
4242872 bytes read in 338 ms (12 MiB/s)
4351196 bytes read in 333 ms (12.5 MiB/s)

Booting kernel from Legacy Image at 80200000 …

Image Name: Linux-3.7.10-1.16-omap2plus
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4242808 Bytes = 4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Loading init Ramdisk from Legacy Image at 81000000 …

Image Name: Initrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 4351132 Bytes = 4.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
Loading Kernel Image … OK
OK

Starting kernel …

// many lines cut off here

Boot logging started on /dev/ttyO2(/dev/console) at Mon Sep 2 02:00:05 2013
Waiting for device /dev/disk/by-id/mmc-00000_0x0f4de006-part2 to appear: ok
fsck from util-linux 2.21.2
[/sbin/fsck.ext4 (1) – /] fsck.ext4 -a /dev/mmcblk0p2
/dev/mmcblk0p2: clean, 24847/195200 files, 188497/789947 blocks
fsck succeeded. Mounting root device read-write.
Mounting root /dev/disk/by-id/mmc-00000_0x0f4de006-part2
mount -o rw,noatime,nobarrier -t ext4 /dev/disk/by-id/mmc-00000_0x0f4de006-part2 /root
[ 10.257232] EXT4-fs (mmcblk0p2): barriers disabled
[ 10.347106] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: nobarrier
[ 11.011016] EXT4-fs (mmcblk0p2): re-mounted. Opts: nobarrier
[ 12.021148] systemd[1]: systemd 195 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ; suse)

Welcome to openSUSE 12.3 (Dartmouth) (armv7hl)!

BeagleBoard booting SuSE on 8GB-SD fails.txt

fdisk -l /dev/sdc

Platte /dev/sdc: 7969 MByte, 7969177600 Byte
255 Köpfe, 63 Sektoren/Spur, 968 Zylinder, zusammen 15564800 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x64c9641e

Gerät boot. Anfang Ende Blöcke Id System
/dev/sdc1 * 2048 411655 204804 83 Linux
/dev/sdc2 411656 6731235 3159790 83 Linux
/dev/sdc3 6731240 7759394 514077+ 82 Linux Swap / Solaris

OMAP SD/MMC: 0

U-Boot 2013.04-rc2 (Apr 17 2013 - 07:41:39)

OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment

In: serial
Out: serial
Err: serial
Beagle xM Rev C
No EEPROM on expansion board
Die ID #452000029ff800000168580217028015
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 1.800
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 480ab000 using PIO, IRQ 0
Net: usb_ether
Hit any key to stop autoboot: 0
mmc0 is current device
gpio: pin 173 (gpio 173) value is 0
gpio: pin 4 (gpio 4) value is 0
SD/MMC found on device 0
** File not found uEnv.txt **
1516 bytes read in 7 ms (210.9 KiB/s)
Running bootscript from mmc0 …

Executing script at 80200000

kerneladdr=0x80200000
ramdiskaddr=0x81000000
mmc0 is current device
4242872 bytes read in 320 ms (12.6 MiB/s)
4351196 bytes read in 318 ms (13 MiB/s)

Booting kernel from Legacy Image at 80200000 …

Image Name: Linux-3.7.10-1.16-omap2plus
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4242808 Bytes = 4 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Loading init Ramdisk from Legacy Image at 81000000 …

Image Name: Initrd
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 4351132 Bytes = 4.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
Loading Kernel Image … OK
OK

Starting kernel …

// many lines cut off here

Creating device nodes with udev
[ 7.418151] systemd-udevd[90]: starting version 195
mount: devpts is already mounted or /dev/pts busy
devpts is already mounted on /dev/pts
Boot logging started on /dev/ttyO2(/dev/console) at Mon Sep 2 02:00:05 2013
Waiting for device /dev/disk/by-id/mmc-00000_0x0f4de006-part2 to appear: …Could not find /dev/disk/by-id/mmc-00000_0x0f4de006-part2.
Want me to fall back to /dev/disk/by-id/mmc-00000_0x0f4de006-part2? (Y/n)

BeagleBoard booting SuSE on 8GB-SD fails.txt (43.5 KB)

BeagleBoard booting SuSE on 4GB-SD ok.txt (84.6 KB)

Hi folks,

I got a 4 GB SD-card that does work well with my BeagleBoard xM, see attachment “BeagleBoard booting SuSE on 4GB-SD ok.txt“. I cloned that card just to have a backup if that card gets corrupted one day. I did so using dd and ended up with a clone that boots just a bit. Booting the clone fails as soon as disc mmc-00000_0x0f4de006-part2 has to bee mounted, see attachment “BeagleBoard booting SuSE on 8GB-SD fails.txt”.

I don’t have the slightest idea what is going wrong. The original 4 GB works just fine but the same image cloned / transferred to an 8 GB card (that should easily do) fails?! Could anybody help me out with just an idea what do to or where to search?

You can’t clone the disks uuid label. Fix that label variable for what the 8gb card actually is and it’ll boot…

I don’t have the slightest idea what is going wrong. The original 4 GB works just fine but the same image cloned / transferred to an 8 GB card (that should easily do) fails?! Could anybody help me out with just an idea what do to or where to search?

You can’t clone the disks uuid label. Fix that label variable for what the 8gb card actually is and it’ll boot…

How do I determine the partitions’ uuids on the clone and where do I have to change that value?

I don't have the slightest idea what is going wrong. The original 4 GB
works just fine but the same image cloned / transferred to an 8 GB card
(that should easily do) fails?! Could anybody help me out with just an idea
what do to or where to search?

You can't clone the disks uuid label. Fix that label variable for what the
8gb card actually is and it'll boot..

How do I determine the partitions' uuids on the clone and where do I have to
change that value?

in the uEnv.txt text file in the boot partition..

Waiting for device /dev/disk/by-id/mmc-00000_0x0f4de006-part2 to appear: ..............................Could not find >>/dev/disk/by-id/mmc-00000_0x0f4de006-part2.

Stick the drive in any linux box and see what:

ls -lh /dev/disk/by-id/* shows..

Regards,

Hello Robert,

many thanks for your hints. My linux-box is an open-suse system kernel 3.11.6-4 running inside an Oracle VM 4.3.6. I investigated this UUID-topic more careful but ended up even more confused. As I cloned the cards using dd I expected them to be identical in every bit (aside the cards’ different sizes that should not affect partitions cloned by dd). And in deed - for both cards I get the an identical output:

`

ls -lh /dev/disk/by-id/usb*

lrwxrwxrwx 1 root root 9 4. Jan 17:52 /dev/disk/by-id/usb-Mass_Storage_Device_125C20100726-0:0 → …/…/sdb
lrwxrwxrwx 1 root root 10 4. Jan 17:52 /dev/disk/by-id/usb-Mass_Storage_Device_125C20100726-0:0-part1 → …/…/sdb1
lrwxrwxrwx 1 root root 10 4. Jan 17:52 /dev/disk/by-id/usb-Mass_Storage_Device_125C20100726-0:0-part2 → …/…/sdb2
lrwxrwxrwx 1 root root 10 4. Jan 17:52 /dev/disk/by-id/usb-Mass_Storage_Device_125C20100726-0:0-part3 → …/…/sdb3

blkid /dev/sdb1

/dev/sdb1: UUID=“1a741a3f-1d6e-49f7-958b-a83e9ac4107f” TYPE=“swap”

blkid /dev/sdb2

/dev/sdb2: UUID=“a8748c5a-2bfa-4f9a-ac4f-b0c314ded6eb” TYPE=“ext4” PTTYPE=“dos”

blkid /dev/sdb3

/dev/sdb3: UUID=“5a41fb0b-d553-4f35-abdf-26a0210b4826” TYPE=“ext4”

`

It seems that the UUID is preserved by dd but still the second (cloned) card does not boot. Is there any other reason for not booting the clone you could imagine?

Best regards,

Christian

Hello folks,

forget about that SuSE-image I fell into trouble with and stick closely to Robet’s Ubuntu which works and allows cloning the easy way. Following those instructions allows cloning without pain; best way to do it, I suppose.

Best regards,

Christian

Hello Christian,

A short succinct list of steps you’ve taken to make your attempt work would help us more than anything else.