Open main menu

CDOT Wiki β

Changes

Pidora 2014 qemu

No change in size, 12:23, 28 May 2014
Fix Pidora and QEMU formatting
== Pidora QEMU Compose ==
Using pidora Pidora in a qemu QEMU environment has some important restrictions to note. The model that is used to emulate pidora Pidora has a hard coded restriction on how much ram it can use(256mb). The programs we use(livemedia-creator) for composing new images require much more ram, which makes the Pidora Qemu QEMU Environment a bad place to try and create images. (See compose on Fedora Arm QemuQEMU)
= Pidora QEMU Setup =
The two stages to setting up Pidora Qemu QEMU involve, getting all the files(kernel, image) and installing the Qemu QEMU environment.
== Getting The Files ==
<pre>
# Choose the directory to put both the image and the compiled qemu QEMU software
pidora_dir=/data/pidora-qemu
cd ${pidora_dir}
# Download the qemu QEMU kernel
wget http://xecdesign.com/downloads/linux-qemu/kernel-qemu
# Download the pidora Pidora image
wget http://pidora.ca/pidora/releases/20/images/Pidora-2014-R1.zip
== 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 QEMU packaged in your distro was not compiled with the proper flags, however it seems to work on the latest fedora 20.
=== Package Install ===
=== Manual Compile ===
If the above package does not allow you to boot Pidora through QemuQEMU, you can try the manual instructions below. This will allow you to use the Qemu QEMU software without actually installing it on your system(I don't like installing source files that are not managed by yum).
The manual compile will require the dependencies for the program to already be installed. Below is a list of packages that might be required(I think only the devel ones are needed?).
<pre>
# Choose the directory for the compiled qemu QEMU software
pidora_dir=/data/pidora-qemu
# Make a new directory for qemu QEMU and enter it
mkdir ${pidora_dir}/raspidev/
cd ${pidora_dir/raspidev/
</pre>
= Boot Pidora in Qemu QEMU =
Make sure you run the steps in "Before Booting" and "The First Boot" before you start Pidora for the first time to avoid issues.
== 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 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 QEMU software
pidora_dir=/data/pidora-qemu
== The First Boot ==
At this step we need to boot pidoraPidora, 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 QEMU software
pidora_dir=/data/pidora-qemu
# This is the command to boot the Pidora Image using the compiled version of qemuQEMU
${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>
<pre>
# Choose the directory for the compiled qemu QEMU software
pidora_dir=/data/pidora-qemu
# This is the command to boot the Pidora Image using the compiled version of qemuQEMU
${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>
<pre>
# Choose the directory for the compiled qemu QEMU software
pidora_dir=/data/pidora-qemu
# This is the command to boot the Pidora Image using the compiled version of qemuQEMU
${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>
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 QEMU in Multi-user:
<pre>
# Choose the directory for the compiled qemu QEMU software
pidora_dir=/data/pidora-qemu
# This is the command to boot the Pidora Image using the compiled version of qemuQEMU
${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>
Log in to root on pidoraPidora, the default root password should be "raspberrypi" if it was not changed. Make sure you are running the next commands on the Qemu QEMU Pidora environment.
<pre>
</pre>
Now the Pidora Qemu QEMU environment has been successfully extended to the max size of the image file.