category: Help <div id="toc_heading"></div><div id="toc"></div> h2. Introduction Many hardware platforms (Raspberry Pi, Beagleboard etc.) need a DOS partition to hold bootloader files, but RISC OS wants its files (particularly !Boot) to reside in a Filecore partition. Additionally, Filecore doesn't - yet - handle partitioned discs, so "thinks" it owns the whole device. Finally, there's only one SD card slot on the Raspberry Pi. How to solve this conundrum? The answer is a "dual-format" SD card. h2. Card layout The solution is actually quite ingenious. * The entire SD card is formatted using !HForm. * Next, a DOSDisc file called !Boot.Loader is created, big enough to hold the bootloader files with room to spare. * Finally the Master Boot Record (MBR) is adjusted to show a DOS partition occupying the exact space allocated to !Boot.Loader, and the MBR is also adjusted to show a Filecore partition occupying the remainder of the card.[1] RISC OS will see the SD card as a Filecore-format disc, but other systems will see a DOS partition. Hence the Raspberry Pi (etc.) bootloader can boot from the DOS partition, and RISC OS can access !Boot itself using Filecore. fn1. Having a Filecore partition mentioned in the MBR isn't strictly necessary (Filecore ignores it) but it does prevent other systems from accidentally overwriting the contents. h2. How to create your own boot SD card There are two easy methods, and one not-so-easy method: # The RISC OS application "SystemDisc":http://shop.elesar.co.uk/index.php?route=product/product&path=18_64&product_id=73 will reformat a blank SD, and then guides you through the process of populating the DOS and Filecore partitions with the necessary software. This method allows RISC OS to access the entire SD card: it is not limited to the first 2GB. # A platform-independent way is to clone an existing boot SD card (e.g. the [[Software information: RaspberryPi: RISC OS Pi|RISC OS Pi SD image]] available from the "Downloads":/content/downloads/raspberry-pi page). Note that RISC OS will only be able to use the first 2GB of the card. # The more adventurous of you might want to use the (Linux) scripts referenced in "this forum thread":/forum/forums/5/topics/13650 to generate a boot SD card of any size. Once you have the SD card in the correct format, it's time to populate it with software. * Right-click on the drive icon to open the Filecore partition. This will already contain a !Boot directory containing just one file (Loader). Now copy the necessary !Boot directory contents (e.g. from the [[Software information: HardDisc4|stable HardDisc4 image]] on the "Miscellaneous downloads":/content/downloads/common page) along with any other files you want to have in the Filecore partition. <b>Take care not to overwrite !Boot.Loader</b> - the card won't boot if you do. * Next, double-click on !Boot.Loader and install the RISC OS ROM and the necessary firmware for your hardware platform (e.g. on the Raspberry Pi you might be copying "bootcode.bin", "config.txt", "fixup.dat", "riscos.img" and "start.elf"; you may also be copying "CMOS", "cmdline.txt", "fixup4.dat" and "start4.elf" if needed). * Remember to dismount the SD card and wait the regulation 15 seconds before unplugging. h2. Restrictions # !Boot.Loader *must* *NOT* be moved, deleted or overwritten. The proper way of updating the DOS partition is to double-click on !Boot.Loader and copy the individual files. # Do not expose the SD card to any utilities that check for partition inconsistencies. For example, "fsck" has been known to find some inconsequential problem with filenames in the DOS partition: when it "corrects" the "error", the card won't boot. h2. The future "Work is underway":/bounty/polls/10 to update Filecore to handle partitioned discs directly. When that is complete, the need for this special dual-format SD card will disappear.