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!
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!
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
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
|
DetailsI'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
Saturday, 29 September 2012, 19:24 GMT
Reason for closing: Deferred
Additional comments about closing: no activity in 2 years
0001-Add-handling-of-loopback...
* 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"