LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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


Reply
  Search this Thread
Old 04-30-2023, 05:38 AM   #1
EmDeeTee
LQ Newbie
 
Registered: Apr 2023
Distribution: Gentoo
Posts: 9

Rep: Reputation: 0
Question Moving my Linux installation to VirtualBox


Hi everybody!

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>
 
Old 05-01-2023, 01:38 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
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.
 
Old 05-01-2023, 03:13 PM   #3
EmDeeTee
LQ Newbie
 
Registered: Apr 2023
Distribution: Gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
Hi! Thanks for your response.

This is what I'm excluding from the tarball.

Code:
--exclude='/home/user/.mozilla/seamonkey/'
--exclude='/home/user/.cache/*'
--exclude='proc/*'
--exclude='sys/*'
--exclude='dev/*'
--exclude='tmp/*'
--exclude='run/*'
--exclude='mnt/*'
--exclude='media/*'
Quote:
Originally Posted by wpeckham View Post
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.
 
Old 05-01-2023, 03:42 PM   #4
EmDeeTee
LQ Newbie
 
Registered: Apr 2023
Distribution: Gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
Exclamation

Hold on... I've just found something out...

I tested if the archive contained /usr/include/sys/ ... And it didn't!

I'm sure that no `--exclude` excluded it from the tarball (as you can see above)

So I tested further on I found out that using my current command for packing it up:

Code:
tar cvpf iterkoczeos_snapshot.tar --exclude='/home/user/.mozilla/seamonkey/'         --exclude='/home/user/.cache/*'         --exclude='proc/*'         --exclude='sys/*'         --exclude='dev/*'         --exclude='tmp/*'         --exclude='run/*'         --exclude='mnt/*'         --exclude='media/*' /
Causes /usr/include/sys/ to be skipped. (I'm running this tar command as root, and there are no errors shown)

But when I tar up specifically /usr/include/ then the archive contains the sys/ directory.

Any idea as to why that might happen? What if other files are also skipped and I don't even know about it?
 
Old 05-02-2023, 03:50 AM   #5
EmDeeTee
LQ Newbie
 
Registered: Apr 2023
Distribution: Gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
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.

Thanks
Attached Files
File Type: log Xorg.0.log (5.0 KB, 4 views)
 
Old 05-02-2023, 11:11 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
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?
 
Old 05-03-2023, 01:41 AM   #7
EmDeeTee
LQ Newbie
 
Registered: Apr 2023
Distribution: Gentoo
Posts: 9

Original Poster
Rep: Reputation: 0
Hi! Thanks for your response.

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 View Post
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?
 
Old 05-03-2023, 12:36 PM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] virtualbox is installed along with virtualbox-dkms and virtualbox-ext-pack and linux-headers-generic, but error for no /dev/vboxdrv Astral Axiom Linux - Software 2 03-04-2019 08:09 PM
Moving /tmp to RAM? Moving system from USB keydrive to SD card? littlebigman Linux - Software 2 04-03-2015 10:04 AM
Moving a folder, versus moving its contents (within the same partition) the dsc General 7 06-29-2012 04:46 AM
copying/moving stalls when moving a lot of data to a usb stick =X¥®µ§= Linux - Hardware 10 07-30-2004 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration