Poster | Thread |
Hypex
| |
Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 8:23:26
| | [ #1 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| Hi guys.
So I recently set up a PiStorm on my A1200. Acquired all hardware I need and fit all together. Set up an SD card with a basic PiStorm-lite core files extracted and setup kick.rom. And tested it. Booted first time and just tested some CU Amiga disks I had near by. Could see a difference when my RAM increased. Plus, despite needing to boot off SD card for the core hardware to work, it booted really fast and wasn't hung up on a missing HDD on the IDE port. Bonus.
But now I really need to set it up as a bootable HDD. Or bootable SD in this case. This is where it starts to get difficult. I found my IDE port pins are broken so I cannot rely on internal HDD. This leaves me at floppy to transfer any needed files externally. Since I don't have a CD/DVD drive either to rely on.
So, as is the case now days, it's easier setting up the SD card using a modern computer. Using UAE usually. And with a focus on Windows.
So first question, do I really need to use Windows? Can it be done on a Mac? Or Linux even? I can find no info on this apart from comments it should be possible.
So all I read says you need Windows, and you need Windows to use a CLI program, and get technical. Ahem, you're telling me it's called Windows, but cannot be done in a window and must be done in a DOS prompt? What's the point of using Windows then!?
So because Windows has an ego it's not easy to set up up a blank partition. Which brings me to the ID. What is ID 76? I got little info online and nothing about 76 from MS site about setting ID in Diskpart. Lists of disk IDs were too vague about it.
I am on Linux and terminals are a native feature. What is 76 in Linux? Can Disks use a 76? 76 doesn't show in in Disks. It does let you set a partition as unknown through some hoops but that may not work.
The next issue is formatting it as Amiga FFS. So Linux can use FFS natively. But it's not easy to mount an image or partition even though FFS module is installed by default on common distros. Disks doesn't offer it as a choice. This would be common across platforms.
So, usually, to circumvent this we get UAE out. Depending on the UAE this may not be easy as well. I use FS-UAE and it doesn't support direct hardware so things get technical. Ways around it are first mounting a FFS image or volume and attaching as a folder drive. Or using a HDD image of same size as drive partition then imaging across to it. Both these are more fiddling around.
Here WinUAE tends to offer more freedom. As it can simply be attached directly. And file systems like PFS can be supported more easily. So the above doesn't become an issue. Even though FS-UAE doesn't do all this by design it would be good if it assisted in this by being able to easily mount a partition as AFFS for use as a folder since it does create disk images for use.
Okay. So at this point, in summary, do we always need Windows to this up? It seems to me or you need to jump through hoops. Some how, all the Amiga people developing this hardware are Windows people, so if you want to use some modern hardware you're forced to become a Windows person to do it. Times haven't changed. Good luck if you only have an iPad as your main computing device! |
|
Status: Offline |
|
|
Turrican3
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 10:05:47
| | [ #2 ] |
|
|
|
Regular Member |
Joined: 20-Jun-2003 Posts: 386
From: Italy | | |
|
| @Hypex
SD card setup for PiStorm1200 doesn't require Windows.
Quite the contrary, I'd argue it might even be *easier* with Linux, which is what I did (especially the partitioning thing) |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 11:54:35
| | [ #3 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @Turrican3
Thanks. How did you go about it? Right now I have three partitions on my SD card ready to go.
My immediate issue is that my files are in images and folders for FS-UAE. So I want to copy them to the SD card. But, with or without FS-UAE, I want to copy those files to the SD card so I can slot it in my A1200 and have it ready to go.
Somehow I have backups from my A1200 back in the day that I plugged into my UAE set ups. Now I want to back. Use them on the real thing again. |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 12:21:00
| | [ #4 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12825
From: Norway | | |
|
| |
Status: Offline |
|
|
Turrican3
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 13:28:37
| | [ #5 ] |
|
|
|
Regular Member |
Joined: 20-Jun-2003 Posts: 386
From: Italy | | |
|
| @Hypex
Unfortunately I just used Linux to properly set-up the SDcard; actual content was simply copied from already existing partition(s) on real hardware so I guess the whole thing was just way easier in my specific case.
I'm not familiar with FS-UAE but I guess as long as you're able to boot the emulated system and move content to an SDcard (IIRC you *can* mount the PiStorm SD boot partition under AmigaOS, you just have to know what you're doing; a PCMCIA reader would be a safer alternative if you're unsure) you should be able to restore your desired content relatively quickly.
Or... just head to the official Discord channel, those guys are VERY helpful and friendly. There's obviously a FAQ too.
|
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 14:36:12
| | [ #6 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @NutsAboutAmiga
I don't recall knowing abut cfdisk before. It looks useful and similar to testdisk. The "-l" option doesn't exist. It can change ID but it can't change it to the elusive 76. Neither in decimal or hex. Whatever that means. Do I need to look at the code for the Amiga device to what the heck this 76 is all about? |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 14:45:04
| | [ #7 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @Turrican3
Yeah that's the problem I face. I can't write it directly. I can write Amiga files to an image from UAE. Or I can mess about and mount it from Linux and copy flies to that way but I need the Amiga protection bits. Even if I clone an image of a HDD it needs to be the exact size. So much easier if I could just use UAE and HDToolbox but that won't work from FS-UAE. Even if I mount the partition so it looks like a folder for FS-UAE I can't use that with FS-UAE.
However, I have an OS4 machine. Which I will make use of. I can use that to partition and write files to the drive. The only caveat is being able to mount the partitions. Since they exist on an MBR drive it may not want to mount Amiga FFS partitions on a foreign drive which makes sense. But no less annoying. |
|
Status: Offline |
|
|
Turrican3
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 15:29:51
| | [ #8 ] |
|
|
|
Regular Member |
Joined: 20-Jun-2003 Posts: 386
From: Italy | | |
|
| @Hypex
Don't quote me on this but I think it should be possible to mount an image file under AmigaOS.
So if you write whatever stuff you need on this (virtual) partition the original Amiga attribute bits should be preserved and then restored on real hardware... as long as you find a way to move such image file there that is. |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 19-Jun-2023 17:04:59
| | [ #9 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12825
From: Norway | | |
|
| |
Status: Offline |
|
|
kolla
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 20-Jun-2023 6:56:18
| | [ #10 ] |
|
|
|
Elite Member |
Joined: 21-Aug-2003 Posts: 2910
From: Trondheim, Norway | | |
|
| @Hypex
You can just assign the type 76 partition as a disk file for fs-uae, and prepare it with hdtoolbox from amigaos within fs-uae. One trick is to make a symlink with a name that fs-uae recognize, like pistorm.hdf for example, pointing to /dev/sdc2 - given that your sd card is /dev/sdc and the second partition /dev/sdc2 is the type 76 partition. Alternatively you can dd the type 76 partition to a hdf file, set that up with fs-uae, and dd it back to sd card.
The point of the type 76 partitions is that they show up as disk units for brcm-sdhc.device, starting from unit 1. unit 0 is reserved to the entire card. This is quite a brilliant way of doing it, I think. Last edited by kolla on 20-Jun-2023 at 07:03 AM. Last edited by kolla on 20-Jun-2023 at 07:01 AM.
_________________ B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 20-Jun-2023 9:02:27
| | [ #11 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @Turrican3
Yes it can mount images easily. However I found a flaw. Because of the MBR it won't format partitions of the SD card as FFS. Also the OS4 commodity to format USB devices is silently buggy. I select format and nothing happens.
The problem here is, that cannot be avoided since somehow a RPi is designed to boot Linux off a foreign FAT partition, is AmigaOS will refuse to recognise or mount Amiga volumes on a drive without an RDB. And AmigaOS doesn't make it easy to deal work around that. Needing to set up mount-lists and what not. In fact, at this point Linux could be easier, since it can mount a partition without needing all the technical information in a file that needs to be created and given eternally to the Mount command.
An app that could format a drive with both RDB and MBR or attach RDB to MBR somehow would help. |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 20-Jun-2023 9:12:21
| | [ #12 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @kolla
The best and most direct way would be to link a file to the partition and "fool" FS-UAE into thinking it is just an image file. Technically, since an image file is a block of data on a drive, there's no difference. It's just how the upper management handles it.
The strangely named brcm-sdhc.device is a good idea. The problem is that Amiga volumes are foreign to MBR. But it goes further, as even on Windows it can't be done from a GUI, so cannot be prepared in a system standard way.
Edit: Did some research and actually linking a file to a block device looks difficult. While it's easy to link it won't work and the result is a useless blank file that won't even show up in file dialog. I did a search on the subject expecting a result but results were hard to come by. Plenty of opposite to mount image as block device. But not linking a file to act as image for a real partition, despite the "everything is a file" design. Last edited by Hypex on 20-Jun-2023 at 10:56 AM.
|
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 20-Jun-2023 17:35:36
| | [ #13 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @NutsAboutAmiga
Yes but I'm hoping to avoid it. Even if, for example, I could create a 4GB volume in memory, it's still inefficient. Since only a portion of the 4GB would contain data and the rest would be zeros wearing out the SD card and wasting time. |
|
Status: Offline |
|
|
kolla
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 20-Jun-2023 18:54:07
| | [ #14 ] |
|
|
|
Elite Member |
Joined: 21-Aug-2003 Posts: 2910
From: Trondheim, Norway | | |
|
| @Hypex
Well, it works just fine for me, but you’re clearly confused. There’s no «fooling» going on, just a convenience.
And no, the problem is not FFS and MBR - each type 76 partition shows up as a *drive* and gets its own RDB partition scheme. So be sure to select correct device node to use, and set it up using hdtoolbox.
And if you want to mount directly from Linux with a kernel that supports RDB and FFS, I suggest you use loopback and configure kernel with support for partitions on loopback device as well. I have noticed that the latter apparently isn’t common on "main stream" distro kernels, so you may have to build kernel yourself. Alternatively, use lopsetup with offset options to skip to start of an FFS partition, and then mount that. Last edited by kolla on 20-Jun-2023 at 07:14 PM.
_________________ B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC |
|
Status: Offline |
|
|
Hammer
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 21-Jun-2023 1:11:48
| | [ #15 ] |
|
|
|
Elite Member |
Joined: 9-Mar-2003 Posts: 5302
From: Australia | | |
|
| @Hypex
Quote:
Some how, all the Amiga people developing this hardware are Windows people, so if you want to use some modern hardware you're forced to become a Windows person to do it
|
Windows 95 / 98 / 2K/ XP / 7 /10 / 11 is a two-button mouse-driven GUI OS.
One of Commodore's reasons for Amiga Hombre's PA-RISC selection is to run Windows NT which is cheaper than MIPS R4200 CPU.
WinUAE can run Linux with WINE / Proton. I haven't tested WinUAE's device access.
For X86 hardware that can't run Windows 11, I selected Arch Linux which is the base Linux distribution for Steam OS 3.x. I plan to migrate out of Microsoft's ecosystem for my X86 PCs without Windows 11.
Many companies (with specific business rules customized software) hated the web app Office Outlook and threaten MS with Thunderbird migration. fuk Microsoft.
For PiStorm32 Lite, I used the PiStorm 32 GB SD image that was bundled with my PiStorm for A500. I also downloaded CaptLeChuck's CoffeineOS Storm image.
I don't support "walled garden" Apple iOS and Bill Gates has exited from Microsoft.
Last edited by Hammer on 22-Jun-2023 at 03:13 AM. Last edited by Hammer on 21-Jun-2023 at 02:28 AM. Last edited by Hammer on 21-Jun-2023 at 02:27 AM. Last edited by Hammer on 21-Jun-2023 at 01:24 AM. Last edited by Hammer on 21-Jun-2023 at 01:19 AM.
_________________ Ryzen 9 7900X, DDR5-6000 64 GB RAM, GeForce RTX 4080 16 GB Amiga 1200 (Rev 1D1, KS 3.2, PiStorm32lite/RPi 4B 4GB/Emu68) Amiga 500 (Rev 6A, KS 3.2, PiStorm/RPi 3a/Emu68) |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 21-Jun-2023 15:10:03
| | [ #16 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @kolla
It's not a normal image file and FS-UAE won't accept it form the launcher. I had to hack into the config file myself. It then showed up as either device or file even though it won't let me pick it.
Though I can partition it normally I can't set it as 76. GParted, Disks, whatever doesn't know what is. So another tool needs to change it. I found some list online that called 76 (or 4C) Aos. AmigaOS? I don't know, the info is vague. Even in the CLI with tools like cfdisk or fdisk it doesn't show up and some don't even let you set it to 76 since it isn't on the list.
So first what I did was this: ln -s /dev/sdc2 image.hdf
It created a link to second partition on SD card I had marked as 76. The file showed up though had no size. Stuck in my config file and launched FS-UAE. Booted the Amiga. Loaded up HDToolbox. Crash!
So if this is simple I've totally missed something. I cannot get any info online about exactly creating a file link to a block device so it seems a rare situation to me. How have you done this? Last edited by Hypex on 21-Jun-2023 at 03:14 PM.
|
|
Status: Offline |
|
|
kolla
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 21-Jun-2023 20:10:53
| | [ #17 ] |
|
|
|
Elite Member |
Joined: 21-Aug-2003 Posts: 2910
From: Trondheim, Norway | | |
|
| @Hypex
Does the user that runs fs-uae have proper read-write access to the device node?
Btw, I believe the type id is 0x76 - so already hex (not that it matters for UAE)
Yes, not Oberon AOS (and yes, Oberon on Amiga is a thing), but rather "Hidden read-only FAT16B" - it makes sense to have this partition "invisible" on … that othet OS. Last edited by kolla on 21-Jun-2023 at 08:20 PM. Last edited by kolla on 21-Jun-2023 at 08:13 PM. Last edited by kolla on 21-Jun-2023 at 08:11 PM.
_________________ B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC |
|
Status: Offline |
|
|
michalsc
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 21-Jun-2023 21:55:49
| | [ #18 ] |
|
|
|
AROS Core Developer |
Joined: 14-Jun-2005 Posts: 377
From: Germany | | |
|
| @Hypex
Hi! I'm terribly sorry that you have some problems with setting things up. This was not my intention. Unfortunately, when deciding on what partitioning scheme to use I was limited by several boundaries:
1. First of all, Raspberry need to be able to boot from the microSD card. The way of booting is already determined and set in the stone, we can't change it. The RasPi needs a MBR partition scheme (Pi4/CM4 can also accept GPT), so it is not possible to boot straight from a RDB partitioned drive.
2. In order to make a safe place for Amiga partitions, a kind of a protective layer in MBR has to be done. One could follow the GPT scheme and create a fake "protective" MBR, but not every tool and not every OS is happy with that. That would be a risk for your data stored on AmigaOS partitions of the microSD card if you would put it to any other machine.
3. Combining protective nature with previous work done by Amithlon, I have decided to introduce the MBR partitions with 0x76 type - keep in mind, primary MBR partitions. This type is not used by any meaningful operating system so most of them list such partitions as "unknown", but reserved and with a "don't touch" principle. Such 0x76 type partitions are further considered as separate units of brcm-sdhc or brcm-emmc.device. Using any other type, or "borrowing" a well known type easy to select with GParted or other tools would lead to a situation, where foreign OS would be suggesting you to "initialise" a partition with damaged data. What that would mean to your AmigaOS files I don't need to explain to you, I think.
4. There would be **one** way to overcome such limitations - a "Frankenstein" layout where an MBR partitioning scheme would be immediately followed by RDB. Unfortunately standard HDToolBox provided with AmigaOS does not allow you to put RDB on second (or third/fourth/whatever) sector, so you would need to perform the partitioning with some other third party tools. Not good, either.
So, here we are - not so easy way of partitioning and not so easy way of using such microSD cards with WinUAE/FSUae. But there is a way...
Provided you have set up your partitions properly, setting the 0x76 type, you can make it readable on FSUAE without any issues. That requires two steps: - modify your config file and provide the path to the physical location of the partition, e.g.:
Quote:
this will make your 2nd hard drive a drive working directly on 0x76 type partition. It will fail to mount until you adjust the access rights for this very partition:
Quote:
sudo chmod a+rw /dev/sdc2 |
This will allow you, as a non privileged user, a direct access to the AmigaOS drive on the 0x76 type partition, provided this is the actual location of it, of course. This works quite well, this is also my setup on a macOS machine.
Also, it is not true that you need Windows machine to partition the microSD card. I have made it on macOS and uploaded video showing necessary steps (https://www.youtube.com/watch?v=m7a8nv-B7jM). The same should be feasible on Linux, provided you pick correct tools. Some of them can, due to their "user friendliness" hide an option to set arbitrary partition type because the authors assumed an average user would do a lot of harm with that. Only sometimes they are fair enough to mention it, quoting cfdisk man page:
Quote:
Note that cfdisk provides basic partitioning functionality with a user-friendly interface. If you need advanced features, use fdisk(8) instead. |
What would eventually help would be a tool (in form of a bootable floppy image) which would do the initial steps for you, e.g. resize the FAT partition, add 0x76 type partition and subsequently (after a reboot) start HDToolBox to allow you to continue. But, considering that Amigans are individuals with so many different points of view, I assume that only few would find such tool usable for them. |
|
Status: Offline |
|
|
michalsc
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 21-Jun-2023 22:20:51
| | [ #19 ] |
|
|
|
AROS Core Developer |
Joined: 14-Jun-2005 Posts: 377
From: Germany | | |
|
| @Hypex
I have just checked the fdisk from Linux. Here the steps to reproduce
1. Start fdisk as root and point it to microSD card, for example "sudo fdisk /dev/sda". NOTE: Make sure /dev/sda is **really really** your microSD. The changes to the drive will overwrite your partition table
2. Press "o" - this will create empty DOS (aka MBR) partition table 3. Press "n" to create new partition 4. Press "p" to make it primary 5. Press "1" to make it first partition 6. Press ENTER to leave default first sector 7. Type size of FAT partition you want, e.g. "+100M", press ENTER 8. Press "t" to change the type of partition (fdisk defaults to 0x83 - linux filesystem) 9. Type "0B" and press ENTER to make it FAT32 10. Press "n" to create new partition 11. Press "p" to make it primary 12. Press "2" to make it second partition 13. Press ENTER after two subsequent prompts to make default start and size of the partition. It will fill up the remaining space of microSD 14. Press "t" to change the type of this partition 15. Press "2" to select second partition 16. Type "76" to make it Amithlon-like type 17. (optional) Type "p" to list partition table, it might look like this (sizes are different, for your convenience I did all this steps on a 100MB file):
Command (m for help): p Disk hd: 100 MiB, 104857600 bytes, 204800 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xf3242416
Device Boot Start End Sectors Size Id Type hd1 2048 22527 20480 10M b W95 FAT32 hd2 22528 204799 182272 89M 76 unknown
18. Type "w" to save the partition table to microSD
After this steps your microSD will have two partitons - you can format the first one and put the necessary boot files there. The second partition will be visible in HDToolBox if you point it to brcm-sdhc.device (on Pi3/PiZero2) or brcm-emmc.device (on Pi4/CM4) |
|
Status: Offline |
|
|
Hypex
| |
Re: Setting up a PiStorm-lite on my A1200 Posted on 22-Jun-2023 5:41:19
| | [ #20 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11228
From: Greensborough, Australia | | |
|
| @kolla
It would be normal root. I had changed the link file but it made no difference. So I tried changing the device mode as well and relinking and made sure both had access. No change. In the end I changed both to 777 as a test but there was no change
I think a simple link won't be enough to represent a partition as a file. I read some software that could do this. But it's read only and custom.
So, I see it is 0x76. Somehow it was unclear when looking it up but looking up "0x76" on the net brought up discussions about it and old Amiga posts. So 0x76 is SpeedStor according to Wikipedia but in ID lists elsewhere it doesn't list 76 or says reserved. And when listing SpeedStor IDs gives all numbers but 76! Strange. So this 76 is hidden read only of which there are a few. |
|
Status: Offline |
|
|