Commit a7a100aa authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

[archiso] README update



* Added boot parameters.
* Reorder and clarify build steps.

Signed-off-by: default avatarGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
parent 85d243ff
INDEX 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. * Image types generated by mkarchiso.
* File format for aitab. * File format for aitab.
* Why the /isolinux and /arch/boot/syslinux directories? * Why the /isolinux and /arch/boot/syslinux directories?
...@@ -9,6 +15,78 @@ INDEX ...@@ -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=<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)
** 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 types generated by mkarchiso.
* image-name.sfs SquashFS image with all files directly on it. * 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. ...@@ -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) *** Building the most basic Arch Linux live media. (configs/baseline)
* First install devtools if needed, mkarchroot needs it. * Install devtools if needed, mkarchroot needs it
[host] # pacman -S devtools [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) (prefix with linux32 if you want to build a 32 bits enviroment under 64 bits)
[host] # mkarchroot /tmp/chroot base [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 [host] # mkarchroot -r bash /tmp/chroot
* Create a loopback device. * 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 [chroot] # mknod /dev/loop0 b 7 0
* Setup a mirror. * Setup a mirror.
[chroot] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist [chroot] # echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist
* Install aditional packages needed for mkarchiso. * Install aditional packages needed for mkarchiso.
(git is only needed to get a copy of archiso.git) [chroot] # pacman -S devtools squashfs-tools syslinux cdrkit
[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
* Build a basic iso. * 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 [chroot] # ./build.sh
* Exit from chroot. * Exit from chroot.
...@@ -105,52 +182,51 @@ Note: These steps should be done with 64 bits support. ...@@ -105,52 +182,51 @@ Note: These steps should be done with 64 bits support.
* Prepare a 32 bit chroot enviroment. * Prepare a 32 bit chroot enviroment.
linux32 mkarchroot /tmp/chroot32 base [host64] # linux32 mkarchroot /tmp/chroot32 base
linux32 mkarchroot -r bash /tmp/chroot32 [host64] # linux32 mkarchroot -r bash /tmp/chroot32
echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist [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 [chroot32] # pacman -S devtools squashfs-tools syslinux cdrkit mkinitcpio-nfs-utils nbd
exit [chroot32] # exit
* Prepare a 64 bits chroot enviroment. * Prepare a 64 bits chroot enviroment.
mkarchroot /tmp/chroot64 base [host64] # mkarchroot /tmp/chroot64 base
mkarchroot -r bash /tmp/chroot64 [host64] # mkarchroot -r bash /tmp/chroot64
echo 'Server = MIRROR/archlinux/$repo/os/$arch' >> /etc/pacman.d/mirrorlist [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 [chroot64] # pacman -S devtools squashfs-tools syslinux cdrkit mkinitcpio-nfs-utils nbd
exit [chroot64] # exit
* Create a shared directory which archiso can access from both chroot enviroments. * Install archiso on both chroots.
mkdir /tmp/shared [host64] # git clone git://projects.archlinux.org/archiso.git
cd /tmp/shared [host64] # make -C archiso/archiso DESTDIR=/tmp/chroot32 install
git clone git://github.com/djgera/archiso.git -b dm-snapshot [host64] # make -C archiso/archiso DESTDIR=/tmp/chroot64 install
cd
mount --bind /tmp/shared /tmp/chroot32/tmp * Create a shared /tmp directory between two chroots for working.
mount --bind /tmp/shared /tmp/chroot64/tmp
[host64] # mkdir /tmp/shared
* Enter 32 bits chroot enviroment, install mkarchiso, [host64] # chmod 1777 /tmp/shared
then build core and netinstall single images. [host64] # mount --bind /tmp/shared /tmp/chroot32/tmp
[host64] # mount --bind /tmp/shared /tmp/chroot64/tmp
linux32 mkarchroot -r bash /tmp/chroot32
mknod /dev/loop1032 b 7 1032 * Enter 32 bits chroot enviroment then build core and netinstall single images.
cd /tmp/archiso/archiso
make install-program [chroot32] # linux32 mkarchroot -r bash /tmp/chroot32
cd ../configs/releng/ [chroot32] # mknod /dev/loop1032 b 7 1032 #assumed loop.max_part=0 (by default)
./build.sh all_iso_single [chroot32] # cp -r /usr/share/archiso/configs/releng /tmp
[chroot32] # cd /tmp/releng
* Enter 64 bits chroot enviroment, install mkarchiso, [chroot32] # ./build.sh all_iso_single
then build core and netinstall single images.
* Enter 64 bits chroot enviroment then build core and netinstall single images.
mkarchroot -r bash /tmp/chroot64
mknod /dev/loop1064 b 7 1064 [chroot64] # mkarchroot -r bash /tmp/chroot64
cd /tmp/archiso/archiso [chroot64] # mknod /dev/loop1064 b 7 1064 #assumed loop.max_part=0 (by default)
make install-program [chroot64] # cp -r /usr/share/archiso/configs/releng /tmp
cd ../configs/releng/ [chroot64] # cd /tmp/releng
./build.sh all_iso_single [chroot64] # ./build.sh all_iso_single
* Finally build core and netinstall dual images * Build core and netinstall dual images from any of the chroot enviroments.
from any of the chroot enviroments. (The final result is the same).
[host64] mkarchroot -r bash /tmp/chroot64
mkarchroot -r bash /tmp/chroot64 [chroot64] # cd /tmp/releng
cd /tmp/archiso/configs/releng/ [chroot64] # ./build.sh all_iso_dual
./build.sh all_iso_dual
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment