开源软件名称(OpenSource Name):coreprocess/linux-unattended-installation开源软件地址(OpenSource Url):https://github.com/coreprocess/linux-unattended-installation开源编程语言(OpenSource Language):Shell 96.8%开源软件介绍(OpenSource Introduction):Linux Unattended InstallationThis project provides all you need to create an unattended installation of a minimal setup of Linux, whereas minimal translates to the most lightweight setup - including an OpenSSH service and Python - which you can derive from the standard installer of a Linux distribution. The idea is, you will do all further deployment of your configurations and services with the help of Ansible or similar tools once you completed the minimal setup. Ubuntu 16.04 LTS, 18.04 LTS and 20.04 LTSUse the Use the Features
PrerequisitesLinuxRun Run Mac (Ubuntu 18.04 LTS only)Run The script DockerRun When running the Docker container, add the public key you want to use and the ISO output directory as volume links and specify the desired Ubuntu version as parameter (defaults to 18.04), e.g: docker run \
--rm \
-t \
-v "$HOME/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:ro" \
-v "$(pwd):/iso" \
ubuntu-unattended \
16.04 Explanation of the command switches: --rm
# Remove the Docker container when finished
-t
# Show terminal output
-v "$HOME/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:ro"
# Mount "$HOME/.ssh/id_rsa.pub" from your machine to "/root/.ssh/id_rsa.pub"
# in the container (read only).
# This is the path, where the script expects your public key to be.
-v "$(pwd):/iso"
# Mount the current working directory from your machine to "/iso"
# in the container. This is the path, where the ISO file is written to. It is enough to build the container once. If you want to add a custom preseed config when executing The script UsageBuild ISO imagesYou can run the ./ubuntu/<VERSION>/build-iso.sh <ssh-public-key-file> <target-iso-file> All parameters are optional.
Boot the created ISO image on the target VM or physical machine. Be aware the setup will start within 10 seconds automatically and will reset the disk of the target device completely. The setup tries to eject the ISO/CD during its final stage. It usually works on physical machines, and it works on VirtualBox. It might not function in certain KVM environments in case the managing environment is not aware of the eject event. In that case, you have to detach the ISO image manually to prevent an unintended reinstall. Power-on the machine and log into it as root using your ssh key. The ssh host key will be generated on first boot. Build disk imagesYou can run the ./ubuntu/<VERSION>/build-disk.sh <ram-size> <disk-size> <disk-format> <ssh-public-key-file> <disk-file> All parameters are optional.
Use the generated disk image as template image and create copies of it to deploy virtual or physical machines. Do not boot the template itself, since the ssh host key will be generated on first boot. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论