start to add latest image parts

This commit is contained in:
Tobias Powalowski 2021-10-04 19:52:58 +02:00
parent 7206f7c7f8
commit e3c7e84142
7 changed files with 92 additions and 6 deletions

View file

@ -0,0 +1,31 @@
# vim:set ft=sh:
# Created by Tobias Powalowski <tpowa@archlinux.org>
# config file for mkisolinux
# DEFAULT kernel boot options
KERNEL_BOOT_OPTIONS="cgroup_disable=memory rootdelay=10 rootfstype=ramfs"
# mkinitcpio config file, defaulted to stock config file
MKINITCPIO_CONFIG="/etc/archboot/x86_64-latest.conf"
# kernel version, defaulted to build for runtime kernel
ALL_kver="/boot/vmlinuz-linux"
# boot message file
# blank by default arch-bootmessage hook will create it by default
APPENDBOOTMESSAGE="/usr/share/archboot/bootloader/messages/x86_64-latest"
APPENDOPTIONSBOOTMESSAGE="/usr/share/archboot/bootloader/messages/append-options"
# syslinux.cfg files to use
SYSLINUXCFG="/usr/share/archboot/bootloader/x86_64-latest.cfg"
# Background for menu
BACKGROUND=/usr/share/archboot/bootloader/background/splash.png
# Prompt on boot, 1=yes 0=no
PROMPT="0"
# Timeout, 30 seconds to fix usb keyboard issues
# 0 means wait for prompt
TIMEOUT="300"

View file

@ -0,0 +1,28 @@
# vim:set ft=sh:
# Created by Tobias Powalowski <tpowa@archlinux.org>
# For more information on how using mkinitcpio please refer to the main config file
# or check the wiki.
MODULES=()
BINARIES=()
FILES=()
# SETUP
#
# Please change the hooks only if you know what you are doing.
HOOKS=(udev archboot_base archboot_latest_installer archboot_net archboot_kexec archboot_licenses net)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

View file

@ -60,8 +60,8 @@ fi
# Generate new environment and launch it with kexec
if [[ "${L_COMPLETE}" == "1" || "${L_INSTALL_COMPLETE}" == "1" ]]; then
# reeove everything not necessary
rm -r /lib/{firmware,modules}
rm -r /usr/share/{efitools,file,grub,hwdata,kbd,licenses,makepkg,nmap,openvpn,pacman,refind,tc,usb_modeswitch,vim,zoneinfo,zsh}
rm -r /lib/{firmware,modules} >/dev/null 2>&1
rm -r /usr/share/{efitools,file,grub,hwdata,kbd,licenses,makepkg,nmap,openvpn,pacman,refind,tc,usb_modeswitch,vim,zoneinfo,zsh} >/dev/null 2>&1
# create container without package cache
if [[ "${L_COMPLETE}" == "1" ]]; then
archboot-create-container.sh "${W_DIR}" -cc -cp -alf || exit 1

View file

@ -230,7 +230,11 @@ build ()
add_full_dir "/usr/share/pacman/keyrings"
add_full_dir "/usr/share/makepkg"
# add local installed pacman database in container mode
[[ "$(cat /etc/hostname)" == "archboot" || ! -e "/etc/hostname" ]] && add_full_dir "/var/lib/pacman/local"
if [[ -e "/etc/hostname" ]]; then
[[ "$(cat /etc/hostname )" == "archboot" ]] && add_full_dir "/var/lib/pacman/local"
else
add_full_dir "/var/lib/pacman/local"
fi
### fix file
add_file "/usr/share/file/misc/magic.mgc"

View file

@ -3,7 +3,6 @@
build ()
{
! [ -d "${TEMPDIR}/arch/" ] && mkdir -p ${TEMPDIR}/arch/
add_file "/usr/bin/archboot-setup.sh" "/usr/bin/setup"
add_file "/usr/bin/archboot-quickinst.sh" "/usr/bin/quickinst"
add_file "/usr/bin/genfstab"
@ -16,8 +15,12 @@ build ()
add_file "/usr/bin/archboot-restore-usbstick.sh"
add_binary "/usr/bin/isoinfo"
add_binary "/usr/bin/mktorrent"
# only include cachedir on booted archboot
[[ "$(cat /etc/hostname)" == "archboot" ]] && add_full_dir "/var/cache/pacman/pkg"
# only include cachedir on booted archboot or container
if [[ -e "/etc/hostname" ]]; then
[[ "$(cat /etc/hostname)" == "archboot" ]] && add_full_dir "/var/cache/pacman/pkg"
else
add_full_dir "/var/cache/pacman/pkg"
fi
}
help ()

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
{
add_file "/usr/bin/archboot-update-installer.sh" "/usr/bin/update-installer.sh"
add_file "/usr/bin/archboot-create-container.sh"
add_file "/usr/share/archboot/latest_installer/etc/profile.d/latest-installer.sh" "/etc/profile.d/latest-installer.sh"
}
help ()
{
cat<<HELPEOF
This hook reboots the latest archboot installer with package cache on an archboot image.
HELPEOF
}

View file

@ -0,0 +1,4 @@
cd /
echo "Waiting 10 seconds for getting an internet connection through dhcpcd..."
sleep 10
update-installer.sh -latest-install