Many of you have run into some wonky behaviors, or caused something to go wrong with your oxnas based units, and there will only be more to come, so this method will try to solve it. As an aside, this is a way to boot from Arch Linux ARM without modifying NAND at all, but requiring an eSATA housing, and the appropriate case modifications to go along with that.
note: I am doing this with a Tt BlacX. There are reports that this does not work with some other eSATA docks.
- A PLX OXNAS 782x based system, probable a Cloud Engines Pogoplug Pro, V3 or B01 (P01/P21/P25/B01/B02/B03/B04)
- Willingness to crack that casing open.
- A blank, or to-be-blanked SATA HDD.
- An eSATA dock/housing (preferably with USB also) & an eSATA to SATA adapter (or you can ghetto rig, but that's not a pretty solution)
- A linux system (or vm, or live cd/usb) in order to use the commands, scripts & files.
- This tarball: http://ppl.ug/r1LnA0CT83U/ (patched 12/31/11 md5:b09ce58f93c79164c9dae0d62758be6c)
- Don't be stupid. Read the whole post.
Place it into your enclosure, and attach to the machine/vm you will use for this process.
Remove all. Yes, all. We will create new ones in a bit.
Download & extract the tarball, to a location of your choosing.
Our first step will be to edit the `disk_create` script to ensure it is going to write this information to the disk we want. Out of the tar it addresses /dev/sdX. Make this match the drive you wish to use. If you do not understand what this means, STOP NOW.
Next, if you `ls -l` you will see the contents of the tarball, and there are 3 symlinks. These three symlinks are: stage1.wrapped, u-boot.wrapped and uImage. Out of the tarball, I have the 850Mhz overclocked stage1 symlinked, the only u-boot I have included symlinked and the uImage.pci kernel symlinked. Unless you have a PCI bus, such as on the Pogoplug Pro (P01), you MUST change this. If you are not sure, ASK!
If at any time in the future, you want to replace any of these parts, you may do so by removing the symlinks to the parts you do not want to replace, and re-run the script. (e.g. You prefer the stock 700Mhz from Cloud Engines, some manufacturers are less.)
Writing Stage1 & U-Boot
Once you have configure your setup with the correct drive, and stage1/u-boot/uImage, you may run the script via `./disk_create`. Doing this will pre-setup the MBR, stage1 & u-boot. You will get an error from dd about the uImage not writing. You haven't partitioned yet.
For the purposes of these instructions, I will use fdisk. If you prefer to use GPT, so be it, but I also cannot prove at the time that the u-boot from PLX will accept GPT partitions.
We will use the fdisk command to partition our disk.
What you want, and I am not your manual, is to:
- create an msdos partition table (fidsk -c=dos)
- create a new primary partition, #1, with the first sector being 2048, and the size being small. I sized mine at 10M, for 10MB. This guide & process may be updated in the future with file system support and you can definitely spare a few megs.
- create a new primary partition, #2, the size of your choice, as this will be your rootfs.
- write the partition table to disk
Personally, I would use ext3. I apologize but ext4 is not built into the kernel at this time. `mkfs.ext3 /dev/sdz2` or whatever your device is. For the sake of continuity, also label the partition "rootfs" `tune2fs -L "rootfs" /dev/sdz2`. Note the second partition. The Kernel will be placed in the first, unformatted partition!
Now that we have the partitions in place, we will re-run the disk_create script, which will now place the kernel into /dev/sdz1.
Download, Extract & Prepare Oxnas rootfs
Mount your newly formatted /dev/sdz2. Download the oxnas rootfs here and extract it to your newly formatted partition. The last thing needed is this: create & edit usr/local/mac_addr on the extracted rootfs, (not this machine you are using to do this!) and place in your device's MAC address in the format XX:XX:XX:XX:XX:XX.
Sync, Unmount & Remove
Flush to disk, using the `sync` command before you unmount and remove your drive.
Attaching & Booting
At this point, you attach the drive to your device, via eSATA or direct SATA, apply power to the drive then the device. I leave it to you to mod your device as necessary, but will add a link to my public G+ gallery. ( link to gallery )
This should boot right off the SATA disk, directly into Arch Linux ARM.
256MB memory device users: http://ppl.ug/3QrAMaurJE8/