English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 20 June 2023, 15:00   #1
Hypex
Registered User
 
Join Date: May 2015
Location: Australia
Posts: 132
Can FS-UAE directly use an SD card in Linux?

Hi guys.


So I currently want to write directly to an SD card to write Amiga files to it. For use in a real Amiga. With FS-UAE in Linux if possible.


I've read it's possible, at least in OSX, but not seen a way in Linux. I've spent too much time on it and conclude I need to boot Windows and install WinUAE as it just looks too hard in Linux. I've tried a bunch of things that just don't work.


So, I found FS-UAE won't accept any block devices as images. I tried to symlink a block device to a file but all it does it create a blank file that isn't shown in the file dialog. I tried editing the config by hand to put it in which was accepted but caused trouble in the emulation.


In the last case, by specifying a block device or a symlink as a hardrive file in the config, UAE loads up the Workbench okay. But when I loaded HDToolbox it instantly crashed the Amiga though the emulator was still working. HDToolbox is set to ask device so scanning devices must have crashed it.


My reason for wanting direct access is that I'm wanting to set up a PiStorm for my A1200. My SD card is partitioned and ready to go. But is missing Amiga data. I have a backup of my A1200 Workbench working in FS-UAE as well as other files. So ideally I'd like to copy all that across in FS-UAE. But it is hard without direct access.


I could create an image file to cache it in, but then I would need to create a huge file of the exact size as the SD partition, and image it across. Even if I could create in it RAM, with 4GB is what I want, it seems a bit over the top when it just be written to the card directly. I thought about mounting it as AFFS in Linux and using it as a folder drive but it will lack the protection bits. Fine for data though.


So, can FS-UAE access an SD card directly, on Linux?
Hypex is offline  
Old 21 June 2023, 08:12   #2
Snoopy1234
Registered User
 
Snoopy1234's Avatar
 
Join Date: Apr 2022
Location: Australia
Age: 52
Posts: 904
https://amiga.thewetmachine.net/en/2...al%20CF%20card
Snoopy1234 is online now  
Old 21 June 2023, 14:09   #3
mja65
Registered User
 
Join Date: Sep 2019
Location: Spotswood, Australia
Posts: 36
That guide assumes the AFFS filesystem is installed in linux which it may not be (running 'cat /proc/filesystems' in the shell and seeing if AFFS is listed should allow you to check), as well it assumes the SD/CF card is FFS formatted at a block size less than or equal to 2048 (based on the pistorm wiki around sharing partitions in linux). It definitely won't work if you've used PFS or SFS. WinUAE definitely makes this easy as I've been transferring stuff to my pistorm build using that recently.

If you want to go the linux route, this is a guide from around sharing an amiga partition in Linux which allows you to mount different amiga partitions. Assuming you can deal with the AFFS aspect, you could probably adapt the instructions to copy to your exisiting SD partitions https://github.com/captain-amygdala/...)-from-Musashi.

The other possible issue with the guide is that you might lose some of the amiga specific flags set on the files. You could use LHA in FS UAE to create an archive since that will preserve all the Amiga filesystem flags then copy across the archive to the FAT32 partition on the SD card you're using for pistorm and access the files when booted on the pistorm with the FAT32 partition mounted. By default the FAT32 partition is quite small. I've resized mine to 4GB (it doesn't work for me if any bigger) so I can transfer files this way.

Btw there is a very active and helpful discord channel for Pistorm if you need more interactive help.

If you have the option of using WinUAE I'd do it that way - I've only got my Pistorm32 recently and there's been a bit of back and forth in terms of adding and removing files!
mja65 is online now  
Old 21 June 2023, 15:35   #4
Hypex
Registered User
 
Join Date: May 2015
Location: Australia
Posts: 132
Quote:
Originally Posted by Snoopy1234 View Post

Thanks for the guide. I haven't seen any other guides about FS-UAE and Linux regarding sharing of files. So an issue I see is that it copies the files from outside of AmigaOS and as pointed out protection bits will be a problem. Given I want to install OS files this will become an issue for me. Also this involves a temporary space as a go between which I want to avoid. Given I could easily mount image files as affs this would be redundant.
Hypex is offline  
Old 21 June 2023, 15:54   #5
Hypex
Registered User
 
Join Date: May 2015
Location: Australia
Posts: 132
Quote:
Originally Posted by mja65 View Post
That guide assumes the AFFS filesystem is installed in linux which it may not be (running 'cat /proc/filesystems' in the shell and seeing if AFFS is listed should allow you to check), as well it assumes the SD/CF card is FFS formatted at a block size less than or equal to 2048 (based on the pistorm wiki around sharing partitions in linux). It definitely won't work if you've used PFS or SFS. WinUAE definitely makes this easy as I've been transferring stuff to my pistorm build using that recently.

You're right. I can't find it on my Mint x64. It is installed with PPC Linux so it might only be in the PPC kernel config which makes sense.



It doesn't even show up as a package so I'd need to locate it or compile it. But it wouldn't help too much anyway because I still lose the protection bits. Unless it affs would convert it when changing it to Linux on read then changing back to Amiga on write.


After the read on Musashi that looks over complicated!


A problem with using LHA, though it would solve other problems, is that I'd need to keep space for a FAT volume, copy data to it, then unpack to another volume on same card. I also need a system that can mount as FAT which I don't have without a working Workbench.



There's always a note about Discord with these things. I've never used it AFAICR. But it would be nice if the info was out there without needing to join some exclusive club needing another account and app. :-)



