mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-11-05 09:48:03 +09:00
20200514 release
Change disk ID to avoid clashes
This commit is contained in:
parent
089f4f033c
commit
4c4bc2bc96
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
||||
raspi-config (20200514) buster; urgency=medium
|
||||
|
||||
* Update initial resize script
|
||||
- Change disk ID to avoid clashes
|
||||
* Add boot order selector
|
||||
|
||||
-- Serge Schneider <serge@raspberrypi.org> Thu, 14 May 2020 06:33:23 +0100
|
||||
|
||||
raspi-config (20200504) buster; urgency=medium
|
||||
|
||||
* Replace references to wifi
|
||||
|
@ -75,10 +75,21 @@ get_variables () {
|
||||
}
|
||||
|
||||
fix_partuuid() {
|
||||
DISKID="$(fdisk -l "$ROOT_DEV" | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')"
|
||||
|
||||
mount -o remount,rw "$ROOT_PART_DEV"
|
||||
mount -o remount,rw "$BOOT_PART_DEV"
|
||||
DISKID="$(tr -dc 'a-f0-9' < /dev/hwrng | dd bs=1 count=8 2>/dev/null)"
|
||||
fdisk "$ROOT_DEV" <<EOF
|
||||
x
|
||||
i
|
||||
0x$DISKID
|
||||
r
|
||||
w
|
||||
EOF
|
||||
sed -i "s/${OLD_DISKID}/${DISKID}/g" /etc/fstab
|
||||
sed -i "s/${OLD_DISKID}/${DISKID}/" /boot/cmdline.txt
|
||||
mount -o remount,ro "$ROOT_PART_DEV"
|
||||
mount -o remount,ro "$BOOT_PART_DEV"
|
||||
sync
|
||||
}
|
||||
|
||||
check_variables () {
|
||||
@ -113,8 +124,8 @@ check_variables () {
|
||||
}
|
||||
|
||||
check_kernel () {
|
||||
local MAJOR=$(uname -r | cut -f1 -d.)
|
||||
local MINOR=$(uname -r | cut -f2 -d.)
|
||||
MAJOR="$(uname -r | cut -f1 -d.)"
|
||||
MINOR="$(uname -r | cut -f2 -d.)"
|
||||
if [ "$MAJOR" -eq "4" ] && [ "$MINOR" -lt "9" ]; then
|
||||
return 0
|
||||
fi
|
||||
@ -157,7 +168,6 @@ main () {
|
||||
return 1
|
||||
fi
|
||||
|
||||
partprobe "$ROOT_DEV"
|
||||
fix_partuuid
|
||||
|
||||
return 0
|
||||
@ -169,7 +179,7 @@ mount -t tmpfs tmp /run
|
||||
mkdir -p /run/systemd
|
||||
|
||||
mount /boot
|
||||
mount / -o remount,rw
|
||||
mount / -o remount,ro
|
||||
|
||||
sed -i 's| init=/usr/lib/raspi-config/init_resize\.sh||' /boot/cmdline.txt
|
||||
sed -i 's| sdhci\.debug_quirks2=4||' /boot/cmdline.txt
|
||||
@ -177,6 +187,7 @@ sed -i 's| sdhci\.debug_quirks2=4||' /boot/cmdline.txt
|
||||
if ! grep -q splash /boot/cmdline.txt; then
|
||||
sed -i "s/ quiet//g" /boot/cmdline.txt
|
||||
fi
|
||||
mount /boot -o remount,ro
|
||||
sync
|
||||
|
||||
echo 1 > /proc/sys/kernel/sysrq
|
||||
|
Loading…
Reference in New Issue
Block a user