Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I have built a kernel image and modules from 2.6.39 sources. I wonder if it is possible to create a virtual machine using these bzImage and modules, including a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    5

    Question Virtual machine from kernel image & modules


    Hi,

    I have built a kernel image and modules from 2.6.39 sources.

    I wonder if it is possible to create a virtual machine using these bzImage and modules, including a basic filesystem.

    If it isnīt possible, could you give me any advice in order to create a basic filesystem? Maybe "Linux From Scratch" project?

    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,692
    LFS (Linux From Scratch) is a very good approach to learn how to do this stuff. Myself, I used it to build a custom Linux system that runs in a VirtualBox VM. Download the book and the bootstrap ISO image so you can get it up PDQ.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    5
    Hi,

    I managed to build the LFS system (ended chapter 6 - Installing basic system sofwtare) into a file (mounted in my PC with loop, not a disk partition).
    I suppose I have to install bootscripts for the system and make the system bootable (chapters 7-.

    My question now is if it possible to create a virtual machine for VirtualBox using this LFS image (I havenīt created any virtual machine before).

    Thanks in advance.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,692
    It's just like installing to a regular system. Create a VM of type "Linux 2.6" or "Linux 2.6 (64 bit)" and install as the LFS book instructs, using the VM instead of a hardware machine.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    May 2011
    Posts
    5
    Hi,

    I managed to finish the LFS 6.8 book building the system into a raw disk image (i.e. a img file created from zero). I have also tried to create a vmdk and a vmdi file from this *.img as indicated in: "How to use a raw disk image file in VirtualBox" (searching through google)

    However, when I try to start the system I get in VBox: "Fatal: Could not read from the boot medium! System halted".

    Reading your comment again I assume that the LFS system should be created inside the new empty Linux VBox machine. Maybe I could copy the content of the img file into the new virtual machine?? ....or should I rebuild the entire system?

    Thanks in advance.

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,692
    I think need to mount the image first, or burn it to a CD/DVD.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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