Pi Boot from USB?
Jess Hampshire (158) 864 posts |
Hi I recently discovered that the more recent versions of the Raspberry Pi can boot from a USB drive. (with no SD card) Does RISC OS support this? |
Stuart Painting (5389) 680 posts |
The short answer is “Well, sort of…” Updating the Pi’s Write-Once memory to allow “boot from USB” has to be done from Raspbian. The USB boot drive needs to be set up in exactly the same way as the boot SD (i.e. with a FAT32 partition for the Pi boot loader, and the rest of the disc in Filecore format). SystemDisc should do this for you. Where you might come unstuck are the CMOS RAM settings. RISC OS stores CMOS RAM settings on the boot SD: this is (a) hard-coded, and (b) not the same place that the Pi boot loader will be loading them from. You can (sort of) get round this by leaving the SD card plugged in and remembering to copy !Boot.Loader.CMOS to the USB drive every time you make a configuration change, but if your aim was to get rid of the SD card altogether this won’t fit the bill. |
Rick Murray (539) 13408 posts |
http://heyrick.ddns.net/files/SDCMOS.ffa It’s a copy of the standard SDCMOS with extra nulls added after the paths, so… Load it into Zap, you’ll see this (some stuff above, some below): 00000048 : (15 : 20353128 : EORCSS R3,R5,R8,LSR #2 0000004C : Oct : 2074634F : RSBCSS R6,R4,PC,ASR #6 00000050 : 2016 : 36313032 : Undefined instruction 00000054 : )... : 00000029 : ANDEQ R0,R0,R9,LSR #32 00000058 : .... : 00000001 : ANDEQ R0,R0,R1 0000005C : SDFS : 53464453 : MOVTPL R4,#&6453 00000060 : :$.C : 432E243A : Undefined instruction 00000064 : MOS. : 00534F4D : SUBEQS R4,R3,R13,ASR #30 00000068 : .... : 00000000 : ANDEQ R0,R0,R0 0000006C : .... : 00000000 : ANDEQ R0,R0,R0 00000070 : .... : 00000000 : ANDEQ R0,R0,R0 00000074 : .... : 00000000 : ANDEQ R0,R0,R0 00000078 : .... : 00000000 : ANDEQ R0,R0,R0 0000007C : SDFS : 53464453 : MOVTPL R4,#&6453 00000080 : :$.! : 212E243A : Undefined instruction 00000084 : Boot : 746F6F42 : STRVCBT R6,[PC],#-3906 00000088 : .Loa : 616F4C2E : Undefined instruction 0000008C : der. : 2E726564 : CDPCS CP5,7,C6,C2,C4,3 00000090 : CMOS : 534F4D43 : MOVTPL R4,#&FD43 00000094 : .... : 00000000 : ANDEQ R0,R0,R0 00000098 : .... : 00000000 : ANDEQ R0,R0,R0 0000009C : .... : 00000000 : ANDEQ R0,R0,R0 000000A0 : .... : 00000000 : ANDEQ R0,R0,R0 000000A4 : .... : 00000000 : ANDEQ R0,R0,R0 000000A8 : .... : 00000000 : ANDEQ R0,R0,R0 000000AC : Save : 65766153 : LDRVSB R6,[R6,#-339]! 000000B0 : CMOS : 534F4D43 : MOVTPL R4,#&FD43 Switch to ASCII mode (normally Sh-Ctrl-F1) and Overwrite mode (press Insert – title should say “(uao)” at the end). Locate the first path (SDFS:$.CMOS) and change it as necessary within its limitations. Then do the same for the second path (the !Boot.Loader.CMOS one). Switch back to Code mode (Sh-Ctrl-F5) and verify the second starts at offset &7C, and the SaveCMOS text starts at offset &AC. If they’re both good, save the module and then get it to load early in the boot sequence – an easy way is to drop the module into !Boot.Choices.Boot.PreDesk with an “!!” prefix. You’ll note that DeepKeys does exactly this. If that looks scary, then… isn’t USB a SCSI device? If so, here’s an UNTESTED version with the “SDFS” replaced by “SCSI”. It might work. |
John Sandgrounder (1650) 574 posts |
It is a lot simpler to let the Pi boot from an SD card, but then to configure RISCOS to use a USB Drive. (*configure filesystem SCSI) You do not then need either the SD card or the USB drive to be ‘partitioned’. For best reliability use an SSD rather than a Flash memory stick. |
Chris (2061) 72 posts |
Just reviving this as recently my SD card slot has become unusable. Is there no way to kickstart the boot from supervisor? |
Chris Gransden (337) 1148 posts |
You should be able to just type, *SCSI |