Use binary vanilla kernel

This commit is contained in:
oddlama 2020-01-06 18:20:47 +01:00
parent f07929d0d6
commit 527a9e6b0a
No known key found for this signature in database
GPG Key ID: 88EA325D51D53908
4 changed files with 18 additions and 8 deletions

View File

@ -14,6 +14,7 @@ Recommendations:
* Edit sshd_config, change port and create a sshusers group for users which may use ssh.
* Use LUKS encryption on the disk
* Use a properly configured kernel, at best restrict even USB!
* Adjust make.conf (default parallel emerge, cpu flags, binhost?)
**TL;DR:** Installs gentoo on a new system, suited for both servers and desktops.
@ -22,7 +23,7 @@ See [Install](#Install) for usage instructions.
---
This script will install a minimal (no-bloat) EFI bootable gentoo system.
This script will install a minimal EFI bootable gentoo system, without additional bloat.
It will stick closely to the [Gentoo AMD64 Handbook](https://wiki.gentoo.org/wiki/Handbook:AMD64)
and [Sakaki's EFI Install Guide](https://wiki.gentoo.org/wiki/Sakaki%27s_EFI_Install_Guide).
@ -77,7 +78,7 @@ this script is not suited for it.
#### EFI
It is assumed that your system can (and will) be booted via EFI.
This is not a strict requirement, but othewise you will be responsible
This is not a strict requirement, but otherwise you will be responsible
to make the system bootable.
This probably involves the following steps:
@ -85,6 +86,7 @@ This probably involves the following steps:
* Change partition type of `efi` partition to `ef02` (BIOS boot partition)
* Change partition name and filesystem name to `boot`
* Install and configure syslinux
* Adjust make.conf
Maybe there will be a convenience script for this at some point.
No promises though.

View File

@ -66,9 +66,12 @@ LOCALE="C.utf8"
GENTOO_MIRROR="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo"
#GENTOO_MIRROR="https://distfiles.gentoo.org"
# The architecture of the target system (only tested with amd64)
GENTOO_ARCH="amd64"
# The stage3 tarball to install
STAGE3_BASENAME="stage3-amd64-hardened+nomultilib"
#STAGE3_BASENAME="stage3-amd64-hardened-selinux+nomultilib"
STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened+nomultilib"
#STAGE3_BASENAME="stage3-$GENTOO_ARCH-hardened-selinux+nomultilib"
################################################

View File

@ -27,7 +27,8 @@ check_config() {
|| die "KEYMAP contains invalid characters"
# Check hostname per RFC1123
[[ "$HOSTNAME" ~= '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$' ]] \
local hostname_regex='^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'
[[ "$HOSTNAME" =~ $hostname_regex ]] \
|| die "'$HOSTNAME' is not a valid hostname"
if [[ "$INSTALL_ANSIBLE" == true ]]; then

View File

@ -103,13 +103,17 @@ main_install_gentoo_in_chroot() {
einfo "Selecting fastest portage mirrors"
try mirrorselect -s 4 -b 10 -D
einfo "Adding ~$GENTOO_ARCH to ACCEPT_KEYWORDS"
echo "ACCEPT_KEYWORDS=\"~$GENTOO_ARCH\"" >> /etc/portage/make.conf \
|| die "Could not modify /etc/portage/make.conf"
# Install git (for git portage overlays)
einfo "Installing git"
try emerge --verbose dev-vcs/git
# Install vanilla kernel and efibootmgr, to be able to boot the system.
einfo "Installing vanilla kernel"
try emerge --verbose sys-kernel/vanilla-kernel sys-boot/efibootmgr
einfo "Installing binary vanilla kernel"
try emerge --verbose sys-kernel/vanilla-kernel-bin sys-boot/efibootmgr
# Copy kernel to EFI
local kernel_version
@ -163,7 +167,7 @@ main_install_gentoo_in_chroot() {
# Install and enable dhcpcd
einfo "Installing dhcpcd"
try emerge --verbose net-misc/dhcpcd sys-apps/iproute2
try emerge --verbose net-misc/dhcpcd
rc-update add dhcpcd default \
|| die "Could not add dhcpcd to default services"