Commit Graph

116 Commits (033-502)

Author SHA1 Message Date
Radek Vykydal ccebb4c045 Add rd.live.overlay.size option
(cherry picked from commit 18423f7951)
2015-07-03 14:16:48 +02:00
Harald Hoyer 2af6708641 dmsquash-live: do not abort, if user pressed ESC on checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.

(cherry picked from commit 370035d561)
2015-07-03 14:08:35 +02:00
Fabian Deutsch 70b7ec9492 dmsquash: Add squashfs support to rd.live.fsimg
Previously rd.live.fsimg only supported filesystems residing in
(compressed) archives.
Now rd.live.fsimg can also be used when a squashfs image is used.
This is achieved by extracting the rootfs image from the squashfs and
then continue with the default routines for rd.live.fsimg.
In addition some code duplication got removed and some documentation
got added.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
(cherry picked from commit b0472eac11)
2015-07-02 19:47:46 +02:00
Harald Hoyer 23e3c7f95f dmsquash-live: setup the images in /run/initramfs
We want to cleanup / after switch_root. Placing the loop files in /
works, but it is more sane to put them in /run/initramfs

(cherry picked from commit 1f8abe81a9)
2015-07-02 19:47:46 +02:00
Fabian Deutsch db1e692c13 dmsquash: Add rd.live.overlay.thin
This option changes the underlying mechanism for the overlay in the
dmsquash module.
Instead of a plain dm snapshot a dm thin snapshot is used. The advantage
of the thin snapshot is, that the TRIM command is recognized, which
means that at runtime, only the occupied blocks will be claimed from
memory, and freed blocks will really be freed in ram.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
(cherry picked from commit d6e34d362a)
2015-07-02 19:47:46 +02:00
Major Hayden b9c6d2b2af Adding support for read/write filesystem images
A user can provide a filesystem image (rootfs.img) inside a compressed
tarball and that filesystem image will be mounted read/write.  This provides
some benefits over a device mapper snapshot overlay, especially when the
live system becomes full.  The boot command line simple needs
"rd.writable.fsimg" added to utilize this feature.

Additional documentation for this option as well as other live boot
options is included.

Signed-off-by: Major Hayden <major@mhtx.net>
(cherry picked from commit 504c0a8fec)
2015-07-02 19:47:46 +02:00
Harald Hoyer 5648ff27e2 Do not reload systemd with wait_for_dev 2014-08-29 14:15:18 +02:00
Harald Hoyer 5676a6d877 dmsquash-live/dmsquash-liveiso-genrules.sh: s/loop0/loop-control/
If loop is a kernel module, /dev/loop0 will never show up as a udev
event, if the loop module is not manually loaded somewhere.
2014-07-29 11:52:05 +02:00
Brian C. Lane 86fff83927 dmsquash-live: add /dev/mapper/live-base
This is similar to the reason for adding the
/run/initramfs/live-baseloop symlink -- access to the original live
image without overlays.

livemedia-creator does not create a osmin.img, so there is no mountable
device for it to use when rsyncing the live image to the target. It
needs a device that points to the original live image without overlays.

Note that lmc won't be creating osmin.img, since really isn't needed any
longer. Its purpose was to provide a minimal image that could be dd'd to
the target. Now that we use rsync this is no longer necessary.

The included patch adds a /dev/mapper/live-base device that Anaconda can
use whether or not there is an osmin present.
2014-07-29 11:52:02 +02:00
Harald Hoyer e6aafacb23 dmsquash-live/iso-scan: do the iso scan regardless of /dev/loop0
The loop driver could be a module and would never be loaded, so the
iso-scan never takes place.

To let the iso-scan happen, it is now placed into the initqueue/settled
unconditionally.
2013-09-09 16:49:45 +02:00
Harald Hoyer 8d3d72a68c no more global $CMDLINE
Do not use the global variable CMDLINE anymore. Use
CMDLINE=$(getcmdline)
2013-09-05 09:57:48 +02:00
Harald Hoyer af11946054 dracut-functions.sh: inst_multiple == dracut_install 2013-08-07 10:33:15 +02:00
Harald Hoyer 1e057b352a add PARTLABEL and PARTUUID 2013-07-05 15:32:38 +02:00
Harald Hoyer 32bd2fbb4c use "rm --" to guard against filenames beginning with "-" 2013-06-28 10:31:18 +02:00
Harald Hoyer aef0f55791 dmsquash-live/iso-scan: wait until the iso-scan/filename is found
Do not only run once, but wait until all devices are found.
2013-06-12 12:49:03 +02:00
Harald Hoyer d18fd0235b dmsquash-live/dmsquash-live-root.sh: fixup 32214acb3a 2013-05-31 09:04:55 +02:00
Harald Hoyer 32214acb3a dmsquash-live/dmsquash-live-root.sh: add parameter rd.live.squashimg
rd.live.squashimg names the squash image in the rd.live.dir
and defaults to squashfs.img

https://bugzilla.redhat.com/show_bug.cgi?id=789036
https://bugzilla.redhat.com/show_bug.cgi?id=782108
2013-05-30 09:27:54 +02:00
Harald Hoyer 14499534ba dmsquash-live: add support for "iso-scan/filename" kernel parameter
now you can write grub entries like

  set isofile="/Fedora-live.iso"
  loopback loop $isofile
  linux loop)/isolinux/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=Fedora-...
  initrd (loop)/isolinux/initrd0.img
