Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
{hooks,install,script}/*:
Fix formatting in all scripts using shfmt.
Replace a few echo calls with printf.
|
|
|
|
use pv to give feedback on copying the airootfs to RAM when copytoram
kernel parameter is given
|
|
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
|
|
Remove /run/archiso/bootmnt directory if nothing is mounted there. An empty directory is just confusing.
|
|
command
Apparently blockdev does not support it.
In an ISO made using '-s img' (Squashfs with dm-snapshot), it results in:
blockdev: Unknown command: --
|
|
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
|
|
Having a shellcheck directive and custom comments in the same line can trigger SC1107 on old versions of shellcheck.
|
|
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
|
|
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>
|
|
Nobody wants to use md5 these days...
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
|
|
Fixes: e7ea394e5181de37a403b29e55d89afc34fdb867
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
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>
|
|
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Since now cowspace_size == cowfile_size (only one file inside)
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
|
|
Move from percent to explicit size and set a default of 256M (sparse)
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@gmail.com>
|
|
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>
|
|
|
|
* Make it ISO9660 friendly (extra dot "." is replaced by "_")
* Was used when support both .fs.sfs and .sfs
|
|
Always create one filesystem of a fixed size (32G), format (ext4) and
know name "airootfs".
Simplify logic a lot.
|
|
|
|
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>
|
|
This fixes FS#31815
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
|
|
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
|
|
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
|
|
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>
|
|
udev doesn't modprobe loop by itself so we have
to ask it nicely.
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
Also improved variable naming.
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
No longer assume the image is in the addons
directory.
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
The check for a comment line wasn't actually working
before. Shell quoting ftl.
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
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>
|
|
Moved addon mounting code into functions.
Signed-off-by: Simo Leone <simo@archlinux.org>
|
|
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>
|
|
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>
|
|
* 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>
|
|
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>
|
|
Move the vim modelines to the bottom, and add the tab settings.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|