Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Red face Building minimal linux from scratch


    Hi,

    I'm trying to understand a little bit more what is hidden behind the word "kernel", so I'm trying to complie it and install it. I'm having some little troubles though.

    My goal is to have a minimal kernel on a USB drive with a bash and the very basic commands like ls, cp, mkdir, ... for now. If I get that working I'll be so happy!

    I partitioned a 4GB USB drive into 4 partitions: 3 partitions of 500MB each in ext3 and the rest in vfat. On the first partition there's GRUB and a small distribution of debian which works fine. The two other ext3 partitions are where I'll test kernels and all that.

    So what do I do?

    I have the latest kernel : 2.6.22.2.

    I should compile the kernel with all the appropriate options, right?

    Ok, I don't know what "appropriate" means so I compiled it with the defconfig configuration. Now what? I have a file bzImage that I copy in the /boot directory of my "test" partition.

    From grub I launch something like:

    root (hd0,1)
    kernel /boot/bzImage ro

    and it fails!

    I am a newbie so there are lots of things I'm missing: maybe specify root=/dev/sdax somewhere, maybe create a /dev/fstab file, maybe an initrd.img file? But what are these things? Any explanation and help is warmly welcome!!! I tried to read some documentations but I haven't seen any answers to my (stupid) questions.

    Thanks,
    Qwerti.

  2. #2
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,732
    Check out Linux From Scratch:

    Welcome to Linux From Scratch!

    It goes into lots of detail about Linux and how it's all put together.
    oz

  3. #3
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,732
    oh... another good option for learning to build your own is Rock Linux:

    Main Page - RockWiki
    oz

  4. $spacer_open
    $spacer_close
  5. #4
    Thanks a lot ozar! I was particularly by LFS... even though it's not exactly what I want to do it gives me nice ideas.

    But now I'm having another problem, I can't compile anymore (see a new thread I just posted)...

    I'll come back to my "tiny" linux as soon I this problem get fixed.

    Thanks,
    Qwerti.

Posting Permissions

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