-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle compressed root filesystem in ISO mode #232
Comments
Booster needs to add By the chance do you have exact instructions on how to create a bootable ISO with efofs & squashfs? |
First of all you need to have a root file system (you can grab one of alpine's mini root file system for convenience). It comes in
Now going back to our ISO structure:
Now an initramfs should detect we are in ISO mode and attempt to mount In our case here, the root file system is still in
Loop device number (could be based on what loop device is available, and the location Now having a read-only filesystem is not always a good idea, so we may need to have a Hope that clears things up a bit. |
Any updates to this? as I am delaying the ISO release process until this feature is added :) |
I just merged To get the schema you described working booster needs to mount a loop device on a file. So you can specify Currently booster can mount a device file only, but it will be doable to add support for loopback devices in case if root is a regular file. Are there any initramfs that already implement erofs root filesystems? I want to check their implementation as well. |
Exactly!
Ok, cool.
I believe only Arch's ISO scripts support EROFS. Alpine's initramfs generation utility (mkinitfs) supports SquashFS (which providing support for is almost identical to EROFS). |
... which allows to mount this file. Such functionality is useful in case if we have a erofs image inside an ISO. The erofs image cannot be mounted directly, thus we need to represent it as a device file first. Implements: #232
We should also handle the case of providing read-write support when in ISO mode (via overlayfs), which is also mentioned in #88. |
A proposal for the whole ISO / OverlayFS / SquashFS / EROFS situation (Getting
/media/cdrom # Where /dev/sr0 will be mounted
/media/rootfs/lower # Where /dev/loop0 will be mounted (Overlayfs step 1)
/media/rootfs/upper # (Overlayfs step 2)
/media/rootfs/work # (Overlayfs step 3)
/new_root # Where chroot / switch_root will take place
erofs,iso9660,loop,overlay
mount -t iso9660 -o ro /dev/sr0 /media/cdrom
losetup /dev/loop0 /media/cdrom/boot/rootfs.erofs
mount -t erofs -o ro /dev/loop0 /media/rootfs/lower
mount -t overlay -o lowerdir=/media/rootfs/lower,upperdir=/media/rootfs/upper,workdir=/media/rootfs/work overlay /new_root |
Any updates to this? |
... which allows to mount this file. Such functionality is useful in case if we have a erofs image inside an ISO. The erofs image cannot be mounted directly, thus we need to represent it as a device file first. Implements: #232
What's the current situation on this? |
squashfs as rootfs with a writable overlay would be very nice to have |
Ok, consider the case the root filesystem was compressed using
squashfs
orerofs
into a file calledrootfs.erofs
.According to this, I think
booster
should check whether the root filesystem is compressed/squashed or not, if it is then an additional mount command should be run:So in addition to checking for
/dev/sr0
and mounting it, booster should also check whether another parameter is passed that specifies the location of the root filesystem on/dev/sr0
whether it was compressed or not (for example anotherroot=
as an argument for booster and not for cmdline)..The text was updated successfully, but these errors were encountered: