FS#46243 - [mkinitcpio] Propose to support `loop` and `loopfstype` kernel parameters in initcpio

Attached to Project: Arch Linux
Opened by Given_92 (huiyiqun) - Thursday, 10 September 2015, 03:38 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 03 July 2016, 17:57 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Thomas Bächler (brain0)
Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Is it possible to add support to mount loopfile as *real root*?

Such like what is implemented in [this link](http://manpages.ubuntu.com/manpages/vivid/man8/initramfs-tools.8.html).

This standard is likely proposed by Ubuntu to be used in Ubuntu touch and taken by `multirom` which is a recently popular multi-boot framework for phone and tablet to boot Linux on these devices.

Some people has implemented this function with hooks [here](https://github.com/crondog/arch-flo/blob/master/mkinicpio/hooks/imgmount). However, I think this implementation is not elegant enough because it modify `mount_handler` and may cause confliction in the future.

With a quick search, I found some people trying to do something like this but resulted in some ugly resolve.

Is it possible to implemented it in `/usr/lib/initcpio/init_function:default_mount_handler`?

Additional info:
* mkinitcpio 18-2
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 03 July 2016, 17:57 GMT
Reason for closing:  Won't implement
Additional comments about closing:  There's already third party implementations for the shell-based initramfs, and systemd supports this out of the box.
Comment by Dave Reisner (falconindy) - Thursday, 10 September 2015, 13:07 GMT
> However, I think this implementation is not elegant enough because it modify `mount_handler` and may cause confliction in the future.
No, that's exactly what you're supposed to do.

Generally, it's better to get support for these things in systemd, not in mkinitcpio.
Comment by Given_92 (huiyiqun) - Friday, 11 September 2015, 05:31 GMT
> Generally, it's better to get support for these things in systemd, not in mkinitcpio.

So far as I know, systemd is executed after *real root* is mounted.
As a result, this feature may need to be implemented in initramfs.
Comment by Dave Reisner (falconindy) - Friday, 11 September 2015, 10:48 GMT
systemd works just fine in early userspace. The systemd package includes hooks to include it in your initramfs.

Loading...