RobertCNelson / boot-scripts

Just a bunch of useful scripts placed under /opt/scripts/
125 stars 132 forks source link

beaglebone-black-make-microSD-flasher-from-eMMC.sh errors #49

Closed rifotu closed 6 years ago

rifotu commented 7 years ago

hello,

I get a lot of errors when running the beaglebone-black-make-microSD-flasher-from-eMMC.sh script. Most of the errros are like below. what can be a reason for this kind of error?

ERROR: sys/power/image_size failed verification -- update discarded.

the summary at the end is like below

Final System Tweaks: sed: can't read /tmp/rootfs/boot/uEnv.txt: No such file or directory beaglebone-black-make-microSD-flasher-from-eMMC.sh: 351: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/boot/uEnv.txt: Directory nonexistent UUID=7d5529f0-129a-4a00-b0c0-49ea3860a079 Generating: /etc/fstab beaglebone-black-make-microSD-flasher-from-eMMC.sh: 367: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent beaglebone-black-make-microSD-flasher-from-eMMC.sh: 368: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent beaglebone-black-make-microSD-flasher-from-eMMC.sh: 369: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent beaglebone-black-make-microSD-flasher-from-eMMC.sh: 370: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/etc/fstab: Directory nonexistent cat: /tmp/rootfs/etc/fstab: No such file or directory /boot/uEnv.txt: enabling eMMC flasher script beaglebone-black-make-microSD-flasher-from-eMMC.sh: 375: beaglebone-black-make-microSD-flasher-from-eMMC.sh: cannot create /tmp/rootfs/boot/uEnv.txt: Directory nonexistent cat: /tmp/rootfs/boot/uEnv.txt: No such file or directory

umount: /tmp/rootfs/: not mounted umount: /tmp/rootfs/: not mounted writing to [/dev/mmcblk1] failed...

Syncing: /dev/mmcblk1 100000+0 records in 100000+0 records out 51200000 bytes (51 MB) copied, 2.43149 s, 21.1 MB/s Syncing: /dev/mmcblk1 complete

umount: /tmp: not mounted umount: /tmp: not mounted sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=59232,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,relatime,size=100788k,mode=755) /dev/mmcblk0p1 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) mqueue on /dev/mqueue type mqueue (rw,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) eMMC has been flashed: please wait for device to power down.

Halting.

RobertCNelson commented 7 years ago

@rifotu please add these details:

cat /etc/dogtag

latest version of beaglebone-black-make-microSD-flasher-from-eMMC.sh ?

update via:

cd /opt/scripts/
git pull
rifotu commented 7 years ago

great!

git pull did the trick

between, below is the dogtag output root@beaglebone:/sys/class/gpio/gpio67# cat /etc/dogtag BeagleBoard.org Debian Image 2016-05-13

rifotu commented 7 years ago

I was a little bit rash with my statement the beaglebone-black-make-microSD-flasher-from-eMMC.sh script runs fine and exists without problems. I powered off / on my BBB, the light sequence effect kicked in and after some time BBB powered itself down.

I removed the sd card and powered the BBB. It seems that the image was not flashed to emmc. I tried to flash again but this time the light sequence effect didn't kick in.

I also tried pressing switch s2 but it didn't matter. Can you please guide me about what I am doing wrong? thanks

alert-jmc commented 7 years ago

