<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Howto: Boot your GoFlex/Dockstar rootfs into QEMU (sort of)</title>
        <description> Sometimes, it might be useful to be able to boot you GoFlex/Dockstar rootfs in a virtual machine.
Unfortunately, as of now qemu doesn&amp;#039;t support emulating Marvell Kirkwood CPU&amp;#039;s. Nevertheless you can
still boot your rootfs in a virtual environment, using a versatile arm kernel. The emulated hardware will, however, be different. Also, there&amp;#039;s no uboot emulation.

I&amp;#039;m assuming that you&amp;#039;re using a Ubuntu system, but probably every Debian based distro should be fine.
Connect your flash drive containing the rootfs to your Ubuntu box and mount it under /media/rootfs. 

Open a terminal and run


sudo -s
wget http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile
wget http://people.debian.org/~aurel32/qemu/armel/vmlinuz-2.6.32-5-versatile
wget http://security.debian.org/debian-security/pool/updates/main/l/linux-2.6/linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb
apt-get install qemu-system libcap2-bin bridge-utils
setcap cap_net_admin=ei /usr/bin/qemu
nano /etc/network/interfaces
add this to the end of the file

auto eth0
iface eth0 inet dhcp

auto br0
iface br0 inet dhcp
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
now run

ifdown eth0
ifup br0
modprobe tun
nano /etc/qemu-ifup
replace the content of the file with this

#!/bin/sh
echo &amp;quot;Executing /etc/qemu-ifup&amp;quot;
echo &amp;quot;Bringing up $1 for bridged mode...&amp;quot;
/sbin/ifconfig $1 0.0.0.0 promisc up
echo &amp;quot;Adding $1 to br0...&amp;quot;
/usr/sbin/brctl addif br0 $1
sleep 2
now run

