Firstly my hardware is running Ubuntu 16-04 64-bit on Ryzen 7 AMD64 hardware:
I would like to install a PPC-based Ubuntu as downloaded from here:
wget http://cdimage.ubuntu.com/releases/trusty/release/ubuntu-14.04.5-server-powerpc.iso
Next is to mount the above image as cdrom image:
sudo mount -o loop=/dev/loop0 ubuntu-14.04.5-server-powerpc.iso /mnt/xubuntu/
Now going into /mnt/xubuntu/install we can identify many files: rootfilesystem, and powerpc kernel + initrd files (under powerpc and powerpc64 and e500mc)
We will use the powerpc64/vmlinux and powerpc64/initrd.gz files.
And for the squashfs it is in squashfs format – which is readonly filesystem. Since squashfs format is not recognizable by QEMU I have decided to manually convert it to ext3 filesystm as follows:
sudo mount -o loop=/dev/loop1 filesystem.squashfs /mnt/rootfs/ cd /mnt/rootfs sudo tar cvfz /tmp/rootfs.tgz . (notice the last char is full stop ".") dd if=/dev/zero of=/sda3/ppc_rootfs.img bs=600M count=1 cd /sda3 mkfs.ext3 ppc_rootfs.img sudo mount ppc_rootfs.img /mnt/rootfs/ cd /mnt/rootfs/ sudo tar xvfz /tmp/rootfs.tgz . sudo umount /mnt/rootfs cd /mnt/xubuntu/install
And the directory looked like this:
And to startup QEMU:
sudo qemu-system-ppc64 -kernel powerpc64/vmlinux -initrd powerpc64/initrd.gz -boot c -hda /sda3/ppc_rootfs.img
And booting goes ahead:
Enter “Alt-Ctrl-t” and you will get this:
Select the “Execute a shell” and now you have a shell to run any PPC binaries you want (without ever using any “qemu-user” utilities).
Or you may want to install from the ISO file:
dd if=/dev/zero of=/sda3/ppc_hda.img bs=600M count=1 mkfs.ext3 /sda3/ppc_hda.img sudo qemu-system-ppc64 -kernel powerpc64/vmlinux -initrd powerpc64/initrd.gz -boot c -hda /sda3/ppc_hda.img -cdrom ~/ubuntu-14.04.5-server-powerpc.iso
You must be logged in to post a comment.