Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/hooks/archiso
AgeCommit message (Collapse)Author
2022-01-22hooks/archiso: merge _mnt_sfs and _mnt_erofs into one funtion _mnt_fsnl6720
Now that EROFS is detected by util-linux, the actions to mount a squashfs or erofs image are basically the same. The _mnt_sfs and _mnt_erofs functions can be merged into one: _mnt_fs. If neither airootfs.sfs nor airootfs.erofs are found, error out to interactive shell.
2022-01-03hooks/archiso: mount cow_device read-only at first and remount it read-write ↵nl6720
right after This prevents errors when the device is already mounted read-only somewhere else (e.g. if cow_device and archisodevice are the same). Partially reverts d0d7eb25cf503753cb1452756059a281289e7a41 Fixes #9.
2021-12-10hooks/archiso{,_loop_mnt}: remove /run/archiso/used_block_devicesnl6720
Now that the archiso_shutdown is removed, nothing uses this file anymore and it is not needed. Additionally, cowspace is mounted read-write on first mount, not mounted read-only and then remounted read-write.
2021-12-02hooks/archiso: remove unneeded file system type from _mnt_devnl6720
It was only used because util-linux did not support detecting EROFS and the mount command required `-t erofs` to mount EROFS. util-linux 2.37 supports detecting EROFS; see https://github.com/util-linux/util-linux/commit/7b2a874e2ee306e9503210f8aa5eed7f53c06755. Now that the workaround is not needed anymore, it can be removed.
2021-11-02hooks/archiso: show GPG "GOODSIG" line when verifying the signaturenl6720
2021-07-31Fix formatting with shfmtDavid Runge
{hooks,install,script}/*: Fix formatting in all scripts using shfmt. Replace a few echo calls with printf.
2021-05-14Apply 1 suggestion(s) to 1 file(s)Simon Wilper
2021-05-14add optional pv toolSimon Wilper
use pv to give feedback on copying the airootfs to RAM when copytoram kernel parameter is given
2021-03-09Support EROFSnl6720
EROFS, like Squashfs, is a read-only file system. It can be used to store airootfs in an image file. Its advantage is the support for POSIX ACLs. EROFS downside is that currently it only supports LZ4 compression (LZMA support is not yet fully implemented). A difference from Squashfs is that, EROFS stores change time (ctime) not modification time (mtime). The reverse is true for Squashfs. Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/59
2021-03-09archiso/initcpio/hooks/archiso: remove redundant /sfs/ from airootfs mount pointnl6720
Remove /run/archiso/bootmnt directory if nothing is mounted there. An empty directory is just confusing.
2020-08-11archiso/initcpio/hooks/archiso: remove option terminator from the blockdev ↵nl6720
command Apparently blockdev does not support it. In an ISO made using '-s img' (Squashfs with dm-snapshot), it results in: blockdev: Unknown command: --
2020-07-29Add license and basic documentationDavid Runge
LICENSE: Add GPL-3.0 license. {{archiso,configs}/*,.editorconfig,.gitlab-ci.yml}: Add SPDX license identifier. Makefile: Add SPDX license identifier. Install the `run_archiso.sh` script as global executable `run_archiso`. Use -D and -t flags to install to install files more generically (without a previous call to install the directory). README.rst: Add README outlining the project's scope, how to build images from the profiles and how to test. AUTHORS.rst: Add list of all direct contributors to the repository. CONTRIBUTING.rst: Add basic contribution guidelines, explaining the linter and the license in use. Closes #7 Closes #3
2020-07-17Separate custom comments from shellcheck commentsnl6720
Having a shellcheck directive and custom comments in the same line can trigger SC1107 on old versions of shellcheck.
2020-07-11Adding linting for initcpio scriptsDavid Runge
archiso/initcpio/install/*: Setting bash shebang for all scripts and making them comform with shellcheck. archiso/initcpio/{hooks,script}/*: Setting ash shebang for all scripts and making them comform with shellcheck (for dash, as shellcheck has no ash specific ruleset). Essentially the ash based scripts should be POSIX compliant as much as possible to have an easier time writing, debugging and maintaining them. Ensuring that variables are not treated as options and introducing variable quoting. .gitlab-ci.yml: Integrating shellcheck for initcpio scripts. Closes #32
2018-06-29Remove cow file early for non-persistent systemsChristian Hesse
The kernel has an open file handle after setting up the mapping. We can remove it early to make sure it is gone on shutdown. This helps to keep the cow_device clean for non-persistent systems where cow_directory contains a version specific string. Signed-off-by: Christian Hesse <mail@eworm.de>
2017-10-17use a stronger hashing algorithmChristian Hesse
Nobody wants to use md5 these days... Signed-off-by: Christian Hesse <mail@eworm.de>
2016-02-28Add the verify=y option to verify the squashfs signature with gpgThomas Bächler
2016-02-04fix boot parameters for mount optionsChristian Hesse
Fixes: e7ea394e5181de37a403b29e55d89afc34fdb867 Signed-off-by: Christian Hesse <mail@eworm.de>
2015-12-13add boot params archisoflags= and cow_flags= for mount optionsChristian Hesse
Having files on btrfs subvolumes requires to give mount options. Add boot params archisoflags= and cow_flags= for this purpose. Boot parameters could look like this: ... archisodevice=/dev/sdaX archisoflags=subvolume=isos cow_device=/dev/sdaX cow_flags=subvolume=persist ... Signed-off-by: Christian Hesse <mail@eworm.de>
2015-05-29limit access to cow directoryChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de>
2015-05-29explicitly detach loop device on umount and silent losetup errorChristian Hesse
Umount detaches the loop device automatically, but let's make it explicit to be sure. Additionally losetup gives: losetup: /dev/loop0: detach failed: No such device or address This is kind of expected, let's silent the error message. Signed-off-by: Christian Hesse <mail@eworm.de>
2015-01-27[archiso] Rename cowfile_size to cow_spacesize=Gerardo Exequiel Pozzi
The name is more relevant since the usage is shared for both dm-snapshot and overlayfs. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-01-27[archiso] Add optional OverlayFS supportGerardo Exequiel Pozzi
This is the first attemp to test overlayfs in archiso. The current dm-snapshot mode is keep and is enabled by default, while the new mode is enabled via "-s sfs" to mkarchiso. No new boot parameters are added, since archiso hooks detects if the .sfs file is for dm-snapshot (airootfs.img inside) or for overlayfs. Persistence is supported in overlayfs mode using the same options (cowlabel or cowdevice), but warning while in dm-snapshot mode, only one file is used (airootfs.cow), in overlayfs mode internal files for workdir/ and upperdir/ are allocated, so you can not use VFAT or NTFS. To test this, you need to enable [testing] in pacman.conf from releng profile and edit build.sh then add "-s sfs" in make_prepare() Look at: setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare Replace with: setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -s sfs -D "${install_dir}" prepare The build requires just half of space that the build for dm-snapshot, since there is no ext4 img ;) Just to remember: there is no space gain in .sfs (just about 2M) There is at least one thing during boot with machine-id service: Dec 24 03:31:39 archiso systemd-machine-id-commit[183]: Failed to unmount transient /etc/machine-id file in our private namespace: Invalid argument Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2015-01-02allow to change dm snapshot chunksizeChristian Hesse
Copying big amount of data results in bad performance as data is written in chunks of 4kiB (8 * 512 bytes). The default is not changed but can be overwritten. Signed-off-by: Christian Hesse <mail@eworm.de>
2015-01-02use consistent syntax for boot parameter processingChristian Hesse
Signed-off-by: Christian Hesse <mail@eworm.de>
2014-12-13[archiso] Merge cowspace_size= option in cowfile_size=Gerardo Exequiel Pozzi
Since now cowspace_size == cowfile_size (only one file inside) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2014-10-13[archiso] Change cowfile_size= behaviorGerardo Exequiel Pozzi
Move from percent to explicit size and set a default of 256M (sparse) Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
2014-08-08Reintroduce the possibility to force an architectureLukas Fleischer
Among other things, 0bb94de ([archiso] Drop aitab support, 2014-06-28) removed the possibility to manually set a specific architecture by using kernel parameters. This, however, is useful, e.g. when installing Arch Linux on a device that reports itself as i586 but works fine with the i686 flavor. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2014-06-28[archiso] Rework checksum functionGerardo Exequiel Pozzi
2014-06-28[archiso] rename airootfs.fs.sfs to airootfs.sfsGerardo Exequiel Pozzi
* Make it ISO9660 friendly (extra dot "." is replaced by "_") * Was used when support both .fs.sfs and .sfs
2014-06-28[archiso] Drop aitab supportGerardo Exequiel Pozzi
Always create one filesystem of a fixed size (32G), format (ext4) and know name "airootfs". Simplify logic a lot.
2013-01-08[archiso] Avoid integer overflow when .fs is > 10.2GGerardo Exequiel Pozzi
2012-10-13[archiso] Introduce cowfile_size= bootparamGerardo Exequiel Pozzi
If not set, nothing is changed in current behaviour. Since dm-snapshot allows to use as "COW" a file with any size, without caring about the the size of "origin", we can avoid creating a "COW" file of the same size as the "origin". This is really useful, when using as cow_device= a filesystem that is VFAT where sparse files are not supported, so if root-image.fs is 1000M, passing cowfile_size=25% will create a root-image.cow of 250M instead of 1000M. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2012-10-06Use tmpfs for /etc/pacman.d/gnupg instead of a symlink to /runPierre Schmitz
This fixes FS#31815 Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-08-25[archiso] Rework Makefile / Reorder filesGerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
2008-09-06Split mkarchiso and configs into logical partsAaron Griffin
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2008-06-21Fix CD-ROM EjectionSimo Leone
Fixes FS#10206 Setting the drive to autoeject causes udevadm trigger to always eject the device if it isn't mounted. Signed-off-by: Simo Leone <simo@archlinux.org>
2008-05-17modprobe loop moduleSimo Leone
udev doesn't modprobe loop by itself so we have to ask it nicely. Signed-off-by: Simo Leone <simo@archlinux.org>
2008-03-27Print a message when copytoram is being usedDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-24Remove dupe code for mounting base imageSimo Leone
Also improved variable naming. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-24Make _mnt_squashfs more genericSimo Leone
No longer assume the image is in the addons directory. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-24Fixed addon config parsingSimo Leone
The check for a comment line wasn't actually working before. Shell quoting ftl. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-24Make default-config an overlaySimo Leone
This allows the root image to remain a [mostly] pristine image, and turns default liveCD configurations into an overlay, rather than copying them into the root image. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-24Functionalize addon mountingSimo Leone
Moved addon mounting code into functions. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-16Implement fstab-like addon configSimo Leone
For now all it handles is bind mounting and squashfs images that have to overlay at the root. The config file syntax is obviously borrowed from fstab. This is far from final, much of it could use some cleanup. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-16Implemented a simple addon mechanismSimo Leone
If asked to do so, mkarchiso simply copies a directory full of addons to the iso root. On boot, after union-mounting /real_root, the archiso hook will look for and source an addon config file. This file is a plain old bash script, which makes it quite flexible. The addon config should be written to take care of any mounting that needs to be done, an example of typical tasks is also included. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-10Slight updates to initcpio hooksDan McGee
* Get rid of unnecessary trailing slash on BOOT_MOUNT variable * Fix -eq/= mixup- we are comparing strings, not numbers * Don't unmount /dev, as it was never mounted Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-10Can now break out of archiso hook into dashSimo Leone
Usually initcpio's init takes care of this, but it never executes that far, so this is copypasta. Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-10Update vim modelines on most filesDan McGee
Move the vim modelines to the bottom, and add the tab settings. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-09Fixed references to archiso.sqfsSimo Leone
Appears to have been changed to archlive.sqfs, a couple hooks refered to the old name and didn't work. Signed-off-by: Simo Leone <simo@archlinux.org>