Qemu auf Fritzbox: Unterschied zwischen den Versionen

Aus Zebradem WIKI
Zur Navigation springenZur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(14 dazwischenliegende Versionen derselben Benutzerin werden nicht angezeigt)
Zeile 1: Zeile 1:
<div style="margin: 10px 10px 0pt 0pt; border: 1px solid rgb(51, 51, 51); padding: 0em 1em 1em; background-color: rgb(27, 28, 45);"><br><center>[[Image:ZD-Logo.png]]</center> <center><big><span style="color: rgb(181, 181, 181);">'''''Das Board mit Freiheiten'''''</span></big></center>
<font color="white"></font>
----
<br>
<div style="margin: 0px 20px 15pt 15pt; padding: 0em 1em 1em; background-color: rgb(48, 49, 64); border: 1px solid rgb(0, 0, 0);">
<br>
{{Navi-Sektion}}
{{Navi-Freetz-Sektion}}
==Installing QEMU==
==Installing QEMU==


###################################################Testversion######################################################
Testversion in Überarbeitung und Übersetzung




$ wget http://fabrice.bellard.free.fr/qemu/qemu-0.13.0.tar.gz  
$ wget http://wiki.qemu.org/download/qemu-0.13.0.tar.gz
$ wget http://ftp.riken.go.jp/pub/FreeBSD/distfiles/qemu/qemu-0.13.0.tar.gz  
$ wget http://ftp.riken.go.jp/pub/FreeBSD/distfiles/qemu/qemu-0.13.0.tar.gz  
$ tar zxvf qemu-0.13.0.tar.gz  
$ tar zxvf qemu-0.13.0.tar.gz  
To build QEMU a few packages like SDL needs to be installed on your system. As QEMU is
To build QEMU a few packages like SDL needs to be installed on your system. As QEMU is
present in the archive, just run:
present in the archive, just run:
$ su -c "apt-get install libadplug-dev"
$ su -c "apt-get install libadplug-dev"
$ su -c "apt-get install cl-sdl"
$ su -c "apt-get install cl-sdl"
$ su -c "apt-get install gcc-3.4"
$ su -c "apt-get install gcc-3.4"
Then run the configure script. Note that you need to use gcc version 3.4, as some parts of
Then run the configure script. Note that you need to use gcc version 3.4, as some parts of
QEMU do not build with newer gcc versions.
QEMU do not build with newer gcc versions.
$ cd qemu-0.13.0
$ cd qemu-0.13.0
$ ./configure --cc=gcc-4.4
$ ./configure --cc=gcc-4.4
Then compile it:
Then compile it:
$ make
$ make
And install it on your system:
And install it on your system:
$ su -c "make install"
$ su -c "make install"
Preparing the installation
Preparing the installation
First you need to create an image of the hard disk. In my case I have chosen to emulate a
First you need to create an image of the hard disk. In my case I have chosen to emulate a
Zeile 25: Zeile 36:
is created in qcow format, so that only the non-empty sectors will be written in the file.
is created in qcow format, so that only the non-empty sectors will be written in the file.
A small tip: create a directory to hold all the files related to the emulated MIPS machine.
A small tip: create a directory to hold all the files related to the emulated MIPS machine.
$ qemu-img create -f qcow hda.img 10G
$ qemu-img create -f qcow hda.img 10G
MIPS Kernel Image:
MIPS Kernel Image:
$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-
$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb
qemu_2.6.20-3_mips.deb
$ ar x linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb data.tar.gz
$ ar x linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb data.tar.gz
$ tar -zxvf data.tar.gz ./boot/vmlinux-2.6.20-1-qemu
$ tar -zxvf data.tar.gz ./boot/vmlinux-2.6.20-1-qemu
$ wget http://ftp.de.debian.org/debian/dists/testing/main/installer-mips/current/images/sb1-bcm91250a/netboot/initrd.gz
$ wget http://ftp.de.debian.org/debian/dists/testing/main/installer-
mips/current/images/sb1-bcm91250a/netboot/initrd.gz
Installing Debian Etch
Installing Debian Etch
To start the installation process, use the following line:
To start the installation process, use the following line:
$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd
$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd
initrd.gz -hda hda.img -append "root=/dev/ram console=ttyS0" -nographic
initrd.gz -hda hda.img -append "root=/dev/ram console=ttyS0" -nographic
After a few seconds you should see the kernel booting:
After a few seconds you should see the kernel booting:
And then the first screen of the Debian-Installer:
And then the first screen of the Debian-Installer:
Zeile 61: Zeile 70:
First boot
First boot
To start the system use the following command:
To start the system use the following command:
$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd
$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd
initrd.gz -hda hda.img -append "root=/dev/hda1 console=ttyS0" -nographic
initrd.gz -hda hda.img -append "root=/dev/hda1 console=ttyS0" -nographic
After a few seconds the system should give you a login prompt:
After a few seconds the system should give you a login prompt:
Zeile 67: Zeile 76:
will install all the modules that you may need. It is available in Sid, but not yet in Etch,
will install all the modules that you may need. It is available in Sid, but not yet in Etch,
therefore you have to download it manually.
therefore you have to download it manually.
$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-
$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-
qemu_2.6.20-3_mips.deb
qemu_2.6.20-3_mips.deb
$ su -c "dpkg -i linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb"
$ su -c "dpkg -i linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb"
hda.img to your USB-Harddisk
hda.img to your USB-Harddisk
First umount your USB-Harddisk from your PC
First umount your USB-Harddisk from your PC
$ su -c "umount /dev/sda... "
$ su -c "umount /dev/sda... "
$ su -c "dd if=.../had.img of =/dev/sda"
$ su -c "dd if=.../had.img of =/dev/sda"
Now mount your USB-Harddisk and Copy al Files to a Folder. (“for example
Now mount your USB-Harddisk and Copy al Files to a Folder. (“for example
fritzboxdebian”)
fritzboxdebian”)
$ su –c "mount /dev/sda... "
$ su –c "mount /dev/sda... "
Format and mount your USB-Harddisk and then Copy the “fritzboxdebian” Folder to your
Format and mount your USB-Harddisk and then Copy the “fritzboxdebian” Folder to your
Formated USB-Harddisk.
Formated USB-Harddisk.
Boot Debian on Fritz box:
Boot Debian on Fritz box:
mount USB-Harddisk
mount USB-Harddisk
$ modprobe ext2/3
$ modprobe ext2/3
$ mkdir /var/media/ftp/Harddisk/fritzboxdebian
$ mkdir /var/media/ftp/Harddisk/fritzboxdebian
$ chmod 777 /var/media/ftp/Harddisk/fritzboxdebian/
$ chmod 777 /var/media/ftp/Harddisk/fritzboxdebian/
$ mount –t ext2/3 /dev/sda... /var/media/ftp/Harddisk/fritzboxdebian
$ mount –t ext2/3 /dev/sda... /var/media/ftp/Harddisk/fritzboxdebian
$ chroot /var/media/ftp/.../fritzboxdebian/ bash
$ chroot /var/media/ftp/.../fritzboxdebian/ bash
 
