Commit Graph

17 Commits (a02d17f7af94f6d12eae8ca32bdfd4289c8c9153)

Author SHA1 Message Date
Harald Hoyer 29f335070a fix(dracut-initramfs-restore.sh): shellcheck for dracut-initramfs-restore.sh 2021-03-31 09:32:33 +02:00
Harald Hoyer 9a52c3fdb0 style: shfmt reformat
reproducible with:

```
$ shfmt_version=3.0.1
$ wget "https://github.com/mvdan/sh/releases/download/v${shfmt_version}/shfmt_v${shfmt_version}_linux_amd64" -O shfmt
$ chmod u+x shfmt
$ ./shfmt -w .
```
2021-03-13 20:10:43 +01:00
Kairui Song 8f7c332e48 refactor(squash): structure in a cleaner way
Simplify the squash mount layout. Instead of overlay on each top
directory (/etc, /usr), just mount and switch_root into the squash
image, with a overlay on top of it.

Also install the binaries and setup scripts separately, so the squash
setup code and the squash image content is independent of each other,
all squash setup script and binaries can be deleted safely upon
switch_root.

With this change, previous squash clean up service and other tricky
implementations are all gone.

This commit depends on systemd commits from:
https://github.com/systemd/systemd/pull/18124

Previouly systemd doesn't recognize non-ramfs initramfs, now this is
doable with SYSTEMD_IN_INITRD=lenient

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-03-09 13:40:35 +00:00
Jóhann B. Guðmundsson ba2e760b91 fix: adding missing efi paths 2021-02-10 14:39:54 +01:00
Lukas Nykryn 76522d58c3 dracut-initramfs-restore: set selinux labels 2018-11-27 16:05:48 +01:00
Kairui Song a60af53413 squash: unsquash the root image instead of mounting it on shutdown
When building squash image, squash module forgot to install the new
shutdown.sh, and the shutdown hooks are always skipped on ordinary
shutdown if squash module is enabled.

The new shutdown.sh will remount the squash image and then everything
will just work, but currently re-mounting the squash image on shutdown
may have selinux problem and make the system hang, and there is no
easy way to fix it.

So skip fixing the shutdown.sh not being install problem, instead
just drop the new shutdown.sh, and unsquash the image on ordinary
shutdown, which is safer and should always work.

Signed-off-by: Kairui Song <kasong@redhat.com>
2018-11-12 09:04:14 +01:00
tpgxyz 7dbadcc749 add support for Zstandard 2017-09-05 01:23:38 +02:00
Alexander Tsoy da5304aabc dracut-initramfs-restore: make mount error nonfatal
Script enables errexit option (set -e). So if /boot is not a mount point
or is already mounted, then script dies after unsuccessful mount
command. Fix this by always returning successful result.
2015-07-28 15:04:56 +02:00
Harald Hoyer 4f0c7fc917 dracut-initramfs-restore.sh: try to mount /boot
This is very useful when /boot has the "noauto" option.

Thanks to Igor Filakhtov
2015-06-02 11:47:04 +02:00
Harald Hoyer 25b987fed6 Fixed the dracut-shutdown.service
Make the service a oneshot service, which remains after exit. This
ensures, that the ExecStop is executed later on, if a shutdown occurs.
2014-12-08 11:32:26 +01:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer 0626cbe923 dracut-initramfs-restore: fix unpacking with early microcode 2014-03-20 13:18:13 +01:00
Koen Kooi 149965bd13 dracut-initramfs-restore,lsinitrd: add LZ4 support
Dracut claims to have LZ4 support, but trying to use it will result in an xzcat failure at the end due to missing CAT support.

The lz4 command chokes on '--', so abstract that out into the CAT select.

Something similar will need to be done for LZO.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2014-01-24 12:49:16 +01:00
Harald Hoyer 32bd2fbb4c use "rm --" to guard against filenames beginning with "-" 2013-06-28 10:31:18 +02:00
Harald Hoyer 449b0e0707 dracut-initramfs-restore.sh: also look for image in boot loader spec dir 2013-03-13 13:09:13 +01:00
Harald Hoyer 50bc2253d3 do not use dracut shutdown, if something failed while unpacking
also require "xzcat"
2012-04-05 13:54:38 +02:00
Harald Hoyer fb67e4aa36 shutdown on demand
Do not save and restore the initramfs, but instead, just unpack the
default initramfs for shutdown on shutdown.
2012-02-13 07:08:08 +01:00