From 96306f2873ca1d98061cf4df9370e7abcd15fd92 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 16 Sep 2012 13:44:35 -0300 Subject: [archiso] Update README (know issues) Signed-off-by: Gerardo Exequiel Pozzi --- README | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README b/README index 2068bc2..8795d74 100644 --- a/README +++ b/README @@ -217,7 +217,7 @@ Note: Using here a MBR partition mode as example, but GPT should also works 4) Extract ISO image on target filesystem. # bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f -C -5) Install syslinux bootloader on target filesystem. +5) Install syslinux bootloader on target filesystem. (See know issue (2) if using FAT) # extlinux -i /arch/boot/syslinux 6) Unmount target filesystem. @@ -443,13 +443,19 @@ When make your custom boot-pendrive, you need to copy /arch directory to it. *** Know issues -** On shutdown there are two steps that [FAIL]: +** (1) On shutdown there are two steps that [FAIL]: "Unmounting Swap-backed Filesystems" and "Unmounting Non-API Filesystems", These filesystem are in use at this stage by archiso, but... This is not a real issue since, all mounted filesystem, loopback devices and device mapper devices made by archiso will be "free" on "shutdown tmpfs" (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook. +** (2) syslinux 4.05 bug with relative directories on FAT: + + "Could not find kernel image: boot/syslinux/whichsys.c32" + This should be fixed in 4.06. For now, workaround with: + sed -i "s|../../|/arch|" //arch/boot/syslinux/syslinux.cfg + *** Building the most basic Arch Linux live media. (configs/baseline) -- cgit v1.2.3 From 820f80b7a26497704d856fe502e101661ff7311d Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 16 Sep 2012 14:00:19 -0300 Subject: [archiso] Update REAME (ISO -> USB [PC-EFI]) Signed-off-by: Gerardo Exequiel Pozzi --- README | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README b/README index 8795d74..4afc9f2 100644 --- a/README +++ b/README @@ -251,15 +251,9 @@ Note: Using here a GPT partition mode as example, but MBR should also works # mount 4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=arch/boot/syslinux/ -f -C +# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f -C -5) Extract efiboot.img on EFI/ on target filesystem. -# mcopy -s -i /EFI/archiso/efiboot.img ::/EFI / - -6) Remove uneeded efiboot.img -# rm /EFI/archiso/efiboot.img - -7) Unmount target filesystem. +5) Unmount target filesystem. # umount -- cgit v1.2.3 From 1b3e56ff0116ed83553e80355ce5acc168c17b41 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 16 Sep 2012 14:07:40 -0300 Subject: [archiso] Update README Signed-off-by: Gerardo Exequiel Pozzi --- README | 2 -- 1 file changed, 2 deletions(-) diff --git a/README b/README index 4afc9f2..7c899f9 100644 --- a/README +++ b/README @@ -8,8 +8,6 @@ INDEX * hooks/archiso_pxe_http * hooks/archiso_pxe_nfs * hooks/archiso_loop_mnt -* Boot parameters (only for configs/releng) - * etc/rc.conf * Transfer ISO file to target medium (configs/releng) * To -> CD / DVD / BD * To -> USB-key / SD / HDD / SSD -- cgit v1.2.3 From 013ea1d83c07b4c5281b20acc9e9adb0efd030ca Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sun, 23 Sep 2012 22:33:46 -0300 Subject: [configs/releng] Add some disk/part/fs tools Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/packages.i686 | 5 +++++ configs/releng/packages.x86_64 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686 index be62a5a..194774c 100644 --- a/configs/releng/packages.i686 +++ b/configs/releng/packages.i686 @@ -12,6 +12,7 @@ dnsutils dosfstools efibootmgr elinks +fsarchiver gnu-netcat gptfdisk grml-zsh-config @@ -24,6 +25,7 @@ irssi lftp lilo linux-atm +mc mtools netcfg nfs-utils @@ -35,7 +37,9 @@ ntp openconnect openssh openvpn +partclone parted +partimage pptpclient rp-pppoe rsync @@ -43,6 +47,7 @@ smartmontools speedtouch sudo tcpdump +testdisk usb_modeswitch vpnc wget diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index a5be3c4..01a52d2 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -12,6 +12,7 @@ dnsutils dosfstools efibootmgr elinks +fsarchiver gnu-netcat gptfdisk grml-zsh-config @@ -25,6 +26,7 @@ irssi lftp lilo linux-atm +mc mtools netcfg nfs-utils @@ -36,7 +38,9 @@ ntp openconnect openssh openvpn +partclone parted +partimage pptpclient refind-efi-x86_64 rp-pppoe @@ -45,6 +49,7 @@ smartmontools speedtouch sudo tcpdump +testdisk usb_modeswitch vpnc wget -- cgit v1.2.3 From 7fa34a628c9625ed557a5d9e30a056785a38272e Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 26 Sep 2012 12:22:54 -0300 Subject: [configs/releng] refind-efi-x86_64 -> refind-efi Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/packages.x86_64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 01a52d2..fa43983 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -42,7 +42,7 @@ partclone parted partimage pptpclient -refind-efi-x86_64 +refind-efi rp-pppoe rsync smartmontools -- cgit v1.2.3 From d902b8f32c58823fa8fa9f769e3603cfad657329 Mon Sep 17 00:00:00 2001 From: Keshav P R Date: Wed, 26 Sep 2012 12:24:41 -0300 Subject: [configs/releng] Use gummiboot-efi instead of UEFI Shell for booting Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 55 +++++++++++++++------- .../efiboot/loader/entries/archiso-x86_64-cd.conf | 4 ++ .../efiboot/loader/entries/archiso-x86_64-usb.conf | 4 ++ .../loader/entries/uefi-shell-v1-x86_64.conf | 2 + .../loader/entries/uefi-shell-v2-x86_64.conf | 2 + configs/releng/efiboot/loader/loader.conf | 2 + configs/releng/packages.x86_64 | 1 + 7 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf create mode 100644 configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf create mode 100644 configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf create mode 100644 configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf create mode 100644 configs/releng/efiboot/loader/loader.conf diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 63cbad0..0f2ebfb 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -69,6 +69,28 @@ make_boot() { make_boot_efi() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then if [[ ${arch} == "x86_64" ]]; then + ## Start - UEFI USB + + mkdir -p ${work_dir}/iso/EFI/boot + cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi + + mkdir -p ${work_dir}/iso/loader/entries + cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/loader.conf + cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/uefi-shell-v2-x86_64.conf + cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/uefi-shell-v1-x86_64.conf + + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/archiso-x86_64.conf + + # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell ) + wget -O ${work_dir}/iso/EFI/shellx64_v2.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi + # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) + wget -O ${work_dir}/iso/EFI/shellx64_v1.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi + + ## End - UEFI USB + + ## Start - UEFI CD + mkdir -p ${work_dir}/iso/EFI/archiso dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0 mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img @@ -80,29 +102,28 @@ make_boot_efi() { cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img - # There are plans to support command line options via a config file (not yet in linux-3.3) - #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi - #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/linux.img - #echo "archisolabel=${iso_label} initrd=\EFI\boot\linux.img" | iconv -f ascii -t ucs2 > ${work_dir}/iso/EFI/boot/linux.conf - - # For now, provide an EFI-shell until 'linux.conf' hits mainline. mkdir -p ${work_dir}/efiboot/EFI/boot - # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell ) - #wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi - # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) - wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi + cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi - # Add an EFI shell script for automatic boot if ESC-key is not pressed within 5 seconds timeout. - sed "s|%ARCHISO_LABEL%|${iso_label}|g; - s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup_iso.nsh > ${work_dir}/efiboot/EFI/boot/startup.nsh - - mkdir -p ${work_dir}/iso/EFI/boot - cp ${work_dir}/efiboot/EFI/boot/bootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi + mkdir -p ${work_dir}/efiboot/loader/entries + cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/loader.conf + cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf + cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf sed "s|%ARCHISO_LABEL%|${iso_label}|g; - s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup_usb.nsh > ${work_dir}/iso/EFI/boot/startup.nsh + s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/archiso-x86_64.conf + cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/shellx64_v2.efi + cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/shellx64_v1.efi + + # There are plans to support command line options via a config file (not yet in linux-3.3) + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/archiso.img + #echo "archisobasedir=${install_dir} archisolabel=${iso_label} initrd=\\EFI\\boot\\archiso.img" > ${work_dir}/efiboot/EFI/boot/linux.conf + umount ${work_dir}/efiboot + + ## End - UEFI CD fi : > ${work_dir}/build.${FUNCNAME} fi diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf new file mode 100644 index 0000000..9892c59 --- /dev/null +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-cd.conf @@ -0,0 +1,4 @@ +title Arch Linux archiso x86_64 UEFI CD +linux /EFI/archiso/vmlinuz.efi +initrd /EFI/archiso/archiso.img +options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf new file mode 100644 index 0000000..f61c532 --- /dev/null +++ b/configs/releng/efiboot/loader/entries/archiso-x86_64-usb.conf @@ -0,0 +1,4 @@ +title Arch Linux archiso x86_64 UEFI USB +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz +initrd /%INSTALL_DIR%/boot/x86_64/archiso.img +options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf b/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf new file mode 100644 index 0000000..9597ff2 --- /dev/null +++ b/configs/releng/efiboot/loader/entries/uefi-shell-v1-x86_64.conf @@ -0,0 +1,2 @@ +title UEFI Shell x86_64 v1 +efi /EFI/shellx64_v1.efi diff --git a/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf b/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf new file mode 100644 index 0000000..0dde77a --- /dev/null +++ b/configs/releng/efiboot/loader/entries/uefi-shell-v2-x86_64.conf @@ -0,0 +1,2 @@ +title UEFI Shell x86_64 v2 +efi /EFI/shellx64_v2.efi diff --git a/configs/releng/efiboot/loader/loader.conf b/configs/releng/efiboot/loader/loader.conf new file mode 100644 index 0000000..62c4a83 --- /dev/null +++ b/configs/releng/efiboot/loader/loader.conf @@ -0,0 +1,2 @@ +timeout 3 +default archiso-x86_64 diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index fa43983..35114ae 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -18,6 +18,7 @@ gptfdisk grml-zsh-config grub-bios grub-efi-x86_64 +gummiboot-efi haveged hdparm ipw2100-fw -- cgit v1.2.3 From fb6e6b80b9c80783cae3cb46d10c4d9c0618f8a4 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 26 Sep 2012 12:24:41 -0300 Subject: [configs/releng] split make_boot_efi() -> make_efi() / make_efiboot() Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 0f2ebfb..5d573a2 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -65,19 +65,17 @@ make_boot() { fi } -# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub) -make_boot_efi() { +make_efi() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then if [[ ${arch} == "x86_64" ]]; then - ## Start - UEFI USB mkdir -p ${work_dir}/iso/EFI/boot cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi mkdir -p ${work_dir}/iso/loader/entries - cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/loader.conf - cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/uefi-shell-v2-x86_64.conf - cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/uefi-shell-v1-x86_64.conf + cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/ + cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/ + cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/ sed "s|%ARCHISO_LABEL%|${iso_label}|g; s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/archiso-x86_64.conf @@ -87,9 +85,14 @@ make_boot_efi() { # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) wget -O ${work_dir}/iso/EFI/shellx64_v1.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi - ## End - UEFI USB + fi + : > ${work_dir}/build.${FUNCNAME} + fi +} - ## Start - UEFI CD +make_efiboot() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + if [[ ${arch} == "x86_64" ]]; then mkdir -p ${work_dir}/iso/EFI/archiso dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0 @@ -106,24 +109,18 @@ make_boot_efi() { cp ${work_dir}/root-image/usr/lib/gummiboot/gummibootx64.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi mkdir -p ${work_dir}/efiboot/loader/entries - cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/loader.conf - cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf - cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf + cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/ + cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/ + cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/ sed "s|%ARCHISO_LABEL%|${iso_label}|g; s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/archiso-x86_64.conf - cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/shellx64_v2.efi - cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/shellx64_v1.efi - - # There are plans to support command line options via a config file (not yet in linux-3.3) - #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi - #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/archiso.img - #echo "archisobasedir=${install_dir} archisolabel=${iso_label} initrd=\\EFI\\boot\\archiso.img" > ${work_dir}/efiboot/EFI/boot/linux.conf - + cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/ + cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/ + umount ${work_dir}/efiboot - ## End - UEFI CD fi : > ${work_dir}/build.${FUNCNAME} fi @@ -293,7 +290,8 @@ make_common_single() { make_packages make_setup_mkinitcpio make_boot - make_boot_efi + make_efi + make_efiboot make_syslinux make_isolinux make_customize_root_image -- cgit v1.2.3 From f4eaf1f91ec680d7ac4bc09b6e2f52b22990e89a Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 26 Sep 2012 19:24:20 -0300 Subject: [archiso] Update README Signed-off-by: Gerardo Exequiel Pozzi --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 7c899f9..d0e4e21 100644 --- a/README +++ b/README @@ -213,7 +213,7 @@ Note: Using here a MBR partition mode as example, but GPT should also works # mount 4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=EFI/ -f -C +# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f -C 5) Install syslinux bootloader on target filesystem. (See know issue (2) if using FAT) # extlinux -i /arch/boot/syslinux -- cgit v1.2.3 From 340ebed2808517933e26e0d6f2bf1b6f957f03ef Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 26 Sep 2012 21:25:34 -0300 Subject: [configs/releng] Increase efiboot.img size * Increase size to a safe 31M, (currently we have 400K free since latest changes) * Also set a filesystem label, can be useful for future usage... Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 5d573a2..125be11 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -95,8 +95,8 @@ make_efiboot() { if [[ ${arch} == "x86_64" ]]; then mkdir -p ${work_dir}/iso/EFI/archiso - dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0 - mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img + truncate -s 31M ${work_dir}/iso/EFI/archiso/efiboot.img + mkfs.vfat -n ARCHISO_EFI ${work_dir}/iso/EFI/archiso/efiboot.img mkdir -p ${work_dir}/efiboot mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot -- cgit v1.2.3 From dd032a2e72157eaa29bf1ab7b1b6dadfc902aa6f Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Add pacman-init.service Signed-off-by: Gerardo Exequiel Pozzi --- .../root-image/etc/systemd/system/pacman-init.service | 13 +++++++++++++ configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 configs/releng/root-image/etc/systemd/system/pacman-init.service create mode 100644 configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf diff --git a/configs/releng/root-image/etc/systemd/system/pacman-init.service b/configs/releng/root-image/etc/systemd/system/pacman-init.service new file mode 100644 index 0000000..2154476 --- /dev/null +++ b/configs/releng/root-image/etc/systemd/system/pacman-init.service @@ -0,0 +1,13 @@ +[Unit] +Description=Initializes Pacman keyring +Wants=haveged.service +After=haveged.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/pacman-key --init +ExecStart=/usr/bin/pacman-key --populate archlinux + +[Install] +WantedBy=multi-user.target diff --git a/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf b/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf new file mode 100644 index 0000000..8f3d6c9 --- /dev/null +++ b/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf @@ -0,0 +1,2 @@ +d /run/pacman.d/gnupg - - - - - +L /etc/pacman.d/gnupg - - - - /run/pacman.d/gnupg -- cgit v1.2.3 From 0dc8c7b3c7ddcbfe74384d6da596c68f5f268ad9 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Add autologin.service Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 125be11..b760256 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -174,6 +174,8 @@ make_customize_root_image() { sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist patch ${work_dir}/root-image/usr/bin/pacman-key < ${script_path}/pacman-key-4.0.3_unattended-keyring-init.patch sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen + sed 's#\(^ExecStart=-/sbin/agetty\)#\1 --autologin root#' \ + ${work_dir}/root-image/usr/lib/systemd/system/getty@.service > ${work_dir}/root-image/etc/systemd/system/autologin@.service mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'locale-gen' \ run -- cgit v1.2.3 From e8d8124dd217c25b619deae1c6a5ebcac0cbe41d Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Enable systemd services Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index b760256..0b4001b 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -185,6 +185,9 @@ make_customize_root_image() { mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \ run + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd@.service ntpd.service || true' \ + run : > ${work_dir}/build.${FUNCNAME} fi } -- cgit v1.2.3 From 56b1e931bc27def5d0a3b51a6282653389fac732 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Install systemd as default (with sysvcompat) Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 0b4001b..2fa5d50 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -26,6 +26,14 @@ setup_workdir() { make_basefs() { mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install + + # Install systemd-sysvcompat in this way until hits {base} group + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'pacman -R --noconfirm --noprogressbar initscripts sysvinit' \ + run + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -p "systemd-sysvcompat" \ + install } # Additional packages (root-image) -- cgit v1.2.3 From d5e1363cbb2409be82ec53cdf428ab752a4e2c79 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Remove files for sysvinit and initscripts Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/root-image/etc/archiso/functions | 20 --------- configs/releng/root-image/etc/inittab | 48 ---------------------- configs/releng/root-image/etc/rc.conf | 23 ----------- .../etc/rc.d/functions.d/automated_script | 23 ----------- .../etc/rc.d/functions.d/setup_special_console | 25 ----------- configs/releng/root-image/etc/rc.d/pacman-init | 34 --------------- 6 files changed, 173 deletions(-) delete mode 100644 configs/releng/root-image/etc/archiso/functions delete mode 100644 configs/releng/root-image/etc/inittab delete mode 100644 configs/releng/root-image/etc/rc.conf delete mode 100644 configs/releng/root-image/etc/rc.d/functions.d/automated_script delete mode 100644 configs/releng/root-image/etc/rc.d/functions.d/setup_special_console delete mode 100755 configs/releng/root-image/etc/rc.d/pacman-init diff --git a/configs/releng/root-image/etc/archiso/functions b/configs/releng/root-image/etc/archiso/functions deleted file mode 100644 index 9fffdcb..0000000 --- a/configs/releng/root-image/etc/archiso/functions +++ /dev/null @@ -1,20 +0,0 @@ -# vim: set ft=sh: - -# kernel_cmdline -# Looks for a parameter on the kernel's boot-time command line. -# -# returns: 0 if param was found. Also prints its value if it was a K=V param. -# 1 if it was not. Also prints value passed as -# -kernel_cmdline () -{ - for param in $(/bin/cat /proc/cmdline); do - case "${param}" in - $1=*) echo "${param##*=}"; return 0 ;; - $1) return 0 ;; - *) continue ;; - esac - done - [ -n "${2}" ] && echo "${2}" - return 1 -} diff --git a/configs/releng/root-image/etc/inittab b/configs/releng/root-image/etc/inittab deleted file mode 100644 index e3fe2c8..0000000 --- a/configs/releng/root-image/etc/inittab +++ /dev/null @@ -1,48 +0,0 @@ -# -# /etc/inittab -# - -# Runlevels: -# 0 Halt -# 1(S) Single-user -# 2 Not used -# 3 Multi-user -# 4 Not used -# 5 X11 -# 6 Reboot - -## Only one of the following two lines can be uncommented! -# Boot to console -id:3:initdefault: -# Boot to X11 -#id:5:initdefault: - -rc::sysinit:/etc/rc.sysinit -rs:S1:wait:/etc/rc.single -rm:2345:wait:/etc/rc.multi -rh:06:wait:/etc/rc.shutdown -su:S:wait:/sbin/sulogin -p - -# -8 options fixes umlauts problem on login -c1:2345:respawn:/sbin/agetty -8 -s -a root 38400 tty1 linux -c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux -c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux -c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux -c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux -c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux - -# Serial Virtual Console for KVM and others VMs -#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux - -# Hypervisor Virtual Console for Xen and KVM -#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux - -ca::ctrlaltdel:/sbin/shutdown -t3 -r now - -# Example lines for starting a login manager -x:5:respawn:/usr/bin/xdm -nodaemon -#x:5:respawn:/usr/sbin/gdm -nodaemon -#x:5:respawn:/usr/bin/kdm -nodaemon -#x:5:respawn:/usr/bin/slim >/dev/null 2>&1 - -# End of file diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf deleted file mode 100644 index a2e6ebf..0000000 --- a/configs/releng/root-image/etc/rc.conf +++ /dev/null @@ -1,23 +0,0 @@ -. /etc/archiso/functions -# -# /etc/rc.conf - configuration file for initscripts -# -# Most of rc.conf has been replaced by various other configuration -# files. See archlinux(7) for details. -# -# For more details on rc.conf see rc.conf(5). -# - -DAEMONS=(syslog-ng network haveged pacman-init) - -# Storage -# -# USEDMRAID="no" -# USELVM="no" - -# Network -# -# interface= -# address= -# netmask= -# gateway= diff --git a/configs/releng/root-image/etc/rc.d/functions.d/automated_script b/configs/releng/root-image/etc/rc.d/functions.d/automated_script deleted file mode 100644 index f3e9018..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/automated_script +++ /dev/null @@ -1,23 +0,0 @@ -automated_script () -{ - script="$(kernel_cmdline script)" - if [[ -n "${script}" ]]; then - stat_busy "Configuring $script" - if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then - wget "${script}" -q -O /tmp/startup_script >/dev/null - rt=$? - else - cp "${script}" /tmp/startup_script - rt=$? - fi - if [ ${rt} -eq 0 ]; then - chmod +x /tmp/startup_script - echo -e '\nif [ $(tty) = "/dev/tty1" ]; then\n /tmp/startup_script\nfi\n' >> /root/.zprofile - stat_done - else - stat_fail - fi - fi -} - -add_hook multi_end automated_script diff --git a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console b/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console deleted file mode 100644 index 7badfe3..0000000 --- a/configs/releng/root-image/etc/rc.d/functions.d/setup_special_console +++ /dev/null @@ -1,25 +0,0 @@ -# If an alternate console was specified on the kernel command line, -# start agetty on it too. -setup_special_console() -{ - local cmdline_console - if cmdline_console=$(kernel_cmdline console); then - stat_busy "Starting agetty on console: ${cmdline_console}" - local port options baud rts - port=${cmdline_console%%,*} - options=${cmdline_console#${port}} - options=${options#,} - baud=${options%%[neo]*} - [[ ${options} == *r ]] && rts="-h" - if ! grep -q "^${port}" /etc/securetty; then - echo ${port} >> /etc/securetty - fi - if ! grep -q "^z0:" /etc/inittab; then - echo "z0:2345:respawn:/sbin/agetty -8 -s ${rts} ${baud:-9600} ${port} linux" >> /etc/inittab - fi - /sbin/telinit q - stat_done - fi -} - -add_hook sysinit_end setup_special_console diff --git a/configs/releng/root-image/etc/rc.d/pacman-init b/configs/releng/root-image/etc/rc.d/pacman-init deleted file mode 100755 index bbbd719..0000000 --- a/configs/releng/root-image/etc/rc.d/pacman-init +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -case "$1" in - start) - stat_busy "Initializing pacman keyring" - if { pacman-key --init && pacman-key --populate archlinux; } &>/dev/null; then - add_daemon pacman-init - stat_done - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Removing pacman keyring" - rm -rf /etc/pacman.d/gnupg - rm_daemon pacman-init - stat_done - ;; - - restart) - $0 stop - $0 start - ;; - - *) - echo "usage: $0 {start|stop|restart}" -esac - -exit 0 -- cgit v1.2.3 From d552ad32ab7001766ec2cdf6d2c555e91267a7cb Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Rework automated_script() from initscript hooks to /root/.zlogin Signed-off-by: Gerardo Exequiel Pozzi --- .../releng/root-image/root/.automated_script.sh | 34 ++++++++++++++++++++++ configs/releng/root-image/root/.zlogin | 1 + 2 files changed, 35 insertions(+) create mode 100755 configs/releng/root-image/root/.automated_script.sh create mode 100644 configs/releng/root-image/root/.zlogin diff --git a/configs/releng/root-image/root/.automated_script.sh b/configs/releng/root-image/root/.automated_script.sh new file mode 100755 index 0000000..fb106da --- /dev/null +++ b/configs/releng/root-image/root/.automated_script.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +script_cmdline () +{ + local param + for param in $(< /proc/cmdline); do + case "${param}" in + script=*) echo "${param##*=}" ; return 0 ;; + esac + done +} + +automated_script () +{ + local script rt + script="$(script_cmdline)" + if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then + if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then + wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null + rt=$? + else + cp "${script}" /tmp/startup_script + rt=$? + fi + if [[ ${rt} -eq 0 ]]; then + chmod +x /tmp/startup_script + /tmp/startup_script + fi + fi +} + +if [[ $(tty) == "/dev/tty1" ]]; then + automated_script +fi diff --git a/configs/releng/root-image/root/.zlogin b/configs/releng/root-image/root/.zlogin new file mode 100644 index 0000000..f598e43 --- /dev/null +++ b/configs/releng/root-image/root/.zlogin @@ -0,0 +1 @@ +~/.automated_script.sh -- cgit v1.2.3 From 6ef682f16dcf1d88cbc7541fc9ef2fbd185d5c00 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [configs/releng] Add timestamp to initramfs Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/mkinitcpio.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/releng/mkinitcpio.conf b/configs/releng/mkinitcpio.conf index 12a656d..03af40c 100644 --- a/configs/releng/mkinitcpio.conf +++ b/configs/releng/mkinitcpio.conf @@ -1,2 +1,2 @@ -HOOKS="base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms pata scsi sata virtio usb fw pcmcia filesystems usbinput" +HOOKS="base udev timestamp memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms pata scsi sata virtio usb fw pcmcia filesystems usbinput" COMPRESSION="xz" -- cgit v1.2.3 From 7348065cdf765ecd2decdb34eb64fd1abf368a8e Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 3 Oct 2012 10:52:13 -0300 Subject: [archiso] Update README (know issues) Signed-off-by: Gerardo Exequiel Pozzi --- README | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README b/README index d0e4e21..ce8d355 100644 --- a/README +++ b/README @@ -435,12 +435,14 @@ When make your custom boot-pendrive, you need to copy /arch directory to it. *** Know issues -** (1) On shutdown there are two steps that [FAIL]: - "Unmounting Swap-backed Filesystems" and "Unmounting Non-API Filesystems", - These filesystem are in use at this stage by archiso, but... +** (1) On shutdown lots of messages from systemd like: + + "Could not unmount /run/archiso/: Device or resource busy" + "Could not delete loopback /dev/loop: Device or resource busy" This is not a real issue since, all mounted filesystem, loopback devices and device mapper devices made by archiso will be "free" on "shutdown tmpfs" (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook. + Proper shutdown is mostly important when persistent is used. ** (2) syslinux 4.05 bug with relative directories on FAT: -- cgit v1.2.3 From 72b34f572ec2f1c2e8f1af88e742853726200178 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Thu, 4 Oct 2012 19:21:08 -0300 Subject: [configs/releng] Add ethtool to live-enviroment FS#28773 - [ethtool] [net-tools] one of packages should belong to base group Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/packages.i686 | 1 + configs/releng/packages.x86_64 | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686 index 194774c..b300c60 100644 --- a/configs/releng/packages.i686 +++ b/configs/releng/packages.i686 @@ -12,6 +12,7 @@ dnsutils dosfstools efibootmgr elinks +ethtool fsarchiver gnu-netcat gptfdisk diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 35114ae..4d93c78 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -12,6 +12,7 @@ dnsutils dosfstools efibootmgr elinks +ethtool fsarchiver gnu-netcat gptfdisk -- cgit v1.2.3 From d2e69f4a4a54cf63e57c672919a2e714eb601d36 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 06:55:36 +0200 Subject: Disable ntpd service by default A live system should never alter the host system in any way. This includes setting the bios clock. E.g. if the user runs his system in local time we would do the wrong thing here. Signed-off-by: Pierre Schmitz --- configs/releng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 2fa5d50..0d93ccd 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -194,7 +194,7 @@ make_customize_root_image() { -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \ run mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd@.service ntpd.service || true' \ + -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd@.service || true' \ run : > ${work_dir}/build.${FUNCNAME} fi -- cgit v1.2.3 From 41def4c27d8eb859ace91c00eefa915dbb4c38fc Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 11:32:28 +0200 Subject: Run dhcpcd on all devices As we did with initscripts, run dhcpcd on all devices and not just eth0. Signed-off-by: Pierre Schmitz --- configs/releng/build.sh | 2 +- configs/releng/root-image/etc/conf.d/dhcpcd | 6 ------ configs/releng/root-image/etc/systemd/system/dhcpcd.service | 13 +++++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 configs/releng/root-image/etc/conf.d/dhcpcd create mode 100644 configs/releng/root-image/etc/systemd/system/dhcpcd.service diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 0d93ccd..3601dff 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -194,7 +194,7 @@ make_customize_root_image() { -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \ run mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd@.service || true' \ + -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd.service || true' \ run : > ${work_dir}/build.${FUNCNAME} fi diff --git a/configs/releng/root-image/etc/conf.d/dhcpcd b/configs/releng/root-image/etc/conf.d/dhcpcd deleted file mode 100644 index 76b56ff..0000000 --- a/configs/releng/root-image/etc/conf.d/dhcpcd +++ /dev/null @@ -1,6 +0,0 @@ -# -# Arguments to be passed to the DHCP client daemon -# - -DHCPCD_ARGS="-qb" - diff --git a/configs/releng/root-image/etc/systemd/system/dhcpcd.service b/configs/releng/root-image/etc/systemd/system/dhcpcd.service new file mode 100644 index 0000000..dd030d5 --- /dev/null +++ b/configs/releng/root-image/etc/systemd/system/dhcpcd.service @@ -0,0 +1,13 @@ +[Unit] +Description=dhcpcd on all interfaces +Wants=network.target +Before=network.target + +[Service] +Type=forking +PIDFile=/run/dhcpcd.pid +ExecStart=/sbin/dhcpcd -A -b -q +ExecStop=/sbin/dhcpcd -k + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3 From 99ae5779460a23f5d2751777dd13dc009f63cfbe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 11:51:38 +0200 Subject: Place the x86_64 boot before i686 This is a very minor change, but let's most people just press enter on bootup. Signed-off-by: Pierre Schmitz --- configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg | 2 +- configs/releng/syslinux.dual/archiso_sys_both_inc.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg b/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg index 324523e..1593303 100644 --- a/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg +++ b/configs/releng/syslinux.dual/archiso_pxe_both_inc.cfg @@ -1,4 +1,4 @@ INCLUDE boot/syslinux/archiso_head.cfg -INCLUDE boot/syslinux/archiso_pxe32.cfg INCLUDE boot/syslinux/archiso_pxe64.cfg +INCLUDE boot/syslinux/archiso_pxe32.cfg INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg b/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg index 4ed6b39..e885c40 100644 --- a/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg +++ b/configs/releng/syslinux.dual/archiso_sys_both_inc.cfg @@ -1,4 +1,4 @@ INCLUDE boot/syslinux/archiso_head.cfg -INCLUDE boot/syslinux/archiso_sys32.cfg INCLUDE boot/syslinux/archiso_sys64.cfg +INCLUDE boot/syslinux/archiso_sys32.cfg INCLUDE boot/syslinux/archiso_tail.cfg -- cgit v1.2.3 From 077e81e4585a2490f4fa9251a9f3602c9ed4ce02 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 12:27:42 +0200 Subject: Add rfkill to the live system Some wireless devices need to be enabled before use which is easier using rfkill. Signed-off-by: Pierre Schmitz --- configs/releng/packages.i686 | 1 + configs/releng/packages.x86_64 | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686 index b300c60..032b666 100644 --- a/configs/releng/packages.i686 +++ b/configs/releng/packages.i686 @@ -42,6 +42,7 @@ partclone parted partimage pptpclient +rfkill rp-pppoe rsync smartmontools diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 4d93c78..21ab1c8 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -45,6 +45,7 @@ parted partimage pptpclient refind-efi +rfkill rp-pppoe rsync smartmontools -- cgit v1.2.3 From da8a83172d6fe0a7ab10aab658464374df527cc1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 18:18:18 +0200 Subject: Makefile: Do not preserve ownership If we use cp -a files might copied with the wrong ownership and might end up like this on the target iso. Signed-off-by: Pierre Schmitz --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1abeb4a..2284865 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ install-initcpio: install-examples: install -d -m 755 $(DESTDIR)/usr/share/archiso/ - cp -a configs $(DESTDIR)/usr/share/archiso/ + cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/archiso/ install-doc: install -D -m 644 README $(DESTDIR)/usr/share/doc/archiso/README -- cgit v1.2.3 From 39bf4183d11fa2443176c948b9a86297ff0cb50f Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 5 Oct 2012 18:29:40 +0200 Subject: Prepare v3 release --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2284865..da0a84e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=2 +V=3 INSTALL_FILES=$(wildcard archiso/initcpio/install/*) HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*) -- cgit v1.2.3 From 76f275e993eec849bd7c03dc42504b6214774a85 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 00:24:24 +0200 Subject: Use tmpfs for /etc/pacman.d/gnupg instead of a symlink to /run This fixes FS#31815 Signed-off-by: Pierre Schmitz --- archiso/initcpio/hooks/archiso | 1 - configs/releng/root-image/etc/fstab | 0 .../releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount | 8 ++++++++ configs/releng/root-image/etc/systemd/system/pacman-init.service | 2 ++ configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf | 2 -- 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 configs/releng/root-image/etc/fstab create mode 100644 configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount delete mode 100644 configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 9445498..5b94743 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -35,7 +35,6 @@ _mnt_fs() { _mnt_dev "/dev/mapper/${dm_snap_name}" "${newroot}${mnt}" "-w" echo $(readlink -f /dev/mapper/${dm_snap_name}) >> /run/archiso/used_block_devices - echo "/dev/mapper/${dm_snap_name} ${mnt} auto defaults 0 0" >> ${newroot}/etc/fstab } # args: /path/to/image_file, mountpoint diff --git a/configs/releng/root-image/etc/fstab b/configs/releng/root-image/etc/fstab new file mode 100644 index 0000000..e69de29 diff --git a/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount b/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount new file mode 100644 index 0000000..4eab551 --- /dev/null +++ b/configs/releng/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -0,0 +1,8 @@ +[Unit] +Description=Temporary /etc/pacman.d/gnupg directory + +[Mount] +What=tmpfs +Where=/etc/pacman.d/gnupg +Type=tmpfs +Options=mode=0755 diff --git a/configs/releng/root-image/etc/systemd/system/pacman-init.service b/configs/releng/root-image/etc/systemd/system/pacman-init.service index 2154476..23b8144 100644 --- a/configs/releng/root-image/etc/systemd/system/pacman-init.service +++ b/configs/releng/root-image/etc/systemd/system/pacman-init.service @@ -2,6 +2,8 @@ Description=Initializes Pacman keyring Wants=haveged.service After=haveged.service +Requires=etc-pacman.d-gnupg.mount +After=etc-pacman.d-gnupg.mount [Service] Type=oneshot diff --git a/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf b/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf deleted file mode 100644 index 8f3d6c9..0000000 --- a/configs/releng/root-image/etc/tmpfiles.d/pacman-init.conf +++ /dev/null @@ -1,2 +0,0 @@ -d /run/pacman.d/gnupg - - - - - -L /etc/pacman.d/gnupg - - - - /run/pacman.d/gnupg -- cgit v1.2.3 From d355c2b83527d3f0c08c6e800b975a613a169c9d Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 00:27:18 +0200 Subject: Only enable the needed services * pacman-init already pulls in services it depends on * the multi-user.target is the default * do not rename the getty service so tools like systemd-delta still work Signed-off-by: Pierre Schmitz --- configs/releng/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 3601dff..3f246d4 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -183,7 +183,7 @@ make_customize_root_image() { patch ${work_dir}/root-image/usr/bin/pacman-key < ${script_path}/pacman-key-4.0.3_unattended-keyring-init.patch sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen sed 's#\(^ExecStart=-/sbin/agetty\)#\1 --autologin root#' \ - ${work_dir}/root-image/usr/lib/systemd/system/getty@.service > ${work_dir}/root-image/etc/systemd/system/autologin@.service + ${work_dir}/root-image/usr/lib/systemd/system/getty@.service > ${work_dir}/root-image/etc/systemd/system/getty@.service mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'locale-gen' \ run @@ -194,7 +194,7 @@ make_customize_root_image() { -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \ run mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin@.service dhcpcd.service || true' \ + -r 'systemctl -f enable pacman-init.service getty@.service dhcpcd.service || true' \ run : > ${work_dir}/build.${FUNCNAME} fi -- cgit v1.2.3 From 7d26b1eae9ba9e3ea0a5c9f7c8e6f12118d2f019 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 07:20:59 +0200 Subject: Add the arch user to some useful groups Only use groups that wont allow damaging the host system by accident. Signed-off-by: Pierre Schmitz --- configs/releng/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 3f246d4..2699468 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -191,7 +191,7 @@ make_customize_root_image() { -r 'usermod -s /bin/zsh root' \ run mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \ + -r 'useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /bin/zsh arch' \ run mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ -r 'systemctl -f enable pacman-init.service getty@.service dhcpcd.service || true' \ -- cgit v1.2.3 From 6f68bec907f5fbfdd1e73be8812ea0ff925965aa Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 10:56:05 +0200 Subject: Fix typo in shebang --- archiso/initcpio/script/archiso_shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archiso/initcpio/script/archiso_shutdown b/archiso/initcpio/script/archiso_shutdown index 41b3945..e024efe 100644 --- a/archiso/initcpio/script/archiso_shutdown +++ b/archiso/initcpio/script/archiso_shutdown @@ -1,4 +1,4 @@ -#!/bin/ash +#!/bin/bash # /oldroot depends on things inside /oldroot/run/archiso... mkdir /oldrun -- cgit v1.2.3 From a5e942a5c058bce64c7acafbd76a8ae7c8ceaf78 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 6 Oct 2012 11:08:44 +0200 Subject: Revert "Fix typo in shebang" This reverts commit 6f68bec907f5fbfdd1e73be8812ea0ff925965aa. Using ash was actually correct as only this shell is available in initramfs. It was the commit message of 27940c420f01f550f36c3aa25633b43a4f2a2069 that was wrong --- archiso/initcpio/script/archiso_shutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archiso/initcpio/script/archiso_shutdown b/archiso/initcpio/script/archiso_shutdown index e024efe..41b3945 100644 --- a/archiso/initcpio/script/archiso_shutdown +++ b/archiso/initcpio/script/archiso_shutdown @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/ash # /oldroot depends on things inside /oldroot/run/archiso... mkdir /oldrun -- cgit v1.2.3 From 76ef155a04effa6741f4db2384eba90671a2fdba Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:40 -0300 Subject: [configs/releng] make packages.both for common packages for each x86_64 Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 2 +- configs/releng/packages.both | 60 +++++++++++++++++++++++++++++++++++++++++ configs/releng/packages.i686 | 61 ------------------------------------------ configs/releng/packages.x86_64 | 61 ------------------------------------------ 4 files changed, 61 insertions(+), 123 deletions(-) create mode 100644 configs/releng/packages.both diff --git a/configs/releng/build.sh b/configs/releng/build.sh index 2699468..ab8097c 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -38,7 +38,7 @@ make_basefs() { # Additional packages (root-image) make_packages() { - mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.{both,${arch}})" install } # Copy mkinitcpio archiso hooks (root-image) diff --git a/configs/releng/packages.both b/configs/releng/packages.both new file mode 100644 index 0000000..4bab7de --- /dev/null +++ b/configs/releng/packages.both @@ -0,0 +1,60 @@ +arch-install-scripts +b43-fwcutter +btrfs-progs +crda +darkhttpd +ddrescue +dhclient +dialog +dmraid +dnsmasq +dnsutils +dosfstools +elinks +ethtool +fsarchiver +gnu-netcat +gptfdisk +grml-zsh-config +grub-bios +haveged +hdparm +ipw2100-fw +ipw2200-fw +irssi +lftp +lilo +linux-atm +mc +mtools +netcfg +nfs-utils +nilfs-utils +nmap +ntfs-3g +ntfsprogs +ntp +openconnect +openssh +openvpn +partclone +parted +partimage +pptpclient +rfkill +rp-pppoe +rsync +smartmontools +speedtouch +sudo +tcpdump +testdisk +usb_modeswitch +vpnc +wget +wireless_tools +wpa_actiond +wvdial +xl2tpd +zd1211-firmware +zsh diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686 index 032b666..e69de29 100644 --- a/configs/releng/packages.i686 +++ b/configs/releng/packages.i686 @@ -1,61 +0,0 @@ -arch-install-scripts -b43-fwcutter -btrfs-progs -crda -darkhttpd -ddrescue -dhclient -dialog -dmraid -dnsmasq -dnsutils -dosfstools -efibootmgr -elinks -ethtool -fsarchiver -gnu-netcat -gptfdisk -grml-zsh-config -grub-bios -haveged -hdparm -ipw2100-fw -ipw2200-fw -irssi -lftp -lilo -linux-atm -mc -mtools -netcfg -nfs-utils -nilfs-utils -nmap -ntfs-3g -ntfsprogs -ntp -openconnect -openssh -openvpn -partclone -parted -partimage -pptpclient -rfkill -rp-pppoe -rsync -smartmontools -speedtouch -sudo -tcpdump -testdisk -usb_modeswitch -vpnc -wget -wireless_tools -wpa_actiond -wvdial -xl2tpd -zd1211-firmware -zsh diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64 index 21ab1c8..137c9d5 100644 --- a/configs/releng/packages.x86_64 +++ b/configs/releng/packages.x86_64 @@ -1,64 +1,3 @@ -arch-install-scripts -b43-fwcutter -btrfs-progs -crda -darkhttpd -ddrescue -dhclient -dialog -dmraid -dnsmasq -dnsutils -dosfstools -efibootmgr -elinks -ethtool -fsarchiver -gnu-netcat -gptfdisk -grml-zsh-config -grub-bios grub-efi-x86_64 gummiboot-efi -haveged -hdparm -ipw2100-fw -ipw2200-fw -irssi -lftp -lilo -linux-atm -mc -mtools -netcfg -nfs-utils -nilfs-utils -nmap -ntfs-3g -ntfsprogs -ntp -openconnect -openssh -openvpn -partclone -parted -partimage -pptpclient refind-efi -rfkill -rp-pppoe -rsync -smartmontools -speedtouch -sudo -tcpdump -testdisk -usb_modeswitch -vpnc -wget -wireless_tools -wpa_actiond -wvdial -xl2tpd -zd1211-firmware -zsh -- cgit v1.2.3 From 0e5b68e0d3122adffd16d48fdb5c93e858ddaf32 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [configs/releng] Remove unused files (startup*.nsh) These files was used with efi-shell boot method, before gummiboot comes here. Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/efiboot/EFI/boot/startup_iso.nsh | 10 ---------- configs/releng/efiboot/EFI/boot/startup_usb.nsh | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 configs/releng/efiboot/EFI/boot/startup_iso.nsh delete mode 100644 configs/releng/efiboot/EFI/boot/startup_usb.nsh diff --git a/configs/releng/efiboot/EFI/boot/startup_iso.nsh b/configs/releng/efiboot/EFI/boot/startup_iso.nsh deleted file mode 100644 index 5c35ca8..0000000 --- a/configs/releng/efiboot/EFI/boot/startup_iso.nsh +++ /dev/null @@ -1,10 +0,0 @@ -@echo -off - -for %m run (0 20) - if exist fs%m:\EFI\archiso\vmlinuz.efi then - fs%m: - cd fs%m:\EFI\archiso - echo "Launching Arch Linux ISO Kernel fs%m:\EFI\archiso\vmlinuz.efi" - vmlinuz.efi archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\EFI\archiso\archiso.img - endif -endfor diff --git a/configs/releng/efiboot/EFI/boot/startup_usb.nsh b/configs/releng/efiboot/EFI/boot/startup_usb.nsh deleted file mode 100644 index 439e400..0000000 --- a/configs/releng/efiboot/EFI/boot/startup_usb.nsh +++ /dev/null @@ -1,10 +0,0 @@ -@echo -off - -for %m run (0 20) - if exist fs%m:\%INSTALL_DIR%\boot\x86_64\vmlinuz then - fs%m: - cd fs%m:\%INSTALL_DIR%\boot\x86_64 - echo "Launching Archiso Kernel fs%m:\%INSTALL_DIR%\boot\x86_64\vmlinuz" - vmlinuz archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\%INSTALL_DIR%\boot\x86_64\archiso.img - endif -endfor -- cgit v1.2.3 From f712182592d90c87bccc4f3d7e67f55d2d6055af Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [configs/releng] /etc/timezone is not used anymore Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/root-image/etc/timezone | 1 - 1 file changed, 1 deletion(-) delete mode 100644 configs/releng/root-image/etc/timezone diff --git a/configs/releng/root-image/etc/timezone b/configs/releng/root-image/etc/timezone deleted file mode 100644 index e2e7775..0000000 --- a/configs/releng/root-image/etc/timezone +++ /dev/null @@ -1 +0,0 @@ -UTC -- cgit v1.2.3 From b2691db41a9c46adf98b8fe9891a306eec6de811 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [configs/releng] /etc/vconsole.conf remove, redundant systemd does not touch anymore FONT and KEYMAP by default. Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/root-image/etc/vconsole.conf | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 configs/releng/root-image/etc/vconsole.conf diff --git a/configs/releng/root-image/etc/vconsole.conf b/configs/releng/root-image/etc/vconsole.conf deleted file mode 100644 index c58bf7e..0000000 --- a/configs/releng/root-image/etc/vconsole.conf +++ /dev/null @@ -1,2 +0,0 @@ -KEYMAP=us -FONT= -- cgit v1.2.3 From 2e94974e2b37b540d52799362f05e16315cb0b00 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [configs/releng] Remove uneeded hack (systemd transition) initscripts/sysvinit are not part from {base} anymore, systemd* is now in {base}. Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/build.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/configs/releng/build.sh b/configs/releng/build.sh index ab8097c..cd9b45a 100755 --- a/configs/releng/build.sh +++ b/configs/releng/build.sh @@ -26,14 +26,6 @@ setup_workdir() { make_basefs() { mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install - - # Install systemd-sysvcompat in this way until hits {base} group - mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -r 'pacman -R --noconfirm --noprogressbar initscripts sysvinit' \ - run - mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ - -p "systemd-sysvcompat" \ - install } # Additional packages (root-image) -- cgit v1.2.3 From 1746e31049c50fb413cceeefcf21b2bda4e2de48 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [archiso] Introduce cowfile_size= bootparam If not set, nothing is changed in current behaviour. Since dm-snapshot allows to use as "COW" a file with any size, without caring about the the size of "origin", we can avoid creating a "COW" file of the same size as the "origin". This is really useful, when using as cow_device= a filesystem that is VFAT where sparse files are not supported, so if root-image.fs is 1000M, passing cowfile_size=25% will create a root-image.cow of 250M instead of 1000M. Signed-off-by: Gerardo Exequiel Pozzi --- README | 5 +++++ archiso/initcpio/hooks/archiso | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README b/README index ce8d355..c33f444 100644 --- a/README +++ b/README @@ -65,6 +65,11 @@ INDEX Size is in bytes (suffix with "k", "m" and "g") or in percentage of available RAM. Default: "75%" +* cowfile_size= Set the size for all files to be used as COW (dm-snapshot), + in percentage of the ro-device.fs file. This is mostly useful + when cow_device= is used and filesystem does not support + sparse files (ie VFAT). + Default: "100%" * copytoram_size= Set the size of tmpfs. This space is used for copy of all SquashFS images used, if copytoram=y. Size is in bytes (suffix with "k", "m" and "g") or diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 5b94743..491ed2f 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -11,13 +11,14 @@ _mnt_fs() { ro_dev=$(losetup --find --show --read-only "${img}") echo ${ro_dev} >> /run/archiso/used_block_devices ro_dev_size=$(blockdev --getsz ${ro_dev}) + rw_dev_size=$((ro_dev_size*cowfile_size/100)) if [[ "${cow_persistent}" == "P" ]]; then if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then msg ":: Found '/run/archiso/cowspace/${cow_directory}/${img_name}.cow', using as persistent." else msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as persistent." - dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null + dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null fi else if [[ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]]; then @@ -25,7 +26,7 @@ _mnt_fs() { rm -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" fi msg ":: Creating '/run/archiso/cowspace/${cow_directory}/${img_name}.cow' as non-persistent." - dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${ro_dev_size} &> /dev/null + dd of="/run/archiso/cowspace/${cow_directory}/${img_name}.cow" count=0 seek=${rw_dev_size} &> /dev/null fi rw_dev=$(losetup --find --show "/run/archiso/cowspace/${cow_directory}/${img_name}.cow") @@ -101,6 +102,11 @@ run_hook() { [[ -z "${archisobasedir}" ]] && archisobasedir="arch" [[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch" [[ -z "${archisodevice}" ]] && archisodevice="/dev/disk/by-label/${archisolabel}" + if [[ -z "${cowfile_size}" ]]; then + cowfile_size="100" + else + cowfile_size=${cowfile_size/%} + fi if [[ -z "${aitab}" ]]; then aitab="/run/archiso/bootmnt/${archisobasedir}/aitab" -- cgit v1.2.3 From 753d2038024541ac2d10f74e6d408d6ed1a23f2a Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 13 Oct 2012 14:40:41 -0300 Subject: [archiso] Split README file Signed-off-by: Gerardo Exequiel Pozzi --- Makefile | 9 +- README | 487 --------------------------------------------- docs/README.altbootmethods | 128 ++++++++++++ docs/README.bootparams | 127 ++++++++++++ docs/README.build | 112 +++++++++++ docs/README.knowissues | 16 ++ docs/README.transfer | 122 ++++++++++++ 7 files changed, 512 insertions(+), 489 deletions(-) delete mode 100644 README create mode 100644 docs/README.altbootmethods create mode 100644 docs/README.bootparams create mode 100644 docs/README.build create mode 100644 docs/README.knowissues create mode 100644 docs/README.transfer diff --git a/Makefile b/Makefile index da0a84e..2deb9fa 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,15 @@ INSTALL_FILES=$(wildcard archiso/initcpio/install/*) HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*) SCRIPT_FILES=$(wildcard archiso/initcpio/script/*) - INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio +DOC_FILES=$(wildcard docs/*) + +DOC_DIR=$(DESTDIR)/usr/share/doc/archiso + + all: install: install-program install-initcpio install-examples install-doc @@ -27,7 +31,8 @@ install-examples: cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/archiso/ install-doc: - install -D -m 644 README $(DESTDIR)/usr/share/doc/archiso/README + install -d $(DOC_DIR) + install -m 644 -t $(DOC_DIR) $(DOC_FILES) dist: git archive --format=tar --prefix=archiso-$(V)/ v$(V) | gzip -9 > archiso-$(V).tar.gz diff --git a/README b/README deleted file mode 100644 index c33f444..0000000 --- a/README +++ /dev/null @@ -1,487 +0,0 @@ -INDEX ------ - -* Boot parameters (initramfs stage) - * hooks/archiso - * hooks/archiso_pxe_common - * hooks/archiso_pxe_nbd - * hooks/archiso_pxe_http - * hooks/archiso_pxe_nfs - * hooks/archiso_loop_mnt -* Transfer ISO file to target medium (configs/releng) - * To -> CD / DVD / BD - * To -> USB-key / SD / HDD / SSD - * PC-BIOS (MBR) - * PC-BIOS (ISOHYBRID-MBR) - * PC-EFI (GPT) [x86_64 only] -* Alternative boot methods (configs/releng) - * ISO in loopback mode - * ISO in memdisk mode - * Network booting (PXE) [first stage] - * DHCP + TFTP - * DHCP + HTTP - * HTTP/NFS/NBD [second stage] -* Build requirements -* Image types generated by mkarchiso. -* File format for aitab. -* Why the /isolinux and /arch/boot/syslinux directories? -* Know issues -* Building the most basic Arch Linux live media. (configs/baseline) -* Building official Arch Linux live media. (configs/releng) - - - -*** Boot parameters (initramfs stage) - -** hooks/archiso - -* archisolabel= Set the filesystem label where archiso files reside. - Default: (unset) -* archisodevice= Set the device node where archiso medium is located. - Default: "/dev/disk/by-label/${archisolabel}" -* archisobasedir= Set the base directory where all files reside. - Default: "arch" -* aitab= Set the path for "aitab" file. - Default: ${archisobasedir}/aitab -* copytoram= If set to "y" or just "copytoram" without arguments, - all SquashFS are copied to "RAM". - Default: (unset) -* checksum= If set to "y" or just "checksum" without arguments, - performs a self-test of all files inside ${install_dir}, - and continue booting if ok. - Default: (unset) -* cow_label= Set the filesystem label where COW (dm-snapshot) - files must be stored. - Default: (unset) -* cow_device= Set the device node where COW (dm-snapshot) files - must be stored. - Default: (unset) or "/dev/disk/by-label/${cow_label}" -* cow_directory= Set a directory inside ${cow_device}. - Default: "/persistent_${archisolabel}/${arch}" -* cow_persistent= Set if snapshots are persistent "P" or non-persistent "N". - Default: "N" (if no ${cow_device} is used) otherwise "P". -* cowspace_size= Set the size of tmpfs /cowspace. This space is used for - Copy-On-Write files of dm-snapshot. - Size is in bytes (suffix with "k", "m" and "g") or - in percentage of available RAM. - Default: "75%" -* cowfile_size= Set the size for all files to be used as COW (dm-snapshot), - in percentage of the ro-device.fs file. This is mostly useful - when cow_device= is used and filesystem does not support - sparse files (ie VFAT). - Default: "100%" -* copytoram_size= Set the size of tmpfs. This space is used for - copy of all SquashFS images used, if copytoram=y. - Size is in bytes (suffix with "k", "m" and "g") or - in percentage of available RAM. - Default: "75%" -* dm_snap_prefix= Set a prefix for device-mapper snapshot node names. - Default: "arch" -* arch= Force an architecture type (i686 | x86_64). - Do not set it for normal operations. - Useful for running a 64 bit kernel / 32 bit userspace. - Default: (architecture of running kernel) - - -** hooks/archiso_pxe_common - -* ip= This parameter is setup automatically by PXELINUX - when option "IPAPPEND" is set to 1 or 2 in config. - ip=::: - Default: (set via PXE server) -* BOOTIF= This parameter is setup automatically by PXELINUX - when option "IPAPPEND" is set to 2 or 3 in config. - BOOTIF= - Default: (set via PXELINUX) -* copy_resolvconf= Copy /etc/resolv.conf from initramfs to live-enviroment. - Set to "n" to skip them. - Default: "y" - - -** hooks/archiso_pxe_nbd - -* archiso_nbd_name= Set NBD export name used by the server. - Default: archiso -* archiso_nbd_srv= Set an IP address where NBD reside. - If ${pxeserver} is used, PXE IP will be used. - Default: (unset) - - -** hooks/archiso_pxe_http - -* archiso_http_srv= Set an HTTP URL (must end with /) where ${archisobasedir} - is found with all *.sfs files. - In the IP/domain part if ${pxeserver} is used, use PXE IP. - Default: (unset) -* archiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded. - Default: "75%" - - -** hooks/archiso_pxe_nfs - -* archiso_nfs_srv= Set the NFS-IP:/path of the server - In the IP part if ${pxeserver} is used, PXE IP will be used. - Default: (unset) -* archiso_nfs_opt= Set NFS mount options separated by comma. - Default: (unset, see below) - These are the implicit options: - port = as given by server portmap daemon - rsize = 1024 - wsize = 1024 - timeo = 7 - retrans = 3 - acregmin = 3 - acregmax = 60 - acdirmin = 30 - acdirmax = 60 - flags = hard, nointr, noposix, cto, ac - - -** hooks/archiso_loop_mnt - -* img_label= Set the filesystem label where archiso-image.iso. - Default: (unset) -* img_dev= Device where archiso-image.iso reside. - Default: (unset) or "/dev/disk/by-label/${img_label}" -* img_loop= Full path where archiso-image.iso is located on ${img_dev} - Default: (unset) - - - -*** Transfer ISO image to target medium (configs/releng) - -ISO images names consist of: archlinux-..
-.iso - -Where: - Year - Month -
Day - 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: - scsibus number - target number - lun number - (Note: see cdrecord -scanbus, for these numbers) - - -1) Write it directly using your favorite recording program. -# cdrecord dev=,, -dao archlinux-..
-.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: -: Device node of the drive where ISO contents should be copied - (example: /dev/sdx) -: Device node of the partition on - (example: /dev/sdx1) -: Mount point path where is mounted - (example: /mnt/sdx/1) -: Path to the ISO file archlinux-..
-.iso - (example: ~/archlinux-2012.07.22-x86_64.iso) -: Represents the filesystem label of the - (example: ARCH_201207 [for all ~/archlinux-2012.07.*.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 - -2) Create a FAT32 or EXTFS filesystem on such partition and setup a label. -# mkfs.vfat -F 32 -n -# mkfs.ext4 -L - -3) Mount target filesystem. -# mount - -4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f -C - -5) Install syslinux bootloader on target filesystem. (See know issue (2) if using FAT) -# extlinux -i /arch/boot/syslinux - -6) Unmount target filesystem. -# umount - -7) Install syslinux MBR boot code on target drive. -# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of= - - -* 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= of= - - -* 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 - -2) Create a FAT32 filesystem on such partition and setup a label. -# mkfs.vfat -F 32 -n - -3) Mount target filesystem. -# mount - -4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f -C - -5) Unmount target filesystem. -# umount - - - -*** Alternative boot methods (configs/releng) - -** ISO in loopback mode. - -Note: Described method is for using with GRUB2. - GRUB2 is installed on target media and archlinux-..
-.iso - is at path on disk and partition

, - where filesystem is labeled as . - -menuentry "Arch Linux (x86_64)" { - set isofile="//archlinux-..

-.iso" - loopback loop (hd,

)$isofile - linux (loop)/arch/boot/x86_64/vmlinuz archisolabel= img_label= img_loop=$isofile - initrd (loop)/arch/boot/x86_64/archiso.img -} - -menuentry "Arch Linux (i686)" { - set isofile="//archlinux-..

-.iso" - loopback loop (hd,

)$isofile - linux (loop)/arch/boot/i686/vmlinuz archisolabel= img_label= img_loop=$isofile - initrd (loop)/arch/boot/i686/archiso.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 archlinux-..

