Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Install QEMU on Ubuntu to simulate MIPSEL and run Debian

Shulou Source: shulou.com Published: 2022-06-01 05:33:23 09月13日 Update

# install QEMU###

Suppose you already have an ubuntu 14 Linux:

First install qemu on ubuntu and execute the following command:

# change the line apt-get, and then install qemu

Sudo apt-get update

Sudo apt-get install qemuqemu-system

Download the corresponding image from the mips directory in http://people.debian.org/~aurel32/qemu:

Here I mark the kernel of my choice, as well as the debian image file (another image file I will error VFS mount failure when starting).

# configure virtual machine network #

1) modify the / etc/network/interfaces file in ubuntu to the following:

2) execute the following command in ubuntu to install the bridge tool and start the bridge:

Apt-get installbridge-utils

Ifup br0

3) add the following script to the ubuntu / etc/qemu-ifup file, and these instructions will be executed when qemu starts:

Echo "Executing/etc/qemu-ifup"

Echo "Bringing up $1for bridged mode..."

Sudo / sbin/ifconfig $10.0.0.0 promisc up

Echo "Adding $1 tobr0..."

Sudo / sbin/brctl addifbr0 $1

Sleep 2

The added result is as follows:

Execute the command in ubuntu to modify the contents of the / etc/sudoers file:

Sudo visudo

# add the following script at the end of the file

Cmnd_Alias QEMU = / sbin/brctl,/sbin/ifconfig

% qemu ALL=NOPASSWD: QEMU

Execute the following command to start the virtual machine in the directory where the kernel and image files are stored in ubuntu:

Sudo qemu-system-mipsel-M malta-kernel vmlinux-2.6.32-5-4kc-malta-hdadebian_squeeze_mipsel_standard.qcow2-append "root=/dev/sda1console=tty0"-net nic-net tap

If all goes well, the running window of QEMU will pop up:

The network is normal:

Reference article:

1) http://blog.csdn.net/huojianying123456/article/details/50242831

2) http://blog.163.com/yanshuang_888222/blog/static/4670967720141043746862/

3) https://www.aurel32.net/info/debian_mips_qemu.php

Tags: File command image content kernel directory network script bridge run tool instruction article time end result report reference select configure Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Huawei Docker NVidia MariaDB