File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
package/root/usr/local/sbin Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -115,5 +115,7 @@ echo "Downloading and writing to /dev/mmcblk1..."
115115curl -L -f " $DOWNLOAD_URL " | $ARCHIVER | dd bs=30M of=/dev/mmcblk1
116116sync
117117echo " "
118+ echo " You may want to run now pine64_remove_boot.sh to make the current device unbootable."
119+ echo " "
118120
119121echo " Done."
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eo pipefail
4+
5+ if [[ " $( id -u) " -ne " 0" ]]; then
6+ echo " This script requires root."
7+ exit 1
8+ fi
9+
10+ echo " Pine A64/Pinebook boot remover!"
11+ echo " (C) 2017. Kamil Trzciński (https://ayufan.eu)."
12+ echo " "
13+ echo " The purpose of this script is to remove boot0 and make the disk unbootable."
14+ echo " "
15+
16+ usage () {
17+ echo " Usage:"
18+ echo " $ $0 [disk]"
19+ echo " "
20+ echo " If no disk is specified the /dev/mmcblk0 will be used."
21+ exit 1
22+ }
23+
24+ if [[ $# -ne 1 ]] && [[ $# -ne 2 ]]; then
25+ usage
26+ fi
27+
28+ DISK=" ${1-/ dev/ mmcblk0} "
29+
30+ echo " Doing this will make the " $DISK " unbootable."
31+
32+ while true ; do
33+ echo " Type YES to continue or Ctrl-C to abort."
34+ read CONFIRM
35+ if [[ " $CONFIRM " == " YES" ]]; then
36+ break
37+ fi
38+ done
39+
40+ echo " "
41+ dd conv=notrunc bs=1k seek=8 count=32 oflag=direct if=/dev/zero of=" $DISK "
42+
43+ echo " Done."
You can’t perform that action at this time.
0 commit comments