OSDN Git Service

Merge branch 'dev' into dev-stable
[alterlinux/alterlinux.git] / docs / archiso / README.altbootmethods
1 INDEX
2 -----
3
4 * Alternative boot methods (configs/releng)
5   * ISO in loopback mode
6   * ISO in memdisk mode
7   * Network booting (PXE) [first stage]
8     * DHCP + TFTP
9     * DHCP + HTTP
10     * HTTP/NFS/NBD [second stage]
11
12
13
14 *** Alternative boot methods (configs/releng)
15
16 ISO images names consist of: archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
17
18 Where:
19     <YYYY> Year
20     <MM> Month
21     <DD> Day
22
23
24 ** ISO in loopback mode.
25
26 Note: Described method is for using with GRUB2.
27       GRUB2 is installed on target media and archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
28       is at path <TARGET-PATH> on disk <D> and partition <P>,
29       where filesystem is labeled as <TARGET-FS-LABEL>.
30
31 menuentry "Arch Linux (x86_64)" {
32     set isofile="/<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-x86_64.iso"
33     loopback loop (hd<D>,<P>)$isofile
34     linux (loop)/arch/boot/x86_64/vmlinuz img_label=<TARGET-FS-LABEL> img_loop=$isofile
35     initrd (loop)/arch/boot/x86_64/archiso.img
36 }
37
38
39 ** ISO in memdisk mode.
40
41 Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
42       with other bootloaders.
43       SYSLINUX is installed on target media and archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
44       is at path <TARGET-PATH>.
45
46
47 LABEL arch_x64
48    LINUX memdisk
49    INITRD /<TARGET-PATH>/archlinux-<YYYY>.<MM>.<DD>-x86_64.iso
50    APPEND iso
51
52
53 ** Network booting (PXE).
54
55 All ISOs are ready to act as PXE server, some manual steps are needed
56 to setup the desired PXE boot mode.
57 Alternatively it is possible to use an existing PXE server following the same logic.
58 Note: Setup network first, adjust IP adresses, and respect all slashes "/".
59
60 First stage is for loading kernel and initramfs via PXE, two methods described here:
61
62 * DHCP + TFTP
63
64 Note: All NIC firmwares should support this.
65
66 # dnsmasq --port=0 \
67           --enable-tftp \
68           --tftp-root=/run/archiso/bootmnt \
69           --dhcp-range=192.168.0.2,192.168.0.254,86400 \
70           --dhcp-boot=/arch/boot/syslinux/lpxelinux.0 \
71           --dhcp-option-force=209,boot/syslinux/archiso.cfg \
72           --dhcp-option-force=210,/arch/
73
74 * DHCP + HTTP
75
76 Note: Not all NIC firmware supports HTTP and DNS (if domain name is used).
77       At least this works with iPXE and gPXE.
78
79 # dnsmasq --port=0 \
80           --dhcp-range=192.168.0.2,192.168.0.254,86400 \
81           --dhcp-boot=http://192.168.0.7/arch/boot/syslinux/lpxelinux.0 \
82           --dhcp-option-force=209,boot/syslinux/archiso.cfg \
83           --dhcp-option-force=210,http://192.168.0.7/arch/
84
85
86 Once the kernel is started from PXE, SquashFS files and other misc files
87 inside "arch" directory must be loaded (second stage). One of the following
88 methods can be used to serve the rest of live-medium.
89
90 * HTTP
91
92 # darkhttpd /run/archiso/bootmnt
93
94
95 * NFS
96
97 # echo "/run/archiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
98 # systemctl start nfs-server.service
99
100
101 * NBD
102
103 Note: Adjust ARCH_201703 as needed.
104
105 # cat << EOF > /tmp/nbd-server.conf
106 [generic]
107 [archiso]
108     readonly = true
109     exportname = /dev/disk/by-label/ARCH_201703
110 EOF
111 # nbd-server -C /tmp/nbd-server.conf