Find the answer to your Linux question:
Results 1 to 7 of 7
Dear folks, We have built a Linux system from scratch which boot in 5 Secs on my Core2Due-Asus MB machine. I tested it on another machine with different motherboard but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    Building the "Just Enough Kernel"


    Dear folks,

    We have built a Linux system from scratch which boot in 5 Secs on my Core2Due-Asus MB machine. I tested it on another machine with different motherboard but the same CPU. Surprisingly, the kernel itself took 7 secs to complete and pass control to init.

    I traced the messages and found that due to different hardware, it spends almost 1.5sec to wait for FD (even if I disable FD in BIOS setup) and spends the rest to detect hardware. Therefore, in order to achieve an atmost 2sec kernel load time (just as we have on the first machine), I'm searching for a solution.

    I've came to conclusion that I should
    1 - Prevent the kernel from scanning for devices
    2 - Reduce the list of compiled features to support just the HW I have.

    Anyone can help me by answering these questions please:
    1 - How can I findout which devices are in actual use by the kernel (to build the just enough list)
    2 - How can prevent the kernel from scanning or waiting for unavailable devices>
    3 - Is there any simpler idea?

    Thanks a lot.
    --Hossein

  2. #2
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    I have another question too. This one is simpler:
    - What is the reason that the same kernel image takes different times (5s vs. 10s) on the same CPU and different M/B? As the best of my knowledge, kernel looks for devices that their modules are built into it. In this case the whole kernel remains unchanged. So, How a change in devices affects the boot time?

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    What's your kernel size ? Does you kernel modules compiled with-in the kernel itself or it will load at run time. ?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. #4
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Lakshmipathi:
    my kernel image size is 2.2MB and I have compiled some modules within the kernel and some are loaded in runtime.

    However, a funny thing is that although I have disabled floppy controller n BIOS (and I don't have a floppy drive) =. The kernel looks for the floppy drive at boot up wasting almost 1.5 seconds.

    Kernel message:
    floppy drive fd is 1.44MB

    How can I prevent the kernel from searching for specific devices for example the floppy drive or the devices I have disabled in BIOS?

    --Thanks

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    Hossein,
    If i'm not wrong,AFAIK ,boot device search will be performed by BIOS/motherboard.
    Once boot device is selected - it will transfer control to boot loader(often grub is used) -which will load the kernel. So kernel comes into picture only after boot loader invokes it. I would be really surprised to know kernel searching for a boot device. I'll try and explore about this and post them here.

    Are you sure you have disabled floppy related modules in your kernel image?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  6. #6
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Lakshmipathi:
    When I remove the support for floppy from the kernel andrecompile it, the problem solves but my question is that why the same kernel searhes for floppy on one motherboard and doesn't do so on the other.

  7. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,738
    Quote Originally Posted by hosm View Post
    Lakshmipathi:
    When I remove the support for floppy from the kernel andrecompile it, the problem solves but my question is that why the same kernel searhes for floppy on one motherboard and doesn't do so on the other.
    If the same kernel works in one machine and didn't work on another , then it's an issue with motherboard. Kernel has nothing do with it. As I said earlier - boot device selection will be handled by (firmware) code developed by motherboard /hardware manufacturer. May be try with virtual machines and compare the boot time across different virtualization tech. like Xen,Vmware,Virtual box etc or setup same hardware setup across testing machine. (like , motherboard )
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •