scripts/config.sh -> gentoo.conf
This commit is contained in:
parent
7c54bac857
commit
920e0f7f55
10
README.md
10
README.md
|
@ -18,7 +18,7 @@ to detect and manage your kernel configuration, have a look at [autokernel](http
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
Edit `scripts/config.sh` and execute `./install` in any live system.
|
Edit `gentoo.conf` and execute `./install -i` in any live system.
|
||||||
You can review the partitioning that will be applied before anything critical is done.
|
You can review the partitioning that will be applied before anything critical is done.
|
||||||
Afterwards, this will apply the partitioning scheme and properly
|
Afterwards, this will apply the partitioning scheme and properly
|
||||||
install the selected stage3 gentoo system. By default, the new system will use
|
install the selected stage3 gentoo system. By default, the new system will use
|
||||||
|
@ -61,10 +61,10 @@ Installing gentoo with this script is simple.
|
||||||
I recommend using a live system where you can quickly install new software.
|
I recommend using a live system where you can quickly install new software.
|
||||||
Any [Arch Linux](https://www.archlinux.org/download/) live iso works fine.
|
Any [Arch Linux](https://www.archlinux.org/download/) live iso works fine.
|
||||||
2. Clone this repository
|
2. Clone this repository
|
||||||
3. Edit `scripts/config.sh`, and particularily pay attention to
|
3. Edit `gentoo.conf`, and particularily pay attention to
|
||||||
the device which will be partitioned. The script will ask for confirmation
|
the device which will be partitioned. The script will ask for confirmation
|
||||||
before partitioning, but better be safe there.
|
before doing any partitioning - but better be safe there.
|
||||||
4. Execute `./install`. The script will tell you if your live
|
4. Execute `./install -i`. The script will tell you if your live
|
||||||
system is missing any required software.
|
system is missing any required software.
|
||||||
|
|
||||||
The script should be able to run without any user supervision after partitioning, but depending
|
The script should be able to run without any user supervision after partitioning, but depending
|
||||||
|
@ -73,7 +73,7 @@ to emerge. The critical commands will ask you what to do in case of a failure.
|
||||||
|
|
||||||
### Config
|
### Config
|
||||||
|
|
||||||
The config file `scripts/config.sh` allows you to adjust some parameters of the installation.
|
The config file `gentoo.conf` allows you to adjust some parameters of the installation.
|
||||||
The most important ones will probably be the device to partition, and the stage3 tarball name
|
The most important ones will probably be the device to partition, and the stage3 tarball name
|
||||||
to install. By default you will get the hardened nomultilib profile without systemd.
|
to install. By default you will get the hardened nomultilib profile without systemd.
|
||||||
|
|
||||||
|
|
2
TODO
2
TODO
|
@ -1,6 +1,6 @@
|
||||||
- root authorized_keys support
|
- root authorized_keys support
|
||||||
- generalize ansible -> any infrastructure management by allowing only root ssh login.
|
- generalize ansible -> any infrastructure management by allowing only root ssh login.
|
||||||
- zfs support
|
- zfs support
|
||||||
- dracut -> genkernel
|
|
||||||
- save meta information to /var/db/gentoo-install
|
- save meta information to /var/db/gentoo-install
|
||||||
- systemd settings pls
|
- systemd settings pls
|
||||||
|
- (dracut -> genkernel, or better?)
|
||||||
|
|
15
gentoo.conf
15
gentoo.conf
|
@ -1,10 +1,13 @@
|
||||||
|
# vim: set ft=sh ts=4 sw=4 sts=-1 noet:
|
||||||
|
# This file will be interpreted by /bin/bash.
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Disk configuration
|
# Disk configuration
|
||||||
|
|
||||||
# Below you will see examples of how to use the provided default partitioning schemes.
|
# Below you will see examples of how to use the provided default partitioning schemes.
|
||||||
# Generally these should be sufficient for most system setups.
|
# Generally these should be sufficient for most system setups.
|
||||||
#
|
#
|
||||||
# You can also create your own scheme using the functions provided in internal_config.sh,
|
# You can also create your own scheme using the functions provided in scripts/config.sh,
|
||||||
# if you need something tailored to your specific system. Generally supported is
|
# if you need something tailored to your specific system. Generally supported is
|
||||||
# any combination of RAID0/1, luks, zfs, btrfs and the usual filesystems (ext4, fat)
|
# any combination of RAID0/1, luks, zfs, btrfs and the usual filesystems (ext4, fat)
|
||||||
# Have a look at the implementation of the default schemes, but be aware that you
|
# Have a look at the implementation of the default schemes, but be aware that you
|
||||||
|
@ -71,12 +74,12 @@ create_btrfs_raid_layout swap=8GiB luks=true /dev/sdX
|
||||||
# ######## Example: Password
|
# ######## Example: Password
|
||||||
#
|
#
|
||||||
# If you want a standard password, you should do the following:
|
# If you want a standard password, you should do the following:
|
||||||
# 1. echo -n "mypassword" > /tmp/mylukskey
|
# 1. echo -n "mypassword" > /tmp/a_strong_encryption_key
|
||||||
# 2. Adjust the function below to return the path: echo -n "/tmp/mylukskey"
|
# 2. Adjust the function below to return the path: echo -n "/tmp/a_strong_encryption_key"
|
||||||
#
|
#
|
||||||
# By default, the selected KEYMAP will also be applied in the initramfs.
|
# By default, the selected KEYMAP will also be applied in the initramfs.
|
||||||
# If you want to be sure, use a longer password but without special characters
|
# If you want to be sure, use a long passphrase with standard alphanumeric characters,
|
||||||
# so that you could also type it without your selected keymap on the default layout.
|
# so that you could also type it without your selected keymap on the default english layout.
|
||||||
#
|
#
|
||||||
# ######## Example: Keyfile
|
# ######## Example: Keyfile
|
||||||
#
|
#
|
||||||
|
@ -95,7 +98,7 @@ create_btrfs_raid_layout swap=8GiB luks=true /dev/sdX
|
||||||
# as you can always use the keyfile in a live system. This might be easier if you
|
# as you can always use the keyfile in a live system. This might be easier if you
|
||||||
# are currently not sure what options you need exactly.
|
# are currently not sure what options you need exactly.
|
||||||
#
|
#
|
||||||
# To generate a strong keyfile, wh
|
# To generate a strong keyfile, follow this procedure:
|
||||||
#
|
#
|
||||||
# 1. Generating a strong keyfile with (resulting file must be < 8MiB)
|
# 1. Generating a strong keyfile with (resulting file must be < 8MiB)
|
||||||
# `head -c1024 /dev/urandom | base64 -w0 > /path/to/keyfile`
|
# `head -c1024 /dev/urandom | base64 -w0 > /path/to/keyfile`
|
||||||
|
|
2
install
2
install
|
@ -25,7 +25,7 @@ export GENTOO_INSTALL_REPO_SCRIPT_PID=$$
|
||||||
umask 0077
|
umask 0077
|
||||||
|
|
||||||
source "$GENTOO_INSTALL_REPO_DIR/scripts/utils.sh"
|
source "$GENTOO_INSTALL_REPO_DIR/scripts/utils.sh"
|
||||||
source "$GENTOO_INSTALL_REPO_DIR/scripts/internal_config.sh"
|
source "$GENTOO_INSTALL_REPO_DIR/scripts/config.sh"
|
||||||
source "$GENTOO_INSTALL_REPO_DIR/scripts/functions.sh"
|
source "$GENTOO_INSTALL_REPO_DIR/scripts/functions.sh"
|
||||||
source "$GENTOO_INSTALL_REPO_DIR/scripts/main.sh"
|
source "$GENTOO_INSTALL_REPO_DIR/scripts/main.sh"
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@ LUKS_HEADER_BACKUP_DIR="$TMP_DIR/luks-headers"
|
||||||
USED_RAID=false
|
USED_RAID=false
|
||||||
# Flag to track usage of luks (needed to check for cryptsetup existence)
|
# Flag to track usage of luks (needed to check for cryptsetup existence)
|
||||||
USED_LUKS=false
|
USED_LUKS=false
|
||||||
|
# Flag to track usage of zfs
|
||||||
|
USED_ZFS=false
|
||||||
# Flag to track usage of btrfs
|
# Flag to track usage of btrfs
|
||||||
USED_BTRFS=false
|
USED_BTRFS=false
|
||||||
|
|
|
@ -130,6 +130,8 @@ generate_initramfs() {
|
||||||
&& modules+=("mdraid")
|
&& modules+=("mdraid")
|
||||||
[[ $USED_LUKS == "true" ]] \
|
[[ $USED_LUKS == "true" ]] \
|
||||||
&& modules+=("crypt crypt-gpg")
|
&& modules+=("crypt crypt-gpg")
|
||||||
|
[[ $USED_ZFS == "true" ]] \
|
||||||
|
&& modules+=("zfs")
|
||||||
[[ $USED_BTRFS == "true" ]] \
|
[[ $USED_BTRFS == "true" ]] \
|
||||||
&& modules+=("btrfs")
|
&& modules+=("btrfs")
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# virt-install
|
||||||
|
# virsh
|
Loading…
Reference in New Issue