Partition Manager feedback

General development discussion not covered by a specific forum
User avatar
IanJeffray
Posts: 163
Joined: Mon Jan 18, 2021 1:51 pm

Re: Partition Manager feedback

Post by IanJeffray »

JonAbbott wrote: Sun Oct 08, 2023 12:33 pm If PM is reporting disc errors, then there's an issue.
Having written and checked hundreds of megabytes across four DOMs and two machines, after formatting successfully with HForm, I'm fairly satisfied it's actually reliable in practice with normal ADFS use. It's only initialising with PM that seems to be a problem. Patched ADFS made no difference, but I also suspect the issue may have been RISC OS 3.70 as things 'seemed better' with 4.39. Too much time and aggro spent to try and dig deeply in to finding the specific combination of things that upset things just now. Also, once a DOM had been successfully formatted with HForm, PM's error messages changed - that's why I ended up using 4 'factory fresh' DOMs.

I do agree that 'ADFS is the cause of the problem' but, as observed, it was impossible to get going using PM, whereas HForm has let me use the DOM, for better or worse.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

IanJeffray wrote: Sun Oct 08, 2023 2:32 pm I'm fairly satisfied it's actually reliable in practice with normal ADFS use.
There's a couple of explanations:
  1. There an obscure bug in PM that I can't spot
  2. ADFS is returning from a write operation, before the write has been acknowledged by the drive so an immediate read of the same sector is returning an ambiguous result
  3. The DOM is buffering writes and not returning the buffered write data when its read back before the write has been committed
The second seems the most likely given the age of ADFS. RISC OS 5 might fair better as several updates were rolled into it to support modern drives - I'd need to try it.

Where can I purchase one of the DOM's you're using?
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

The latest test build of 1.02 is now available.

I've changed the layout options for FileCore which were introduced in the previous 1.02 build as "ADFS" varieties. To avoid confusion the drop-down list now includes helper text which states which version of RISC OS the layouts are supported on. Options now available are:

Code: Select all

E, Big map (RISC OS 3.60 and newer)
E (RISC OS 3.19 and earlier)
E+ (RISC OS 3.80 and later)

FAT12/16 drives with multiple reserved LBA are now accepted (reported by Doug Webb)

"Pi Boot drive" download code has had a make-over. It now scrapes the source URL's to retrieve the current versions of RISC OS, HardDisc4 and NetSurf. If the scrape fails, it falls back to hard-coded versions/URL's. This provides some future-proofing (provided the website don't radically change) and should cover RISC OS 5.30 when it's released.

The download code performs a lot more checks and retry options are now offered when an issue occurs, instead of an instant cancel. Keep-alives are now sent to the source URL if no data is received with one second as I've noticed HTTPS sources via URL_GetURL can get stuck and time-out (tested under RPCEmu). Depending on where the time-out occurred it could have reported a misleading "file is corrupt" error instead of the time-out error.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

Updated 1.02 build available

This resolves an issue that caused some ADFS drives to report disc errors when read/formatted with PM.

EDIT:
IanJeffray wrote: Fri Oct 06, 2023 4:56 pm Having all manner of weird issues with PM with a 1GB DOM in a RiscPC, using ADFS.
The more detailed answer is the issues you were seeing with PM were down to the combination of an incorrect check within PM and a quirk of ADFS.

Whenever possible PM issues commands direct to the drive, bypassing the filesystem. In this case, the check within ADFS to fall-back to ADFS_DiscOp's was wrong, so ATA commands were not being used to talk to the drive on earlier versions of ADFS.

The reason HForm doesn't exhibit the issue when it issues it's ADFS_DiscOp is because it's passing an alternative DiscRec with the command. That works around the fact early ADFS do not check DiscOp limits against the IDENTIFY response, but instead use the information from FileCore - which isn't available until the drive is formatted...so its a catch 22.

I've corrected the fall-back check in the ADFS driver so ADFS_DiscOp are only used for ST506 drives. IDE drives will now always use ATA commands direct to the drive, bypassing ADFS/FileCore and their limitations.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

Updated 1.02 build available.

"Pi Boot drive" now downloads the source package lists to obtain the current URL of the packages that get pre-installed during the build. I've yet to implement caching, so it will download them every time Initialise Pi Boot drive is selected from the drive menu.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

Updated 1.02 build available.

This resolves an issue where ADFS hosted drives might fail to read, causing the drive to be shown as Unallocated.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

Updated 1.02 build available.

Very minor update that only affects "Pi Boot Drive". It wasn't kicking off Resolver, which would result in no DNS - I'm not sure how I missed that during all my testing.

I have spotted that although the network card is configured and working, the Network Configure panel doesn't show the card as being configured (ie it's not ticked). I'll see if I can resolve that during the build process.
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v1.03 04/01/24 beta attached.

