Guillaume Faye Posted November 27, 2016 Share Posted November 27, 2016 hello , i use opi pc + i was install armbian in emmc with nand-sata-install without problems. so after a few mouths of work i would backup emmc. i plug an sd in a usb reader and launch nand-sata-install. i has been just one choise: "boot to sd , systeme on sata usb". all copy was good. but now opi boot only with sd card plug in the usb reader or with a fresh image in sd slot. if i try nand-sata-install from usb reader , i have error message "this toll must run from sd card!" how is it possible to reinstall old systeme (with all my work) in emmc. thanks. Link to comment Share on other sites More sharing options...
Igor Posted November 27, 2016 Share Posted November 27, 2016 Nand-sata-installer is not a eMMC backup tool, not designed for such scenarios ... it's job is to transfer data from SD media somewhere else and adjust boot scripts, install bootloader, ... Link to comment Share on other sites More sharing options...
Guillaume Faye Posted November 28, 2016 Author Share Posted November 28, 2016 thanks. Yes i understand that later....... is it possible to just reinstall boot partition in emmc for booting witthout sd and don't lost data in emmc? Link to comment Share on other sites More sharing options...
martinayotte Posted November 28, 2016 Share Posted November 28, 2016 dd if=/usr/lib/linux-u-boot-dev-orangepipcplus_5.24_armhf/u-boot-sunxi-with-spl.bin of=/dev/mmcblk2 bs=1024 seek=8 You also need to check rootdev is set properly in your /boot/boot.cmd Link to comment Share on other sites More sharing options...
Guillaume Faye Posted November 28, 2016 Author Share Posted November 28, 2016 thanks. I try your command from fresh dedian console (boot with sd card) , i must modifie to : dd if=/usr/lib/linux-u-boot-orangepipcplus_5.20_armhf/u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8 /usr/lib/linux-u-boot-orangepipcplus_5.20_armhf/u-boot-sunxi-with-spl.bin find in debian sd and of=/dev/mmcblk1 because i haven't mmcblk2 in /dev/ no errors in console , i try to reboot without sd card : no succes boot log from serial cable : U-Boot SPL 2016.09-armbian (Sep 15 2016 - 07:38:36) DRAM: 1024 MiB Trying to boot from MMC2 U-Boot 2016.09-armbian (Sep 15 2016 - 07:38:36 +0200) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi PC Plus I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 1, SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 2374 bytes read in 136 ms (16.6 KiB/s) ## Executing script at 43100000 gpio: pin PL10 (gpio 298) value is 1 gpio: pin PG11 (gpio 203) value is 1 ** File not found /boot/.verbose ** ** File not found /boot/.next ** ** Unrecognized filesystem type ** ** File not found .next ** 37596 bytes read in 374 ms (97.7 KiB/s) 3137557 bytes read in 293 ms (10.2 MiB/s) 5024944 bytes read in 462 ms (10.4 MiB/s) ## Loading init Ramdisk from Legacy Image at 42000000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 3137493 Bytes = 3 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Using machid 0x1029 from environment Starting kernel ... [sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 1024MB ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2004620! ion_reserve_common: ion reserve: [0x50000000, 0x60000000]! and after console on hdmi screen: many line :begin runing /script/local-block ... done at the end: Gave up waiting for root device. common problemes: -boot args (cat /proc/cmdline) -Check rootdelay= (did the systeme wait long enouth?) -Check root= (did the systeme wait for the right device ?) -missing modules (cats /proc/modules; ls /dev) alert! /dev/disk/by-uuid/39e............1b7e doesnot exist. dropping to a shell! rebooting automatically due to panic = boot argument. to finish i can't check rootdev is set properly in my /boot/boot.cmd because i don't no how do that. Link to comment Share on other sites More sharing options...
martinayotte Posted November 28, 2016 Share Posted November 28, 2016 Boot from SD again, then do "mount /dev/mmcblk1p1 /mnt", then check /mnt/boot/boot.cmd and make sure the rootdev=/dev/mmcblk1p1. Also check the same thing in /mnt/boot/armbianEnv.txt (I'm not sure if this file exist in older 5.20). Check the /mnt/etc/fstab too for the device or UUID used in "/" partition. (If some UUID is used, check what "blkid" is reporting) Link to comment Share on other sites More sharing options...
Guillaume Faye Posted November 29, 2016 Author Share Posted November 29, 2016 thanks for reply. 1) i mount mmcblk1p1 and there's no line rootdev in boot.cmd , where add this? and must i run "mkimage -C none -A arm -T script -d /mnt/boot/boot.cmd /mnt/boot/boot.scr" after change boot.cmd. strangely in line 11 , root=uuid=39e06b78-4f68-4cfb-a505-c7bd1f801b7e is different of uuid mmcblk1p1 in /dev/disk/by-uuid/a80ecb16-1adb-4a2b-ad23-b15d3b4f7517 maybe must i change this too? 2) i havn't /mnt/boot/armbianEnv.txt. 3) /mnt/etc/fstab: /dev/mmcblk1p1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0 /var/swap none swap sw 0 0 Link to comment Share on other sites More sharing options...
martinayotte Posted November 29, 2016 Share Posted November 29, 2016 There is a lot of changes that occured between 5.20 and 5.24, so don't worry about things that are missing, it would be useless to add them. But for root=UUID, yes, you need to fix that, either by placing proper one, or simply by using "root=/dev/mmcblk1p1". Yes, you will need to use mkimage command to get the boot.scr updated, then reboot without SD. Link to comment Share on other sites More sharing options...
Guillaume Faye Posted November 30, 2016 Author Share Posted November 30, 2016 I modified boot.cmd as below: gpio set PL10 gpio set PG11 setenv machid 1029 setenv bootm_boot_mode sec if ext4load mmc 0 0x00000000 /boot/.verbose then setenv verbosity 7 else setenv verbosity 1 fi setenv bootargs "console=tty1 root=/dev/mmcblk1p1 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 panic=1$ #--------------------------------------------------------------------------------------------------------------------$ # Boot loader script to boot with different boot methods for old and new kernel #--------------------------------------------------------------------------------------------------------------------$ if ext4load mmc 0 0x00000000 /boot/.next || fatload mmc 0 0x00000000 .next || ext4load mmc 0 0x00000000 .next then # sunxi mainline kernel #--------------------------------------------------------------------------------------------------------------------$ ext4load mmc 0 0x49000000 /boot/dtb/${fdtfile} || fatload mmc 0 0x49000000 /dtb/${fdtfile} || ext4load mmc 0 0x490000$ ext4load mmc 0 0x42000000 /boot/uInitrd || fatload mmc 0 0x42000000 uInitrd || ext4load mmc 0 0x42000000 uInitrd ext4load mmc 0 0x46000000 /boot/zImage || fatload mmc 0 0x46000000 zImage || ext4load mmc 0 0x46000000 zImage bootz 0x46000000 0x42000000 0x49000000 #bootz 0x46000000 - 0x49000000 #--------------------------------------------------------------------------------------------------------------------$ else # sunxi android kernel #--------------------------------------------------------------------------------------------------------------------$ ext4load mmc 0 0x43000000 /boot/script.bin || fatload mmc 0 0x43000000 script.bin || ext4load mmc 0 0x43000000 script$ ext4load mmc 0 0x42000000 /boot/uInitrd || fatload mmc 0 0x42000000 uInitrd || ext4load mmc 0 0x42000000 uInitrd ext4load mmc 0 0x48000000 /boot/zImage || fatload mmc 0 0x48000000 zImage || ext4load mmc 0 0x48000000 zImage bootz 0x48000000 0x42000000 #bootz 0x48000000 #--------------------------------------------------------------------------------------------------------------------$ fi and run : mkimage -C none -A arm -T script -d /mnt/boot/boot.cmd /mnt/boot/boot.scr allways run fail without sd. it seems boot is ok but kernel launch error. boot log on tty: U-Boot SPL 2016.09-armbian (Sep 15 2016 - 07:38:36) DRAM: 1024 MiB Trying to boot from MMC2 U-Boot 2016.09-armbian (Sep 15 2016 - 07:38:36 +0200) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi PC Plus I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 1, SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0(part 0) is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 2347 bytes read in 140 ms (15.6 KiB/s) ## Executing script at 43100000 gpio: pin PL10 (gpio 298) value is 1 gpio: pin PG11 (gpio 203) value is 1 ** File not found /boot/.verbose ** ** File not found /boot/.next ** ** Unrecognized filesystem type ** ** File not found .next ** 37596 bytes read in 386 ms (94.7 KiB/s) 3137557 bytes read in 298 ms (10 MiB/s) 5024944 bytes read in 470 ms (10.2 MiB/s) ## Loading init Ramdisk from Legacy Image at 42000000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 3137493 Bytes = 3 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Using machid 0x1029 from environment Starting kernel ... [sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 1024MB ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2004620! ion_reserve_common: ion reserve: [0x50000000, 0x60000000]! and after at tv screen : many line :begin runing /script/local-block ... done Gave up waiting for root device. common problemes: -boot args (cat /proc/cmdline) -Check rootdelay= (did the systeme wait long enouth?) -Check root= (did the systeme wait for the right device ?) -missing modules (cats /proc/modules; ls /dev) alert! /dev/disk/mmcblk1p1 doesnot exist. dropping to a shell! rebooting automatically due to panic = boot argument. "/dev/disk/by-uuid/39e.......... doesnot exist" was change by "/dev/disk/mmcblk1p1 doesnot exist" indicate boot.scr has been updated but after.....why doesn't exist mmcblk1p1???? ( i not include rootdev line . must include at end of boot.cmd?) Link to comment Share on other sites More sharing options...
martinayotte Posted November 30, 2016 Share Posted November 30, 2016 You seems to be at 2 inch from success ... The "disk" in /dev/disk/mmcblk1p1 should not be there ... Maybe the error isn't in boot.cmd, since you provide proper root there. Did you check again in /etc/fstab of the eMMC ? (so in /mnt/etc/fstab when mounted from sd boot) Link to comment Share on other sites More sharing options...
Guillaume Faye Posted December 1, 2016 Author Share Posted December 1, 2016 You seems to be at 2 inch from success ... The "disk" in /dev/disk/mmcblk1p1 should not be there ... Maybe the error isn't in boot.cmd, since you provide proper root there. Did you check again in /etc/fstab of the eMMC ? (so in /mnt/etc/fstab when mounted from sd boot) yes 2 inch it is better than nothink i recheck /mnt/etc/fstab: /dev/mmcblk1p1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0 /var/swap none swap sw 0 0 i see nothing wrong . maybe try /dev/mmcblk1? or reload just kernel core? thanks again for your help ang youtr time. Link to comment Share on other sites More sharing options...
martinayotte Posted December 1, 2016 Share Posted December 1, 2016 I don't know which script is trying to access it using /dev/disk/mmcblk1p1. If we knew, we could have that fixed ... Sorry, if my help didn't provide solution. Link to comment Share on other sites More sharing options...
Guillaume Faye Posted December 2, 2016 Author Share Posted December 2, 2016 Don't sorry you spent verry time to help me, and the mistake was mine. yesterday i try to explore nand -sata-install script to try to understand how it work and try some commandes. and one time i have a rebbot on emmc but with sd plugged.... very strangely. i continue to rummage this emmc. So,in finnaly if i find nothing, i know how access emmc data from sd boot, i will backup this on usb key , execute nand-sata-install from fresh debian sd card and manualy copie datato emmc from backup. Link to comment Share on other sites More sharing options...
Recommended Posts