summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2014-09-27 22:32:28 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-27 22:32:28 +0200
commit4c72bfe6a1c5a943f060d13c2c6dfd7c39902552 (patch)
tree782ef3c7b2a8cfdf64b686125618c78613a27c24 /scripts
parent7ce9317dcaef232d6e3fd7b426108e76483227b4 (diff)
write a disk signature
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index 600543923..ec08151aa 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -453,6 +453,14 @@ if [[ $target = raspberry-pi ]]; then
dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1BE)) 2>/dev/null
fi
+# disk signature
+rnddev=/dev/urandom
+[[ -c /dev/arandom ]] && rnddev=/dev/arandom
+dd if=$rnddev bs=4 count=1 2>/dev/null | \
+ dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1B8)) 2>/dev/null
+print -n '\0\0' | \
+ dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1BC)) 2>/dev/null
+
(( quiet )) || print Cleaning out partitions...
(( datafssz )) && dd if=/dev/zero bs=1048576 count=1 \
seek=$((cyls - cfgfs - datafssz)) 2>/dev/null
@@ -507,8 +515,6 @@ case $target {
}
cd "$R"
-rnddev=/dev/urandom
-[[ -c /dev/arandom ]] && rnddev=/dev/arandom
dd if=$rnddev bs=16 count=1 >>etc/.rnd 2>/dev/null
(( quiet )) || print Fixing up permissions...
chown 0:0 tmp