LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   kernel 2.6.18: booting without initrd (http://www.linuxquestions.org/questions/linux-general-1/kernel-2-6-18-booting-without-initrd-670716/)

launcelot 09-18-2008 12:23 AM

kernel 2.6.18: booting without initrd
 
Greetings,

I would like GRUB to boot my kernel directly without loading an initrd image.

So, I've recompiled my kernel with direct (not through a module) support for ext3 filesystems and the piix drivers to my Intel ICH7 SATA hard drive. But, now I get the following error message when booting without in initrd image:

Code:

kernel panic-not syncing VFS:unable to mount root fs on unknown-block(0,0)
(among others,) In make menuconfig, I have included the following in my bzImage:

Code:

File systems section:
<*> Ext3 journalling file system support

Device drivers section:
<*> Serial ATA (SATA) support
<*>  Intel PIIX/ICH SATA support

But as I said it still doesn't boot without initrd. It does boot with an initrd image created through mkinitramfs.

I'm sure PIIX is the correct driver to my hard disk, as shown by:

Code:

lancelot@sherka:~$ udevinfo -a -p $(udevinfo -q path -n /dev/sda1)
(...)
 DRIVERS=="ata_piix"
(...)

And lsmod shows me that ata_piix is now not anymore loaded as a module.

Any idea what I have missed? Which module(s) shoud I add the to the kernel image if I am to boot without initrd?

Thanks for your answers.

datopdog 09-18-2008 02:14 AM

Check what drivers your initrd loads and build them in, it could be the partition layout it does not understand.

launcelot 09-19-2008 01:06 AM

Thanks for your answer.

I've gone back top menuconfig, and it appears that every type of partition that is supported by my kernel is supported natively and not as part as a module.

I have finally managed to uncompress and browse my initrd image and I must say I'm a bit confused... I located a "drivers" subdirectory within the modules. It has dozens of drivers as shown by ls -R:

Code:

./acpi:
fan.ko  processor.ko  thermal.ko

./base:
firmware_class.ko

./block:
aoe  cciss.ko  cpqarray.ko  cryptoloop.ko  DAC960.ko  floppy.ko  loop.ko  nbd.ko  paride  pktcdvd.ko  sx8.ko  umem.ko  xd.ko

./block/aoe:
aoe.ko

./block/paride:
aten.ko  bpck6.ko  bpck.ko  comm.ko  dstr.ko  epat.ko  epia.ko  fit2.ko  fit3.ko  friq.ko  frpw.ko  kbic.ko  ktti.ko  on20.ko  on26.ko  paride.ko  pcd.ko  pd.ko  pf.ko  pg.ko  pt.ko

./cdrom:
cdrom.ko

./ide:
ide-cd.ko  ide-floppy.ko  ide-generic.ko  ide-pnp.ko  ide-tape.ko  legacy  pci

./ide/legacy:
ide-cs.ko

./ide/pci:
aec62xx.ko  amd74xx.ko  cmd64x.ko  cs5530.ko  cy82c693.ko  hpt34x.ko  it821x.ko  ns87415.ko  pdc202xx_new.ko  rz1000.ko  serverworks.ko  sis5513.ko  triflex.ko  via82cxxx.ko
alim15x3.ko  atiixp.ko  cs5520.ko  cs5535.ko  generic.ko  hpt366.ko  jmicron.ko  opti621.ko  pdc202xx_old.ko  sc1200.ko  siimage.ko      slc90e66.ko  trm290.ko

./ieee1394:
ieee1394.ko  ohci1394.ko  sbp2.ko

./message:
fusion  i2o

./message/fusion:
mptbase.ko  mptfc.ko  mptsas.ko  mptscsih.ko  mptspi.ko

./message/i2o:
i2o_block.ko  i2o_core.ko

./mmc:
mmc_block.ko  mmc_core.ko  sdhci.ko  wbsd.ko

./net:
3c59x.ko  8139too.ko  b44.ko  defxx.ko  e1000    epic100.ko  fealnx.ko    hp100.ko  myri10ge    ne2k-pci.ko    ns83820.ko  r8169.ko  sis900.ko  sky2.ko  starfire.ko  sungem.ko      sunhme.ko  tlan.ko  via-rhine.ko    yellowfin.ko
8139cp.ko  8390.ko    bnx2.ko  dl2k.ko  e100.ko  eql.ko      forcedeth.ko  mii.ko    natsemi.ko  netconsole.ko  pcnet32.ko  s2io.ko  skge.ko    slhc.ko  sundance.ko  sungem_phy.ko  tg3.ko    tulip    via-velocity.ko

./net/e1000:
e1000.ko

./net/myri10ge:
myri10ge.ko

./net/tulip:
de2104x.ko  de4x5.ko  dmfe.ko  tulip.ko  winbond-840.ko  xircom_cb.ko

./pcmcia:
pcmcia_core.ko  pcmcia.ko

./scsi:
3w-9xxx.ko  ahci.ko        ch.ko        fdomain.ko        in2000.ko    lpfc          pas16.ko    qla2xxx          sata_promise.ko  sata_sx4.ko          scsi_transport_iscsi.ko  sym53c416.ko  wd7000.ko
3w-xxxx.ko  aic7xxx        dc395x.ko    gdth.ko            initio.ko    megaraid      pcmcia      qlogicfas408.ko  sata_qstor.ko    sata_uli.ko          scsi_transport_sas.ko    sym53c8xx_2
aacraid      aic7xxx_old.ko  dmx3191d.ko  g_NCR5380.ko      ipr.ko        megaraid.ko    pdc_adma.ko  qlogicfas.ko    sata_sil24.ko    sata_via.ko          scsi_transport_spi.ko    t128.ko
advansys.ko  arcmsr          dpt_i2o.ko  g_NCR5380_mmio.ko  ips.ko        NCR53c406a.ko  ppa.ko      raid_class.ko    sata_sil.ko      sata_vsc.ko          sg.ko                    tmscsim.ko
aha152x.ko  atp870u.ko      dtc.ko      hptiop.ko          iscsi_tcp.ko  nsp32.ko      psi240i.ko  sata_mv.ko      sata_sis.ko      scsi_debug.ko        sr_mod.ko                u14-34f.ko
aha1542.ko  BusLogic.ko    eata.ko      imm.ko            libiscsi.ko  osst.ko        qla1280.ko  sata_nv.ko      sata_svw.ko      scsi_transport_fc.ko  st.ko                    ultrastor.ko

./scsi/aacraid:
aacraid.ko

./scsi/aic7xxx:
aic79xx.ko  aic7xxx.ko

./scsi/arcmsr:
arcmsr.ko

./scsi/lpfc:
lpfc.ko

./scsi/megaraid:
megaraid_mbox.ko  megaraid_mm.ko  megaraid_sas.ko

./scsi/pcmcia:
aha152x_cs.ko  fdomain_cs.ko  nsp_cs.ko  qlogic_cs.ko  sym53c500_cs.ko

./scsi/qla2xxx:
qla2xxx.ko

./scsi/sym53c8xx_2:
sym53c8xx.ko

./usb:
core  host  input  storage

./usb/core:
usbcore.ko

./usb/host:
ehci-hcd.ko  ohci-hcd.ko  uhci-hcd.ko

./usb/input:
usbhid.ko

./usb/storage:
usb-storage.ko

./video:
vga16fb.ko  vgastate.ko

At the moment I'm completely lost. I will try to dig into this list tonight.

launcelot 09-19-2008 01:12 PM

I was a bit confused this morning, I'm still a bit confused, but I think I have found a way to tackle it. I'm going to dichotomitically (sp?) remove modules from the initrd image until I isolate the module(s) necessary for the boot of my computer.

Starting now.

I'll let you know how this goes.

EDIT: I've removed all kernel modules from my initramfs image. Yet, my kernel still boots.

Let's summarize:
initramfs image is supposed to be disposable. It"s only there to load some kernel modules which you can compile into the kernel just fine.
My kernel can't boot without the initramfs image.
I remove all kernel modules from the initramfs image.
My kernel still boots with this modified image.
This means things are not what they're supposed to be.

The most puzzling in all this is that my kernel is not all that recent. It's the debian etch kernel...

If someone can explain...


All times are GMT -5. The time now is 02:15 PM.