Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Virtualbox guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 215
Location: Hertfordshire, UK

PostPosted: Wed Sep 25, 2013 7:47 am    Post subject: Virtualbox guest Reply with quote

If you want to quickly spin up a Gentoo VirtualBox x86 guest, here is a virtual disk image (VDI) that is ready to go. Perhaps it will save you some time.

Gnome, audio, CD, firefox with flash are installed. I do not claim that the kernel options are optimal.

If there is interest, I will keep it updated. Obviously, you can ignore the following as you see fit.
These instructions should be understood only to be a snapshot of something that works.

Comments are welcome.

Instructions:

1. On your host computer (I used Windows), download VirtualBox and VirtualBox Extension Pack, versions 4.2.18 from virtualbox.org.

2. If you wish, enable virtualization in your BIOS. The Gentoo image supplied here supports multiple cpus, although it will work with just one cpu.

3. Download the (1 GB) zip file: http://bit.ly/19Ux9ik

4. Verify the zip file. The SHA1 hash is: 62390757FF2CC73A77577262E41928DF90868160

5. Unzip the 8 GB VDI file and place it in the VirtualBox VMs subdirectory in your home directory.

6. Create a new Virtual Machine in VirtualBox. Call it Gentoo x86. The settings are as follows:


  • General:

    • Basic:
      Name: Gentoo x86
      Type: Linux
      Version: Gentoo
    • Advanced:
      Shared Clipboard: Disabled
      Drag-Drop: Disabled
      Removable Media: Check Remember Runtime Changes
      Mini Toolbar: Check Show in Fullscreen
      Uncheck Show at Top of Screen

  • System:

    • Motherboard:
      Base Memory: 1024 MB
      Boot Order: CD, then HardDisk
      Chipset: PIIX3
      Extended Features:

      • Enable IO APIC
      • Hardware clock in UTC
      • Enable Absolute Pointing Device

    • Processor:
      Two cpus.
      Execution cap 100%
      Enable PAE/NX is not checked
    • Acceleration:
      Enable VT-x/AMD-V is checked
      Enable Nested Paging is checked

  • Display
    Video Memory: 12MB
    Monitor Count: 1
    Other options not checked.
  • Storage
    You need to add the vdi file you downloaded as a disk under a SATA controller (type AHCI).
    There should be an IDE controller of type PIIX4 for the CD drive. Use host I/O cache should be checked.

  • Audio
    Enable Audio is checked
    Host Audio Driver is Windows DirectSound
    Audio Controller is ICH AC97

  • Network
    Enable Network Adapter 1, attached to NAT.
    Advanced: Adapter type Intel PRO 1000MT Desktop (82540EM)
    Cable connected is checked.

  • Serial ports: Everything is unchecked. No support.

  • USB:
    Enable USB Controller is checked.
    Enable USB 2.0 (EHCI) controller is checked.


7. Start the virtual machine.

8. There are two acccounts: larry and root. The password is gentoo.
_________________
Harold Naparst


Last edited by hnaparst on Wed Oct 02, 2013 9:26 am; edited 2 times in total
Back to top
View user's profile Send private message
hagar-dunor
n00b
n00b


Joined: 26 Apr 2012
Posts: 18

PostPosted: Tue Oct 01, 2013 12:55 pm    Post subject: Reply with quote

Hi, maybe it would be worth to merge topics ? https://forums.gentoo.org/viewtopic-t-964410.html

One comment : your virtual drive looks huge, have you tried to fill your partitions with zeros before compressing ?

For each partition :

Code:
dd if=/dev/zero of=dump
rm dump


Cheers


Last edited by hagar-dunor on Tue Oct 01, 2013 5:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 215
Location: Hertfordshire, UK

PostPosted: Tue Oct 01, 2013 4:29 pm    Post subject: Reply with quote

Thanks for your tip about zeroing out unused space. Now the zip file is half of what it was before.

Regarding merging, I'll leave that up to the moderators.
_________________
Harold Naparst
Back to top
View user's profile Send private message
hagar-dunor
n00b
n00b


Joined: 26 Apr 2012
Posts: 18

PostPosted: Tue Oct 01, 2013 5:40 pm    Post subject: Reply with quote

Still seems too fat. A full gnome virtual image should weight between 700 and 800 MB. Some additional tips I use for my virtual image :

-Wipe /usr/portage/distfiles
-"make clean" in /usr/src/linux
-Don't forget to zero unused space on /boot partition if it's a partition on it's own, same for swap if it happened to be used.

About thread merging, I was thinking of something that we should initiate, a common thread to host all gentoo virtual images in one place. But it's just an idea.
Back to top
View user's profile Send private message
hnaparst
Apprentice
Apprentice


Joined: 27 Jul 2005
Posts: 215
Location: Hertfordshire, UK

PostPosted: Wed Oct 02, 2013 9:28 am    Post subject: Reply with quote

Thanks again for your pointers. Now the zip file is 1.05 GB and the VDI file is 8 GB. A few useful commands follow, mostly for my own reference. Users shouldn't need these commands:

Sometimes VirtualBox will refuse to mount the vdi file if it has previously encountered another vdi with the same identifier.

Code:
VBoxManage.exe internalcommands sethduuid hd.vdi


boot into runlevel 1 by placing a 1 at the end of the kernel line in grub. Not sure if this actually worked.

Code:
mount -n -o remount,ro /dev/sda1 /
zerofree /dev/sda1
shutdown -h now


To minimize the size of the disk image.

Code:
VboxManage modifyvdi hd.vdi compact

_________________
Harold Naparst
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum