index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-07-06 23:22:45 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds+github@gmail.com> | 2020-07-06 23:22:45 +0200 |
commit | 2dbfa429261753c0b621e862571f05d74c77fffc (patch) | |
tree | 4dd006a48e0a9db27dea14d9bc2b50caed1d0a97 | |
parent | 377868cfcd72bbc0ef3a1ee233d0bc7acd016a84 (diff) |
-rw-r--r-- | README.md | 26 |
@@ -41,25 +41,31 @@ This is probably what you'll need, a minimal example of how to install using arc ```python 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) -hdd = archinstall.select_disk(archinstall.all_disks()) +# Select a harddrive and a disk password +harddrive = archinstall.select_disk(archinstall.all_disks()) disk_password = getpass.getpass(prompt='Disk password (won\'t echo): ') -with archinstall.Filesystem(hdd, archinstall.GPT) as fs: +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') - with archinstall.Luks2(fs) as crypt: - if hdd.partition[1]['size'] == '512M': - raise OSError('Trying to encrypt the boot partition for petes sake..') - key_file = crypt.encrypt(hdd.partition[1], password=disk_password, key_size=512, hash_type='sha512', iter_time=10000, key_file='./pwfile') - unlocked_crypt_vol = crypt.mount(hdd.partition[1], 'luksloop', key_file) + if harddrive.partition[1].size == '512M': + raise OSError('Trying to encrypt the boot partition for petes sake..') + harddrive.partition[0].format('fat32') - with archinstall.Installer(unlocked_crypt_vol, hostname='testmachine') as installation: + with archinstall.luks2(harddrive.partition[1], 'luksloop', disk_password) as unlocked_device: + unlocked_device.format('btrfs') + + with archinstall.Installer(unlocked_device, hostname='testmachine') as installation: if installation.minimal_installation(): - installation.add_bootloader() + installation.add_bootloader(harddrive.partition[0]) installation.add_additional_packages(['nano', 'wget', 'git']) - installation.install_profile('desktop') + installation.install_profile('workstation') installation.user_create('anton', 'test') installation.user_set_pw('root', 'toor') |