I am having a similar issue. Creating the image from a beaglebone (I'm using a BBGW) works just fine, and I can use the sdflasher microSD to write to the eMMC on that beaglebone. However, when I try to boot that microSD on a different BBGW, I'm getting a UUID error:

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 device. Common problems:

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands.

flasher_boot_output.txt

Antonstr commented 7 years ago

Good day I have the same problem, I have a beagle that was set up in 2015 with kernel version 3.8.13-bone79.

This is what happens if I run the script

root@beaglebone:/opt/scripts/tools/eMMC# ./beaglebone-black-make-microSD-flasher-from-eMMC.sh

Starting eMMC Flasher from microSD media Version: [1.20170427: u-boot v2017.05-rc2...]

================================================================================ Prepare environment for flashing Starting at Wed Aug 30 10:42:05 UTC 2017

==> sysctl: vm.min_free_kbytes=[2882] ==> sysctl: setting: [sysctl -w vm.min_free_kbytes=16384] vm.min_free_kbytes = 16384

==> Determining root drive ==> console=ttyO0,115200n8 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN root=UUID=8d06d03b-a749-4035-8ea9-6dbe5f09a379 ro rootfstype=ext4 rootwait fixrtc quiet init=/lib/systemd/systemd

==> root_drive=[/dev/mmcblk0p2] ====> Root drive identified at /dev/mmcblk0p2 ==> Determining boot drive ==> Figuring out Source and Destination devices ====> Source identified: [/dev/mmcblk0] ====> Destination identified: [/dev/mmcblk1] ====> Unmounting auto-mounted partitions ==> Figuring out machine ====> Machine is TI_AM335x_BeagleBone ====> Machine is compatible with BeagleBone Black

5 4 3 2 1

================================================================================ Checking running system ==> Copying: [/dev/mmcblk0] -> [/dev/mmcblk1] ==> lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0boot0 179:8 0 2M 1 disk mmcblk0boot1 179:16 0 2M 1 disk mmcblk0 179:0 0 3.6G 0 disk ├─mmcblk0p1 179:1 0 96M 0 part └─mmcblk0p2 179:2 0 3.5G 0 part /

==> df -h | grep rootfs: rootfs 3.4G 2.6G 635M 81% /

!==> Error: [/dev/mmcblk1] does not exist writing to [/dev/mmcblk1] failed... ==> Stopping Cylon LEDs ... Traceback (last called is first): reset_leds() in ./functions.sh:427 write_failure() in ./functions.sh:445 check_running_system_initrd() in ./functions.sh:637 main() in ./beaglebone-black-make-microSD-flasher-from-eMMC.sh:35 The command kill $CYLON_PID > /dev/null 2>&1 exited with exit code 1.

Tearing Down script environment ==> Unmounting /tmp blockdev: cannot open /dev/mmcblk1: No such file or directory ==> Stopping Cylon LEDs ... ==> Setting LEDs to root@beaglebone:/opt/scripts/tools/eMMC#

RobertCNelson commented 7 years ago

@Antonstr

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0boot0 179:8 0 2M 1 disk
mmcblk0boot1 179:16 0 2M 1 disk
mmcblk0 179:0 0 3.6G 0 disk
├─mmcblk0p1 179:1 0 96M 0 part
└─mmcblk0p2 179:2 0 3.5G 0 part /

looks like your microSD wasn't plugged in..

Regards,

Antonstr commented 7 years ago

Good day Robert

The SD was plugged in, this is a brand new BeagleBone Black Wireless and is giving me endless problems. You cannot install anything to it as there is no space.

Every attempt to re-flash the eMMC so far has failed

Regards

Anton

On Wed, Aug 30, 2017 at 3:48 PM, Robert Nelson notifications@github.com wrote:

@Antonstr https://github.com/antonstr

`` NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0boot0 179:8 0 2M 1 disk mmcblk0boot1 179:16 0 2M 1 disk mmcblk0 179:0 0 3.6G 0 disk ├─mmcblk0p1 179:1 0 96M 0 part └─mmcblk0p2 179:2 0 3.5G 0 part /

looks like your microSD wasn't plugged in..

Regards,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertCNelson/boot-scripts/issues/49#issuecomment-325995764, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2tQS6rkXdCP8bRLDlH67wFL2_HeEqmks5sdWg3gaJpZM4Lyg_J .

RobertCNelson commented 7 years ago

@Antonstr yes the out of box lxqt image doesn't leave much room.. Most users use an external microSD or start with the iot image.

BTW, since the re-flash is failing, please run:

sudo /opt/scripts/tools/version.sh

Regards,

Antonstr commented 7 years ago

Good day Robert

Thank you Robert I eventually managed to find a version that flashed.

Regards

Anton

On Thu, Aug 31, 2017 at 3:41 PM, Robert Nelson notifications@github.com wrote:

@Antonstr https://github.com/antonstr yes the out of box lxqt image doesn't leave much room.. Most users use an external microSD or start with the iot image.

BTW, since the re-flash is failing, please run:

sudo /opt/scripts/tools/version.sh

Regards,

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobertCNelson/boot-scripts/issues/49#issuecomment-326298738, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2tQVN84aVlvR6i8jY1emjxKyUZfhaAks5sdrgPgaJpZM4Lyg_J .

vto80 commented 7 years ago

Hello Robert, I'm having some trouble with it too:

flasher_output.txt

This part looks like the error:

Allocating group tables: done Writing inode tables: done ext2fs_update_bb_inode: Cannot iterate data blocks of an inode containing inline data while setting bad block inode Traceback (last called is first): _format_root() in ./functions.sh:820 _prepare_future_rootfs() in ./functions.sh:1328 prepare_drive_reverse() in ./functions.sh:1417 main() in ./beaglebone-black-make-microSD-flasher-from-eMMC.sh:37 The command LC_ALL=C mkfs.ext4 ${ext4_options} ${rootfs_partition} -L ${rootfs_label} exited with exit code 1.

Also, version.sh:

git:/opt/scripts/:[4dd50b306e4eb31a05bb72a9573febc3695f1f05] eeprom:[A335BNLT00C01116BBBK1499] dogtag:[BeagleBoard.org Debian Image 2017-03-19] bootloader:[/dev/mmcblk1]:[U-Boot 2017.03-00002-gd12b1519b4] kernel:[4.4.54-ti-r93] nodejs:[v4.8.0]

vto80 commented 7 years ago

Replying to myself and anyone else that ran into this error with the BBB: It works now.

Changes:

Robert, thank you for a very useful script!

btrhad commented 6 years ago

I used to be able to clone my "golden" beaglebone to new beagle bones to create duplicates for my project. However after some time I now have newer BBB's and I can't install my SDcard image anymore. (I created the SDcard on my original BBB using the tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC script. (I first did a git pull in /opt/scripts).

When I insert the SD card in a new Beaglebone I get this error: `[ 2.376940] Freeing init memory: 244K Loading, please wait... [ 2.452019] udevd[92]: starting version 175 Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Waiting for root file system ... done. Gave up waiting for root device. Common problems:

Busyox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash) Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off (initramfs) `

The UUID is the UUID of the emmc from the original beaglebone (where I created the SDcard from). The new beaglebone has a differnet UUID. When I'm dropped into the shell, i see there are no /dev/mmcblk1* nodes.

My old BBB has linux 3.8.13-bone70 i tried to reinstall all old software on the newer 4.x debian but I can't my old *dts files (for all the custom hardware that is attached to the BBB) working in the newer environment.

Henk Dijkstra

RobertCNelson commented 6 years ago

@btrhad 3.8.13-bone70 with new hardware, same old bug discussed many times on the beagleboard google group..

https://groups.google.com/forum/#!forum/beagleboard

bone70 doesn't support newer eMMC models:

Follow this gist:

https://gist.github.com/RobertCNelson/39faf80ddc9fcefae74dce2c6ca2eb45

Regards,