bengreen.eu Circle Device

 

Quick Reference

Installation of Gentoo on VirtualBox

Gentoo on VirtualBox

Installing Gentoo on VirtualBox... as quickly as possible!

Boot into install cd

Make partitions and file systems on virtual hard drive:

fdisk /dev/sda
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2

Download stage 3 install:

mount /dev/sda2 /mnt/gentoo
mkdir /mnt/gentoo/boot
cd /mnt/gentoo
wget stage3-amd64-nomultilib-<dateandtime>.tar.xz
tar -xf stage3-amd64-nomultilib-<dateandtime>.tar.xz
mkdir -p mnt/portage/distfiles
mkdir -p mnt/portage/packages
nano etc/portage/make.conf
(change the portage package and distfiles directories)

Download the gentoo-current.xz.sqfs file from a gentoo mirror and save it in mnt/portage as portage.sqfs.

Update the etc/fstab to include this line and change boot and root lines appropriately (/dev/sda1, /dev/sda2 etc):

/mnt/portage/portage.sqfs /usr/portage squashfs ro,defaults,nosuid,nodev,noexec 0 0

To make the above line work properly loop and squashfs kernel modules must be present.

Mount the appropriate stuff (bind and what not):

mount --bind /dev dev
mount -t proc proc proc
mount -t sysfs sysfs sys
mkdir usr/portage
mount mnt/portage/portage.sqfs usr/portage

And chroot:

chroot . /bin/bash

Install stuff:

emerge syslinux gentoo-sources

Get a fairly universal configuration from linux-sunxi (it has many more modules and stuff than you need and so if you want to cut it down...)

cd /usr/src/linux
wget https://raw.githubusercontent.com/jwrdegoede/linux-sunxi/master/.config
make menuconfig
make -j4
make install
make modules_install

Install SysLinux:

dd count=1 bs=440 conv=notrunc if=/usr/share/

Make install should be in the right place so be sure to create a valid /boot/syslinux.cfg and install it with:

extlinux --install /boot

I noticed that you cannot boot from the hard disk from the gentoo CD so power off and remove it from the virtual drive and boot the machine.

In your new environment

Configure any stuff you like in /etc/portage/make.conf and /etc/portage/package.[use|keywords] then I emerged these:

app-admin/sudo
app-editors/vim
app-emulation/virtualbox-guest-additions
app-portage/layman
dev-libs/openssl
dev-vcs/git
media-fonts/dejavu
media-fonts/terminus-font
net-misc/openssh
sys-apps/usbutils
sys-boot/syslinux
sys-kernel/gentoo-sources
www-client/palemoon-bin
x11-terms/st
x11-themes/tango-icon-theme
x11-wm/fluxbox

Quick Links: Techie Stuff | General | Personal | Quick Reference