Changes:
  • MBR partition tables are sorted by disk order before being interpreted
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v1.03 03/05/24 beta attached, which adds NVMeFS support.

Changes:
  • GPT's MBR protective partition assumed to be valid if 1 sector too large
  • The BPB_TotSec16 size check was wrong, causing FAT16 partitions greater than 65535 sectors to be invalid
  • Altered FAT BPB_Media check to match Microsoft documentation
  • Adjusted FAT Sectors per Cluster to match Microsoft's current recommendations
  • The Fragment ID for the FAT "Loader" partition and UBoot area are now calculated, not hard-coded
  • NVMeFS support added
  • Added some additional debug output when scanning for available filing systems
  • Modified the Module version detection as it was failing on v0.01
  • "Mount with FAT32FS" menu option will now only show if FAT32FS supports the partition's underlying filesystem
  • Fixed an issue with FAT32 where the volume name would not be found if it occurred in the first directory sector
  • When initialising a drive, it was not clearing the existing partition table
  • Corrected an issue when writing FileCore layouts to 4K drives, which would corrupt the sector if the write was mid-sector
  • Fixed an issue in ADFS which wasn't checking a drive is supported before pre-filling various variables, causing the next filesystem's first drive to potentially get named "ADFS n"
  • Now handles FileCore partitions where the logical drive sector size is smaller than the physical LBA size
  • The Bootloader FAT partition is now aligned to a MB boundary to comply with Linux partition alignment restrictions
  • When writing an MBR, the sector is first read before clearing the MBR region to avoid overwriting the FileCore Disc Record at &C00 on 4K drives
  • When formatting a FAT partition, it was not adjusting the partiton type to match the chosen FAT type
  • Fixed an issue that was causing the wrong partition start/end CHS values to be written to disc when writing the MBR partition table
  • Added an UpCall claim around the first FileCore action after initialising a Pi or Pinebook Boot Drive, which avoids the "Insert disc.." prompt when the dismount/remount fails
  • Moved common code for Pi/Pinebook Boot drives to the Internet library
  • When updating a window position, the window's X,Y are now returned to ensure menus appear relative to the window if its moved by the Wimp when displayed
  • Changed drive addressing type to a bitwise field to support mixed-mode drives that support both CHS and LBA addressing. This allows MBR and FileCore to use reported CHS geometry if it exists, regardless of the actual addressing mode in use
  • Fixed an issue on GPT partitioned disks, where the sectors used for the backup GPT where not being reserved when there's unallocated space at the end of the disk
  • Before formatting a FileCore partition, the size is now checked to ensure it results in a multi-zoned FileCore format
  • Minimum size of usable unallocated space on GPT increased to 10MB to match MBR
  • Unallocated blocks on MBR/GPT are now aligned to MB boundaries
  • Fixed an issue scraping the available HardDisc4 versions
  • Pi Bootdrive: The latest NVMe and WiFi driver packages are now included
  • Pi Bootdrive: Adjusted !Boot.Choices.Internet.Startup to load the WiFi driver and perform a DHCP request on whichever driver wins out. This should allow WiFi to be the priority and RJ45 to act as a fallback
EDIT [14th May 2024]: It's come to my attention that some of the code changes made to NVMeFS 0.03 which PM relies on, have not made their way into the ROOL source-code. As a consequence, PM will error when formatting partitions and might even crash when scanning drives, due to changes to some of the SWI parameters.
Please avoid using PM to format NVMeFS drives until further notice. To avoid potential issues when scanning drives, remove NVMeFS support by deleting !PartMgr.FS.NVMeFS
JonAbbott
Posts: 3046
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Partition Manager feedback

Post by JonAbbott »

v1.03 23/05/24 beta attached.

Two SWI that were added to NVMeFS during development/testing that Partition Manager relies on are missing from the ROOL release of NVMeFS 0.03. The knock-on effect is PM can't ask NVMeFS to detach/reattach drives when changes are made, so a physical reboot will be required after formatting, before the drive will be usable.

This also prevents Pi Boot drives from being created on NVMeFS hosted drives although as its not possible to boot from NVMe on a Pi currently, this isn't so much of an issue, unless you're trying to create a hybrid SD/NVMeFS boot sequence when it gets the OS from the SD before switching over to NVMeFS for !Boot. The workaround would be to either manually create the NVMeFS FileCore drive, or create a boot drive on a USB stick first and copy the contents across to NVMeFS.

I've adjusted the code to check if the SWI are missing, so it should hopefully now silently fail and immediately rescan the drive when it tries to either detach or reattach a physical drive.

If you have FAT32FS v1.64 installed, it should now be possible to mount FAT partitions on NVMe drives via the partition menu.

Changes:
  • Added a check for the drive detach/attach SWI that are currently missing from the ROOL release of NVMeFS 0.03
  • Added NVMeFS support for FAT32FS v1.64
Now available as the full release here.
Post Reply