Include 2GB vfat partition

Talking about OS and emulation core development
Post Reply
User avatar
rooted
Posts: 7637
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 671 times
Been thanked: 183 times
Contact:

Include 2GB vfat partition

Post by rooted » Wed Feb 26, 2020 4:14 am

I've been seeing so many issues with Windows users having issues copying ROMs I think it makes sense to include a 2 gigabyte vfat partition on OGA Advance images that is automatically mounted and available to emulators.

Doing so allows Windows users to have a visible partition to copy ROMs negating all these problems.

You could even take it a step further and have these ROMs automatically copied to ROMs folder on the system drive so they don't have to worry about corruption.

Thoughts?

crashoverride
Posts: 4960
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 288 times
Contact:

Re: Include 2GB vfat partition

Post by crashoverride » Wed Feb 26, 2020 4:24 am

rooted wrote:
Wed Feb 26, 2020 4:14 am
I think it makes sense to include a 2 gigabyte vfat partition on OGA Advance images
This was discussed early on. A 2GB partition would only hold 1 PSP game or 2 PS1 games (single disk). Also a limitation is that FAT can not be re-sized like EXT4.

Another option considered was creating a single FAT partition and dynamically creating a second one. Then, storing an EXT4 filesystem as a file (loopback) on it, but the 2GB file system limit makes this complicated.

[edit]
The ideal mechanism for ROM transfer is over a network (eth/wifi). It would be great if someone could develop a HTML web interface that lets you upload and manage ROMs. Unlike GO1, there is plenty of RAM to run a web server, and its as easy to get as "apt install".

User avatar
rooted
Posts: 7637
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 671 times
Been thanked: 183 times
Contact:

Re: Include 2GB vfat partition

Post by rooted » Wed Feb 26, 2020 4:37 am

I like the web interface idea but once you have networking SMB is accessible already, although I know a lot of people have no idea what this even is.

What about using exfat vs vfat, there would be no 4GB limitation and your loopback method would work okay?

cutterjohn
Posts: 20
Joined: Sat Jan 03, 2015 6:57 am
languages_spoken: english
ODROIDs: C1
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Include 2GB vfat partition

Post by cutterjohn » Wed Feb 26, 2020 5:13 am

If they have network access, it's just as easy(and less work) if they are directed to winscp, etc. or WSL w/ssh suite.

EDIT:
Or as someone else pointed out here w/w10 ssh client is builtin(or might need to be added in apps/optional) but I'd go with a GUI app, e.g. winscp or the like...
Last edited by cutterjohn on Thu Feb 27, 2020 9:04 am, edited 1 time in total.

User avatar
mad_ady
Posts: 7914
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 502 times
Been thanked: 350 times
Contact:

Re: Include 2GB vfat partition

Post by mad_ady » Thu Feb 27, 2020 2:21 am

Haven't seen the fat32 4G file limit in a while (https://en.m.wikipedia.org/wiki/File_Allocation_Table). Are roms getting that big? I wouldn't know...
Why not ntfs then? It should have reasonable read performance and you could force fsck it on boot...

Regarding resizing - you don't need that. Just mkfs the partition on first boot. The problem is - what size do you make the rootfs?
You could have (though I presume you want to avoid it) two reference images - one for linux users and one for windows users.

Also copying roms through a phone thethered connection as a wifi substitute should be documented and recommended on the wiki.

User avatar
rooted
Posts: 7637
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 671 times
Been thanked: 183 times
Contact:

Re: Include 2GB vfat partition

Post by rooted » Thu Feb 27, 2020 8:30 am

ROMs aren't that big it's just an issue that you could only copy a few PS1 games, Dreamcast also.

Unfortunately USB tethering is locked down on my phone so I was unable to test if it actually works, does it?

NTFS is fine as long as it's NTFS-3G, the thing with that is it requires additional software. Unless something has changed with the kernel implementation, it has always been marked dangerous to write with it.

User avatar
mad_ady
Posts: 7914
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 502 times
Been thanked: 350 times
Contact:

Re: Include 2GB vfat partition

Post by mad_ady » Thu Feb 27, 2020 4:48 pm

Oh, come on - NTFS write support has been stable on linux for the past 15 years, even if it's marked experimental. I've been using it to clean up windows hosts with a live cd for ages. I do remember a time (circa 2003) when ntfs-3g was unable to create new files, but you could edit/delete files. So, the warning is history...

ducalex
Posts: 151
Joined: Sun May 19, 2019 3:29 am
languages_spoken: english, french
Has thanked: 31 times
Been thanked: 206 times
Contact:

Re: Include 2GB vfat partition

Post by ducalex » Sat Feb 29, 2020 1:11 am

crashoverride wrote:
Wed Feb 26, 2020 4:24 am
Another option considered was creating a single FAT partition and dynamically creating a second one. Then, storing an EXT4 filesystem as a file (loopback) on it, but the 2GB file system limit makes this complicated.
FAT32 maximum file size is actually 4GB. A single FAT32 partition with a 4GB loopback system image would be the best solution for users. Easy to upgrade/switch distro without having to copy all the games again.

Otherwise a 4GB ext4 system partition and a resized fat32 or a fat32 created to fit the card on first boot.

