Mustang: Installation of Fedora 19 Disk Image
Pre-requisites
Prior to downloading and installing the Mustang build, you will require access to the following equipment:
- An existing Linux system, for example a laptop or desktop system
- A USB hard disk enclosure, or a spare disk bay in a Linux system
- A USB serial "null modem" cable (or USB serial adapter with "null modem" cable), or a serial port and a "null modem" cable
Download Fedora 19 image
Download image from: ftp://ftp.ges.redhat.com/private/jcm/apm/f19_remix/apm_f19_v4.tar.xz
Hook up Mustang board
Prior to installing Fedora, verify that the Mustang board is correctly hooked up and ready for use.
Connect serial cable
- Attach a USB serial cable to your Linux system (or use a serial port), along with a "null modem" cable.
- Attach the other end of the serial cable to the DB9 connector on the rear of the Mustang system.
- Attach an Ethernet cable into the first Ethernet port on the Mustang system, which is located furthest away from the DB9 connector, atop the two USB connectors. This is the port that Linux will recognize as "eth0" when booted.
Connect to the mustang console from another system running screen
screen -S console /dev/ttyS0 115200Power Mustang board on
Attach the power cable to the Mustang board.
Extract Mustang Build
Once you have downloaded the Mustang build, you will need to extract the archive file. Use the following command from a Linux system:
tar xvfJ apm_f19_v4.tar.xzThis will extract the following files:
apm_f19_v4.img.xz
config_jcm15
mustang_linux_src_1.08.12-beta_rc.tar.xzThe first file is a compressed disk image that will be written to the hard disk installed within the Mustang board case. The other two files contain the Linux kernel configuration and source (should you - optionally - wish to rebuild the kernel that ships within this image).
Extract the disk image:
xz -dk apm_f19_v4.img.xzThis will extract the following files:
apm_f19_v4.imgCopy the disk image to the Mustang board
The Mustang board ships in a case containing a 500GB hard disk. Carefully remove this disk drive from the case. Then install it into either a removable USB enclosure, or into a spare disk bay within your Linux system. Linux should detect this drive and assign a name, such as "/dev/sdc". You can determine the name using the "dmesg" or (preferably) "lsblk" commands.
Copy the disk image onto the hard disk:
dd if=apm_f19_v4.img of=/dev/sdX bs=1MReplace "/dev/sdX" with the name of the device, for example "/dev/sdc".
Once this operation has completed, ensure that the drive is ejected safely from your Linux system:
sync
eject /dev/sdXConfigure the Mustang board to boot Fedora
Install the hard disk drive into the Mustang case. Next, power on the system and interrupt the boot sequence when the countdown begins. Type the following commands (do not type the "Mustang#" prompt the precedes each command as it is typed into U-Boot):
Mustang# setenv rh_load_kern_scsi 'ext4load scsi 0:1 ${kern_addr_r} /uImage'
Mustang# setenv rh_load_fdt_scsi 'ext4load scsi 0:1 ${fdt_addr_r} /mustang.dtb'
Mustang# setenv rh_local_load 'run rh_load_kern_scsi rh_load_fdt_scsi'
Mustang# setenv rh_local_args 'setenv bootargs root=/dev/sda2 rw panic=1 console=ttyS0,115200 earlyprintk=uart8250-32bit,0x1c020000 debug maxcpus=${num_cores}'
Mustang# setenv rh_local 'scsi init; run rh_local_load; run rh_local_args; bootm ${kern_addr_r} - ${fdt_addr_r}'
Mustang# setenv bootcmd 'run rh_local'Save these settings into the Mustang's NOR flash memory with the following command:
Mustang# saveenvBooting Fedora
Once the board has been configured, you can type "reset" or power-cycle the board, and it should automatically boot into the Fedora engineering build. The default password for the "root" user is "fedora".
Resizing the disk
To do this, login to the Mustang, and type:
fdisk /dev/sdaThen delete the second partition (the root partition):
d
2Next recreate the second partition, accepting all of the defaults:
n
p
2
1050624
PRESS ENTERThis will cause all of the available disk space to be used, as opposed to the very limited space in the default image. Exit from frisk:
wThen reboot the Mustang system. After rebooting, instruct the Mustang to use this new space:
resize2fs /dev/sda2This will instruct the ext4 filesystem to resize itself to fill all of the remaining (e.g. 500GB in the example) free disk space.