dd if=/dev/zero of=kirkwood_rootfs.img bs=1MB count=2000
mkfs.ext3 -F kirkwood_rootfs.img
mount -o loop kirkwood_rootfs.img /mnt
cp -a /media/rootfs/* /mnt
nano /mnt/sbin/autologin.sh
paste this

#!/bin/sh
exec /bin/login -f root
now run

chmod +x /mnt/sbin/autologin.sh
echo &amp;#039;c1:2345:respawn:/sbin/agetty -l /sbin/autologin.sh -n 38400 tty1 linux&amp;#039; &amp;gt;&amp;gt; /mnt/etc/inittab
cp linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb /mnt/root
rm /mnt/etc/udev/rules.d/70-persistent-net.rules
umount /mnt
Finally, start QEMU

qemu-system-arm -M versatilepb -m 128M -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda kirkwood_rootfs.img -append &amp;quot;root=/dev/sda&amp;quot; -net nic,macaddr=00:16:3e:00:00:01 -net tap
You will be automatically logged in as root, but network will not work. In QEMU do this

dpkg -i linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb
reboot
After the reboot your virtual machine should also have internet access.


Sources: 
http://www.linuxquestions.org/questions/linux-software-2/autologin-without-gui-374338/
http://people.debian.org/~aurel32/qemu/armel/
http://www.aurel32.net/info/debian_arm_qemu.php
https://help.ubuntu.com/community/KVM/Networking</description>
        <link>https://forum.doozan.com/read.php?2,5971,5971#msg-5971</link>
        <lastBuildDate>Sun, 15 Mar 2026 16:45:31 -0500</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forum.doozan.com/read.php?2,5971,5971#msg-5971</guid>
            <title>Howto: Boot your GoFlex/Dockstar rootfs into QEMU (sort of)</title>
            <link>https://forum.doozan.com/read.php?2,5971,5971#msg-5971</link>
            <description><![CDATA[ Sometimes, it might be useful to be able to boot you GoFlex/Dockstar rootfs in a virtual machine.<br />
Unfortunately, as of now qemu doesn&#039;t support emulating Marvell Kirkwood CPU&#039;s. Nevertheless you can<br />
still boot your rootfs in a virtual environment, using a versatile arm kernel. The emulated hardware will, however, be different. Also, there&#039;s no uboot emulation.<br />
<br />
I&#039;m assuming that you&#039;re using a Ubuntu system, but probably every Debian based distro should be fine.<br />
Connect your flash drive containing the rootfs to your Ubuntu box and mount it under /media/rootfs. <br />
<br />
Open a terminal and run<br />
<br />
<pre class="bbcode">
sudo -s
wget <a href="http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile"  rel="nofollow">http://people.debian.org/~aurel32/qemu/armel/initrd.img-2.6.32-5-versatile</a>
wget <a href="http://people.debian.org/~aurel32/qemu/armel/vmlinuz-2.6.32-5-versatile"  rel="nofollow">http://people.debian.org/~aurel32/qemu/armel/vmlinuz-2.6.32-5-versatile</a>
wget <a href="http://security.debian.org/debian-security/pool/updates/main/l/linux-2.6/linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb"  rel="nofollow">http://security.debian.org/debian-security/pool/updates/main/l/linux-2.6/linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb</a>
apt-get install qemu-system libcap2-bin bridge-utils
setcap cap_net_admin=ei /usr/bin/qemu
nano /etc/network/interfaces</pre>
add this to the end of the file<br />
<pre class="bbcode">
auto eth0
iface eth0 inet dhcp

auto br0
iface br0 inet dhcp
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0</pre>
now run<br />
<pre class="bbcode">
ifdown eth0
ifup br0
modprobe tun
nano /etc/qemu-ifup</pre>
replace the content of the file with this<br />
<pre class="bbcode">
#!/bin/sh
echo &quot;Executing /etc/qemu-ifup&quot;
echo &quot;Bringing up $1 for bridged mode...&quot;
/sbin/ifconfig $1 0.0.0.0 promisc up
echo &quot;Adding $1 to br0...&quot;
/usr/sbin/brctl addif br0 $1
sleep 2</pre>
now run<br />
<pre class="bbcode">
dd if=/dev/zero of=kirkwood_rootfs.img bs=1MB count=2000
mkfs.ext3 -F kirkwood_rootfs.img
mount -o loop kirkwood_rootfs.img /mnt
cp -a /media/rootfs/* /mnt
nano /mnt/sbin/autologin.sh</pre>
paste this<br />
<pre class="bbcode">
#!/bin/sh
exec /bin/login -f root</pre>
now run<br />
<pre class="bbcode">
chmod +x /mnt/sbin/autologin.sh
echo &#039;c1:2345:respawn:/sbin/agetty -l /sbin/autologin.sh -n 38400 tty1 linux&#039; &gt;&gt; /mnt/etc/inittab
cp linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb /mnt/root
rm /mnt/etc/udev/rules.d/70-persistent-net.rules
umount /mnt</pre>
Finally, start QEMU<br />
<pre class="bbcode">
qemu-system-arm -M versatilepb -m 128M -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda kirkwood_rootfs.img -append &quot;root=/dev/sda&quot; -net nic,macaddr=00:16:3e:00:00:01 -net tap</pre>
You will be automatically logged in as root, but network will not work. In QEMU do this<br />
<pre class="bbcode">
dpkg -i linux-image-2.6.32-5-versatile_2.6.32-35squeeze2_armel.deb
reboot</pre>
After the reboot your virtual machine should also have internet access.<br />
<br />
<br />
Sources: <br />
<a href="http://www.linuxquestions.org/questions/linux-software-2/autologin-without-gui-374338/"  rel="nofollow">http://www.linuxquestions.org/questions/linux-software-2/autologin-without-gui-374338/</a><br />
<a href="http://people.debian.org/~aurel32/qemu/armel/"  rel="nofollow">http://people.debian.org/~aurel32/qemu/armel/</a><br />
<a href="http://www.aurel32.net/info/debian_arm_qemu.php"  rel="nofollow">http://www.aurel32.net/info/debian_arm_qemu.php</a><br />
<a href="https://help.ubuntu.com/community/KVM/Networking"  rel="nofollow">https://help.ubuntu.com/community/KVM/Networking</a>]]></description>
            <dc:creator>Vlad</dc:creator>
            <category>Debian</category>
            <pubDate>Sun, 02 Oct 2011 15:44:39 -0500</pubDate>
        </item>
    </channel>
</rss>