No more recommending that Windows users use a virtual machine or buy a wifi dongle to use their system...
These users thanked the author ducalex for the post:
mad_ady (Sat Feb 29, 2020 2:28 am)

User avatar
mad_ady
Posts: 7914
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 502 times
Been thanked: 350 times
Contact:

Re: Include 2GB vfat partition

Post by mad_ady » Sat Feb 29, 2020 2:27 am

Hmm, why limit the rootfs to 4G? You could have /opt (or whatever) mounted from a different 4G file. So it's not that limiting. Resizing files would be a pain, though...

User avatar
rooted
Posts: 7637
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 671 times
Been thanked: 183 times
Contact:

Re: Include 2GB vfat partition

Post by rooted » Sat Feb 29, 2020 1:31 pm


mad_ady wrote:Oh, come on - NTFS write support has been stable on linux for the past 15 years, even if it's marked experimental. I've been using it to clean up windows hosts with a live cd for ages. I do remember a time (circa 2003) when ntfs-3g was unable to create new files, but you could edit/delete files. So, the warning is history...
All Linux distros I know of use NTFS-3G not the kernel implementation, there has to be a reason for this. I'm just looking to not introduce other issues trying to fix one.

NTFS-3G r/w is good, enabling write in the NTFS kernel driver is what I'm talking about being a negative.

User avatar
mad_ady
Posts: 7914
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 502 times
Been thanked: 350 times
Contact:

Re: Include 2GB vfat partition

Post by mad_ady » Sat Feb 29, 2020 4:26 pm

Hmm, I thought they were the same thing now...

deerwings
Posts: 165
Joined: Mon Oct 08, 2018 9:11 am
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advance
Has thanked: 3 times
Been thanked: 13 times
Contact:

Re: Include 2GB vfat partition

Post by deerwings » Sun Mar 01, 2020 12:10 am

I've seen some weird issues related to NTFS implementation in Linux. Anywhere from file corruption to simple permission issues that cannot seem to be overcome within the system itself. Exfat seems to be better supported. On the other hand, I think the following partition structure might be more viable. Since your roms are generally only read, not written, the best option would be to have any read/writeable data such as save states to be on a completely different partition. For example:

/boot - Standard partition
/ - ext4 partition, approx 2GB in size for system/additional software that may need to be installed
/saves - ext4 partition - Save State/Save Data/sram is usually on the order of kilobytes, so a 1GB partition should be sufficient for this
/roms - expandable fat32 partition to fill the rest of the disk - Since roms/isos are read and not written to, a fat32 partition should be fine as corruption shouldn't be a problem unless the system crashes or is rebooted in mid-write to the partition. Since this would only happen when placing roms on the partition, the chances of it corrupting should be minimal.

Total Minimal SD Card size would need to be at least suggested 8GB, though you COULD get by with a 4GB card but you'd have practically no space left over for anything. For an OGA, it seems impractical to use anything smaller than 8GB. Ideal is 32GB or even 64GB.

Exfat support seems to work as well, but I've also read that some linux kernels have issues with writing to exfat partitions, even if it can read them just fine.

User avatar
mad_ady
Posts: 7914
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 502 times
Been thanked: 350 times
Contact:

Re: Include 2GB vfat partition

Post by mad_ady » Sun Mar 01, 2020 1:38 am

Regarding ext4 saves - it leaves the problem of not being able to easily back up or remove bad saves from the sd card.

crashoverride
Posts: 4960
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 288 times
Contact:

Re: Include 2GB vfat partition

Post by crashoverride » Sun Mar 01, 2020 3:08 am

My personal opinion is that this just moves complications from one place to another. :lol:

I believe that GO-Advance should function like every other ODROID. The SD card should only be removed to re-flash. Instead, ROM transfer should happen via USB (flash drive, SSD/HDD, wifi, ethernet). Ironically, this turns out to be more daunting than it would appear on the surface (file manager).

deerwings
Posts: 165
Joined: Mon Oct 08, 2018 9:11 am
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advance
Has thanked: 3 times
Been thanked: 13 times
Contact:

Re: Include 2GB vfat partition

Post by deerwings » Sun Mar 01, 2020 4:41 am

crashoverride wrote:
Sun Mar 01, 2020 3:08 am
My personal opinion is that this just moves complications from one place to another. :lol:

I believe that GO-Advance should function like every other ODROID. The SD card should only be removed to re-flash. Instead, ROM transfer should happen via USB (flash drive, SSD/HDD, wifi, ethernet). Ironically, this turns out to be more daunting than it would appear on the surface (file manager).
Complicated by lack of USB Host on the OGA. This would have certainly added some cost if a Micro USB or USB-C USB host port had been added to the unit, but technically would have solved the problem. Of course, the flip side would be if Microsoft would just get with the times and start supporting ext filesystems too.. :)

A good pad/button controllable File Manager would be a great solution, as long as the OGA can mount the USB drive inserted into it, which has proven a little fiddly on its own, but not too difficult to overcome.

User avatar
rooted
Posts: 7637
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 671 times
Been thanked: 183 times
Contact:

Re: Include 2GB vfat partition

Post by rooted » Sun Mar 01, 2020 3:12 pm

Honestly I think this solution is pretty good and should be getting more attention:

viewtopic.php?f=194&t=37917

Post Reply

Return to “Platform development”

Who is online

Users browsing this forum: No registered users and 1 guest