qemu mipsとDebianネットワークが機能しない

qemu mipsとDebianネットワークが機能しない

数日経っても、まだdebian8.7(またはubuntu 16.04)とqemuでネットワークを実行できません。すべてデフォルトのパッケージを使用してインストールされます(またはqemuの場合、Shadowのブログ投稿に関連するsrcにもインストールされます)。

エラーは、/etc/network/interfacesの内部または実行中のスクリプトにあるようです。

以下に両方を貼り付けます。おそらくあなたはこのエラーを見つけて私を少し助けてくれるでしょう。時間をいただきありがとうございます。

/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

Debian 8.7 から来ました (約 1 時間前に最新バージョンをダウンロードしてインストールしました)。

スクリプトの実行:

#!/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"

ベストアンサー1

私の問題は厳密に言うと仮想マシンにありますが、「ユーザー」ネットワークを使用しています。解決策:

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

ここでdebian-mipsをインストールしましたが、すぐに次の問題が発生しました。

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インストールされていません。su代わりに使用
  2. PATHsbinは含まれません。走るexport PATH=$PATH:/usr/sbin
  3. ifconfig存在しない。ip a代わりに使用
  4. ifup: unknown interface enp0s19。 Alt:(ip link set dev enp0s19 upしかし、上記のように、実際の問題はdhclientが実行されていないということです)

おすすめ記事