I can reboot into Windows so do have the option of WinUAE. But of course I need to install it. And then drag my images across to it. So that will need setup. I've already copy my WB and Work images to a USB stick. Only about 3GB but it took over an hour to copy with USB3. Too many files from a folder drive were included.
Hypex is offline  
Old 21 June 2023, 20:56   #6
arcanist
Registered User
 
Join Date: Dec 2017
Location: Austin, TX
Age: 41
Posts: 412
I'm not entirely sure I understand the scenario. Here's how I set up a CF card with FS-UAE on Linux:

hard_drive_0 = /dev/sdd # put your block device, or symlink to one here
hard_drive_0_controller = ide0

Then you can boot AmigaOS ADFs or CD to set it up with HDToolbox. Add a second hard drive pointing to a directory to copy files back and forth.

Make sure your user has write permission to the block device, or run FS-UAE with sudo.
arcanist is offline  
Old 22 June 2023, 05:06   #7
Hypex
Registered User
 
Join Date: May 2015
Location: Australia
Posts: 132
Quote:
Originally Posted by arcanist View Post
I'm not entirely sure I understand the scenario. Here's how I set up a CF card with FS-UAE on Linux:

That would be I would have liked to use FS-UAE launcher to add my SD card partition directly but it's not supported in the GUI. So tried substituting it with a file link to the device that didn't show up either. And went down a rabbit hole.


Quote:
hard_drive_0 = /dev/sdd # put your block device, or symlink to one here
hard_drive_0_controller = ide0

Thanks for the clue about the controller. I didn't see that anywhere. Unfortunately it causes UAE to crash on boot.


Quote:
Then you can boot AmigaOS ADFs or CD to set it up with HDToolbox. Add a second hard drive pointing to a directory to copy files back and forth.

With just the device as hard drive as it boots up fine but then OS3.9 HDToolbox crashes while scanning drives and reboots.



Quote:
Make sure your user has write permission to the block device, or run FS-UAE with sudo.

Good point. Ended up changing to 777 just to test. Still crashes.
Hypex is offline  
Old 22 June 2023, 08:43   #8
Snoopy1234
Registered User
 
Snoopy1234's Avatar
 
Join Date: Apr 2022
Location: Australia
Age: 52
Posts: 904
Quote:
Originally Posted by Hypex View Post




Thanks for the clue about the controller. I didn't see that anywhere. Unfortunately it causes UAE to crash on boot.





With just the device as hard drive as it boots up fine but then OS3.9 HDToolbox crashes while scanning drives and reboots.




.
In Winuae uaehf.device is selected instead of ide0 if that helps.

Last edited by Snoopy1234; 22 June 2023 at 08:43. Reason: u
Snoopy1234 is online now  
Old 22 June 2023, 09:43   #9
mja65
Registered User
 
Join Date: Sep 2019
Location: Spotswood, Australia
Posts: 36
Quote:
Originally Posted by Snoopy1234 View Post
In Winuae uaehf.device is selected instead of ide0 if that helps.
I think what you're meaning is as a result Hypex needs to select uaehf.device instead of scsi.device in the tool types? I haven't used 3.9 much but pretty sure it will crash the Amiga if you have the wrong one selected.
mja65 is online now  
Old 22 June 2023, 14:46   #10
Hypex
Registered User
 
Join Date: May 2015
Location: Australia
Posts: 132
Quote:
Originally Posted by mja65 View Post
I think what you're meaning is as a result Hypex needs to select uaehf.device instead of scsi.device in the tool types? I haven't used 3.9 much but pretty sure it will crash the Amiga if you have the wrong one selected.

Actually, I found you can have any selected, and if nothing is attached nothing will show up. How, if it's set to scan (tool type ASKDEVICE) then it will crash. I've never found it so buggy!


But I found what I need. It seemed like some esoteric knowledge. There was talk about it but the info wasn't clearly laid out.


So, first I need direct access as listed here under Using real hard drives:

https://fs-uae.net/docs/hard-drives


I had that working it turns out. In the end if I wanted to use a symlink the block device still needed permission changed. So it didn't really help since the device needs changing each time I insert it. I changed HDToolbox to scan scsi.device and then uaehd.devce. Nothing was showing up. But it definitely was reading the block device. I found when it was root only it didn't find the file.


Then I found this after a Google:
https://fs-uae.net/docs/options/hard-drive-0-type


This was what I needed. Set type to RDB and the drive showed up! Well the partition did. In uaehf.device. Was able to install it as drive in HDToolbox.


What is funny is that it didn't even treat it as a HDF partition file. It needed to be set to RDB. Only then did it show up in HDToolbox at all.


Thanks everyone!
Hypex is offline  
Old 24 June 2023, 09:52   #11
vk3heg
Registered User
 
vk3heg's Avatar
 
Join Date: Oct 2008
Location: Australia
Age: 55
Posts: 226
I was just about to post, about setting the permissions and the fsuae config lines:

hard_drive_1_controller = uaehf.device
hard_drive_1_type = rdb
hard_drive_1 = /dev/sdd

Then saw you managed to get it sorted...
vk3heg is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix for crash when using FS-UAE and QEMU-UAE on recent Linux distros FrodeSolheim support.FS-UAE 1 18 March 2023 20:12
FS-UAE with Linux Methanoid support.FS-UAE 3 04 June 2017 13:11
Android UAE and Micro SD card. zeke1312 support.OtherUAE 2 29 October 2015 18:46
fs-uae-launcher and fs-uae-arcade (dev versions) linux problems [Solved] esc support.FS-UAE 2 18 November 2014 01:02
G-FS-UAE (GUI/Frontend for Linux FS-UAE) Speedvicio support.FS-UAE 12 05 November 2012 20:14

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:48.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.13474 seconds with 15 queries