Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#20034 - [mkinitcpio] Add support for loopback mounting NFS root file system

Attached to Project: Arch Linux
Opened by Dustin King (daking) - Wednesday, 30 June 2010, 19:33 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 29 September 2012, 19:24 GMT
Task Type Feature Request
Category Packages: Core
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 1
Private No

Details

I'm managing a number of Arch Linux clients that PXE boot and connect to read-only root file systems over NFS. In order to avoid conflating permissions on the client file systems with permissions on the server, I have the file systems saved as partition images rather than being part of mounted file systems on the server. This means that early userspace needs to loopback mount the partition image before switching root into the read-only file system. I've added that functionality into the net hook in mkinitcpio. Which image to loopback mount and what format to expect the image to be in are specified by two new kernel boot parameters (loop and loopfmt) specified in the PXE configuration. I also made the net hook install the loop module by default. Having an appropriate file system module in the initcpio is, of course, also required.

I'm attaching a patch to mkinitcpio. The patch was originally based on 0.6.3. The initcpio images we have in production were made with a patched version of 0.6.3. The patch I've uploaded is rebased on the current git head. Rebasing didn't produce any conflicts; the net stuff doesn't look like it's undergone any changes since then. If this is a feature that you'd like to include in mkinitcpio, I'm happy to do further testing with initcpio images made after applying the patch to the current version of mkinitcpio.
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 29 September 2012, 19:24 GMT
Reason for closing:  Deferred
Additional comments about closing:  no activity in 2 years
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 04 July 2010, 20:36 GMT
mmm things could be improved:

* Do not change parameter "$1" directly with /new_root

* In file install/net add next line so you don't need modprobe and udev settle:
add_device /lib/udev/devices/loop0 b 7 0

* you don't need losetup, this can be done directly with mount (and mount from busybox does not need -o loop)
mount -t "$loopfmt" "/mnt_tmp/$loopimage" "$1"
Comment by Dustin King (daking) - Wednesday, 07 July 2010, 00:37 GMT
I've made the suggested changes and uploaded a new version of the patch. I tested the patch against mkinitcpio 0.6.6. It seems to produce working initcpio images for my environment if I include loop and ext2 (the format for the loopback images I'm using) in my mkinitcpio.conf. Let me know if there's anything else you'd like me to do.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 17 August 2012, 21:17 GMT
such patch should be updated for newer changes, anyway looks like devs are not interested on this (+2 years), maybe this tasks can be closed...

Loading...