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#54777 - [mkinitcpio-nfs-utils] set rootdelay=0

Attached to Project: Arch Linux
Opened by Tom Yan (tom.ty89) - Wednesday, 12 July 2017, 13:16 GMT
Last edited by freswa (frederik) - Sunday, 13 September 2020, 13:41 GMT
Task Type Bug Report
Category Packages: Core
Status Assigned
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
The mkinitcpio init would try to poll device (when try to resolve it) set in root=. However /dev/nfs is not a real device so the polling is pointless for it. Setting rootdelay=0 for it should be hence always a right thing to do.

I haven't really ever used NFS myself. I just happen to see an old bug (reported as an issue of mkinitcpio instead of this package) because I am trying to get another issue in mkinitcpio fixed. So in case things have changed and this is no longer valid, I am sorry.

This is the old bug report: https://bugs.archlinux.org/task/35529

Dave Reisner referred to this bug report in a recent commit of mkinitcpio:

https://git.archlinux.org/mkinitcpio.git/commit/?id=15cab4d017c7cc46b8234bfa641fcef2b28207b6

While the defualt_mount_handler does not actually have anything to do with it. For nfs we have a different mount handler, also the problem actually originates from the -b tests in poll_device().

Additional info:
* package version(s) 0.3-5
This task depends upon

Comment by Dave Reisner (falconindy) - Wednesday, 12 July 2017, 13:31 GMT
Wouldn't it be better to just fix the initcpio hook to stop relying on a bogus file in /dev?
Comment by Tom Yan (tom.ty89) - Wednesday, 12 July 2017, 14:10 GMT
I don't know, to be honest. It doesn't seem to me that we can simply omit root=/dev/nfs by reading the hook, the old report, and the kernel doc it referred to. Doesn't look like to be a flaw of the hook to me.

Since I don't see how we can skip the -b test in poll_device(), and it seems wrong to have an exception there, setting rootdelay=0 in the hook seems like the best way to me. We are setting root= there and we know that we don't need to poll it, so we also set rootdelay=0 for it, seems logical enough to me.
Comment by Dave Reisner (falconindy) - Wednesday, 12 July 2017, 14:18 GMT
What the kernel thinks is irrelevant since we're talking about an initramfs. If you specify something like root=nfs, then you skip everything in resolve_device (including poll_device) and return 1.
Comment by Tom Yan (tom.ty89) - Thursday, 13 July 2017, 16:55 GMT
So are you suggesting root="/dev/nfs" and rootfstype="nfs" will not actually be used at all (apart from used as a param for the resolve_device())? Can you confirm that?

In that case I suppose the fix would be eliminating the following lines from the hook?

# ensure root and filesystem type are set proper for nfs boot
root="/dev/nfs"
rootfstype="nfs"

Coz I don't see why we should even set root= at all then. We might even might to consider adding `unset root` in case some users think they should use root=/dev/nfs mistakenly?
Comment by Dave Reisner (falconindy) - Thursday, 13 July 2017, 18:37 GMT
> So are you suggesting root="/dev/nfs" and rootfstype="nfs" will not actually be used at all (apart from used as a param for the resolve_device())? Can you confirm that?
Yes, that's what I'm suggesting.

Loading...