=== setup v_marduk ===
== host as root ==
echo 1 > /proc/sys/net/ipv4/ip_forward
emerge -1av bridge-utils usermode-utilities
mkdir /mnt/virt
chown -R sloader:users /mnt/virt
brctl addbr br0
ifconfig br0 192.168.168.1 netmask 255.255.255.0 up
tunctl -b -u sloader -t tap0
brctl addif br0 tap0
ifconfig tap0 up 0.0.0.0 promisc
host as sloader:
qemu-img create -f qcow2 marduk.img 10G
start_marduk_cd.sh
#!/bin/bash
qemu-system-x86_64 \
-vnc 192.168.178.111:0 \
-cpu host \
-smp 2 \
-drive file=marduk.img,if=virtio,media=disk \
-m 2048 \
-k de \
-net nic,macaddr=00:00:00:00:00:01,model=virtio \
-net tap,ifname=tap0,script=no,downscript=no \
-cdrom systemrescuecd-6.0.3.iso \
-boot d \
-enable-kvm
start_marduk_disk.sh
#!/bin/bash
qemu-system-x86_64 \
-cpu host \
-smp 2 \
-drive file=marduk.img,if=virtio,media=disk \
-m 1024 \
-k de \
-vga none \
-nographic \
-net nic,macaddr=00:00:00:00:00:01,model=virtio \
-net tap,ifname=tap0,script=no,downscript=no \
-enable-kvm &
in vm
bash
passwd
net-setup eth0 # to 192.168.168.3/24 gw 192.168.168.1
== switch so ssh ==
fdisk /dev/vda
Device Boot Start End Sectors Size Id Type
/dev/vda1 2048 309247 307200 150M 83 Linux
/dev/vda2 309248 4503551 4194304 2G 83 Linux
/dev/vda3 4503552 20971519 16467968 7.9G 83 Linux
mkfs.ext2 /dev/vda1
mkswap /dev/vda2
swapon /dev/vda2
mkreiserfs /dev/vda3
mount /dev/vda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/vda1 /mnt/gentoo/boot
cd /mnt/gentoo
tar xpf stage3-amd64-nomultilib-20191016T214504Z.tar.xz
mkdir usr/portage
mkdir var/distfiles
/etc/init.d/rpc.statd start
mount.nfs 192.168.168.1:/usr/portage /mnt/gentoo/usr/portage
mount.nfs 192.168.168.1:/var/distfiles /mnt/gentoo/var/distfiles
mount -o bind /dev /mnt/gentoo/dev
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo /bin/bash
== base sys ==
nano -w /etc/portage/make.conf
eselect profile set 11
env-update
emerge -1av portage
eselect python set python3.7
nano -w /etc/locale.gen
locale-gen
date 10180821
echo "Europe/Berlin" > /etc/timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
emerge -1av gcc
gcc-config 2
. /etc/profile
emerge -1av glibc