3

since few days I still can not run network on debian8.7 (or ubuntu 16.04) and qemu. all installed with default packages (or - in case of qemu, from src too relating to shadow'sblog post).

I think that the bug is inside the /etc/network/interfaces or in the running script.

I will paste both below. Maybe you will spot the bug and help me a little bit. Thank you for your time.

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

# auto br0
iface br0 inet dhcp
    pre-up tunctl -t tap0 -g tuntap
    pre-up tunctl -t tap1 -g tuntap
    pre-up ip link set tap0 up
    pre-up ip link set tap1 up
    bridge_ports eth0 tap0 tap1
    bridge_stp off
    bridge_maxwait 0
    bridge_fd 0
    post-down ip link set tap0 down
    post-down ip link set tap1 down
    post-down tunctl -d tap0
    post-down tunctl -d tap1

it is from debian 8.7 (I downloaded and installed latest version some about one hour ago).

Script run:

#!/bin/sh

image="/home/myuser/routers_research/debian-mipsel/debian_squeeze_mipsel_standard.qcow2"
kernel="/home/myuser/routers_research/debian-mipsel/vmlinux-2.6.32-5-4kc-malta"

echo "[+] Start debian mipsel.."

qemu-system-mipsel -net nic -net tap,ifname=tap1,script=no,downscript=no -nographic -M malta -m 256 -kernel $kernel -hda $image -append "root=/dev/sda1 console=tty0"
2

1 Answer 1

0

My problem was entirely VM side but I was using "user" networking. The solution:

su
# <root pwd>
/usr/sbin/dhclient
# problem solved

I had installed debian-mips from here and immediately hit the following out-of-the-box issues:

wget http://http.us.debian.org/debian/dists/buster/main/installer-mips/current/images/malta/netboot/initrd.gz
wget http://http.us.debian.org/debian/dists/buster/main/installer-mips/current/images/malta/netboot/vmlinux-4.19.0-16-4kc-malta
# Installed...
# Copy /boot files out of vm...
# Run with:
qemu-system-mips -M malta -m 256 -hda hda.img \
    -kernel vmlinux-4.19.0-16-4kc-malta \
    -initrd initrd.img-4.19.0-16-4kc-malta \
    -append "root=/dev/sda1 console=ttyS0 nokaslr" \
    -nographic \
    -device e1000-82545em,netdev=user.0 \
    -netdev user,id=user.0,hostfwd=tcp::5555-:22
  1. sudo is not installed. Use su instead
  2. PATH doesn't include sbin. Run export PATH=$PATH:/usr/sbin
  3. ifconfig doesn't exist. Use ip a instead
  4. ifup: unknown interface enp0s19. Alt: ip link set dev enp0s19 up (but as above the real issue was dhclient not running)

You must log in to answer this question.