The insane partition situation.
Murray Colpman (1746) 7 posts |
I collect old computers, so I have used RISC OS on an actual RISC PC a while back (a few years now) – I had to use Linux quite a bit in order to get RISC OS installed properly (it came with a completely blank hard drive). So I do have a vague old understanding of how this works, but I’m quite sketchy, so please bear with me. Actually, thinking about this post even more, I think I might be confusing Acorn and Amiga partitioning, so if this looks completely out, this is probably what’s going on, please do correct me ;) I understand that the RISC OS image has an MS-DOS partition table AND an Acorn partition table (or whatever you call the RISC OS equivalent) “on top” of each other, as far as I can tell. Correct me if I’m wrong about this. I understand the reasoning behind it, but I’m slightly confused at how it actually works – how exactly does RISC OS pick up its partition? I originally understood it to be because the Acorn partition table was at the END of the disc, so happens not to interfere with the DOS one (this would match up with my experience as I seem to remember having issues caused by this). Of course, this doesn’t make any sense, because then copying the image onto an SD card that isn’t exactly the image’s size would fail. So how DOES RISC OS decide where to find its filesystem? So, more things – Basically what I’m interested in is setting up a really hacky dual-boot system – don’t worry about the way I’m going to do this software-wise, I have it all planned. My only (other) question is, partition-wise, how should I proceed? As far as I can tell my best bit would be starting with the RISC OS image, then creating an ext2 partition for Linux in the MS-DOS partition table after the RISC OS blob. That way RISC OS would still have its filesystem (however it’s supposed to find it), Linux would have a partition and the FAT partition would still exist. Any other thoughts? EDIT: Sorry, I should have made it clear, I’m talking about the Raspberry Pi here. |
Jess Hampshire (158) 865 posts |
RISC OS currently does not understand partitions. The filesystem is similar to a “supperfloppy” type format. (It accesses it oblivious to the extra stuff.) However the area where a partition table lives appears not to be used, which allows a DOS partition to be created. On the Pi distro, this overlaps the start of the RISC OS (called Filecore) area. This area of the disk is marked as a DOS image file on RISC OS, allowing it to be accessed from RISC OS. The remainder of the RISC OS area has a protective partiton entry so that other systems don’t format over it, if the remaining space is used. (It is possible to create a FAT32 partition with the remaining space and access it under RISC OS with FAT32FS, which does understand partitions, which should make the overlapping stuff redundant in the, hopefully near, future) (RISC OS 5 runs quite happilly on a RISC PC, infact the Pi distro will work, providing it has an RO 4 set of ROMs to softload from) |
Murray Colpman (1746) 7 posts |
Ah, I see. I must really have been getting confused with Amiga, then ;). Thanks a lot! But does that mean that the ~60MB FAT partition, which is before the RISC OS fake partition, is on top of the RISC OS filesystem? If not, how’s it working? (IIRC I have RISC OS 3.6 or 3.7 ROMs on the RISC PC – I haven’t used it in a while, and don’t have it with me right now. I think I actually have one of those x86 second processors too for running Windows 3.1 in a RISC OS window (which is amazingly cool). Lovely system, the RISC PC, I’ve always loved Acorn stuff). |
Martin Bazley (331) 379 posts |
Yes. The FAT partition refers to an address which lies inside the area of the disc which RISC OS knows about. This chunk of data is then surrounded with FileCore metadata to trick RISC OS into thinking it’s an ordinary file, not realising that something else is accessing that space behind its back. Of course, the main disadvantage of FileCore being utterly ignorant of the importance of having that particular file in that particular place is that if you delete it and copy in another one, your Pi won’t boot. |
Jess Hampshire (158) 865 posts |
Unless you had the hard drive connected to a podule, they have their own filing system, and some support their own partition systems.
That’s what I want to do eventually. Initially RISC OS and XBMC. But Android and Puppy Linux on Pi both sound interesting too. (Raspian is a bit sluggish and too cut down from Debian.) That should work, you may want to create a FAT32 partition too, to allow a shared area with RISC OS. (Which would probably want to be the second primary partition, meaning you would have to use the third entry for the extended partition, to put the linux system and swapfile in, unless the swapfile were on a USB harddrive.)
Which probably means you wouldn’t want to try RO 5 on it yet, since currently it has to use the same partition. (Or lack of one) Hopefully, when RISC OS 5 gets proper partiton support, it should be possible to copy the existing system to a first partition of a new drive, and then put an RO 5 partition on the rest of the disk, having two separate systems, with just the softloader on the RO 3.x area. (RO 3.8 and above have a new filesystem without the 77 file directory limit and the 10 character filename limit, the Pi distro needs these, but the plain RO 5 image doesn’t) |
Murray Colpman (1746) 7 posts |
Well, I’ve got my dual-boot setup working :) Here’s roughly how it goes:
As for partitioning, I did what was suggested and I created a ~6GB ext4 partition after the RISC OS fake partition. I also created a spare ~6GB partition for the future (Android? ;)) I believe there’s a swap file actually in the Raspbian partition so I’m just using 4 primary partitions. Not very future-proof but the easiest thing in this situation given my main Linux box picks up the Acorn Filestore and not the MS-DOS partition table. It works surprisingly well considering how hacky it is. I’m going to do a bit more fiddling, then anyone can have it if they want it. I did notice a BootLinux in the package manager but it doesn’t seem to actually do anything – was this a plan for the future? |
Ben Avison (25) 445 posts |
Well spotted, yes, there are still discussions about an official dual-boot RISC OS / Linux disc image. |
Steve Revill (20) 1361 posts |
Indeed. It will broadly work by you having Linux in a partition after the existing FAT+Filecore stuff. I’m sure you can add that now to the 2GB image if you’ve a larger SD card, using parted or similar – it should work just fine (assuming you put all the Linux stuff into the FAT partition, too). The BootLinux ‘app’ is simply a stub that swaps between one config.txt file and another in the FAT partition (then reboots), allowing you to reboot from RISC OS into Linux. If there were a similar app on the desktop in Linux, you could do the same to get back into RISC OS. Something like that anyway… |