hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

Segfault while dd #184

Open tuxpeople opened 3 years ago

tuxpeople commented 3 years ago

I've this issue:

[root@k3s1 ~]# flash -F /root/ssh -d /dev/mmcblk0 -f https://downloads.raspberrypi.org/raspbian_lite_latest
/usr/bin/curl
Downloading https://downloads.raspberrypi.org/raspbian_lite_latest ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   298  100   298    0     0   2462      0 --:--:-- --:--:-- --:--:--  2483
100  433M  100  433M    0     0  8311k      0  0:00:53  0:00:53 --:--:-- 10.3M
/usr/bin/unzip
Uncompressing /tmp/image.img.raspbian_lite_latest ...
Archive:  /tmp/image.img.raspbian_lite_latest
  inflating: /tmp/2020-02-13-raspbian-buster-lite.img
Use /tmp/2020-02-13-raspbian-buster-lite.img
Unmounting /dev/mmcblk0 ...
Flashing /tmp/2020-02-13-raspbian-buster-lite.img to /dev/mmcblk0 ...
1.72GiB 0:03:54 [7.52MiB/s] [===================================================================================================================================================================================================================>] 100%
571+8520 records in
571+8520 records out
1849688064 bytes (1.8 GB, 1.7 GiB) copied, 234.65 s, 7.9 MB/s
/usr/local/bin/flash: line 680: 16954 Done                    pv -s "${size}" < "${image}"
     16955 Segmentation fault      | sudo dd bs=$bs_size "of=${rawdisk}"

Should this work? Or is this script for hypriot images only?

tuxpeople commented 3 years ago

Maybe ist just not intended to be used online on the Pi itself ;-)