-.iso - is at 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 arch_x64 - LINUX memdisk - INITRD //archlinux-..
-.iso - APPEND iso - -LABEL arch_x32 - LINUX memdisk - INITRD //archlinux-..
-.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 ARCH_201207 as needed. - -# cat << EOF > /tmp/nbd-server.conf -[generic] -[archiso] - readonly = true - exportname = /dev/disk/by-label/ARCH_201207 -EOF -# nbd-server -C /tmp/nbd-server.conf - - - -*** Build requirements - -** For mkarchiso script needs these packages (build host): - + squashfs-tools for mksquashfs - + libisoburn for xorriso - + btrfs-progs for mkfs.btrfs (optional) - -** For configs/releng build.sh needs theses packages (build host): - + dosfstools for mkfs.vfat - + patch for patch - + lynx for fetching the latest installation guide - -** For these hooks needs these packages (on target root-image) -* archiso - + (none) -* archiso_loop_mnt - + (none) -* archiso_pxe_common - + mkinitcpio-nfs-utils for ipconfig -* archiso_pxe_nbd - + nbd for nbd-client -* archiso_pxe_http - + curl for curl -* archiso_pxe_nfs - + mkinitcpio-nfs-utils for nfsmount -* archiso_shutdown - + (none) - - -*** Image types generated by mkarchiso. - -* image-name.sfs SquashFS image with all files directly on it. -* image-name.fs.sfs SquashFS with only one file inside (image-name.fs), - which is an image of some type of filesystem - (ext4, ext3, ext2, xfs), all files reside on it. - - -*** File format for aitab. - -The aitab file holds information about the filesystems images that must be -created by mkarchiso and mounted at initramfs stage from the archiso hook. -It consists of some fields which define the behaviour of images. - -# - - Image name without extension (.fs .fs.sfs .sfs). - Mount point. - Architecture { i686 | x86_64 | any }. - SquashFS compression type { gzip | lzo | xz }. - Set the filesystem type of the image - { ext4 | ext3 | ext2 | xfs | btrfs }. - A special value of "none" denotes no usage of a filesystem. - In that case all files are pushed directly to SquashFS filesystem. - An absolute value of file system image size in MiB. - (example: 100, 1000, 4096, etc) - A relative value of file system free space [in percent]. - {1%..99%} (example 50%, 10%, 7%). - This is an estimation, and calculated in a simple way. - Space used + 10% (estimated for metadata overhead) + desired % - - -*** Why the /isolinux and /arch/boot/syslinux directories? - -The /isolinux directory holds files needed for the ISOLINUX boot loader -module of SYSLINUX. ISOLINUX can not find config files on -/arch/boot/syslinux, like other boot loaders modules (EXTLINUX, SYSLINUX, etc). -When make your custom boot-pendrive, you need to copy /arch directory to it. -/isolinux/isolinux.cfg just holds /arch/boot/syslinux/syslinux.cfg - - -*** Know issues - -** (1) On shutdown lots of messages from systemd like: - - "Could not unmount /run/archiso/: Device or resource busy" - "Could not delete loopback /dev/loop: Device or resource busy" - This is not a real issue since, all mounted filesystem, loopback devices - and device mapper devices made by archiso will be "free" on "shutdown tmpfs" - (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook. - Proper shutdown is mostly important when persistent is used. - -** (2) syslinux 4.05 bug with relative directories on FAT: - - "Could not find kernel image: boot/syslinux/whichsys.c32" - This should be fixed in 4.06. For now, workaround with: - sed -i "s|../../|/arch|" //arch/boot/syslinux/syslinux.cfg - - -*** Building the most basic Arch Linux live media. (configs/baseline) - -* Install needed packages. - # pacman -S git make squashfs-tools libisoburn rsync --needed - -* Install archiso. - # git clone git://projects.archlinux.org/archiso.git - # make -C archiso install - -* Build a basic iso. - # /usr/share/archiso/configs/baseline/build.sh - -Note: If you want to customize, just see the configs/releng directory which is -used to build official images with much more things. - - -*** Building official Arch Linux live media. (configs/releng) - -* Install needed packages. - # pacman -S git make squashfs-tools libisoburn dosfstools lynx patch --needed - -* Install archiso. - # git clone git://projects.archlinux.org/archiso.git - # make -C archiso install - -* Build them! - # /usr/share/archiso/configs/releng/build.sh build all - -Note: See build.sh -h for more options. diff --git a/docs/README.altbootmethods b/docs/README.altbootmethods new file mode 100644 index 0000000..ebe1c6e --- /dev/null +++ b/docs/README.altbootmethods @@ -0,0 +1,128 @@ +INDEX +----- + +* Alternative boot methods (configs/releng) + * ISO in loopback mode + * ISO in memdisk mode + * Network booting (PXE) [first stage] + * DHCP + TFTP + * DHCP + HTTP + * HTTP/NFS/NBD [second stage] + + + +*** Alternative boot methods (configs/releng) + +ISO images names consist of: archlinux-..
-.iso + +Where: + Year + Month +
Day + i686 | x86_64 | dual(*) + +(*) "dual" includes both i686 and x86_64 architectures. + + +** ISO in loopback mode. + +Note: Described method is for using with GRUB2. + GRUB2 is installed on target media and archlinux-..
-.iso + is at path on disk and partition

