Site Tools


setup:v_marduk

This is an old revision of the document!


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
setup/v_marduk.1571377685.txt.gz · Last modified: by sloader