==Quellenangaben==
http://www.aurel32.net/
 
== Wichtige Links ==
 
*[[Hauptseite|Zurück zu Hauptseite]]
*[[Freetz|Zurück zu freetz]]
 
[[Category:Freetz]]
[[Category:Fritzbox]]
[[Category:Software]]
[[Category:Linux]]

Aktuelle Version vom 17. März 2012, 16:41 Uhr


Das Board mit Freiheiten





Zebradem Fritzbox Wiki >> Qemu auf Fritzbox Magyar, Nederlands, Italiano, English
Community Modelle Freetz Fritzbox Tipps & Tricks

Einführung Freetz Pakete Freetz Addons Freetz Tipps Freetz chroot Freetz Images Freetz Faqs

Installing QEMU

Testversion in Überarbeitung und Übersetzung


$ wget http://wiki.qemu.org/download/qemu-0.13.0.tar.gz
$ wget http://ftp.riken.go.jp/pub/FreeBSD/distfiles/qemu/qemu-0.13.0.tar.gz 
$ tar zxvf qemu-0.13.0.tar.gz 

To build QEMU a few packages like SDL needs to be installed on your system. As QEMU is present in the archive, just run:

$ su -c "apt-get install libadplug-dev"
$ su -c "apt-get install cl-sdl"
$ su -c "apt-get install gcc-3.4"

