mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
start to add latest image parts
This commit is contained in:
parent
7206f7c7f8
commit
e3c7e84142
7 changed files with 92 additions and 6 deletions
31
etc/archboot/presets/x86_64-latest
Normal file
31
etc/archboot/presets/x86_64-latest
Normal 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"
|
||||
|
28
etc/archboot/x86_64-latest.conf
Normal file
28
etc/archboot/x86_64-latest.conf
Normal 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=()
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 ()
|
||||
|
|
16
usr/lib/initcpio/install/archboot_latest_installer
Normal file
16
usr/lib/initcpio/install/archboot_latest_installer
Normal 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
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
cd /
|
||||
echo "Waiting 10 seconds for getting an internet connection through dhcpcd..."
|
||||
sleep 10
|
||||
update-installer.sh -latest-install
|
Loading…
Reference in a new issue