From a7a100aabccaa555e7325f20d7f9c307ac059157 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Tue, 21 Jun 2011 22:56:57 -0300 Subject: [archiso] README update * Added boot parameters. * Reorder and clarify build steps. Signed-off-by: Gerardo Exequiel Pozzi --- README | 196 +++++++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 136 insertions(+), 60 deletions(-) diff --git a/README b/README index dee3a50..cff5bed 100644 --- a/README +++ b/README @@ -1,6 +1,12 @@ INDEX ----- +* Boot parameters (initramfs stage) + * hooks/archiso + * hooks/archiso_pxe_nbd + * hooks/archiso_loop_mnt +* Boot parameters (only for configs/releng) + * etc/rc.conf * Image types generated by mkarchiso. * File format for aitab. * Why the /isolinux and /arch/boot/syslinux directories? @@ -9,6 +15,78 @@ INDEX +*** Boot parameters (initramfs stage) + +** hooks/archiso + +* archisolabel= Set the filesystem label where archiso files reside. + Default: (unset) +* archisodevice= Set the device node where archiso medium is located. + Default: "/dev/disk/by-label/${archisolabel}" +* archisobasedir= Set the base directory where all files reside. + Default: "arch" +* aitab= Set the path for "aitab" file. + Default: ${archisobasedir}/aitab +* copytoram= If set to "y" or just "copytoram" without arguments, + all SquashFS are copied to "RAM". + Default: (unset) +* cowspace_size= Set the size of tmpfs /cowspace. This space is used for + Copy-On-Write files of dm-snapshot. + (directory not visible outside initramfs) + Size is in bytes (suffix with "k", "m" and "g") or + in percentage of available RAM. + Default: "75%" +* copytoram_size= Set the size of tmpfs /cowpytoram. This space is used for + copy of all SquashFS images used, if copytoram=y. + (directory not visible outside initramfs) + Size is in bytes (suffix with "k", "m" and "g") or + in percentage of available RAM. + Default: "75%" +* 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/archiso_pxe_nbd + +* ip= This parameter is setup automatically by PXELINUX + when option "IPAPPEND" is set to 1 or 2 in config. + ip=::: + 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= + Default: (set via PXELINUX) + + +** hooks/archiso_loop_mnt + +* img_dev= Device where archiso-image.iso reside. + Default: (unset) +* img_loop= Full path where archiso-image.iso is located on ${img_dev} + Default: (unset) + + + +*** Boot parameters (only for configs/releng) + +** /etc/rc.conf + +By default these parameters are set by default to these values +if nothing is specified on command line. + +* locale= "en_US.UTF-8" +* daemon_locale= "no" +* hardwareclock= "UTC" +* timezone= "Canada/Pacific" +* keymap= "us" +* consolefont= (unset) +* consolemap= (unset) +* usecolor= "yes" + + + *** Image types generated by mkarchiso. * image-name.sfs SquashFS image with all files directly on it. @@ -60,35 +138,34 @@ When make your custom boot-pendrive, you need to copy /arch directory to it. *** Building the most basic Arch Linux live media. (configs/baseline) -* First install devtools if needed, mkarchroot needs it. - [host] # pacman -S devtools +* Install devtools if needed, mkarchroot needs it + [host] # pacman -S devtools --needed -* Create a chroot to work on it. +* Create a base chroot to work on it. (prefix with linux32 if you want to build a 32 bits enviroment under 64 bits) [host] # mkarchroot /tmp/chroot base -* Enter it. (prefix with linux32 if needed). +* Install archiso on chroot (needs git and make) + [host] # pacman -S git make --needed + [host] # git clone git://projects.archlinux.org/archiso.git + [host] # make -C archiso/archiso DESTDIR=/tmp/chroot install + +* Enter to chroot (prefix with linux32 if needed). [host] # mkarchroot -r bash /tmp/chroot * Create a loopback device. - (mkarchiso does not create it, use other number if not available) + (mkarchroot does not create it, use other number if not available) [chroot] # mknod /dev/loop0 b 7 0 * Setup a mirror. [chroot] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist * Install aditional packages needed for mkarchiso. - (git is only needed to get a copy of archiso.git) - [chroot] # pacman -S git squashfs-tools syslinux devtools cdrkit make - -* Install archiso. - [chroot] # cd /tmp - [chroot] # git clone git://projects.archlinux.org/archiso.git - [chroot] # cd archiso/archiso - [chroot] # make install-program + [chroot] # pacman -S devtools squashfs-tools syslinux cdrkit * Build a basic iso. - [chroot] # cd /tmp/archiso/configs/baseline + [chroot] # cp -r /usr/share/archiso/configs/baseline /tmp + [chroot] # cd /tmp/baseline [chroot] # ./build.sh * Exit from chroot. @@ -105,52 +182,51 @@ Note: These steps should be done with 64 bits support. * Prepare a 32 bit chroot enviroment. -linux32 mkarchroot /tmp/chroot32 base -linux32 mkarchroot -r bash /tmp/chroot32 -echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist -pacman -S squashfs-tools syslinux devtools cdrkit make mkinitcpio-nfs-utils nbd --noconfirm --needed -exit + [host64] # linux32 mkarchroot /tmp/chroot32 base + [host64] # linux32 mkarchroot -r bash /tmp/chroot32 + [chroot32] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist + [chroot32] # pacman -S devtools squashfs-tools syslinux cdrkit mkinitcpio-nfs-utils nbd + [chroot32] # exit * Prepare a 64 bits chroot enviroment. -mkarchroot /tmp/chroot64 base -mkarchroot -r bash /tmp/chroot64 -echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist -pacman -S squashfs-tools syslinux devtools cdrkit make mkinitcpio-nfs-utils nbd --noconfirm --needed -exit - -* Create a shared directory which archiso can access from both chroot enviroments. - -mkdir /tmp/shared -cd /tmp/shared -git clone git://github.com/djgera/archiso.git -b dm-snapshot -cd -mount --bind /tmp/shared /tmp/chroot32/tmp -mount --bind /tmp/shared /tmp/chroot64/tmp - -* Enter 32 bits chroot enviroment, install mkarchiso, - then build core and netinstall single images. - -linux32 mkarchroot -r bash /tmp/chroot32 -mknod /dev/loop1032 b 7 1032 -cd /tmp/archiso/archiso -make install-program -cd ../configs/releng/ -./build.sh all_iso_single - -* Enter 64 bits chroot enviroment, install mkarchiso, - then build core and netinstall single images. - -mkarchroot -r bash /tmp/chroot64 -mknod /dev/loop1064 b 7 1064 -cd /tmp/archiso/archiso -make install-program -cd ../configs/releng/ -./build.sh all_iso_single - -* Finally build core and netinstall dual images - from any of the chroot enviroments. (The final result is the same). - -mkarchroot -r bash /tmp/chroot64 -cd /tmp/archiso/configs/releng/ -./build.sh all_iso_dual + [host64] # mkarchroot /tmp/chroot64 base + [host64] # mkarchroot -r bash /tmp/chroot64 + [chroot64] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist + [chroot64] # pacman -S devtools squashfs-tools syslinux cdrkit mkinitcpio-nfs-utils nbd + [chroot64] # exit + +* Install archiso on both chroots. + + [host64] # git clone git://projects.archlinux.org/archiso.git + [host64] # make -C archiso/archiso DESTDIR=/tmp/chroot32 install + [host64] # make -C archiso/archiso DESTDIR=/tmp/chroot64 install + +* Create a shared /tmp directory between two chroots for working. + + [host64] # mkdir /tmp/shared + [host64] # chmod 1777 /tmp/shared + [host64] # mount --bind /tmp/shared /tmp/chroot32/tmp + [host64] # mount --bind /tmp/shared /tmp/chroot64/tmp + +* Enter 32 bits chroot enviroment then build core and netinstall single images. + + [chroot32] # linux32 mkarchroot -r bash /tmp/chroot32 + [chroot32] # mknod /dev/loop1032 b 7 1032 #assumed loop.max_part=0 (by default) + [chroot32] # cp -r /usr/share/archiso/configs/releng /tmp + [chroot32] # cd /tmp/releng + [chroot32] # ./build.sh all_iso_single + +* Enter 64 bits chroot enviroment then build core and netinstall single images. + + [chroot64] # mkarchroot -r bash /tmp/chroot64 + [chroot64] # mknod /dev/loop1064 b 7 1064 #assumed loop.max_part=0 (by default) + [chroot64] # cp -r /usr/share/archiso/configs/releng /tmp + [chroot64] # cd /tmp/releng + [chroot64] # ./build.sh all_iso_single + +* Build core and netinstall dual images from any of the chroot enviroments. + + [host64] mkarchroot -r bash /tmp/chroot64 + [chroot64] # cd /tmp/releng + [chroot64] # ./build.sh all_iso_dual -- cgit v1.2.3-70-g09d2