what is the magic dd incantation to copy the system from the sd card to the emmc?
#5
(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)
(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
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
  Reply


Messages In This Thread
RE: what is the magic dd incantation to copy the system from the sd card to the emmc? - by geokon - 08-06-2022, 01:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PBP does not start from postmarket OS image burnt to sd card zkajdan 21 17,827 03-10-2025, 01:55 PM
Last Post: wdt
Exclamation 'failed to open panfrost' after system update using archarm Puckla 1 4,131 03-01-2024, 06:46 PM
Last Post: Puckla
  Help installing Manjaro on eMMC of Pinebook Pro pine4546464 4 10,248 12-13-2023, 07:22 PM
Last Post: trillobite
  Manjaro 20.04 not loading from SD (with Manjaro on eMMC) zaius 1 3,469 12-07-2023, 03:11 PM
Last Post: wdt
  Fedora 36 -> 37 upgrade kills system tydeman 0 2,410 10-28-2023, 09:53 AM
Last Post: tydeman
  [Manjaro] u-boot won't boot from eMMC with (unbootable) SD card present zackw 1 6,404 08-21-2023, 09:08 PM
Last Post: vanessadonald
  2TB SD Card Write Errors jiacovelli 3 4,350 06-02-2023, 06:13 PM
Last Post: KC9UDX
  Blank screen after Armbian 20.04 install to emmc? psychoacoustic 3 9,587 04-01-2023, 03:22 PM
Last Post: TRS-80
  Fix for Armbian not booting on PBP from eMMC agreenbhm 7 13,682 04-01-2023, 02:58 PM
Last Post: TRS-80
  My installation guide starting from messed up eMMC Besouro 0 3,235 12-19-2022, 01:01 PM
Last Post: Besouro

Forum Jump:


Users browsing this thread: 1 Guest(s)