index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-08-20 17:08:13 +0000 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-08-20 17:08:13 +0000 |
commit | 056b800c8eb42c4112dce54bd1a7336d52ead2ab (patch) | |
tree | f26df1541224fd11a1d485ff6c463979d7c01983 /profiles | |
parent | aaad480ab845ad644fdb8455d2bbf1763c605d24 (diff) |
-rw-r--r-- | profiles/52-54-00-12-34-56.py | 32 |
diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py new file mode 100644 index 00000000..4c487938 --- /dev/null +++ b/profiles/52-54-00-12-34-56.py @@ -0,0 +1,32 @@ +import archinstall, getpass + +# Unmount and close previous runs +archinstall.sys_command(f'umount -R /mnt', surpress_errors=True) +archinstall.sys_command(f'cryptsetup close /dev/mapper/luksloop', surpress_errors=True) + +# Select a harddrive and a disk password +harddrive = archinstall.all_disks()['/dev/sda'] +disk_password = '1234' + +with archinstall.Filesystem(harddrive, archinstall.GPT) as fs: + # Use the entire disk instead of setting up partitions on your own + fs.use_entire_disk('luks2') + + if harddrive.partition[1].size == '512M': + raise OSError('Trying to encrypt the boot partition for petes sake..') + harddrive.partition[0].format('fat32') + + with archinstall.luks2(harddrive.partition[1], 'luksloop', disk_password) as unlocked_device: + unlocked_device.format('btrfs') + + with archinstall.Installer(unlocked_device, boot_partition=harddrive.partition[0], hostname='testmachine') as installation: + if installation.minimal_installation(): + installation.add_bootloader() + + installation.add_additional_packages(['nano', 'wget', 'git']) + installation.install_profile('workstation') + + installation.user_create('anton', 'test') + installation.user_set_pw('root', 'toor') + + installation.add_AUR_support()
\ No newline at end of file |