, + where filesystem is labeled as . + +menuentry "Arch Linux (x86_64)" { + set isofile="//archlinux-..

-.iso" + loopback loop (hd,

)$isofile + linux (loop)/arch/boot/x86_64/vmlinuz archisolabel= img_label= img_loop=$isofile + initrd (loop)/arch/boot/x86_64/archiso.img +} + +menuentry "Arch Linux (i686)" { + set isofile="//archlinux-..

-.iso" + loopback loop (hd,

)$isofile + linux (loop)/arch/boot/i686/vmlinuz archisolabel= img_label= img_loop=$isofile + initrd (loop)/arch/boot/i686/archiso.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 archlinux-..

-.iso + is at 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 arch_x64 + LINUX memdisk + INITRD //archlinux-..
-.iso + APPEND iso + +LABEL arch_x32 + LINUX memdisk + INITRD //archlinux-..
-.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 ARCH_201207 as needed. + +# cat << EOF > /tmp/nbd-server.conf +[generic] +[archiso] + readonly = true + exportname = /dev/disk/by-label/ARCH_201207 +EOF +# nbd-server -C /tmp/nbd-server.conf diff --git a/docs/README.bootparams b/docs/README.bootparams new file mode 100644 index 0000000..13e1ead --- /dev/null +++ b/docs/README.bootparams @@ -0,0 +1,127 @@ +INDEX +----- + +* Boot parameters (initramfs stage) + * hooks/archiso + * hooks/archiso_pxe_common + * hooks/archiso_pxe_nbd + * hooks/archiso_pxe_http + * hooks/archiso_pxe_nfs + * hooks/archiso_loop_mnt + + + +*** Boot parameters (initramfs stage) + +** hooks/archiso + +* archisolabel= Set the filesystem label where archiso files reside. + Default: (unset) +* archisodevice= Set the device node where archiso medium is located. + Default: "/dev/disk/by-label/${archisolabel}" +* archisobasedir= Set the base directory where all files reside. + Default: "arch" +* aitab= Set the path for "aitab" file. + Default: ${archisobasedir}/aitab +* copytoram= If set to "y" or just "copytoram" without arguments, + all SquashFS are copied to "RAM". + Default: (unset) +* checksum= If set to "y" or just "checksum" without arguments, + performs a self-test of all files inside ${install_dir}, + and continue booting if ok. + Default: (unset) +* cow_label= Set the filesystem label where COW (dm-snapshot) + files must be stored. + Default: (unset) +* cow_device= Set the device node where COW (dm-snapshot) files + must be stored. + Default: (unset) or "/dev/disk/by-label/${cow_label}" +* cow_directory= Set a directory inside ${cow_device}. + Default: "/persistent_${archisolabel}/${arch}" +* cow_persistent= Set if snapshots are persistent "P" or non-persistent "N". + Default: "N" (if no ${cow_device} is used) otherwise "P". +* cowspace_size= Set the size of tmpfs /cowspace. This space is used for + Copy-On-Write files of dm-snapshot. + Size is in bytes (suffix with "k", "m" and "g") or + in percentage of available RAM. + Default: "75%" +* cowfile_size= Set the size for all files to be used as COW (dm-snapshot), + in percentage of the ro-device.fs file. This is mostly useful + when cow_device= is used and filesystem does not support + sparse files (ie VFAT). + Default: "100%" +* copytoram_size= Set the size of tmpfs. This space is used for + copy of all SquashFS images used, if copytoram=y. + Size is in bytes (suffix with "k", "m" and "g") or + in percentage of available RAM. + Default: "75%" +* dm_snap_prefix= Set a prefix for device-mapper snapshot node names. + Default: "arch" +* arch= Force an architecture type (i686 | x86_64). + Do not set it for normal operations. + Useful for running a 64 bit kernel / 32 bit userspace. + Default: (architecture of running kernel) + + +** hooks/archiso_pxe_common + +* ip= This parameter is setup automatically by PXELINUX + when option "IPAPPEND" is set to 1 or 2 in config. + ip=::: + Default: (set via PXE server) +* BOOTIF= This parameter is setup automatically by PXELINUX + when option "IPAPPEND" is set to 2 or 3 in config. + BOOTIF= + Default: (set via PXELINUX) +* copy_resolvconf= Copy /etc/resolv.conf from initramfs to live-enviroment. + Set to "n" to skip them. + Default: "y" + + +** hooks/archiso_pxe_nbd + +* archiso_nbd_name= Set NBD export name used by the server. + Default: archiso +* archiso_nbd_srv= Set an IP address where NBD reside. + If ${pxeserver} is used, PXE IP will be used. + Default: (unset) + + +** hooks/archiso_pxe_http + +* archiso_http_srv= Set an HTTP URL (must end with /) where ${archisobasedir} + is found with all *.sfs files. + In the IP/domain part if ${pxeserver} is used, use PXE IP. + Default: (unset) +* archiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded. + Default: "75%" + + +** hooks/archiso_pxe_nfs + +* archiso_nfs_srv= Set the NFS-IP:/path of the server + In the IP part if ${pxeserver} is used, PXE IP will be used. + Default: (unset) +* archiso_nfs_opt= Set NFS mount options separated by comma. + Default: (unset, see below) + These are the implicit options: + port = as given by server portmap daemon + rsize = 1024 + wsize = 1024 + timeo = 7 + retrans = 3 + acregmin = 3 + acregmax = 60 + acdirmin = 30 + acdirmax = 60 + flags = hard, nointr, noposix, cto, ac + + +** hooks/archiso_loop_mnt + +* img_label= Set the filesystem label where archiso-image.iso. + Default: (unset) +* img_dev= Device where archiso-image.iso reside. + Default: (unset) or "/dev/disk/by-label/${img_label}" +* img_loop= Full path where archiso-image.iso is located on ${img_dev} + Default: (unset) diff --git a/docs/README.build b/docs/README.build new file mode 100644 index 0000000..2a3d709 --- /dev/null +++ b/docs/README.build @@ -0,0 +1,112 @@ +INDEX +----- + +* Build requirements +* Image types generated by mkarchiso. +* File format for aitab. +* Why the /isolinux and /arch/boot/syslinux directories? +* Building the most basic Arch Linux live media. (configs/baseline) +* Building official Arch Linux live media. (configs/releng) + + + +*** Build requirements + +** For mkarchiso script needs these packages (build host): + + squashfs-tools for mksquashfs + + libisoburn for xorriso + + btrfs-progs for mkfs.btrfs (optional) + +** For configs/releng build.sh needs theses packages (build host): + + dosfstools for mkfs.vfat + + patch for patch + + lynx for fetching the latest installation guide + +** For these hooks needs these packages (on target root-image) +* archiso + + (none) +* archiso_loop_mnt + + (none) +* archiso_pxe_common + + mkinitcpio-nfs-utils for ipconfig +* archiso_pxe_nbd + + nbd for nbd-client +* archiso_pxe_http + + curl for curl +* archiso_pxe_nfs + + mkinitcpio-nfs-utils for nfsmount +* archiso_shutdown + + (none) + + +*** Image types generated by mkarchiso. + +* image-name.sfs SquashFS image with all files directly on it. +* image-name.fs.sfs SquashFS with only one file inside (image-name.fs), + which is an image of some type of filesystem + (ext4, ext3, ext2, xfs), all files reside on it. + + +*** File format for aitab. + +The aitab file holds information about the filesystems images that must be +created by mkarchiso and mounted at initramfs stage from the archiso hook. +It consists of some fields which define the behaviour of images. + +# + + Image name without extension (.fs .fs.sfs .sfs). + Mount point. + Architecture { i686 | x86_64 | any }. + SquashFS compression type { gzip | lzo | xz }. + Set the filesystem type of the image + { ext4 | ext3 | ext2 | xfs | btrfs }. + A special value of "none" denotes no usage of a filesystem. + In that case all files are pushed directly to SquashFS filesystem. + An absolute value of file system image size in MiB. + (example: 100, 1000, 4096, etc) + A relative value of file system free space [in percent]. + {1%..99%} (example 50%, 10%, 7%). + This is an estimation, and calculated in a simple way. + Space used + 10% (estimated for metadata overhead) + desired % + + +*** Why the /isolinux and /arch/boot/syslinux directories? + +The /isolinux directory holds files needed for the ISOLINUX boot loader +module of SYSLINUX. ISOLINUX can not find config files on +/arch/boot/syslinux, like other boot loaders modules (EXTLINUX, SYSLINUX, etc). +When make your custom boot-pendrive, you need to copy /arch directory to it. +/isolinux/isolinux.cfg just holds /arch/boot/syslinux/syslinux.cfg + + + +*** Building the most basic Arch Linux live media. (configs/baseline) + +* Install needed packages. + # pacman -S git make squashfs-tools libisoburn rsync --needed + +* Install archiso. + # git clone git://projects.archlinux.org/archiso.git + # make -C archiso install + +* Build a basic iso. + # /usr/share/archiso/configs/baseline/build.sh + +Note: If you want to customize, just see the configs/releng directory which is +used to build official images with much more things. + + +*** Building official Arch Linux live media. (configs/releng) + +* Install needed packages. + # pacman -S git make squashfs-tools libisoburn dosfstools lynx patch --needed + +* Install archiso. + # git clone git://projects.archlinux.org/archiso.git + # make -C archiso install + +* Build them! + # /usr/share/archiso/configs/releng/build.sh build all + +Note: See build.sh -h for more options. diff --git a/docs/README.knowissues b/docs/README.knowissues new file mode 100644 index 0000000..24bfa41 --- /dev/null +++ b/docs/README.knowissues @@ -0,0 +1,16 @@ +*** Know issues + +** (1) On shutdown lots of messages from systemd like: + + "Could not unmount /run/archiso/: Device or resource busy" + "Could not delete loopback /dev/loop: Device or resource busy" + This is not a real issue since, all mounted filesystem, loopback devices + and device mapper devices made by archiso will be "free" on "shutdown tmpfs" + (A.K.A deinitramfs), build at initramfs by [archiso_shutdown] initcpio hook. + Proper shutdown is mostly important when persistent is used. + +** (2) syslinux 4.05 bug with relative directories on FAT: + + "Could not find kernel image: boot/syslinux/whichsys.c32" + This should be fixed in 4.06. For now, workaround with: + sed -i "s|../../|/arch|" //arch/boot/syslinux/syslinux.cfg diff --git a/docs/README.transfer b/docs/README.transfer new file mode 100644 index 0000000..e9654b8 --- /dev/null +++ b/docs/README.transfer @@ -0,0 +1,122 @@ +INDEX +----- + +* Transfer ISO file to target medium (configs/releng) + * To -> CD / DVD / BD + * To -> USB-key / SD / HDD / SSD + * PC-BIOS (MBR) + * PC-BIOS (ISOHYBRID-MBR) + * PC-EFI (GPT) [x86_64 only] + + + +*** Transfer ISO image to target medium (configs/releng) + +ISO images names consist of: archlinux-..
-.iso + +Where: + Year + Month +
Day + 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: + scsibus number + target number + lun number + (Note: see cdrecord -scanbus, for these numbers) + + +1) Write it directly using your favorite recording program. +# cdrecord dev=,, -dao archlinux-..
-.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: +: Device node of the drive where ISO contents should be copied + (example: /dev/sdx) +: Device node of the partition on + (example: /dev/sdx1) +: Mount point path where is mounted + (example: /mnt/sdx/1) +: Path to the ISO file archlinux-..
-.iso + (example: ~/archlinux-2012.07.22-x86_64.iso) +: Represents the filesystem label of the + (example: ARCH_201207 [for all ~/archlinux-2012.07.*.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 + +2) Create a FAT32 or EXTFS filesystem on such partition and setup a label. +# mkfs.vfat -F 32 -n +# mkfs.ext4 -L + +3) Mount target filesystem. +# mount + +4) Extract ISO image on target filesystem. +# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f -C + +5) Install syslinux bootloader on target filesystem. (See know issue (2) if using FAT) +# extlinux -i /arch/boot/syslinux + +6) Unmount target filesystem. +# umount + +7) Install syslinux MBR boot code on target drive. +# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of= + + +* 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= of= + + +* 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 + +2) Create a FAT32 filesystem on such partition and setup a label. +# mkfs.vfat -F 32 -n + +3) Mount target filesystem. +# mount + +4) Extract ISO image on target filesystem. +# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f -C + +5) Unmount target filesystem. +# umount -- cgit v1.2.3