(08-01-2022, 09:40 AM)wdt Wrote: Do be aware that your SD boot is using the uboot ON THE emmc,
this is almost certainly NOT the same as what is on the SD card,
which because of the spin-boot failure is not quite correct
So..maybe better to do partition dd's and then adjust fstab and extlinux.conf
(on emmc, to point to emmc)
You can verify my 1st supposition by disabling/remove emmc and see if it still boots
Then, backup SD mbr and dd 1st 16M from emmc -> SD, restore SD mbr, disable emmc, does it boot?
Or, better order, 1st save 1st 16M (emmc) somewhere on SD (for later convenience)
Yeah, that's a good point. I can't just clobber what's on the emmc. The uboot details are stored on there
(08-01-2022, 03:13 PM)dumetrulo Wrote: You're a bit short on relevant details, such as the size of the SD card, the size of your eMMC, the number of partitions involved etc. As of now, I can only say for sure that the boot partition begins at sector 32768.
Please boot from your Armbian SD, and provide the following outputs:
Code:sudo fdisk -l /dev/mmcblk1
sudo fdisk -l /dev/mmcblk2
If these commands should not produce the partitoning details of the SD card and eMMC, run lsblk to find the proper device names, and try with them.
Then I can tell you which dd commands you will need.
Sorry for the late reply..
Code:
$ sudo fdisk -l /dev/mmcblk1
Disk /dev/mmcblk1: 29.12 GiB, 31267487744 bytes, 61069312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa30be9a7
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 32768 60456959 60424192 28.8G 83 Linux
$ sudo fdisk -l /dev/mmcblk2
Disk /dev/mmcblk2: 116.48 GiB, 125069950976 bytes, 244277248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa30be9a7
Device Boot Start End Sectors Size Id Type
/dev/mmcblk2p1 32768 12902399 12869632 6.1G 83 Linux
I think I was a bit unclear, but I'd like to repartition the emmc to make this kind of copying possible. Now I'm realizing I need to get the partitions right first - so straight dd isn't really the right tool here. I'm not sure on the details of how to go about it though. So any tips would be appreciated.
I'd also like to drop to some console output during Armbian boot to actually see whats going on. Any idea how I can hide the spinning graphic and see some useful info?
(08-03-2022, 09:02 AM)wdt Wrote: use lsblk 1st,, boot0,boot1 is emmc (DO NOT use boot0, boot1)Thanks for the detailed rundown on how to use dd. I'm guessing I need to understand how to partition the emmc first though.. If I'm not mistaken here
(as root, sudo),,, if= input file,,, of= output file
either /dev/mmcblkX, X=1 or 2 (whole device) OR /dev/mmcblkXpY (partition Y, Y= 1 or 2))
Never use (dd's) default block size for flash (512B), always at least 256K
(me,,, bs=1M),,,, sync when done
For 1st sector, mbr,,,, dd if=/dev/SD of=savedSD.mbr bs=512 count=1
For 1st 16M (mbr+uboot) ,,,, dd if=/dev/emmc of=1st16m.emmc bs=1M count=16
replace emmc and SD with appropriate, of= can have paths if needed,
ie of=~/saved.mbr,,,,~=home