summaryrefslogtreecommitdiff
path: root/docs/README.altbootmethods
blob: 77ff917a182d7e4aab6b059c7419ab38db154cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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: parabola-<YYYY>.<MM>.<DD>-dual.iso

Where:
    <YYYY> Year
    <MM> Month
    <DD> Day


** ISO in loopback mode.

Note: Described method is for using with GRUB2.
      GRUB2 is installed on target media and parabola-<YYYY>.<MM>.<DD>-dual.iso
      is at path <TARGET-PATH> on disk <D> and partition <P>,
      where filesystem is labeled as <TARGET-FS-LABEL>.

menuentry "Parabola GNU/Linux-libre (x86_64)" {
    set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-dual.iso"
    loopback loop (hd<D>,<P>)$isofile
    linux (loop)/parabola/boot/x86_64/vmlinuz parabolaisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
    initrd (loop)/parabola/boot/x86_64/parabolaiso.img
}

menuentry "Parabola GNU/Linux-libre (i686)" {
    set isofile="/<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-dual.iso"
    loopback loop (hd<D>,<P>)$isofile
    linux (loop)/parabola/boot/i686/vmlinuz parabolaisolabel=<FS-LABEL> img_label=<TARGET-FS-LABEL> img_loop=$isofile
    initrd (loop)/parabola/boot/i686/parabolaiso.img
}


** ISO in memdisk mode.

Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
      with other bootloaders.
      SYSLINUX is installed on target media and parabola-<YYYY>.<MM>.<DD>-dual.iso
      is at path <TARGET-PATH>.
      On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
      of the ISO image plus 64 MiB (or 128 MiB).


LABEL parabola_x64
   LINUX memdisk
   INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-dual.iso
   APPEND iso

LABEL parabola_x32
   LINUX memdisk
   INITRD /<TARGET-PATH>/parabola-<YYYY>.<MM>.<DD>-dual.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/parabolaiso/bootmnt \
          --dhcp-range=192.168.0.2,192.168.0.254,86400 \
          --dhcp-boot=/parabola/boot/syslinux/gpxelinux.0 \
          --dhcp-option-force=209,boot/syslinux/parabolaiso.cfg \
          --dhcp-option-force=210,/parabola/

* 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/parabola/boot/syslinux/gpxelinux.0 \
          --dhcp-option-force=209,boot/syslinux/parabolaiso.cfg \
          --dhcp-option-force=210,http://192.168.0.7/parabola/


Once the kernel is started from PXE, SquashFS files and other misc files
inside "parabola" directory must be loaded (second stage). One of the following
methods can be used to serve the rest of live-medium.

* HTTP

# darkhttpd /run/parabolaiso/bootmnt


* NFS

# echo "/run/parabolaiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
# systemctl start rpc-mountd.service


* NBD

Note: Adjust PARABOLA_201302 as needed.

# cat << EOF > /tmp/nbd-server.conf
[generic]
[parabolaiso]
    readonly = true
    exportname = /dev/disk/by-label/PARABOLA_201302
EOF
# nbd-server -C /tmp/nbd-server.conf