diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-09-13 22:35:30 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-09-13 22:35:30 -0300 |
commit | 4b38c919cbb133c35a06b330e8de9f305c5b4792 (patch) | |
tree | 0f995b2f9a80bbe1975bd33e89cb67609c46d144 | |
parent | aaddf796dcaa9c62859c386d81abc4bfb9e02eec (diff) | |
parent | 83cebf9e43fb3734c003ae358c4d308728dca7e4 (diff) |
Merge branch 'master' of gparabola:archiso
Conflicts:
README
archiso/Makefile
archiso/hooks/archiso
archiso/hooks/archiso_loop_mnt
archiso/hooks/archiso_pxe_nbd
archiso/install/archiso
archiso/install/archiso_loop_mnt
archiso/install/archiso_pxe_nbd
archiso/mkarchiso
archiso/testiso
configs/baseline/build.sh
configs/releng/build.sh
configs/releng/packages.i686
configs/releng/packages.x86_64
configs/releng/root-image/etc/hosts
configs/releng/root-image/etc/issue
configs/releng/root-image/etc/rc.conf
configs/releng/syslinux.dual/archiso_pxe32.cfg
configs/releng/syslinux.dual/archiso_pxe64.cfg
configs/releng/syslinux/archiso_head.cfg
configs/releng/syslinux/archiso_pxe.cfg
configs/releng/syslinux/archiso_sys.cfg
-rw-r--r-- | README | 227 | ||||
-rw-r--r-- | archiso/archiso_pxe_nbd | 6 | ||||
-rw-r--r-- | archiso/archiso_shutdown | 40 | ||||
-rw-r--r-- | archiso/hooks/archiso_pxe_common | 42 | ||||
-rw-r--r-- | archiso/hooks/archiso_pxe_http | 61 | ||||
-rw-r--r-- | archiso/hooks/archiso_pxe_nfs | 26 | ||||
-rw-r--r-- | archiso/hooks/archiso_shutdown | 23 | ||||
-rw-r--r-- | archiso/install/archiso_kms | 14 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_common | 30 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_http | 15 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_nfs | 16 | ||||
-rw-r--r-- | archiso/install/archiso_shutdown | 18 | ||||
-rwxr-xr-x | configs/baseline/build.sh | 4 | ||||
-rw-r--r-- | configs/baseline/syslinux/syslinux.cfg | 2 | ||||
-rwxr-xr-x | configs/releng/build.sh | 5 | ||||
-rw-r--r-- | configs/releng/efiboot/EFI/boot/startup.nsh | 10 | ||||
-rw-r--r-- | configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices | 7 | ||||
-rw-r--r-- | configs/releng/syslinux/archiso_head.cfg | 2 |
18 files changed, 542 insertions, 6 deletions
@@ -373,6 +373,233 @@ EOF +*** Transfer ISO image to target medium (configs/releng) + +ISO images names consist of: parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + +Where: + <YYYY> Year + <MM> Month + <DD> Day + <TYPE> netinstall | core + <ARCH> i686 | x86_64 | dual(*) + +(*) "dual" includes both i686 and x86_64 architectures. + + +** To -> CD / DVD / BD + +Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode, + All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode. + +Nomeclature: + <B> scsibus number + <T> target number + <L> lun number + (Note: see cdrecord -scanbus, for these numbers) + + +1) Write it directly using your favorite recording program. +# cdrecord dev=<B>,<T>,<L> -dao parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + + +** To -> USB Flash Drive (USB-key) / Memory card (SD) / + Hard-Disk Drive (HDD) / Solid-State Drive (SSD) + +Note: These steps are the general workflow, you can skip some of them, + using another filesystem if your bootloader supports it, + installing to another directory than "arch/" or using more than + one partition. Just ensure that main boot params options + (archisolabel= and archisobasedir=) are set correctly according to your setup. + +Nomeclature: +<DEV-TARGET>: Device node of the drive where ISO contents should be copied + (example: /dev/sdx) +<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET> + (example: /dev/sdx1) +<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted + (example: /mnt/sdx/1) +<ISO-SOURCE>: Path to the ISO file parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + (example: ~/parabola-2012.04.16-netinstall-x86_64.iso) +<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE> + (example: LIBRE_201204 [for all ~/parabola-2012.04.*.iso]) + + +* PC-BIOS (MBR): + +Note: Using here a MBR partition mode as example, but GPT should also works + if machine firmware is not broken. + Just ensure that partition is set with attribute "2: legacy BIOS bootable" + and use gptmbr.bin instead of mbr.bin for syslinux. + +1) Create one partition entry in MBR (of type "b" for FAT32 or "83" for EXTFS) + and mark it as "active" (bootable). +# fdisk <DEV-TARGET> + +2) Create a FAT32 or EXTFS filesystem on such partition and setup a label. +# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N> +# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N> + +3) Mount target filesystem. +# mount <DEV-TARGET-N> <MNT-TARGET-N> + +4) Extract ISO image on target filesystem. +# bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f <ISO-SOURCE> -C <MNT-TARGET-N> + +5) Install syslinux bootloader on target filesystem. +# extlinux -i <MNT-TARGET-N>/arch/boot/syslinux + +6) Unmount target filesystem. +# umount <MNT-TARGET-N> + +7) Install syslinux MBR boot code on target drive. +# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=<DEV-TARGET> + + +* PC-BIOS (ISOHYBRID-MBR): + +Note: This method is the most easily, quick and dirty, but is the most limited + if you want to use your target medium for other purposes. + +1) Dump ISO file to target medium. +# dd if=<ISO-SOURCE> of=<DEV-TARGET> + + +* PC-EFI (GPT) [x86_64 only] + +Note: Using here a GPT partition mode as example, but MBR should also works + if machine firmware is not broken. + +1) Create one partition entry in GPT (of type "ef00") +# gdisk <DEV-TARGET> + +2) Create a FAT32 filesystem on such partition and setup a label. +# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N> + +3) Mount target filesystem. +# mount <DEV-TARGET-N> <MNT-TARGET-N> + +4) Extract ISO image on target filesystem. +# bsdtar -x --exclude=isolinux/ --exclude=arch/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N> + +5) Extract efiboot.img on EFI/ on target filesystem. +# mcopy -s -i <MNT-TARGET-N>/EFI/archiso/efiboot.img ::/EFI <MNT-TARGET-N>/ + +6) Remove uneeded efiboot.img +# rm <MNT-TARGET-N>/EFI/archiso/efiboot.img + +7) Unmount target filesystem. +# umount <MNT-TARGET-N> + + + +*** Alternative boot methods (configs/releng) + +** ISO in loopback mode. + +Note: Described method is for using with GRUB2. + GRUB2 is installed on target media and parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + is at path <TARGET-PATH> on disk <D> and partition <P>, + where filesystem is labeled as <TARGET-FS-LABEL>. + +menuentry "Parabola GNU/Linux-libre (x86_64)" { + set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" + loopback loop (hd<D>,<P>)$isofile + linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile + initrd (loop)/arch/boot/x86_64/libreiso.img +} + +menuentry "Parabola GNU/Linux-libre (i686)" { + set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" + loopback loop (hd<D>,<P>)$isofile + linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile + initrd (loop)/arch/boot/i686/libreiso.img +} + + +** ISO in memdisk mode. + +Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work + with other bootloaders. + SYSLINUX is installed on target media and parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + is at path <TARGET-PATH>. + On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size + of the ISO image plus 64 MiB (or 128 MiB). + + +LABEL parabola_x64 + LINUX memdisk + INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + APPEND iso + +LABEL parabola_x32 + LINUX memdisk + INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + APPEND iso + + +** Network booting (PXE). + +All ISOs are ready to act as PXE server, some manual steps are needed +to setup the desired PXE boot mode. +Alternatively it is possible to use an existing PXE server following the same logic. +Note: Setup network first, adjust IP adresses, and respect all slashes "/". + +First stage is for loading kernel and initramfs via PXE, two methods described here: + +* DHCP + TFTP + +Note: All NIC firmwares should support this. + +# dnsmasq --port=0 \ + --enable-tftp \ + --tftp-root=/run/archiso/bootmnt \ + --dhcp-range=192.168.0.2,192.168.0.254,86400 \ + --dhcp-boot=/arch/boot/syslinux/gpxelinux.0 \ + --dhcp-option-force=209,boot/syslinux/archiso.cfg \ + --dhcp-option-force=210,/arch/ + +* DHCP + HTTP + +Note: Not all NIC firmware supports HTTP and DNS (if domain name is used). + At least this works with iPXE and gPXE. + +# dnsmasq --port=0 \ + --dhcp-range=192.168.0.2,192.168.0.254,86400 \ + --dhcp-boot=http://192.168.0.7/arch/boot/syslinux/gpxelinux.0 \ + --dhcp-option-force=209,boot/syslinux/archiso.cfg \ + --dhcp-option-force=210,http://192.168.0.7/arch/ + + +Once the kernel is started from PXE, SquashFS files and other misc files +inside "arch" directory must be loaded (second stage). One of the following +methods can be used to serve the rest of live-medium. + +* HTTP + +# darkhttpd /run/archiso/bootmnt + + +* NFS + +# echo "/run/archiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports +# rc.d start rpcbind nfs-common nfs-server + + +* NBD + +Note: Adjust LIBRE_201204 as needed. + +# cat << EOF > /tmp/nbd-server.conf +[generic] +[archiso] + readonly = true + exportname = /dev/disk/by-label/LIBRE_201204 +EOF +# nbd-server -C /tmp/nbd-server.conf + + + *** Build requirements ** For mkarchiso script needs these packages (build host): diff --git a/archiso/archiso_pxe_nbd b/archiso/archiso_pxe_nbd new file mode 100644 index 0000000..e6b9872 --- /dev/null +++ b/archiso/archiso_pxe_nbd @@ -0,0 +1,6 @@ +omit_kill_nbd_client() { + add_omit_pids $(< /run/archiso/nbd_client.pid) +} + +add_hook shutdown_prekillall omit_kill_nbd_client +add_hook single_prekillall omit_kill_nbd_client diff --git a/archiso/archiso_shutdown b/archiso/archiso_shutdown new file mode 100644 index 0000000..85cce59 --- /dev/null +++ b/archiso/archiso_shutdown @@ -0,0 +1,40 @@ +#!/bin/ash + +# /oldroot depends on things inside /oldroot/run/archiso... +mkdir /oldrun +mount -n --move /oldroot/run /oldrun + +# Unmount all mounts now. +umount $(mount | awk '$3 ~/^\/oldroot/ {print $3}' | sort -r) + +# Remove all dm-snapshot devices. +dmsetup remove_all + +# Remove all loopback devices. +for _lup in $(grep ^/dev/loop /oldrun/archiso/used_block_devices | tac); do + if ! losetup -d ${_lup} 2> /dev/null; then + umount -d ${_lup} + fi +done + +# Unmount the space used to store *.cow. +umount /oldrun/archiso/cowspace + +# Unmount boot device if needed (no copytoram=y used) +if [[ ! -d /oldrun/archiso/copytoram ]]; then + if [[ -d /oldrun/archiso/img_dev ]]; then + umount /oldrun/archiso/img_dev + else + umount /oldrun/archiso/bootmnt + fi + if [[ -f /oldrun/archiso/nbd_client.pid ]]; then + nbd-client -d /dev/nbd0 + fi +fi + +# reboot / poweroff / halt, depending on the argument passed by init +# if something invalid is passed, we halt +case "$1" in + reboot|poweroff|halt) "$1" -f ;; + *) halt -f;; +esac diff --git a/archiso/hooks/archiso_pxe_common b/archiso/hooks/archiso_pxe_common new file mode 100644 index 0000000..febb503 --- /dev/null +++ b/archiso/hooks/archiso_pxe_common @@ -0,0 +1,42 @@ +# vim: set ft=sh: + +run_hook () { + local i net_mac bootif_mac bootif_dev + # These variables will be parsed from /tmp/net-*.conf generated by ipconfig + local DEVICE + local IPV4ADDR IPV4BROADCAST IPV4NETMASK IPV4GATEWAY IPV4DNS0 IPV4DNS1 + local HOSTNAME DNSDOMAIN NISDOMAIN ROOTSERVER ROOTPATH + local filename + # /tmp/net-*.conf + + if [[ -n "${ip}" ]]; then + if [[ -n "${BOOTIF}" ]]; then + bootif_mac=${BOOTIF#01-} + bootif_mac=${bootif_mac//-/:} + for i in /sys/class/net/*/address; do + read net_mac < ${i} + if [[ "${bootif_mac}" == "${net_mac}" ]]; then + bootif_dev=${i#/sys/class/net/} + bootif_dev=${bootif_dev%/address} + break + fi + done + ip="${ip}::${bootif_dev}" + fi + + # setup network and save some values + ipconfig "ip=${ip}" + + . /tmp/net-*.conf + + pxeserver=${ROOTSERVER} + + # setup DNS resolver + if [[ "${IPV4DNS0}" != "0.0.0.0" ]]; then + echo "nameserver ${IPV4DNS0}" > /etc/resolv.conf + fi + if [[ "${IPV4DNS1}" != "0.0.0.0" ]]; then + echo "nameserver ${IPV4DNS1}" >> /etc/resolv.conf + fi + fi +} diff --git a/archiso/hooks/archiso_pxe_http b/archiso/hooks/archiso_pxe_http new file mode 100644 index 0000000..ae56210 --- /dev/null +++ b/archiso/hooks/archiso_pxe_http @@ -0,0 +1,61 @@ +# vim: set ft=sh: + +run_hook() { + if [[ -n "${ip}" && -n "${archiso_http_srv}" ]]; then + + archiso_http_srv=$(eval echo ${archiso_http_srv}) + [[ -z "${archiso_http_spc}" ]] && archiso_http_spc="75%" + + mount_handler="archiso_pxe_http_mount_handler" + fi +} + +# Fetch a file with CURL +# +# $1 URL +# $2 Destination directory inside httpspace/${archisobasedir} +_curl_get() { + local _url="${1}" + local _dst="${2}" + + msg ":: Downloading '${_url}'" + if ! curl -f -o "/run/archiso/httpspace/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then + echo "ERROR: Downloading '${_url}'" + echo " Falling back to interactive prompt" + echo " You can try to fix the problem manually, log out when you are finished" + launch_interactive_shell + fi +} + +archiso_pxe_http_mount_handler () { + newroot="${1}" + + msg ":: Mounting /run/archiso/httpspace (tmpfs) filesystem, size='${archiso_http_spc}'" + mkdir -p "/run/archiso/httpspace" + mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 httpspace "/run/archiso/httpspace" + + local _aitab_url="${archiso_http_srv}${aitab#/run/archiso/bootmnt/}" + local _aitab_file="/run/archiso/httpspace/${aitab#/run/archiso/bootmnt/}" + + _curl_get "${_aitab_url}" "/" + + local aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size + while read aitab_img aitab_mnt aitab_arch aitab_sfs_comp aitab_fs_type aitab_fs_size; do + [[ "${aitab_img#\#}" != "${aitab_img}" ]] && continue + [[ "${aitab_arch}" != "any" && "${aitab_arch}" != "${arch}" ]] && continue + if [[ "${aitab_fs_type}" != "none" ]]; then + _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.fs.sfs" "/${aitab_arch}" + else + _curl_get "${archiso_http_srv}${archisobasedir}/${aitab_arch}/${aitab_img}.sfs" "/${aitab_arch}" + fi + done < "${_aitab_file}" + + if [[ "${checksum}" == "y" ]]; then + _curl_get "${archiso_http_srv}${archisobasedir}/checksum.${arch}.md5" "/" + fi + + mkdir -p "/run/archiso/bootmnt" + mount -o bind /run/archiso/httpspace /run/archiso/bootmnt + + archiso_mount_handler ${newroot} +} diff --git a/archiso/hooks/archiso_pxe_nfs b/archiso/hooks/archiso_pxe_nfs new file mode 100644 index 0000000..a053672 --- /dev/null +++ b/archiso/hooks/archiso_pxe_nfs @@ -0,0 +1,26 @@ +# vim: set ft=sh: + +run_hook() { + if [[ -n "${ip}" && -n "${archiso_nfs_srv}" ]]; then + + archiso_nfs_srv=$(eval echo ${archiso_nfs_srv}) + [[ -n "${archiso_nfs_opt}" ]] && archiso_nfs_opt="-o ${archiso_nfs_opt}" + + mount_handler="archiso_nfs_mount_handler" + fi +} + +archiso_nfs_mount_handler() { + newroot="${1}" + mkdir -p "/run/archiso/bootmnt" + msg ":: Mounting '${archiso_nfs_srv}'" + # Do not put "${archiso_nfs_opt}" nfsmount fails! + if ! nfsmount ${archiso_nfs_opt} "${archiso_nfs_srv}" "/run/archiso/bootmnt"; then + echo "ERROR: Mounting '${archiso_nfs_srv}'" + echo " Falling back to interactive prompt" + echo " You can try to fix the problem manually, log out when you are finished" + launch_interactive_shell + fi + + archiso_mount_handler ${newroot} +} diff --git a/archiso/hooks/archiso_shutdown b/archiso/hooks/archiso_shutdown new file mode 100644 index 0000000..24e4103 --- /dev/null +++ b/archiso/hooks/archiso_shutdown @@ -0,0 +1,23 @@ +run_hook () +{ + msg -n ":: Creating shutdown ramfs..." + + for _dir in bin lib sbin usr/bin usr/lib usr/sbin; do + mkdir -p /run/initramfs/${_dir} + done + cp /bin/busybox /run/initramfs/bin/ + cp /lib/ld-* /run/initramfs/lib/ + cp /lib/lib* /run/initramfs/lib/ + cp /usr/lib/lib* /run/initramfs/usr/lib/ + cp /bin/mount /run/initramfs/bin/ + cp /sbin/dmsetup /run/initramfs/sbin/ + cp /sbin/losetup /run/initramfs/sbin/ + if [[ -x /bin/nbd-client ]]; then + cp /bin/nbd-client /run/initramfs/bin/ + fi + + chroot /run/initramfs /bin/busybox --install + cp /shutdown /run/initramfs/ + + msg "done." +} diff --git a/archiso/install/archiso_kms b/archiso/install/archiso_kms new file mode 100644 index 0000000..6566049 --- /dev/null +++ b/archiso/install/archiso_kms @@ -0,0 +1,14 @@ +#!/bin/bash + +build() { + MODULES="radeon nouveau i915 via-agp sis-agp intel-agp" + if [[ $(uname -m) == i686 ]]; then + MODULES+=" amd64-agp ati-agp sworks-agp ali-agp amd-k7-agp nvidia-agp efficeon-agp" + fi +} + +help() { + cat << HELPEOF +Adds all common KMS drivers to the initramfs image. +HELPEOF +} diff --git a/archiso/install/archiso_pxe_common b/archiso/install/archiso_pxe_common new file mode 100644 index 0000000..b37e5a1 --- /dev/null +++ b/archiso/install/archiso_pxe_common @@ -0,0 +1,30 @@ +#!/bin/bash + +build() { + MODULES="${MODULES} $(comm -2 -3 <(checked_modules "/drivers/net/" | sort) \ + <(find $MODULEDIR/kernel/drivers/net/{irda,phy,wimax,wireless} \ + -name '*.ko*' \ + -exec bash -c 'printf "%s\n" "${@%%.ko*}" | sed "s@.*/@@;s@-@_@" | sort' _ {} +) \ + | grep -v -e 'ppp_' -e 'plip' -e 'pppoe')" + SCRIPT="archiso_pxe_common" + + + add_binary /lib/initcpio/ipconfig /bin/ipconfig + + # Add hosts support files+dns + add_symlink /lib/libnss_files.so.2 $(readlink /lib/libnss_files.so.2) + add_binary $(readlink -f /lib/libnss_files.so.2) + add_symlink /lib/libnss_dns.so.2 $(readlink /lib/libnss_dns.so.2) + add_binary $(readlink -f /lib/libnss_dns.so.2) + + add_dir /etc + echo "hosts: files dns" > $BUILDROOT/etc/nsswitch.conf +} + +help() { +cat<<HELPEOF + This hook loads the necessary modules for boot via PXE. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/archiso/install/archiso_pxe_http b/archiso/install/archiso_pxe_http new file mode 100644 index 0000000..9e2ff65 --- /dev/null +++ b/archiso/install/archiso_pxe_http @@ -0,0 +1,15 @@ +#!/bin/bash + +build() { + SCRIPT="archiso_pxe_http" + + add_binary curl +} + +help() { +cat<<HELPEOF + This hook loads the necessary modules for boot via PXE and HTTP. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/archiso/install/archiso_pxe_nfs b/archiso/install/archiso_pxe_nfs new file mode 100644 index 0000000..f7b6f5d --- /dev/null +++ b/archiso/install/archiso_pxe_nfs @@ -0,0 +1,16 @@ +#!/bin/bash + +build() { + MODULES="nfs" + SCRIPT="archiso_pxe_nfs" + + add_binary /lib/initcpio/nfsmount /bin/nfsmount +} + +help() { + cat <<HELPEOF + This hook loads the necessary modules for boot via PXE and NFS. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/archiso/install/archiso_shutdown b/archiso/install/archiso_shutdown new file mode 100644 index 0000000..87b8297 --- /dev/null +++ b/archiso/install/archiso_shutdown @@ -0,0 +1,18 @@ +#!/bin/bash + +build() { + SCRIPT="archiso_shutdown" + + add_file /usr/lib/initcpio/archiso_shutdown /shutdown +} + +help() { + cat <<HELPEOF +This hook will create a shutdown initramfs in /run/initramfs +that we can pivot to on shutdown in order to unmount / and +and others mount points, dm-snapshot devices and loopback devices. +Mostly usefull for dm-snapshot persistent. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh index 06b76ba..02f0fb5 100755 --- a/configs/baseline/build.sh +++ b/configs/baseline/build.sh @@ -23,7 +23,7 @@ make_setup_mkinitcpio() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then cp /usr/lib/initcpio/hooks/archiso ${work_dir}/root-image/usr/lib/initcpio/hooks cp /usr/lib/initcpio/install/archiso ${work_dir}/root-image/usr/lib/initcpio/install - cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-archiso.conf + cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-libreiso.conf : > ${work_dir}/build.${FUNCNAME} fi } @@ -33,7 +33,7 @@ make_boot() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch} mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" \ - -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux-libre -g /boot/libreiso.img' \ + -r 'mkinitcpio -c /etc/mkinitcpio-libreiso.conf -k /boot/vmlinuz-linux-libre -g /boot/libreiso.img' \ run cp ${work_dir}/root-image/boot/libreiso.img ${work_dir}/iso/${install_dir}/boot/${arch}/libreiso.img cp ${work_dir}/root-image/boot/vmlinuz-linux-libre ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz diff --git a/configs/baseline/syslinux/syslinux.cfg b/configs/baseline/syslinux/syslinux.cfg index 7f5ac05..a959e0a 100644 --- a/configs/baseline/syslinux/syslinux.cfg +++ b/configs/baseline/syslinux/syslinux.cfg @@ -1,7 +1,7 @@ UI menu.c32 MENU TITLE Parabola GNU/Linux-libre -LABEL libre +LABEL libre MENU LABEL Parabola GNU/Linux-libre LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz INITRD /%INSTALL_DIR%/boot/%ARCH%/libreiso.img diff --git a/configs/releng/build.sh b/configs/releng/build.sh index b9197c4..65dfbb2 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -43,7 +43,7 @@ make_setup_mkinitcpio() { done cp /usr/lib/initcpio/install/archiso_kms ${work_dir}/root-image/usr/lib/initcpio/install cp /usr/lib/initcpio/archiso_shutdown ${work_dir}/root-image/usr/lib/initcpio - cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-archiso.conf + cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-libreiso.conf : > ${work_dir}/build.${FUNCNAME} fi } @@ -55,7 +55,7 @@ make_boot() { local _dst_boot=${work_dir}/iso/${install_dir}/boot mkdir -p ${_dst_boot}/${arch} mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux-libre -g /boot/libreiso.img' \ + -r 'mkinitcpio -c /etc/mkinitcpio-libreiso.conf -k /boot/vmlinuz-linux-libre -g /boot/libreiso.img' \ run mv ${_src}/boot/libreiso.img ${_dst_boot}/${arch}/libreiso.img mv ${_src}/boot/vmlinuz-linux-libre ${_dst_boot}/${arch}/vmlinuz @@ -376,6 +376,7 @@ if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then echo "This mode <all> needs to be run on x86_64" _usage 1 fi +command_mode="${2}" if [[ ${command_mode} == "single" ]]; then work_dir=${work_dir}/${arch} diff --git a/configs/releng/efiboot/EFI/boot/startup.nsh b/configs/releng/efiboot/EFI/boot/startup.nsh new file mode 100644 index 0000000..1433751 --- /dev/null +++ b/configs/releng/efiboot/EFI/boot/startup.nsh @@ -0,0 +1,10 @@ +@echo -off + +for %m run (0 9) + if exist fs%m:\EFI\archiso\vmlinuz.efi then + fs%m: + cd fs%m:\EFI\archiso + echo "Launching Parabola GNU/Linux-libre ISO Kernel fs%m:\EFI\archiso\vmlinuz.efi" + vmlinuz.efi archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\EFI\archiso\libreiso.img + endif +endfor diff --git a/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices b/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices new file mode 100644 index 0000000..f6b6062 --- /dev/null +++ b/configs/releng/root-image/etc/rc.d/functions.d/symlink_used_block_devices @@ -0,0 +1,7 @@ +symlink_used_block_devices() +{ + mkdir /run/aif + ln -s /run/archiso/used_block_devices /run/aif/ignore_block_devices +} + +add_hook multi_end symlink_used_block_devices diff --git a/configs/releng/syslinux/archiso_head.cfg b/configs/releng/syslinux/archiso_head.cfg index 1394dfe..765102c 100644 --- a/configs/releng/syslinux/archiso_head.cfg +++ b/configs/releng/syslinux/archiso_head.cfg @@ -1,6 +1,6 @@ SERIAL 0 38400 UI boot/syslinux/vesamenu.c32 -MENU TITLE Parabola +MENU TITLE Parabola GNU/Linux-libre MENU BACKGROUND boot/syslinux/splash.png MENU WIDTH 78 |