Then run the configure script. Note that you need to use gcc version 3.4, as some parts of QEMU do not build with newer gcc versions.

$ cd qemu-0.13.0
$ ./configure --cc=gcc-4.4

Then compile it:

$ make

And install it on your system:

$ su -c "make install"

Preparing the installation First you need to create an image of the hard disk. In my case I have chosen to emulate a 10GB hard-disk, but this size could be changed to correspond to your needs. Note that the file is created in qcow format, so that only the non-empty sectors will be written in the file. A small tip: create a directory to hold all the files related to the emulated MIPS machine.

$ qemu-img create -f qcow hda.img 10G

MIPS Kernel Image:

$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb
$ ar x linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb data.tar.gz
$ tar -zxvf data.tar.gz ./boot/vmlinux-2.6.20-1-qemu
$ wget http://ftp.de.debian.org/debian/dists/testing/main/installer-mips/current/images/sb1-bcm91250a/netboot/initrd.gz

Installing Debian Etch To start the installation process, use the following line:

$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd
initrd.gz -hda hda.img -append "root=/dev/ram console=ttyS0" -nographic

After a few seconds you should see the kernel booting: And then the first screen of the Debian-Installer: Proceed as a normal installation, until you get to the following screen. Debian-Installer complains that it can't find kernel modules. This is normal because the initrd of another platform is used. This is not really a problem as the QEMU kernel has been compiled with the network driver, the disk driver and ext3 support built-in. However that means you won't be able to install Debian on an XFS partition. This is a known limitation that will disappear when the MIPS QEMU platform is supported in Debian-Installer. So in short answer yes, contrarily to what is suggested. During the installation, Debian installer will complain that it can not found a suitable kernel for this platform, as shown on the screenshot below. This is due to the fact that Debian- Installer currently does not support the QEMU platform; the support will be added post-Etch. An unofficial kernel being provided directly to QEMU, you can safely ignore this message and continue the installation. Near to the end of the installation you will get the following error screen: Again consider this message as harmless. There is no need for a bootloader, as QEMU is able to directly load a kernel and an initrd. Then you will get to the end of the installation. Congratulations! When the systems reboot, just exit QEMU as different parameters have to be used to boot the installed system. Personally, I use killall qemu-system-mips, but other methods could also work. Using the system First boot To start the system use the following command:

$ qemu-system-mips -kernel .../qemu-0.9.0/boot/vmlinux-2.6.20-1-qemu -initrd

initrd.gz -hda hda.img -append "root=/dev/hda1 console=ttyS0" -nographic After a few seconds the system should give you a login prompt: The first thing to do is to install the kernel image corresponding to the running kernel This will install all the modules that you may need. It is available in Sid, but not yet in Etch, therefore you have to download it manually.

$ wget http://ftp.nl.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.20-1-

qemu_2.6.20-3_mips.deb

$ su -c "dpkg -i linux-image-2.6.20-1-qemu_2.6.20-3_mips.deb"

hda.img to your USB-Harddisk First umount your USB-Harddisk from your PC

$ su -c "umount /dev/sda... "
$ su -c "dd if=.../had.img of =/dev/sda"

Now mount your USB-Harddisk and Copy al Files to a Folder. (“for example fritzboxdebian”)

$ su –c "mount /dev/sda... "

Format and mount your USB-Harddisk and then Copy the “fritzboxdebian” Folder to your Formated USB-Harddisk. Boot Debian on Fritz box: mount USB-Harddisk

$ modprobe ext2/3
$ mkdir /var/media/ftp/Harddisk/fritzboxdebian
$ chmod 777 /var/media/ftp/Harddisk/fritzboxdebian/
$ mount –t ext2/3 /dev/sda... /var/media/ftp/Harddisk/fritzboxdebian
$ chroot /var/media/ftp/.../fritzboxdebian/ bash

Quellenangaben

http://www.aurel32.net/

Wichtige Links