开源软件名称(OpenSource Name):archlinux/archinstall开源软件地址(OpenSource Url):https://github.com/archlinux/archinstall开源编程语言(OpenSource Language):Python 99.6%开源软件介绍(OpenSource Introduction):Arch InstallerJust another guided/automated Arch Linux installer with a twist. The installer also doubles as a python library to install Arch Linux and manage services, packages and other things inside the installed system (Usually from a live medium).
Installation & Usage
Or simply guided installerRunning theAssuming you are on an Arch Linux live-ISO:
Some additional options that are not needed by most users are hidden behind the Running from a declarative configuration file or URLPrerequisites:
Assuming you are on a Arch Linux live-ISO and booted into EFI mode.
Available LanguagesArchinstall is available in different languages which have been contributed and are maintained by the community.
Any contributions to the translations are more than welcome, and to get started please follow the guide Help?Submit an issue here on GitHub, or submit a post in the discord help channel. Mission StatementArchinstall promises to ship a guided installer that follows the Arch Principles as well as a library to manage services, packages and other Arch Linux aspects. The guided installer will provide user-friendly options along the way, but the keyword here is options, they are optional and will never be forced upon anyone. The guided installer itself is also optional to use if so desired and not forced upon anyone. Archinstall has one fundamental function which is to be a flexible library to manage services, packages and other aspects inside the installed system. This library is in turn used by the provided guided installer but is also for anyone who wants to script their own installations. Therefore, Archinstall will try its best to not introduce any breaking changes except for major releases which may break backwards compatibility after notifying about such changes. Scripting your own installationYou could just copy guided.py as a starting point. However, assuming you're building your own ISO and want to create an automated installation process, or you want to install virtual machines onto local disk images, here is a minimal example of how to install using archinstall as a Python library: import archinstall, getpass
# Select a harddrive and a disk password
harddrive = archinstall.select_disk(archinstall.all_blockdevices(partitions=False))
disk_password = getpass.getpass(prompt='Disk password (won\'t echo): ')
# We disable safety precautions in the library that protects the partitions
harddrive.keep_partitions = False
# First, we configure the basic filesystem layout
with archinstall.Filesystem(harddrive, archinstall.GPT) as fs:
# We create a filesystem layout that will use the entire drive
# (this is a helper function, you can partition manually as well)
fs.use_entire_disk(root_filesystem_type='btrfs')
boot = fs.find_partition('/boot')
root = fs.find_partition('/')
boot.format('vfat')
# Set the flag for encrypted to allow for encryption and then encrypt
root.encrypted = True
root.encrypt(password=disk_password)
with archinstall.luks2(root, 'luksloop', disk_password) as unlocked_root:
unlocked_root.format(root.filesystem)
unlocked_root.mount('/mnt')
boot.mount('/mnt/boot')
with archinstall.Installer('/mnt') as installation:
if installation.minimal_installation():
installation.set_hostname('minimal-arch')
installation.add_bootloader()
installation.add_additional_packages(['nano', 'wget', 'git'])
# Optionally, install a profile of choice.
# In this case, we install a minimal profile that is empty
installation.install_profile('minimal')
user = User('devel', 'devel', False)
installation.create_users(user)
installation.user_set_pw('root', 'airoot') This installer will perform the following:
Unattended installation based on MAC addressArchinstall comes with an unattended example which will look for a matching profile for the machine it is being run on, based on any local MAC address.
For instance, if the machine that unattended is run on has the MAC address TestingUsing a Live ISO ImageIf you want to test a commit, branch or bleeding edge release from the repository using the vanilla Arch Live ISO image, you can replace the version of archinstall with a new version and run that with the steps described below:
After this, running archinstall with Without a Live ISO ImageTo test this without a live ISO, the simplest approach is to use a local image and create a loop device.
This will create a 20 GB There's also a Building and Testing guide. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论