-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual scsi probe of a Lun #84
Conversation
I can't wait to give this a run! I'm probably taking a few day off from Wednesday (I'll be out around 7 days), so I dunno if I will get the opportunity to look at this in detail. But it's pretty ifdef'd out, so I don't mind merging this if it helps things progress. |
Take your time; I took mine, so I can't complain if things go long. |
@@ -518,7 +526,7 @@ static int switchroot(const char* newroot) { | |||
} | |||
|
|||
static int mount_proc_sys_dev(void) { | |||
if (false) { | |||
if (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement here is not ifdef'd.
For some reason, I thought it should be enabled, no matter what.
On a second thought, I wonder if you prefer this to be ifdef dependent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was false deliberately because in the use case this code was intended for initoverlayfs is the init system, but exec's itself as a systemd process really quickly (and then systemd mounts /proc).
But tbh, it was a micro-optimization, so I don't mind it being true, it was just one less mount call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, some things are broken here in general (not in this PR, in initoverlayfs main branch) that I have to fix when I come back.
I think if you run the upstream version of this now on a Fedora Workstation machine, it doesn't boot anymore and they are really trivial silly bugs.
I just got distracted by other things the last week or two.
This commit introduces manual probing of a specified SCSI LUN. The LUN can be specified either via the kernel command line `scsi.addr=<host>:<channel>:<target>:<lun>` or by adding a line to the `initoverlayfs.config` file `scsi.addr <host>:<channel>:<target>:<lun>`. In case both are present, the configuration takes precedence. Any operation depends on the presence of the `scsi_mod.scan=manual` kernel argument. If it is not present in the kernel command line, no action will occur. The directory `scsi_probe` contains the main functions needed to complete the task and some related tests. To run the tests, simply run `make` in the `scsi_probe` subdirectory. Signed-off-by: Alessandro Carminati (Red Hat) <[email protected]>
3f792e6
to
89dd5dc
Compare
I updated my PR because of a typo I discovered. It doesn't change much in practice, but it bothered me. In |
Merging before I go on PTO, I didn't give the most thorough review, but it's all ifdef'd out anyway, better to merge to not block progress... |
agreed, sorry i couldn't review before. If we find anything later in the road we improve it. |
It will be interesting to try the boot direct to erofs idea you had @alessandrocarminati via "root=" karg and then pivot_rooting to the real rootfs using "systemd.root=" karg @rrendec is working on. Of course this is only suitable for embedded because of the dependency on the storage drivers being directly into the kernel, but it's one of the cases we care about. |
This commit introduces manual probing of a specified SCSI LUN. The LUN can be specified either via the kernel command line
scsi.addr=<host>:<channel>:<target>:<lun>
or by adding a line to theinitoverlayfs.config
filescsi.addr <host>:<channel>:<target>:<lun>
. In case both are present, the configuration takes precedence. Any operation depends on the presence of thescsi_mod.scan=manual
kernel argument.If it is not present in the kernel command line, no action will occur. The directory
scsi_probe
contains the main functions needed to complete the task and some related tests.To run the tests, simply run
make
in thescsi_probe
subdirectory.