I've been trying to configure a kernel that will not require an initrd to boot. I haven't succeeded. The filesystem I'm attempting to boot from is ext4, and I have all the extended filesystems compiled in my kernel (not as a module, in the kernel itself). I'm using an Early-2011 MacBook Pro with a 2.5" 1TB WD hard drive. My command line is root=PARTUUID=5c595262-cd6a-48f9-b199-6d72dae95b09 ro rootfstype=ext4 rootwait
and every time I boot I get a kernel panic about not being able to mount the root partition and the See Update I have CONFIG_DEVTMPFS enabled that mounts /dev before the root filesystem, but since I originally posted this question, I've switched to using a root=
section of my command line being invalid.PARTUUID
instead of specifying it's dev
path, so I shouldn't need it anymore, but it's still enabled. I have the CONFIG_EFI_STUB option enabled and am using that to boot, and my command line is hard coded into the kernel.
Kernel panic when I try to boot (because it's not seeing my HDD)
What configuration options do I need to change to get my system working without an initrd talking to my HDD? I can't use an initrd because my only method of booting is directly loading my kernel EFI-style, and therefore since the kernel itself can't load an initrd (as far as I know, a bootloader is required to load the initrd) I can't use one.
UPDATE: Since the posting of this question, I've determined that everything is configured fine except my kernel isn't seeing my 2.5" internal 1TB SATA drive (which is why my kernel was originally saying the root
argument was invalid, sda didn't exist). So what do I need to configure to get my kernel talking to my internal SATA HDD? (And should I post that as a separate question?)
Output of lsmod
running with a slightly-modified configuration to support initial ram disks
lspci
on that same slightly-modified configuration and initial ram disk
udev
in the kernel? Are you absolutely sure that your drive will be detected as/dev/sda
and that your root is on its 4th partition? – Julie Pelletier Jun 28 '16 at 04:24CONFIG_DEVTMPFS
, enabled, however, which I think may be what you're asking. I highly doubt my drive would be anything other thansda
. (What else would it be? My system only has one drive.) – Billy Jun 28 '16 at 04:49make localmodconfig
to get all the necessary drivers. – Gilles 'SO- stop being evil' Jun 28 '16 at 21:19/boot/config-<current-running-kernel-version>-<architecture>
to./.config
? – Billy Jun 28 '16 at 21:30/boot
.make localmodconfig
is based on drivers in the running kernel. – Gilles 'SO- stop being evil' Jun 28 '16 at 21:32initrd=...
to theefibootmgr
is not an answer? looks like an answer to me - you wanted to know how to boot linux directly from Mac's boot loader without grub and now you do. As @Patrick says, though, avoiding grub is just going to make it difficult to upgrade linux kernels or change boot args (btw, using grub doesn't mean you have to see the grub menu - you can configure it to just instantly load the default kernel and initrd without displaying a menu) – cas Jun 29 '16 at 00:19MODULES=[most|netboot|dep|list]
in/etc/initramfs-tools/initramfs.conf
on debian). It's a solved problem, and was solved long ago. OP seems to mistakenly think that going back to the early-90s is worth the effort. Possibly true as a learning exercise, not true for real-world usage. – cas Jun 29 '16 at 06:23