Browse Source

Determine partitions with GPT labels instead of number.

pull/104/head
Xavier Petit 5 years ago committed by Clément
parent
commit
2b2708c0b0
  1. 8
      scripts/install_client.sh
  2. 14
      scripts/system/etc/gdm3/PostLogin/Default

8
scripts/install_client.sh

@ -61,13 +61,7 @@ cd /tmp/system
sed -i -e "s|::DISK::|$DISK|g" etc/udev/rules.d/10-local.rules
# Fourth local partition
PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
grep -v usb |
grep '0 part' |
cut -d' ' -f2 |
sort |
head -n4 |
tail -n1)
PART=$(lsblk -pro kname,partlabel | grep 01-tmp-system | cut -d' ' -f1)
sed -i -e "s|::PART::|$PART|g" usr/share/initramfs-tools/scripts/init-premount/reformat
apt-get -y install overlayroot

14
scripts/system/etc/gdm3/PostLogin/Default

@ -29,11 +29,7 @@ set -x
sleep 0.5
# Find the first removable F2FS partition
PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
grep -e '1 part f2fs' -e '1 disk f2fs' |
cut -d' ' -f2 |
sort |
head -n1)
PART=$(lsblk -pro kname,partlabel | grep 01-home)
# Make sure the mountpoints are free
(
@ -47,13 +43,7 @@ then
mount -o noatime "$PART" /mnt
else
# No removable F2FS partition found, use the third local partition instead
PART=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
grep -v usb |
grep '0 part' |
cut -d' ' -f2 |
sort |
head -n3 |
tail -n1)
PART=$(lsblk -pro kname,partlabel | grep 01-tmp-home)
if test -z "$PART"
then

Loading…
Cancel
Save