[arch-releng] [RFC] [PATCH] [archiso] README: add: alternative boot methods
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- README | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/README b/README index 5f1d253..a59d524 100644 --- a/README +++ b/README @@ -16,6 +16,13 @@ INDEX * 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. @@ -273,6 +280,113 @@ Note: Using here a GPT partition mode as example, but MBR should also works +*** 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-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + is at path <TARGET-PATH> on disk <D> and partition <P>, + where filesystem is labeled as <TARGET-FS-LABEL>. + +menuentry "Arch Linux (x86_64)" { + set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" + loopback loop (hd<D>,<P>)$isofile + linux (loop)/arch/boot/x86_64/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile + initrd (loop)/arch/boot/x86_64/archiso.img +} + +menuentry "Arch Linux (i686)" { + set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso" + loopback loop (hd<D>,<P>)$isofile + linux (loop)/arch/boot/i686/vmlinuz archisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile + initrd (loop)/arch/boot/i686/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-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + is at path <TARGET-PATH>. + On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size + of the ISO image plus 64 MiB (or 128 MiB). + + +LABEL arch_x64 + LINUX memdisk + INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + APPEND iso + +LABEL arch_x32 + LINUX memdisk + INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-<TYPE>-<ARCH>.iso + APPEND iso + + +** Network booting (PXE). + +All ISOs are ready to act as PXE server, some manual steps are needed +to setup desired PXE boot mode. +Alternativelly is possible to use an already 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 kernel is started from PXE, SquashFS files and other misc files +inside "arch" directory must be loaded (second stage). One of the follow +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_201204 as needed. + +# cat << EOF > /tmp/nbd-server.conf +[generic] +[archiso] + readonly = true + exportname = /dev/disk/by-label/ARCH_201204 +EOF +# nbd-server -C /tmp/nbd-server.conf + + + *** Build requirements ** For mkarchiso script needs these packages (build host): -- 1.7.9.6
+All ISOs are ready to act as PXE server, some manual steps are needed +to setup desired PXE boot mode. +Alternativelly is possible to use an already PXE server following the same logic. +Note: Setup network first, adjust IP adresses, and respect all slashes "/".
to set up the desired PXE boot mode. Alternatively it is possible to use a what? "respect all slashes" isn't that obvious? How about DHCP? As I user I would like to know if any dhcp server is started by default (as this could have an impact on my network) maybe you should add something like "some manual steps are needed to set up the desired PXE boot mode, which also involves enabling the DHCP server"
On 04/19/2012 05:13 AM, Dieter Plaetinck wrote:
+All ISOs are ready to act as PXE server, some manual steps are needed +to setup desired PXE boot mode. +Alternativelly is possible to use an already PXE server following the same logic. +Note: Setup network first, adjust IP adresses, and respect all slashes "/". to set up the desired PXE boot mode. fixed. Alternatively it is possible to use a what? Your "PXE server" made with you with for example: ISC dhcpd, tftp-hpa, and maybe other components. "respect all slashes" isn't that obvious? Maybe, but not in all cases. (example last slash must be present here otherwise will not work at all: --dhcp-option-force=210,/arch/ ) How about DHCP? As I user I would like to know if any dhcp server is started by default (as this could have an impact on my network) maybe you should add something like "some manual steps are needed to set up the desired PXE boot mode, which also involves enabling the DHCP server"
dnsmasq always start the dhcp server, in fact I titled it as "* DHCP + TFTP" Following the policy, that the user knows what he does, and this is purely as a reference and memory aid(at least this is my intention), do not think it needed further clarification. If necessary the wiki is the right place. Thank you for the feedback :) -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
Typos, typos. Am 18.04.2012 22:04, schrieb Gerardo Exequiel Pozzi:
+All ISOs are ready to act as PXE server, some manual steps are needed +to setup desired PXE boot mode. +Alternativelly is possible to use an already PXE server following the same logic.
"Alternatively, it is possible to use an existing PXE server ..." ^ ^^ ^^^^^^^^
+Once kernel is started from PXE, SquashFS files and other misc files
"Once the kernel ..." ^^^
+inside "arch" directory must be loaded (second stage). One of the follow
"One of the following ...." ^^^^^^^^^
+methods can be used to serve the rest of live-medium.
On 04/19/2012 05:44 AM, Thomas Bächler wrote:
Typos, typos.
Am 18.04.2012 22:04, schrieb Gerardo Exequiel Pozzi:
+All ISOs are ready to act as PXE server, some manual steps are needed +to setup desired PXE boot mode. +Alternativelly is possible to use an already PXE server following the same logic. "Alternatively, it is possible to use an existing PXE server ..." ^ ^^ ^^^^^^^^
+Once kernel is started from PXE, SquashFS files and other misc files "Once the kernel ..." ^^^
+inside "arch" directory must be loaded (second stage). One of the follow "One of the following ...." ^^^^^^^^^
+methods can be used to serve the rest of live-medium.
Fixed all. Thank you. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
participants (3)
-
Dieter Plaetinck
-
Gerardo Exequiel Pozzi
-
Thomas Bächler