Category Archives: gentoo

XEN Paravirtualized Gentoo 2009 domU

http://www.howtoforge.com/paravirtualized-gentoo-2009-domu-using-debian-lenny

Base

dd if=/dev/zero of=gentoo.img count=4096 bs=1M
mkfs.ext3 gentoo.img
mount -o loop gentoo /mnt/gentoo

Gentoo Stage

wget http://mirrors.kernel.org/gentoo/releases/amd64/current/stage3-amd64-20090702.tar.bz2
tar jxvf stage3-amd64-20090702.tar.bz2 -C /mnt/gentoo

Modules

mkdir /mnt/gentoo/lib/modules
cp -R /lib/modules/2.6.26-2-xen-amd64 /mnt/gentoo/lib/modules

Chroot Base

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
emerge –sync
emerge dhcp
emerge syslog-ng
rc-update add syslog-ng default
emerge dcron
rc-update add dcron default
nano -w /etc/conf.d/hostname
nano /etc/conf.d/net

config_eth0=( “192.168.1.100 netmask 255.255.255.0” )
routes_eth0=( “default gw 192.168.1.254” )
#config_eth0=( “dhcp” )

nano /etc/fstab

/dev/sda1 / ext3 noatime 0 1
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

passwd
exit

Configuration

kernel = ‘/boot/vmlinuz-2.6.26-2-xen-amd64’
ramdisk = ‘/boot/initrd.img-2.6.26-2-xen-amd64’
memory = ‘256’
root = ‘/dev/sda1 ro’
disk = [‘file:/xen/gentoo.img,sda1,w’,]
name = ‘Gentoo 2009’
dhcp = ‘dhcp’
vif = [ ” ]
extra = ‘xencons=tty’
on_poweroff = ‘destroy’
on_reboot = ‘restart’
on_crash = ‘restart’

Problems with /proc
Fixing this is just a matter of commenting out the section of /sbin/rc that attempts to mount /proc begining at around line 217 like this:

# check_statedir /proc
#
# ebegin “Mounting proc at /proc”
# if [[ ${RC_USE_FSTAB} = “yes” ]] ; then
# mntcmd=$(get_mount_fstab /proc)
# else
# unset mntcmd
# fi
# try mount -n ${mntcmd:–t proc proc /proc -o noexec,nosuid,nodev}
# eend $?

You’ll also need to comment the section attempting to mount /sys as well, or the next time you boot, you’ll get the same error with a different mount point failing.

# if [ “$(get_KV)” -ge “$(KV_to_int ‘2.6.0’)” ] ; then
# if [[ -d /sys ]] ; then
# ebegin “Mounting sysfs at /sys”
# if [[ ${RC_USE_FSTAB} = “yes” ]] ; then
# mntcmd=$(get_mount_fstab /sys)
# else
# unset mntcmd
# fi
# try mount -n ${mntcmd:–t sysfs sysfs /sys -o noexec,nosuid,nodev}
# eend $?
# else
# ewarn “No /sys to mount sysfs needed in 2.6 and later kernels!”
# fi
# fi

vmware workstation 6 on gentoo

after installation:

gpasswd -a USERNAME vmware

to run vmware:

VMWARE_USE_SHIPPED_GTK=yes /opt/vmware/workstation/bin/vmware

when I’ve tried to power on a virtual machine, I’ve got this error:

Unable to change virtual machine power state: Failed to connect to peer process

solution for me was:

chmod o+x /opt/vmware/workstation/lib/bin/vmware-vmx

gentoo: ’emerge’ problems

problem:

/usr/bin/xgettext: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

solution:
to resolve such problems correction of broken lib dependencies required:

revdep-rebuild -p

the specified problem were corrected with following:

emerge –oneshot -p =sys-devel/gettext-0.16.1



kde @ gentoo

> make.conf
#####
XUSE=”truetype X new-login xorg xscreensaver xv xcomposite xinerama opengl aiglx”
IMAGEUSE=”jpeg gif tiff png svg pdf”
MEDIAUSE=”alsa mad vidix asf win32codecs dvd mp4 aac x264 xvid nsplugin mp3 real”
GENERAL=”samba java bzip2 symlink sqlite spell xml”
SYSTEM=”hal fam dbus aoss threads”
NOTUSE=”-arts -qt4 -ipv6″
KDEUSE=”kde kdeenablefinal qt3 rdesktop”
// DEV=”mysql mysqli postgres apache2 php”

USE=”${NOTUSE} ${SYSTEM} ${GENERAL} ${IMAGEUSE} ${XUSE} ${KDEUSE} ${MEDIAUSE}”
######

emerge xorg-x11

emerge kdebase-meta

xorgcfg

emerge alsa-utils pmount

rc-update add alsasound default
rc-update add dbus default
rc-update add hald default
rc-update add xdm default

gpasswd -a YOURUSERNAME plugdev

vi /etc/conf.d/xdm
DISPLAYMANAGER=”kdm”

gentoo-install.com