81 lines
2.8 KiB
Org Mode
81 lines
2.8 KiB
Org Mode
|
* Debian Preseed Configuration
|
||
|
|
||
|
This Git repository contains a preseed configuration file (preseed.txt) that can be used to automate the installation of Debian on default machines. The preseed file is based on the official DebianInstaller/Preseed documentation, which can be found [[https://wiki.debian.org/DebianInstaller/Preseed][here]].
|
||
|
|
||
|
* Usage
|
||
|
|
||
|
To use this preseed configuration during installation, follow these steps:
|
||
|
|
||
|
1. When the graphical installer boot menu appears, select the "Help" entry.
|
||
|
2. You will get a generic help screen with a boot: prompt at the bottom.
|
||
|
3. Type the following command, replacing the URL with the address to your preseed configuration file:
|
||
|
#+begin_src shell
|
||
|
auto url=http://webserver/path/preseed.cfg
|
||
|
#+end_src
|
||
|
|
||
|
* Preseed Configuration Details
|
||
|
|
||
|
The preseed configuration includes the following sections:
|
||
|
Localization
|
||
|
|
||
|
Language: English (US)
|
||
|
Country: Germany
|
||
|
|
||
|
Network Configuration
|
||
|
|
||
|
Automatically choose a network interface with a link.
|
||
|
|
||
|
Mirror Settings
|
||
|
|
||
|
Use manual mirror selection with `http.de.debian.org` as the mirror.
|
||
|
|
||
|
Account Setup
|
||
|
|
||
|
- Set root password to `asdf`.
|
||
|
- Create a user account with username `user` and password `asdf`. This user will belong to the groups: `audio`, `cdrom`, `video`, `sudo`.
|
||
|
|
||
|
Clock and Time Zone Setup
|
||
|
|
||
|
- Hardware clock is set to UTC.
|
||
|
- Time zone is set to `Europe/Berlin`.
|
||
|
- NTP is enabled to sync the clock.
|
||
|
|
||
|
Partitioning
|
||
|
|
||
|
- Automatically partition the disk with GPT label.
|
||
|
- Use the `atomic` partitioning recipe (all files in one partition).
|
||
|
|
||
|
Base System Installation
|
||
|
|
||
|
- Additional packages to install: `openssh-server`, `build-essential`, `sudo`, `git`, `iperf3`, `smartmontools`, `vim`, `curl`, `tree`, `rsync`, `systemd-timesyncd`, `neofetch`, `btrfs-progs`, `powertop`.
|
||
|
|
||
|
Boot Loader Installation
|
||
|
|
||
|
- Grub is the boot loader.
|
||
|
- Grub will be installed to the UEFI partition/boot record if no other operating system is detected.
|
||
|
|
||
|
Finishing Up the Installation
|
||
|
|
||
|
- Avoid displaying the last message about the install being complete.
|
||
|
- After installation, the system will halt (not reboot).
|
||
|
|
||
|
Advanced Options
|
||
|
|
||
|
- Custom commands will be run after installation to set up SSH keys for the `user` account.
|
||
|
|
||
|
* Custom Commands
|
||
|
|
||
|
The following custom commands will be executed during the installation:
|
||
|
|
||
|
#+begin_src shell
|
||
|
mkdir -p /home/user/.ssh/
|
||
|
echo "sh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqc9fnzfCz8fQDFzla+D8PBhvaMmFu2aF+TYkkZRxl9 tuan@genesis-2022-01-20" > /target/home/user/.ssh/authorized_keys
|
||
|
chown -R user:user /target/home/user/.ssh/
|
||
|
chmod 700 /target/home/user/.ssh/
|
||
|
chmod 600 /target/home/user/.ssh/authorized_keys
|
||
|
#+end_src
|
||
|
|
||
|
These commands will create an .ssh directory in the user's home directory, add an authorized SSH key, and set the appropriate permissions.
|
||
|
|
||
|
Feel free to customize this preseed configuration to suit your specific requirements.
|