[SOLVED] Moving my Linux installation to VirtualBox
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Lately, I got into making Linux From Scratch. It all went pretty well, but I wanted to make my installation distributable, so I can pack my whole system and send it to somebody or run it in a virtual machine.
A few days ago I completed the base system with general-use libraries and GUI with Xorg. It is all working on my comput00r. So I wanted to pack it for the first time and run it in a VM...
I used
Code:
tar -cvpf --exclude[...] /
I don't have the exact script I used with me right now, but by this --exclude[...] I meant that I excluded some cache directories and Virtual File Systems.
and now I got my very first, shiny tarball
So I downloaded VirtualBox (I'm doing this on Windows, but I built my LFS on Gentoo) and made a VM. I've used Arch Live CD to get my tarball situated on there and installed GRUB and finally, booted it up. It worked, I was able to log in and issue commands.
The problem is, that quite quickly my enthusiasm got shot down when I realised there is something wrong with this VM.
I can't build linux kernel inside it, and configure scripts fail when trying to build something else... (I tried it with bash source code).
Here I give you the config.log file from bash: https://pastebin.com/Rrk3i2qv
On line 101 it says something about not being able to find an include. I have no idea why. It works perfectly fine on my PC.
Linux compilation also failed on 'make menuconfig', because it was not able to find <sys/types.h>
Did you check that those targets of the includes and library sources were present?
It may be that your excludes happened to exclude something that you need to include OR RECREATE in the new virtual guest.
Did you check that those targets of the includes and library sources were present?
It may be that your excludes happened to exclude something that you need to include OR RECREATE in the new virtual guest.
I noticed my error. I've used a wildcard instead of the absolute path to the `sys` directory. So it also excluded /usr/include/sys...
I guess the error told me what was wrong, but I tried to search for a deeper cause and never thought to actually check if this header file existed.
But now I have yet another problem with that virtual machine. When I want to start xorg, it closes with an error. The log says something about not being able to load vmware module. I don't know why it tries to load vmware since I'm on VirtualBox. I have also compiled my kernel with support for VirtuaBox GPU. I'm including the Xorg log if anybody wants to take a look at it.
Vesa should be compatible with the virtual display, and it seems it is not installed. You need SOME compatible display module. Try doing a reconfigure of X to see if it autodetects and activates a working module. IF it does not, you might need to reinstall x.org, or the VBOX video driver, or both. Assuming that one or both are already installed completely, the reconfig of X might just take care of that.
Are you trying to start xorg directly, or using startx, or using xinit?
I was able to fix the problem by poking around in the display settings of my virtual machine. It was set to `VMSVGA` and I changed it to `VBoxVGA` and it started working. I am using startx
Quote:
Originally Posted by wpeckham
Vesa should be compatible with the virtual display, and it seems it is not installed. You need SOME compatible display module. Try doing a reconfigure of X to see if it autodetects and activates a working module. IF it does not, you might need to reinstall x.org, or the VBOX video driver, or both. Assuming that one or both are already installed completely, the reconfig of X might just take care of that.
Are you trying to start xorg directly, or using startx, or using xinit?
Good job!
If you are satisfied, you might want to mark this thread as "solved" now.
That way others can find your solution if they run into the same situation and issue.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.