mohorst Posted October 31, 2018 Posted October 31, 2018 Hello, i try to move it from SD to eMMC on a Orange Pi Zero +2 H5, but without success. Shouldn't be two partion created on eMMC by the nand-sata-install script ? root@orangepizeroplus2:~# fdisk -l /dev/mmcblk2 Disk /dev/mmcblk2: 7.3 GiB, 7818182656 bytes, 15269888 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: 0xe8c6ce8d Device Boot Start End Sectors Size Id Type /dev/mmcblk2p1 8192 15117183 15108992 7.2G 83 Linux Old UUID: /dev/mmcblk0p1 SD UUID: UUID=85ffa85e-4784-4cfd-93bb-db6f93f8ef0b UUID=dcb9caff-046e-4a9f-8d17-580c67514cf6 SATA UUID: UUID=dcb9caff-046e-4a9f-8d17-580c67514cf6 eMMC UUID: UUID=dcb9caff-046e-4a9f-8d17-580c67514cf6 ext4 Boot: $1 /dev/mmcblk2p1 ext4 Root: $2 /dev/mmcblk2p1 Usage: 1137 Dest: 6781 regards MoHorst
martinayotte Posted October 31, 2018 Posted October 31, 2018 2 hours ago, mohorst said: Shouldn't be two partion created on eMMC by the nand-sata-install script ? No ! partitioning of the eMMC should be identical to the one on SD. Can you provide boot log details from serial debug port ?
mohorst Posted October 31, 2018 Author Posted October 31, 2018 (edited) Thanks, for the quick response. Spoiler U-Boot SPL 2018.05-armbian (Oct 26 2018 - 20:36:24 +0200) DRAM: 512 MiB Trying to boot from MMC2 NOTICE: BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000) NOTICE: Configuring SPC Controller NOTICE: BL3-1: v1.0(debug):c9f55c0 NOTICE: BL3-1: Built : 20:36:18, Oct 26 2018 NOTICE: DT: sun50i-h5-orangepi-zero-plus2 NOTICE: SCPI: dummy stub handler, implementation level: 000000 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9 U-Boot 2018.05-armbian (Oct 26 2018 - 20:36:24 +0200) Allwinner Technology CPU: Allwinner H5 (SUN50I) Model: OrangePi Zero Plus2 DRAM: 512 MiB MMC: SUNXI SD/MMC: 0, SUNXI SD/MMC: 1 Loading Environment from EXT4... Card did not respond to voltage select! ** Bad device mmc 0 ** Failed (-5) In: serial Out: serial Err: serial Net: No ethernet found. Card did not respond to voltage select! ** Bad device mmc 0 ** Card did not respond to voltage select! ** Bad device mmc 0 ** starting USB... No controllers found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc1(part 0) is current device Scanning mmc 1:1... Found U-Boot script /boot/boot.scr 3090 bytes read in 5 ms (603.5 KiB/s) ## Executing script at 4fc00000 U-boot loaded from eMMC or secondary SD Boot script loaded from mmc 240 bytes read in 3 ms (78.1 KiB/s) Card did not respond to voltage select! ** Bad device mmc 0 ** 29671 bytes read in 16 ms (1.8 MiB/s) ** File not found /boot/dtb/allwinner/overlay/-fixup.scr ** 4923550 bytes read in 247 ms (19 MiB/s) 13148168 bytes read in 646 ms (19.4 MiB/s) ## Loading init Ramdisk from Legacy Image at 4fe00000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 4923486 Bytes = 4.7 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 4fa00000 Booting using the fdt blob at 0x4fa00000 Loading Ramdisk to 49b4d000, end 49fff05e ... OK reserving fdt memory region: addr=4fa00000 size=6d000 Loading Device Tree to 0000000049add000, end 0000000049b4cfff ... OK Starting kernel ... Loading, please wait... starting version 232 Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems done. Begin: Waiting for root file system ... Begin: Running /scripts/local-block .... Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. Begin: Running /scripts/local-block ... done. done. Gave up waiting for root file system device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/mmcblk0p1 does not exist. Dropping to a shell! Rebooting automatically due to panic= boot argument Edited November 3, 2018 by Tido added Spoiler
martinayotte Posted October 31, 2018 Posted October 31, 2018 9 minutes ago, mohorst said: ALERT! /dev/mmcblk0p1 does not exist. Dropping to a shell! This means that maybe either /boot/armbianEnv.txt or /etc/fstab present on eMMC, or both, have the wrong UUID. Boot again with SDCard, mount the eMMC manually, and check/edit those to have proper UUID. Then halt the OS, eject the SDCard, and recycle power to boot from eMMC.
mohorst Posted October 31, 2018 Author Posted October 31, 2018 The fstab is fine blkid /dev/mmcblk0p1: UUID="85ffa85e-4784-4cfd-93bb-db6f93f8ef0b" TYPE="ext4" PARTUUID="cac5f6cc-01" /dev/mmcblk2p1: UUID="f817ad43-5219-4498-a6ac-f14e5ac76fd3" TYPE="ext4" PARTUUID="8bc978ec-01" /dev/mmcblk0: PTUUID="cac5f6cc" PTTYPE="dos" /dev/mmcblk2: PTUUID="8bc978ec" PTTYPE="dos" root@orangepizeroplus2:/mnt/tt/etc# cat fstab # <file system> <mount point> <type> <options> <dump> <pass> tmpfs /tmp tmpfs defaults,nosuid 00 UUID=f817ad43-5219-4498-a6ac-f14e5ac76fd3 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro,x-gvfs-hide 0 1 I assume, i have to add to armbianEnv.txt rootdev=UUID=f817ad43-5219-4498-a6ac-f14e5ac76fd3 rootfstype=ext4 root@orangepizeroplus2:/mnt/tt/boot# cat armbianEnv.txt # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
mohorst Posted October 31, 2018 Author Posted October 31, 2018 It's working after adding this two lines to armbianEnv.txt. Thanks for your support.
mohorst Posted October 31, 2018 Author Posted October 31, 2018 I think, here is the issue, if the rootdev is not in the original file, it wouldn't be changed or added. ------nand-sata-install line 224----- # new boot scripts if [[ -f ${TempDir}/bootfs/boot/armbianEnv.txt ]]; then sed -e 's,rootdev=.*,rootdev='"$targetuuid"',g' -i ${TempDir}/bootfs/boot/armbianEnv.txt else ------nand-sata-install-----
martinayotte Posted October 31, 2018 Posted October 31, 2018 34 minutes ago, mohorst said: root@orangepizeroplus2:/mnt/tt/boot# cat armbianEnv.txt # $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u This seems to be a file corrupted, because it kind of copy of /etc/ssh/sshd_config, hoping that there is no other files corrupted ... Take a copy of SDCard /boot/armbianEnv.txt and place it into the eMMC after changing the UUID.
mohorst Posted October 31, 2018 Author Posted October 31, 2018 Looks like it's already changed on the SDCard. I will perform a fresh installation from scratch.
mohorst Posted October 31, 2018 Author Posted October 31, 2018 After a fresh installation, all works as expected. 1
martinayotte Posted October 31, 2018 Posted October 31, 2018 4 hours ago, mohorst said: After a fresh installation, all works as expected. Glad to ear that !
pzw Posted November 1, 2018 Posted November 1, 2018 Could it be that the image on the SD card you first used was corrupted? Did you use Etcher to create the SD card? Just curious... :-)
mohorst Posted November 3, 2018 Author Posted November 3, 2018 On 11/1/2018 at 2:56 PM, pzw said: Could it be that the image on the SD card you first used was corrupted? Did you use Etcher to create the SD card? Just curious... :-) I couldn't reproduce the problem, it was a fresh installation with only a few changes. I used ImageWriter.
pzw Posted November 6, 2018 Posted November 6, 2018 On 11/3/2018 at 6:32 AM, mohorst said: I used ImageWriter. There is a reason why Etcher is recommended by the creators of Armbian... It is for sure one of the (few) image writing utilities which actually verify after the writing... And yes, that is important, because corrupted SD cards can generate strange issues..... Good to hear it is working, but I would strongly recommend using Etcher to create the flash cards in the future, to ensure you are not dealing with a corrupted image on the card...
alexho Posted April 12, 2019 Posted April 12, 2019 Hi Does anyone know how to do the opposite. Meaning copy from the emmc back to the sd card? I ran out of space on my 8GB
Recommended Posts