2013-04-15 11:39:32 +02:00
Harald Hoyer ca2c693679 Do not call plymouth with full path 2013-04-11 16:08:26 +02:00
Harald Hoyer 85804a9197 dmsquash-live: force load squashfs kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=922248
2013-03-16 10:31:37 +01:00
Harald Hoyer af3ef92a6b dmsquash-live: add iso9660 kernel module 2013-03-07 15:49:24 +01:00
Harald Hoyer 41eba87b32 dracut_need_initqueue 2013-03-06 17:29:11 +01:00
Frederick Grose 579f385384 Provide devices to enable booting with rd.live.overlay.readonly=1 2013-02-06 13:52:30 +01:00
Harald Hoyer 5204d1d36d dmsquash-live: fixed checkisomd5 service call 2013-01-02 13:56:27 +01:00
Harald Hoyer 040f388331 dmsquash-live: add systemd checkisomd5 service 2012-12-14 09:04:55 +01:00
Will Woods 44f77ac1b0 apply-live-updates.sh: handle updates for /run
/run will get mounted at $NEWROOT/run after switch_root, but it's not
there yet. bind-mount it in place so updates for /run actually land in
/run.

(also: remove a redundant check for existing directories. mkdir -p
doesn't do anything if the directory already exists.)
2012-09-07 14:09:42 +02:00
Frederick Grose 0db77f5a2b dmsquash-live/dmsquash-live-root.sh: Physically write overlay reset at time of request 2012-09-06 10:48:37 +02:00
Harald Hoyer 372c9b9647 dmsquash-live: do not eject medium for live_ram 2012-07-26 09:25:28 +02:00
Harald Hoyer 68e7661ca7 deprecate old command line options 2012-07-25 10:32:42 +02:00
Harald Hoyer 53fe81e752 modules.d/*/module-setup.sh: combine and specify type for installs
To speedup image creation, combine dracut_install calls and specify the exact type.
E.g. inst_script instead of the generic inst.
2012-06-29 12:41:27 +02:00
Amadeusz Żołnowski 1048124120 90dmsquash-live: don't source fs-lib.sh as it is not used 2012-06-29 12:41:27 +02:00
Juan RP 8442dc45b6 dmsquash-live: do not hardcode path to mount(8) in generated hook.
In some cases (at least in mine) mount(8) is in /usr/bin/mount and
not in /bin/mount as dmsquash-live-root.sh expects. PATH is set to
/usr/bin:/usr/sbin:/sbin:/bin in that script anyway.
2012-05-29 09:15:34 +02:00
Brian C. Lane 37427748d1 Fail to boot if mediacheck fails (#817419)
The return value of checkisomd5 was being ignored.
2012-05-10 11:52:45 +02:00
Harald Hoyer b2de89c5dc 90dmsquash-live/dmsquash-live-root.sh: add symlink
/run/initramfs/livedev
2012-03-29 12:53:53 +02:00
Harald Hoyer 2c0317213e get rid of /tmp/root.info 2012-03-08 11:00:29 +01:00
Will Woods b43d651511 fix apply-live-updates failing because of /lib symlink
Since cp won't copy a directory over a symlink, any updates that were
supposed to go into e.g. /lib would get dropped if you had /updates/lib
as an actual directory, but the target system had /lib->/usr/lib.
2012-03-08 10:58:42 +01:00
Harald Hoyer 552ecca6db Renamed all shell scripts to *.sh 2012-02-22 15:15:21 +01: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
Harald Hoyer 027dbc9f85 dmsquash-live: really changed /dev/live-baseloop to /run/initramfs/
Forgot to amend my change to ce32e32f2a
2012-01-20 12:02:15 +01:00
Will Woods a75c3afe68 minor cleanups in parsing for dmsquash-live and livenet
- use wait_for_dev in livenet
- clarify log message and fix missing newline in dmsquash-live

Signed-off-by: Will Woods <wwoods@redhat.com>
2012-01-13 11:50:53 +01:00
Brian C. Lane ce32e32f2a Create a symlink for the live image's base loop device
It is useful to know that loop device that the live image's / is mounted
from. Make a /run/initramfs/live-baseloop symlink that points to it.

Edited-By: harald@redhat.com: changed /dev/live-baseloop
                              to /run/initramfs/live-baseloop
2012-01-13 11:38:48 +01:00
Colin Guthrie 09ee7234b6 dmsquash: Ensure the 'loop' kernel module is included and loaded. 2012-01-09 13:34:17 +01:00
Brian C. Lane 14599cd760 Fix live update script (#769970)
pushd and popd are not available in the shell used by dracut.
2012-01-05 11:02:04 +01:00
Harald Hoyer bf7487ab18 90dmsquash-live: wait for the /dev/mapper/live-rw device
wait for the /dev/mapper/live-rw device
2011-11-16 14:03:38 +01:00
Harald Hoyer b0692d0311 add wait_for_dev() and wait_for_mount() 2011-11-15 09:47:16 +01:00
Will Woods 03b5494ca1 apply-live-updates.sh: copy without glob
cp $SRC/* $DEST will skip dotfiles in $SRC.
( cd $SRC; cp -a -t $DEST . ) will copy everything.
2011-10-21 13:18:06 +02:00
Harald Hoyer bfdc0eba0b 90dmsquash-live: do not install by default 2011-10-21 10:29:58 +02:00
Will Woods 54ba7acba1 dmsquash-live: fix log message about root/liveroot 2011-10-18 17:13:50 +02:00
Harald Hoyer ca8d4e8933 Do not use /run/udev/rules.d for udev rules
for rules, which should not be called in the real root.

Stale rules can cause this:
https://bugzilla.redhat.com/show_bug.cgi?id=734096
2011-09-19 12:21:51 +02:00
Harald Hoyer e41e5b78c6 90dmsquash-live: do not symlink to /dev/live
/dev/live should not be used anyway
2011-09-19 12:20:11 +02:00