RobertCNelson / boot-scripts

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

BBmicroSDflasher "rsync: link_stat "/boot/uboot/*" failed: No such file or directory (2)" #57

Closed GrantRolls closed 7 years ago

GrantRolls commented 7 years ago

Hey, Encountered following issue when trying to run the microSD flasher script. Up to this point no errors were encountered. At the last line terminal stalls.

beagleboard version: BeagleBoard.org Debian Image 2015-11-12

================================================================================ Partitionning /dev/mmcblk1

==> sfdisk parameters: sfdisk: [sfdisk --force --Linux --in-order --unit M /dev/mmcblk1] sfdisk: [1,96,0xE,*] sfdisk: [97,,,-] ==> Partitionning

Checking that no-one is using this disk right now ... OK

Disk /dev/mmcblk1: 243840 cylinders, 4 heads, 16 sectors/track

sfdisk: ERROR: sector 3069768701 does not have an msdos signature /dev/mmcblk1: unrecognized partition table type Old situation: No partitions found New situation: Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System /dev/mmcblk1p1 * 1 96 96 98304 e W95 FAT16 (LBA) /dev/mmcblk1p2 97 7619 7523 7703552 83 Linux /dev/mmcblk1p3 0 - 0 0 0 Empty /dev/mmcblk1p4 0 - 0 0 0 Empty Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).)

==> Partitionning Completed ==> Generated Partitions:

Disk /dev/mmcblk1: 243840 cylinders, 4 heads, 16 sectors/track Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System /dev/mmcblk1p1 * 32 3103 3072 98304 e W95 FAT16 (LBA) /dev/mmcblk1p2 3104 243839 240736 7703552 83 Linux /dev/mmcblk1p3 0 - 0 0 0 Empty /dev/mmcblk1p4 0 - 0 0 0 Empty

================================================================================

================================================================================ Preparing future /boot to receive files

==> Formatting boot partition with mkfs.vfat -F 16 /dev/mmcblk1p1 -n BEAGLEBONE

mkfs.vfat 3.0.13 (30 Jun 2012)

==> Formatting boot: /dev/mmcblk1p1 complete ==> Creating temporary boot directory (/tmp/boot) ==> Mounting /dev/mmcblk1p1 to /tmp/boot

================================================================================

================================================================================ Copying boot: /dev/mmcblk0p1 -> /dev/mmcblk1p1 ==> rsync: /boot/uboot/ -> /tmp/boot sending incremental file list rsync: link_stat "/boot/uboot/*" failed: No such file or directory (2)

sent 12 bytes received 12 bytes 48.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9] writing to [/dev/mmcblk1] failed... ==> Stopping Cylon LEDs ... ==> Setting LEDs to ./functions.sh: line 385: 6809 Terminated cylon_leds

RobertCNelson commented 7 years ago

"2015-11-12"... Okay, what script did you run? There's a few of them. Please type:

git rev-parse HEAD

in /opt/scripts/ so i have some idea of of the time line of the script you ran..

GrantRolls commented 7 years ago

I ran the latest script as the BBB did not already have it in the filesystem. https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh b601e6040bd38481b1e9f99f87fd66acb93fbf6d

RobertCNelson commented 7 years ago

@GrantRolls this might fix it:

https://github.com/RobertCNelson/boot-scripts/commit/fe72bb08d78ca634e3159a4df29054c8e03924ac

Having a fun time getting "2015-11-12" flashed to atleast one of my boards. ;)

Regards,

RobertCNelson commented 7 years ago

Weird, /boot/uboot/ exists, but it's unreadable... let's look for the old trigger file (MLO)

https://github.com/RobertCNelson/boot-scripts/commit/179c63999319f4b5364489643e9bf920f24bcf9d

Regards,

RobertCNelson commented 7 years ago

Okay things seem to work.

moved the rootfs from eMMC -> microSD with "beaglebone-black-make-microSD-flasher-from-eMMC.sh"

Then shutdown and let the microSD flash the eMMC: microSD -> eMMC

Then shutdown and let the eMMC boot..

debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh 
git:/opt/scripts/:[179c63999319f4b5364489643e9bf920f24bcf9d]
eeprom:[A335BNLT00C02516BBBK14A7]
dogtag:[BeagleBoard.org Debian Image 2015-11-12]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2015.10-00001-g143c9ee]
kernel:[3.8.13-bone79]
nodejs:[v0.10.38]

Regards,

GrantRolls commented 7 years ago

Awesome - looks like that was it. Cheers. Another small bug I found was that rsync --progress was not being used by the microSDflasher. I changed this as the rootfs was large and it looked like it was hanging for me at the point where it does the rootfs -> tmp sync.

Regards, Grant