This option disables the built-in disk drivers completely.
Passing " nodisk" to gnumach command line will allow the user
to boot the installer with a ramdisk, and rumpdisk should
initialise AHCI controller in userspace.

This is a workaround for the installer for some modern hardware that
the gnumach built-in kernel AHCI driver cannot drive.
It is also useful for testing rumpdisk without kernel drivers.

---
 linux/dev/drivers/block/genhd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/linux/dev/drivers/block/genhd.c b/linux/dev/drivers/block/genhd.c
index 903135c3..eb4801a6 100644
--- a/linux/dev/drivers/block/genhd.c
+++ b/linux/dev/drivers/block/genhd.c
@@ -1054,7 +1054,9 @@ void device_setup(void)
 #ifndef MACH
        chr_dev_init();
 #endif
-       blk_dev_init();
+       extern char *kernel_cmdline;
+       if (!strstr(kernel_cmdline, " nodisk"))
+               blk_dev_init();
        sti();
 #ifdef CONFIG_SCSI
        scsi_dev_init();
-- 
2.30.0


Reply via email to