Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Firstly, let me just say, "Newbie alert!" This is my first time to attempt to build a Linux kernel. So, bear with me. I just wanted to warn you guys ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    8

    installing the kernel onto a hard drive (not a distro)


    Firstly, let me just say, "Newbie alert!" This is my first time to attempt to build a Linux kernel. So, bear with me.

    I just wanted to warn you guys in advance. I am sorry if my questions are really stupid.

    Anyway, so I downloaded the source code (version 3.0), and I have attempted to build it. I used menuconfig to configure the .config file; then I issued the make command to actually compile the kernel. Basically, I did as the README file said.

    Since this was just a test, I kept things kind of minimal. Just basically the bare minimum that I thought I might need. (If needed, I can upload the .config file or the resulting bzImage. Just let me know if you guys need me to. The bzImage file is only about 2.6 MiB, I think.)

    Onto an empty partition, I moved bzImage and installed Lilo. Then, I rebooted.

    Lilo loads it, decompresses it, yada, yada, yada... A couple of other insignificant lines of text are displayed. The last to be shown is: "Booting the kernel."

    Shortly after that (mere seconds), the hard drive activity light turns off. Nothing changes afterwards. Just a flashing cursor. I cannot type anything. There is no response from anything I do.

    Is this a success? And, if so, how do I get some actual functionality, like a console to input commands? I thought that was part of the kernel itself... No? Even the lowest-level of commands are external?

    And, if so, how do I get it to load things, such as a command shell?

    Again, I apologize. I am not overly familiar with the inner-workings of Linux. Not yet, anyway. I hope for these experiences to change that.

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Hello and Welcome....It's hard to say if your build was a success or not. You need more than just a kernel on a partition if you want to get Linux running. You need a lot of things actually.
    I think the easiest thing for you to try would be to install any distro to your hard drive and use that to play around with, try upgrading to the newest kernel on your favorite distro. After you become a little more skilled in using Linux then you can try experimenting with all kinds of things.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Welcome!

    Like Mike said... you need more than just the kernel.
    The kernel itself is really just a resource manager of sorts.
    It handles device drivers, memory allocation and much more.
    But it's not an actual 'tool' that you can interact with in the way that you are trying to do.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2011
    Posts
    8
    Actually, I have been using Linux (and other Unix-like operating systems) off-and-on for years.

    At the moment, I am utilizing a LiveCD version of Slax 6. I liked its lightweight nature so much, I have taken an interest in "rolling-my-own distribution", I guess you could say. Setting up a barebones system with only what I need. None of the extra fluff.

    Puppy Linux, Tiny Core Linux, Slax... They are all good and all. However, I would like to do it myself. If nothing else, it should be a good learning experience.

    I have found the Linux From Scratch site. However, its online book seemed to lack the answers to my questions. Hence why I came here.

    Are there any other online resources that could guide me in regards to adding more to the system? I have a kernel. What next do I need? How do I go about getting other things loaded?

  6. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    You could try Gentoo, using the Gentoo Handbook as guidance.
    There is also CRUX, Arch, or a minimal install of either Debian or Slackware.

    All can be installed with the bare minimum of extras, letting you add in only what you want.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  7. #6
    Just Joined!
    Join Date
    Jul 2011
    Posts
    8
    Okay, I think I have narrowed it down. It appears that it is my kernel that is at least part of the problem. (In another thread, on the Installation board, I was wondering if maybe I was missing some directories and/or files.)

    Could someone with more experience compiling kernels glance over my .config file and tell me if they see anything that might indicate why it is never getting past the "booting the kernel" message? Is there anything obviously wrong with it?

    Note: This is not the exact .config that produced my current bzImage. However, the only difference is that, for the later-compiled kernel, I enabled the option for a verbose kernel boot-up. This .config file has the option disabled.

    PS: I had to divide my .config file into three separate files to keep my uploads within this forum's file size requirements.
    Attached Files Attached Files

  8. #7
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    We don't know what's on your system, therefore we don't really know what you need. The exact error message would be more useful
    I think I might have a question about your .config....Did you set the "Processor type and features"?
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  9. #8
    Just Joined!
    Join Date
    Jul 2011
    Posts
    8
    I am not receiving any error messages. The kernel compiled without incident. A few warnings, sure. But you know, nothing much. "Failed to use a cast", yada, yada, yada. (I just compiled the 3.0 source files as they were released.)

    When I try to use the kernel, the last thing said is, "Booting the kernel." Then, nothing more. The cursor just infiitely blinks below that. No errors are displayed, nor anything to indicate progress. (With a successfully compiled kernel, lots of text is quickly written to the screen. Eventually, it leads to, "INIT: entering runlevel: 3". Or something like that.)

    I am currently using an old, junk computer with a Pentium II. However, if memory serves me correctly, I think I said 386 during menuconfig. I figured choosing the lowest processor option would be fine.

    I do not think I enabled any processor features. If any, just CPUID. Definitely not any MSRs or anything.

  10. #9
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    I may be wrong here, and it wouldn't be the first time...

    But if you are booting a kernel, but not an operating system, I don't think you are going to get anything on the screen that you can use.

    What exactly are you looking to get?

    Again... I may be wrong here...
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  11. #10
    Just Joined!
    Join Date
    Jul 2011
    Posts
    8
    As I previously said, it appears that it should quickly post a lot of information to the screen, followed by "INIT: entering runlevel: 3", then whatever other output resulting from init's execution.

    I am basing this expectation on what I see if I replace the kernel I compiled with the one from my LiveCD version of Slax.

    From what I can tell, my kernel is not getting to the point of idling / initializing init. My best guess: It cannot access the hard drive?

    I was certain I enabled all I would need to do so. But, apparently, something about my configuration is wrong. (At this moment, I am currently compiling a new kernel, one much larger. Hopefully, I have included enough junk this time that I will have what I need.)

Page 1 of 2 1 2 LastLast

Posting Permissions

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