lp:~smoser/cloud-initramfs-tools

Owned by Scott Moser
Get this repository:
git clone https://git.launchpad.net/~smoser/cloud-initramfs-tools
Only Scott Moser can upload to this repository. If you are Scott Moser please log in for upload directions.

Branches

Name Last Modified Last Commit
fix/1890803-overlayroot-no-fstab 2020-08-13 20:28:51 UTC
overlayroot: initialize /etc/fstab if root does not have one and read-only

Author: Scott Moser
Author Date: 2020-08-13 14:21:15 UTC

overlayroot: initialize /etc/fstab if root does not have one and read-only

A root filesystem may not have an /etc/fstab. That could be for either:
a.) not needed - the kernel command line has root mount options and no
  other filesystems are mounted.
b.) system has systemd.mounts - this is currently not supported by
overlayroot.

If the kernel command line contains 'ro', then overlayroot will
correctly leave root mounted 'ro'. The problem was that without an
/etc/fstab, systemd would not remount the root filesystem rw, and
thus failure would ensue.

The change here is to initialize an fstab in the case that the root
filesystem did not contain one, *and* 'ro' is present on the cmdline.
In cases where 'ro' is not present, then overlayroot will leave /
mounted as rw, so systemd does not need to remount rw.

LP: #1890803

rooturl-fsimage 2020-05-12 18:31:10 UTC
rooturl support for "nested" mounts.

Author: Scott Moser
Author Date: 2020-05-12 18:26:51 UTC

rooturl support for "nested" mounts.

This adds support for "nested" mounts to rooturl.

A nested mount is in simplist for something like:

 root=LABEL=my-images:file=my-squashfs.img

Which instructs the initramfs to mount a filesystem with the
label 'my-images' and then loop mount a 'my-squashfs.img' inside it.
A live cd basically contains an image on a cdrom.

The goal of this code is to mimic that sort of behavior but more
generically.

 # Example:

  qemu-img create -f raw 10G disk.img
  mkfs.ext2 -L images disk.img
  mount -o loop disk.img /mnt
  wget -O /mnt/bionic.img \
    http://images.maas.io/ephemeral-v3/daily/bionic/amd64/20200507/squashfs
  umount /mnt

Then boot that with a kernel command line like:

   root=img:LABEL=images:bionic.img

This actually does work right now, booting with something like:

  cmdline="console=ttyS0 root=img:LABEL=images:file=squashfs overlayroot=tmpfs"
  qemu-system-x86_64 -enable-kvm \
    -device virtio-scsi-pci,id=virtio-scsi-xkvm \
    -object rng-random,filename=/dev/urandom,id=objrng0 \
    -device virtio-rng-pci,rng=objrng0,id=rng0 \
    -device virtio-net-pci,netdev=net00 \
    -netdev type=user,id=net00 \
    -drive file=disk.img,id=disk00,if=none,format=raw,index=0 \
    -device virtio-blk,drive=disk00,serial=disk.img \
    -m 768 -serial mon:stdio \
    -kernel boot-kernel \
    -initrd boot-initrd.new \
    -append "$cmdline"

 # TODO
 ## handle ROOT_FLAGS in the final mount

 ## copy to tmpfs and unmount
I'd like to have some syntax which says copy the file to a tmpfs, and
unmount under it.

So that something like:
   LABEL=images:tmpfile=my-squash.img

would do:
   mount images by label
   copy my-squash to /initramfs/tmp-images/my-squash.img
   mount /initramfs/tmp-images/my-squash.img
   umount /dev/disk/by-label/images

Then we'd be all in memory and a cdrom could be ejected.

 ## add support for 'fsimage-layered' support in curtin
I'd like to be able to use the un-modified squashfs images from
lxd (or maas) and overlay some changes on top, such as to
/etc/passwd or maybe /etc/cloud/ or something.

That would greatly ease the creation of derivative live-cds.
So that I could script something that would
 - pull kernel and initramfs
 - pull disk image / squashfs
 - use mkisofs (and grub) It would ease creation of live-cds

'fsimage-layered' as described at
https://curtin.readthedocs.io/en/latest/topics/config.html
is a mechanism that curtin uses.

fix/1834875-growpart-add-flock-depend 2020-02-25 01:23:28 UTC
update changelog

Author: Scott Moser
Author Date: 2020-02-25 01:23:28 UTC

update changelog

13 of 3 results
This repository contains Public information 
Everyone can see this information.

Subscribers