20200514 release

Change disk ID to avoid clashes
This commit is contained in:
Serge Schneider 2020-05-14 06:35:08 +01:00
parent 089f4f033c
commit 4c4bc2bc96
2 changed files with 25 additions and 6 deletions

8
debian/changelog vendored
View File

@ -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 raspi-config (20200504) buster; urgency=medium
* Replace references to wifi * Replace references to wifi

View File

@ -75,10 +75,21 @@ get_variables () {
} }
fix_partuuid() { 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}/g" /etc/fstab
sed -i "s/${OLD_DISKID}/${DISKID}/" /boot/cmdline.txt 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 () { check_variables () {
@ -113,8 +124,8 @@ check_variables () {
} }
check_kernel () { check_kernel () {
local MAJOR=$(uname -r | cut -f1 -d.) MAJOR="$(uname -r | cut -f1 -d.)"
local MINOR=$(uname -r | cut -f2 -d.) MINOR="$(uname -r | cut -f2 -d.)"
if [ "$MAJOR" -eq "4" ] && [ "$MINOR" -lt "9" ]; then if [ "$MAJOR" -eq "4" ] && [ "$MINOR" -lt "9" ]; then
return 0 return 0
fi fi
@ -157,7 +168,6 @@ main () {
return 1 return 1
fi fi
partprobe "$ROOT_DEV"
fix_partuuid fix_partuuid
return 0 return 0
@ -169,7 +179,7 @@ mount -t tmpfs tmp /run
mkdir -p /run/systemd mkdir -p /run/systemd
mount /boot 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| init=/usr/lib/raspi-config/init_resize\.sh||' /boot/cmdline.txt
sed -i 's| sdhci\.debug_quirks2=4||' /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 if ! grep -q splash /boot/cmdline.txt; then
sed -i "s/ quiet//g" /boot/cmdline.txt sed -i "s/ quiet//g" /boot/cmdline.txt
fi fi
mount /boot -o remount,ro
sync sync
echo 1 > /proc/sys/kernel/sysrq echo 1 > /proc/sys/kernel/sysrq