[Fedora-livecd-list] size of device on which anaconda lays down a filesystem?

Alan Pevec apevec at gmail.com
Sat Jul 31 15:37:25 UTC 2010


On Sat, Jul 31, 2010 at 4:41 PM, Bruno Wolff III <bruno at wolff.to> wrote:
> On Thu, Jul 29, 2010 at 17:36:16 -0500,
>  paul.armor at usbank.com wrote:
>>
>> It's like the block device that lives under the filesystem isn't actually
>> "as big" as the fs that's layed down on top of it?
>
> This is done with an overlay. The base file system is readonly. If you
> aren't using a disk based overlay (for USB devices), you'll be limited to
> whatever is used for the ramfs overlay. I don't know exactly how that is
> sized, but it is probably some minimum and a fraction of your ram. So it
> doesn't seem surprising that you get the same limit even with different sizes
> for the image saved on the cd, dvd or usb device.

Right, in EL-5 version there's older livecd initrd generator script
called "mayflower" which is limited to in-memory overlay (sparse file
in initramfs).
It does not support disk based overlay, that was added later in Fedora
mkliveinitrd after RHEL5 branched.
This is the relevant excerpt from mayflower:

do_live_from_base_loop() {
    # create a sparse file for the overlay
    dd if=/dev/null of=/overlay bs=1024 count=1 seek=$((512*1024)) 2> /dev/null
    OVERLAY_LOOPDEV=$( losetup -f )
    losetup $OVERLAY_LOOPDEV /overlay

    # set up the snapshot
    echo 0 `blockdev --getsize $BASE_LOOPDEV` snapshot $BASE_LOOPDEV
$OVERLAY_LOOPDEV p 8 | dmsetup create live-rw
...

So you could edit this script before creating the ISO and increase
seek offset to make overlay bigger, but remember that writing to
live-rw is not safe, rootfs will get corrupted when it runs out of
space, see https://bugzilla.redhat.com/show_bug.cgi?id=465725
Union mounts is the solution, we'll use it when it hits
upstream/Fedora kernel. In the meantime be careful and watch overlay
usage with dmsetup status live-rw

BTW in >=F13 initramfs generator is dracut, if you want to look what
F13 livecd does see
/usr/share/dracut/modules.d/90dmsquash-live/dmsquash-live-root

Cheers,
Alan


More information about the livecd mailing list