Gentoo Guide · 2 min read · Dec 02, 2025
Gentoo 2009 domU paravirtualizzato utilizzando Debian Lenny
Gentoo 2009 domU paravirtualizzato utilizzando Debian Lenny
Questa guida ti aiuterà a creare un guest xen paravirtualizzato gentoo sotto Debian Lenny. Poiché il rilascio di Gentoo 2008.0 è deprecato, utilizzeremo l’attuale stage gentoo.
Base
dd if=/dev/zero of=gentoo.img count=4096 bs=1Mmkfs.ext3 gentoo.imgmount -o loop gentoo /mnt/gentooGentoo Stage
wget http://mirrors.kernel.org/gentoo/releases/amd64/current/stage3-amd64-20090702.tar.bz2tar jxvf stage3-amd64-20090702.tar.bz2 -C /mnt/gentooModuli
mkdir /mnt/gentoo/lib/modulescp -R /lib/modules/2.6.26-2-xen-amd64 /mnt/gentoo/lib/modulesChroot Base
mount -t proc none /mnt/gentoo/procmount -o bind /dev /mnt/gentoo/devcp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.confchroot /mnt/gentoo /bin/bashenv-updatesource /etc/profileemerge --syncemerge dhcpemerge syslog-ngrc-update add syslog-ng defaultemerge dcronrc-update add dcron defaultnano -w /etc/conf.d/hostnamenano /etc/conf.d/netconfig_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 0passwdexitConfigurazione
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'Problemi con /proc
Correggere questo è solo una questione di commentare la sezione di /sbin/rc che tenta di montare /proc a partire dalla riga 217 circa in questo modo:
# check_statedir /proc
#
# ebegin "Montaggio di proc in /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 $?Dovrai anche commentare la sezione che tenta di montare /sys, altrimenti la prossima volta che avvii, riceverai lo stesso errore con un diverso punto di montaggio che fallisce.
# if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] ; then
# if [[ -d /sys ]] ; then
# ebegin "Montaggio di sysfs in /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 "Nessun /sys per montare sysfs necessario nei kernel 2.6 e successivi!"
# fi
# fiRicevi i nuovi post nella tua casella di posta.
Nessuno spam. Disiscriviti in qualsiasi momento.