summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/README.altbootmethods125
-rw-r--r--docs/README.bootparams141
-rw-r--r--docs/README.build111
-rw-r--r--docs/README.knownissues12
-rw-r--r--docs/README.transfer133
5 files changed, 522 insertions, 0 deletions
diff --git a/docs/README.altbootmethods b/docs/README.altbootmethods
new file mode 100644
index 0000000..d9acc89
--- /dev/null
+++ b/docs/README.altbootmethods
@@ -0,0 +1,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 PARA_201302 as needed.
+
+# cat << EOF > /tmp/nbd-server.conf
+[generic]
+[parabolaiso]
+ readonly = true
+ exportname = /dev/disk/by-label/PARA_201302
+EOF
+# nbd-server -C /tmp/nbd-server.conf
diff --git a/docs/README.bootparams b/docs/README.bootparams
new file mode 100644
index 0000000..7139976
--- /dev/null
+++ b/docs/README.bootparams
@@ -0,0 +1,141 @@
+INDEX
+-----
+
+* Boot parameters (initramfs stage)
+ * hooks/parabolaiso
+ * hooks/parabolaiso_pxe_common
+ * hooks/parabolaiso_pxe_nbd
+ * hooks/parabolaiso_pxe_http
+ * hooks/parabolaiso_pxe_nfs
+ * hooks/parabolaiso_loop_mnt
+
+* Boot parameters (configs/releng)
+ * scripts/choose-mirror
+
+
+*** Boot parameters (initramfs stage)
+
+** hooks/parabolaiso
+
+* parabolaisolabel= Set the filesystem label where parabolaiso files reside.
+ Default: (unset)
+* parabolaisodevice= Set the device node where parabolaiso medium is located.
+ Default: "/dev/disk/by-label/${parabolaisolabel}"
+* parabolaisobasedir= Set the base directory where all files reside.
+ Default: "parabola"
+* aitab= Set the path for "aitab" file.
+ Default: ${parabolaisobasedir}/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_${parabolaisolabel}/${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: "parabola"
+* 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/parabolaiso_pxe_common
+
+* ip= This parameter is setup automatically by PXELINUX
+ when option "IPAPPEND" is set to 1 or 2 in config.
+ ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
+ 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=<hardware-address-of-boot-interface>
+ Default: (set via PXELINUX)
+* copy_resolvconf= Copy /etc/resolv.conf from initramfs to live-enviroment.
+ Set to "n" to skip them.
+ Default: "y"
+
+
+** hooks/parabolaiso_pxe_nbd
+
+* parabolaiso_nbd_name= Set NBD export name used by the server.
+ Default: parabolaiso
+* parabolaiso_nbd_srv= Set an IP address where NBD reside.
+ If ${pxeserver} is used, PXE IP will be used.
+ Default: (unset)
+
+
+** hooks/parabolaiso_pxe_http
+
+* parabolaiso_http_srv= Set an HTTP URL (must end with /) where ${parabolaisobasedir}
+ is found with all *.sfs files.
+ In the IP/domain part if ${pxeserver} is used, use PXE IP.
+ Default: (unset)
+* parabolaiso_http_spc= Set the size of tmpfs where *.sfs files are downloaded.
+ Default: "75%"
+
+
+** hooks/parabolaiso_pxe_nfs
+
+* parabolaiso_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)
+* parabolaiso_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/parabolaiso_loop_mnt
+
+* img_label= Set the filesystem label where parabolaiso-image.iso.
+ Default: (unset)
+* img_dev= Device where parabolaiso-image.iso reside.
+ Default: (unset) or "/dev/disk/by-label/${img_label}"
+* img_loop= Full path where parabolaiso-image.iso is located on ${img_dev}
+ Default: (unset)
+
+
+
+*** Boot parameters (configs/releng)
+
+** scripts/choose-mirror
+
+* mirror= Takes a mirror URL and creates a new mirrorlist.
+ When setting mirror=auto, the mirror is taken from
+ archiso_http_srv= in order to keep using the mirror
+ selected in the netboot menu.
+ Default: (unset)
diff --git a/docs/README.build b/docs/README.build
new file mode 100644
index 0000000..f2fb594
--- /dev/null
+++ b/docs/README.build
@@ -0,0 +1,111 @@
+INDEX
+-----
+
+* Build requirements
+* Image types generated by mkparabolaiso.
+* File format for aitab.
+* Why the /isolinux and /parabola/boot/syslinux directories?
+* Building the most basic Parabola GNU/Linux-libre live media. (configs/baseline)
+* Building official Parabola GNU/Linux-libre live media. (configs/releng)
+
+
+
+*** Build requirements
+
+** For mkparabolaiso 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
+ + lynx for fetching the latest installation guide
+
+** For these hooks needs these packages (on target root-image)
+* parabolaiso
+ + (none)
+* parabolaiso_loop_mnt
+ + (none)
+* parabolaiso_pxe_common
+ + mkinitcpio-nfs-utils for ipconfig
+* parabolaiso_pxe_nbd
+ + nbd for nbd-client
+* parabolaiso_pxe_http
+ + curl for curl
+* parabolaiso_pxe_nfs
+ + mkinitcpio-nfs-utils for nfsmount
+* parabolaiso_shutdown
+ + (none)
+
+
+*** Image types generated by mkparabolaiso.
+
+* image-name.sfs SquashFS image with all files directly on it.
+ [read-only, no dm-snapshot is used]
+* 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, btrfs), all files reside on it.
+ [read-write, via COW image with dm-snapshot]
+
+
+*** File format for aitab.
+
+The aitab file holds information about the filesystems images that must be
+created by mkparabolaiso and mounted at initramfs stage from the parabolaiso hook.
+It consists of some fields which define the behaviour of images.
+
+# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size>
+
+<img> Image name without extension (.fs .fs.sfs .sfs).
+<mnt> Mount point.
+<arch> Architecture { i686 | x86_64 | any }.
+<sfs_comp> SquashFS compression type { gzip | lzo | xz }.
+<fs_type> 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.
+<fs_size> 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 /parabola/boot/syslinux directories?
+
+The /isolinux directory holds files needed for the ISOLINUX boot loader
+module of SYSLINUX. ISOLINUX can not find config files on
+/parabola/boot/syslinux, like other boot loaders modules (SYSLINUX, PXELINUX).
+
+
+
+*** Building the most basic Parabola GNU/Linux-libre live media. (configs/baseline)
+
+* Install needed packages.
+ # pacman -S git make squashfs-tools libisoburn rsync --needed
+
+* Install parabolaiso.
+ # git clone git://projects.parabolagnulinux.org/parabolaiso.git
+ # make -C parabolaiso install
+
+* Build a basic iso.
+ # /usr/share/parabolaiso/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 Parabola GNU/Linux-libre live media. (configs/releng)
+
+* Install needed packages.
+ # pacman -S git make squashfs-tools libisoburn dosfstools lynx --needed
+
+* Install parabolaiso.
+ # git clone git://projects.parabolagnulinux.org/parabolaiso.git
+ # make -C parabolaiso install
+
+* Build them!
+ # /usr/share/parabolaiso/configs/releng/build.sh
+
+Note: See build.sh -h for more options. This only runs on x86_64.
diff --git a/docs/README.knownissues b/docs/README.knownissues
new file mode 100644
index 0000000..7002c5e
--- /dev/null
+++ b/docs/README.knownissues
@@ -0,0 +1,12 @@
+*** Know issues
+
+** (1) On shutdown lots of messages from systemd like:
+
+ "Could not unmount /run/parabolaiso/<ABC>: Device or resource busy"
+ "Could not delete loopback /dev/loop<N>: Device or resource busy"
+ This is not a real issue since, all mounted filesystem, loopback devices
+ and device mapper devices made by parabolaiso will be "free" on "shutdown tmpfs"
+ (A.K.A deinitramfs), build at initramfs by [parabolaiso_shutdown] initcpio hook.
+ Proper shutdown is mostly important when persistent is used.
+
+
diff --git a/docs/README.transfer b/docs/README.transfer
new file mode 100644
index 0000000..f6879e0
--- /dev/null
+++ b/docs/README.transfer
@@ -0,0 +1,133 @@
+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]
+ * PC-EFI (ISOHYBRID-GPT) [x86_64 only]
+
+
+
+*** Transfer ISO image to target medium (configs/releng)
+
+ISO images names consist of: parabola-<YYYY>.<MM>.<DD>-dual.iso
+
+Where:
+ <YYYY> Year
+ <MM> Month
+ <DD> Day
+
+
+** 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:
+ <B> scsibus number
+ <T> target number
+ <L> lun number
+ (Note: see cdrecord -scanbus, for these numbers)
+
+
+1) Write it directly using your favorite recording program.
+# cdrecord dev=<B>,<T>,<L> -dao parabola-<YYYY>.<MM>.<DD>-dual.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 "parabola/" or using more than
+ one partition. Just ensure that main boot params options
+ (parabolaisolabel= and parabolaisobasedir=) are set correctly according to your setup.
+
+Nomeclature:
+<DEV-TARGET>: Device node of the drive where ISO contents should be copied
+ (example: /dev/sdx)
+<DEV-TARGET-N>: Device node of the partition on <DEV-TARGET>
+ (example: /dev/sdx1)
+<MNT-TARGET-N>: Mount point path where <DEV-TARGET-N> is mounted
+ (example: /mnt/sdx/1)
+<ISO-SOURCE>: Path to the ISO file parabola-<YYYY>.<MM>.<DD>-dual.iso
+ (example: ~/parabola-2012.07.22-dual.iso)
+<FS-LABEL>: Represents the filesystem label of the <ISO-SOURCE>
+ (example: PARA_201302)
+
+
+* 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 and mark it as "active" (booteable).
+Note: Type "b" for FAT32, "83" for EXTFS or "7" for NTFS.
+# fdisk <DEV-TARGET>
+
+2) Create a FAT32, EXTFS or NTFS filesystem on such partition and setup a label.
+Note: COW is not supported on NTFS.
+# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
+# mkfs.ext4 -L <FS-LABEL> <DEV-TARGET-N>
+# mkfs.ntfs -L <FS-LABEL> <DEV-TARGET-N>
+
+3) Mount target filesystem.
+# mount <DEV-TARGET-N> <MNT-TARGET-N>
+
+4) Extract ISO image on target filesystem.
+# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
+
+5) Install syslinux bootloader on target filesystem.
+# extlinux -i <MNT-TARGET-N>/parabola/boot/syslinux
+
+6) Unmount target filesystem.
+# umount <MNT-TARGET-N>
+
+7) Install syslinux MBR boot code on target drive.
+# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr.bin of=<DEV-TARGET>
+
+
+* 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.
+ If using this does not work, use PC-BIOS (MBR) method instead.
+
+1) Dump ISO file to target medium.
+# dd if=<ISO-SOURCE> of=<DEV-TARGET>
+
+
+* 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 <DEV-TARGET>
+
+2) Create a FAT32 filesystem on such partition and setup a label.
+# mkfs.vfat -F 32 -n <FS-LABEL> <DEV-TARGET-N>
+
+3) Mount target filesystem.
+# mount <DEV-TARGET-N> <MNT-TARGET-N>
+
+4) Extract ISO image on target filesystem.
+# bsdtar -x --exclude=isolinux/ --exclude=EFI/parabolaiso/ --exclude=parabola/boot/syslinux/ -f <ISO-SOURCE> -C <MNT-TARGET-N>
+
+5) Unmount target filesystem.
+# umount <MNT-TARGET-N>
+
+
+* PC-EFI (ISOHYBRID-GPT) [x86_64 only]
+
+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.
+ If using this does not work, use PC-EFI (GPT) method instead.
+
+1) Dump ISO file to target medium.
+# dd if=<ISO-SOURCE> of=<DEV-TARGET>