Changes

Jump to: navigation, search

Pidora 2014 qemu

4,335 bytes added, 11:55, 28 May 2014
no edit summary
= Pidora QEMU Setup =
== Getting The Files ==
<pre>
# Choose the directory to put both the image and the compiled qemu software
# Unzip the image file
unzip Pidora-2014-R1.zip
 
</pre>
 
== Getting QEMU ==
 
There are multiple ways to get qemu-system-arm. You can compile a new version with a few select flags, or you can try installing the version that your distribution has already compiled. It is possible that the qemu packaged in your distro was not compiled with the proper flags, however it seems to work on the latest fedora 20.
 
=== Through Distro Packages ===
This method should probably be good enough to run Pidora in Qemu. I have only tested on Fedora 20, and it works.
 
<pre>
yum install qemu-system-arm
</pre>
 
=== Manual Compile ===
If the above package does not allow you to boot Pidora through Qemu, you can try the manual instructions below. This will allow you to use the Qemu software without actually installing it on your system(I don't like installing source files that are not managed by yum).
 
<pre>
 
 
# Choose the directory for the compiled qemu software
pidora_dir=/data/pidora-qemu
# Make a new directory for qemu and enter it
cd ${pidora_dir/raspidev/
 
git clone git://git.qemu-project.org/qemu.git
cd ${pidora_dir}/raspidev/qemu/
 
# Configure the options for raspberry pi
./configure --target-list="arm-softmmu arm-linux-user" --enable-sdl --prefix=/usr
 
# Finally, compile it
make
 
</pre>
 
= Boot Pidora in Qemu =
 
 
== Before Booting ==
{{Admon/important| Warning! | Running the command "dd" can be dangerous and could result in data loss if not used properly.}}
Make sure that you add some more space to the image file. Depending on what you want to do with the pidora image you may want more space. Replace the value in the variable size, with the number of GB to increase the size of the image with.
<pre>
# Choose the directory for the compiled qemu software
pidora_dir=/data/pidora-qemu
 
# Size = GB
size=4
 
 
dd if=/dev/zero bs=1G count=${size} >> ${pidora_dir}/Pidora-2014-R1.img
</pre>
 
== The First Boot ==
At this step we need to boot pidora, start first boot, and allow it to automatically resize the partition inside the image to the right size. This will only work if you already increase the size of the image in the previous steps.
 
<pre>
# Choose the directory for the compiled qemu software
pidora_dir=/data/pidora-qemu
 
# This is the command to boot the Pidora Image using the compiled version of qemu
${pidora_dir}/raspidev/qemu/arm-softmmu/qemu-system-arm -kernel ${pidora_dir}/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda ${pidora_dir}/Pidora-2014-R1.img
</pre>
There are multiple ways === Manually Resize Pidora ===If for some reason the Pidora Partitions did not resize after running first boot and you did run the dd command above to increase the size of the image, then we will manually resize the file system here. First start up Pidora Qemu in Multi-user:<pre># Choose the directory for the compiled qemu softwarepidora_dir=/data/pidora-qemu # This is the command to get boot the Pidora Image using the compiled version of qemu${pidora_dir}/raspidev/qemu/arm-softmmu/qemu-system-arm-kernel ${pidora_dir}/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw 3" -hda ${pidora_dir}/Pidora-2014-R1. You can compile img</pre> Log in to root on pidora, the default root password should be "raspberrypi" if it was not changed. Make sure you are running the next commands on the Qemu Pidora environment. <pre>fdisk /dev/sda# list all partitions, note the start location of partition 2 p# delete a partitiond# select partition 22# create a new version with a few partitionn# select partition 22# select flagsstart location, or you can try installing default should be the start location from above<press enter for default># select end location<press enter for default># write/save the changesw<pre>     == Pidora Graphical Boot == <pre># Choose the directory for the version that your distribution has already compiled. qemu softwarepidora_dir=/data/pidora-qemu
git clone git:# This is the command to boot the Pidora Image using the compiled version of qemu${pidora_dir}/raspidev/git.qemu/arm-project.orgsoftmmu/qemu.gitcd -system-arm -kernel ${pidora_dir}/raspidevkernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/qemusda2 panic=1 rootfstype=ext4 rw" -hda ${pidora_dir}/Pidora-2014-R1.img
</pre>
== Pidora Multi-user Boot ==
 
<pre>
# Choose the directory for the compiled qemu software
pidora_dir=/data/pidora-qemu
 
# This is the command to boot the Pidora Image using the compiled version of qemu
${pidora_dir}/raspidev/qemu/arm-softmmu/qemu-system-arm -kernel ${pidora_dir}/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw 3" -hda ${pidora_dir}/Pidora-2014-R1.img
</pre>
198
edits

Navigation menu