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 Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:46 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
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

Closed by  Jelle van der Waa (jelly)
Monday, 18 September 2023, 17:46 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/m kinitcpio/mkinitcpio-nfs-utils/issues/2
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.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...