README.altbootmethods 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. INDEX
  2. -----
  3. * Alternative boot methods (configs/releng)
  4. * ISO in loopback mode
  5. * ISO in memdisk mode
  6. * Network booting (PXE) [first stage]
  7. * DHCP + TFTP
  8. * DHCP + HTTP
  9. * HTTP/NFS/NBD [second stage]
  10. *** Alternative boot methods (configs/releng)
  11. Release image filesystem labels consist of: PARA_<YYYY><MM>
  12. Release image filenames consist of: parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso
  13. Where:
  14. <EDITION> consist of either <INIT_SYSTEM> or <INIT_SYSTEM>-<DESKTOP_ENVIRONMENT>
  15. <ISO_TYPE> consist of either <ARCH>-netinstall or <ARCH>-complete
  16. <VERSION> consist of <YYYY>.<MM>.<DD>
  17. Where:
  18. <INIT_SYSTEM> such as 'systend', 'openrc'
  19. <DESKTOP_ENVIRONMENT> such as 'cli', 'lxde'
  20. <ARCH> such as 'i686', 'x86_64', or 'dual'
  21. <YYYY> is the 4-digit year of the build date
  22. <MM> is the 2-digit month of the build date
  23. <DD> is the 2-digit day of the build date
  24. e.g. parabola-systemd-cli-i686-netinstall-2017-09-30.iso
  25. parabola-openrc-lxde-dual-complete-2017-09-30.iso
  26. ** ISO in loopback mode.
  27. Note: Described method is for using with GRUB2.
  28. GRUB2 is installed on source media and parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso
  29. is at path <ISO_PATH> on disk <D> and partition <P>,
  30. where the ISO filesystem label is <ISO_FS_LABEL>
  31. and filesystem is labeled as <SOURCE_FS_LABEL>.
  32. <BOOT_DIRNAME> is the root directory of the kernel and initrd in the ISO,
  33. which corresponds to the $boot_dirname variable in build.sh (default: 'parabola').
  34. Note: The 'dual' architecture ISOs can make use of both of the entries below.
  35. menuentry "Parabola GNU/Linux-libre Live (x86_64)" {
  36. set boot_dirname="<BOOT_DIRNAME>"
  37. set iso_fs_label="<ISO_FS_LABEL>"
  38. set target_fs_label="<SOURCE_FS_LABEL>"
  39. set iso_file="/<ISO_PATH>/parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso"
  40. loopback loop (hd<D>,<P>)$iso_file
  41. linux (loop)/$boot_dirname/boot/x86_64/vmlinuz parabolaisolabel=$iso_fs_label img_label=$target_fs_label img_loop=$iso_file
  42. initrd (loop)/$boot_dirname/boot/x86_64/parabolaiso.img
  43. }
  44. menuentry "Parabola GNU/Linux-libre Live (i686)" {
  45. set boot_dirname="<BOOT_DIRNAME>"
  46. set iso_fs_label="<ISO_FS_LABEL>"
  47. set target_fs_label="<SOURCE_FS_LABEL>"
  48. set iso_file="/<ISO_PATH>/parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso"
  49. loopback loop (hd<D>,<P>)$iso_file
  50. linux (loop)/$boot_dirname/boot/i686/vmlinuz parabolaisolabel=$iso_fs_label img_label=$target_fs_label img_loop=$iso_file
  51. initrd (loop)/$boot_dirname/boot/i686/parabolaiso.img
  52. }
  53. ** ISO in memdisk mode.
  54. Note: Described method is for using with SYSLINUX. Anyway MEMDISK from SYSLINUX can work
  55. with other bootloaders.
  56. SYSLINUX is installed on target media and parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso
  57. is at path <ISO_PATH>.
  58. On 32-bit systems, is needed to pass vmalloc=nnM to the kernel, where nn is the size
  59. of the ISO image plus 64 MiB (or 128 MiB).
  60. Note: The 'dual' architecture ISOs can make use of both of the entries below.
  61. LABEL parabola_x64
  62. LINUX memdisk
  63. INITRD /<ISO_PATH>/parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso
  64. APPEND iso
  65. LABEL parabola_x32
  66. LINUX memdisk
  67. INITRD /<ISO_PATH>/parabola-<EDITION>-<ISO_TYPE>-<VERSION>.iso
  68. APPEND iso
  69. ** Network booting (PXE).
  70. All ISOs are ready to act as PXE server, some manual steps are needed
  71. to setup the desired PXE boot mode.
  72. Alternatively it is possible to use an existing PXE server following the same logic.
  73. Note: Setup network first, adjust IP adresses, and respect all slashes "/".
  74. First stage is for loading kernel and initramfs via PXE, two methods described here:
  75. * DHCP + TFTP
  76. Note: All NIC firmwares should support this.
  77. # dnsmasq --port=0 \
  78. --enable-tftp \
  79. --tftp-root=/run/parabolaiso/bootmnt \
  80. --dhcp-range=192.168.0.2,192.168.0.254,86400 \
  81. --dhcp-boot=/parabola/boot/syslinux/gpxelinux.0 \
  82. --dhcp-option-force=209,boot/syslinux/parabolaiso.cfg \
  83. --dhcp-option-force=210,/parabola/
  84. * DHCP + HTTP
  85. Note: Not all NIC firmware supports HTTP and DNS (if domain name is used).
  86. At least this works with iPXE and gPXE.
  87. # dnsmasq --port=0 \
  88. --dhcp-range=192.168.0.2,192.168.0.254,86400 \
  89. --dhcp-boot=http://192.168.0.7/parabola/boot/syslinux/gpxelinux.0 \
  90. --dhcp-option-force=209,boot/syslinux/parabolaiso.cfg \
  91. --dhcp-option-force=210,http://192.168.0.7/parabola/
  92. Once the kernel is started from PXE, SquashFS files and other misc files
  93. inside "parabola" directory must be loaded (second stage). One of the following
  94. methods can be used to serve the rest of live-medium.
  95. * HTTP
  96. # darkhttpd /run/parabolaiso/bootmnt
  97. * NFS
  98. # echo "/run/parabolaiso/bootmnt 192.168.0.*(ro,no_subtree_check,no_root_squash)" >> /etc/exports
  99. # systemctl start rpc-mountd.service
  100. * NBD
  101. Note: The ISO filesystem label is <ISO_FS_LABEL>. Get this with the following command:
  102. $ isoinfo -d -i path/to/the.iso | grep 'Volume id:'
  103. # cat << EOF > /tmp/nbd-server.conf
  104. [generic]
  105. [parabolaiso]
  106. readonly = true
  107. exportname = /dev/disk/by-label/<ISO_FS_LABEL>
  108. EOF
  109. # nbd-server -C /tmp/nbd-server.conf