Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-28 00:50:05 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-28 00:50:05 +0000
commit70c811e2bcc5a5492b230021c8de41b0c2368956 (patch)
tree03cbbb7f722fdb49208b525c806f4fb7a815fbb0
parent1aec07f82944978ff473336a9919e8b72b1da94d (diff)
Feature: #28 - Fixing the booatloader config when disk ain't encrypted
-rw-r--r--archinstall.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archinstall.py b/archinstall.py
index 1cc42255..e0c42a04 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -1012,14 +1012,16 @@ def setup_bootloader(*positionals, **kwargs):
## For some reason, blkid and /dev/disk/by-uuid are not getting along well.
## And blkid is wrong in terms of LUKS.
#UUID = sys_command('blkid -s PARTUUID -o value {drive}{partition_2}'.format(**args)).decode('UTF-8').strip()
- UUID = simple_command(f"ls -l /dev/disk/by-uuid/ | grep {os.path.basename(args['drive'])}{args['partitions']['2']} | awk '{{print $9}}'").decode('UTF-8').strip()
with open('/mnt/boot/loader/entries/arch.conf', 'w') as entry:
entry.write('title Arch Linux\n')
entry.write('linux /vmlinuz-linux\n')
entry.write('initrd /initramfs-linux.img\n')
if args['skip-encrypt']:
+ ## NOTE: We could use /dev/disk/by-partuuid but blkid does the same and a lot cleaner
+ UUID = simple_command(f"blkid -s PARTUUID -o value /dev/{os.path.basename(args['drive'])}{args['partitions']['2']}").decode('UTF-8').strip()
entry.write('options root=PARTUUID={UUID} rw intel_pstate=no_hwp\n'.format(UUID=UUID))
else:
+ UUID = simple_command(f"ls -l /dev/disk/by-uuid/ | grep {os.path.basename(args['drive'])}{args['partitions']['2']} | awk '{{print $9}}'").decode('UTF-8').strip()
entry.write('options cryptdevice=UUID={UUID}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n'.format(UUID=UUID))
return True