English Amiga Board


Go Back   English Amiga Board > Support > support.OtherUAE

 
 
Thread Tools
Old 12 August 2013, 21:40   #1
Hercules
Beer monster

Hercules's Avatar
 
Join Date: Jul 2009
Location: UK
Posts: 195
Mounting .hdf files from Linux side? How?

Hi all

I am wondering how to mount .hdf files under Linux. I know e-uae will mount them, but can I'd like to know how to mount from the Linux side rather than under e-uae emulation...

Any help on this would be greatfully received !

Thanks!
Hercules is offline  
Old 12 August 2013, 22:23   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,169
Assuming you're using a normal HDF, which corresponds to a single partition (not an HDF with RDB, i.e. an image file of a complete hard disk), and you formatted the partition using FFS, try something like this:

# Create a directory where we'll mount the FFS partition
mkdir /media/test
mount -o ro,loop,bs=xxxx,reserved=xxx,verbose -t affs my_hdf_file.hdf /media/test


bs= specifies the block size. Could be 512, 1024, 2048, ... depending on how you formatted the partition. Linux only supports block sizes up to 4096 bytes. reserved= will usually be 2 which is the default. If so you don't need to specify it.

You might also need to add a root=xxxx argument to specify the location of the root block since it seems the Linux affs code sometimes can't find it.

If it works, you should have read-only access to the files in the HDF. I don't really trust the Linux affs code not to screw up when writing. Plus things like file comments and protection bits would be lost if you move files around using Linux.

When I tried this I think I remember that for some partitions, some files were missing from some directories when listed in Linux. If you notice anything similar please let me know.

If you want to mount partitions which are inside an RDB-type HDF that's also possible but you need to specify the correct offset= and sizelimit= arguments.
mark_k is offline  
Old 15 August 2013, 00:08   #3
OddbOd
Registered User
 
Join Date: Jul 2005
Location: Australia
Age: 42
Posts: 663
Quote:
Originally Posted by mark_k View Post
If you want to mount partitions which are inside an RDB-type HDF that's also possible but you need to specify the correct offset= and sizelimit= arguments.
There are some handy hints on doing this at: http://gareth.halfacree.co.uk/2013/0...es-under-linux despite this post talking about a physical drive a loop mounted hardfile works just as well.

@mark_k: Why is sizelimit needed?
OddbOd is offline  
Old 15 August 2013, 13:26   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,169
Quote:
Originally Posted by OddbOd View Post
@mark_k: Why is sizelimit needed?
If you have an RDB-type hardfile with several partitions:
[RDB area][partition 1][partition 2][unused space]

Let's say you want to mount partition 1. You'd use the offset option to specify where partition 1 begins in the hardfile. Without using sizelimit, the loopback device would cover from the start of partition 1 right to the end of the file. The root block of an FFS partition is (more or less) in the middle of the partition. Without specifying sizelimit, the Linux affs code will look for the root block half-way between the start of partition 1 and the end of the hardfile. Which might be at some random place in partition 2. By specifying sizelimit to be the size of partition 1, affs should hopefully be able to find the root block itself.
mark_k is offline  
Old 13 January 2020, 08:34   #5
MrDBUG
Registered User
 
Join Date: Apr 2010
Location: Larvik, Norway
Posts: 63
No go with pds3 ?
MrDBUG is offline  
Old 13 January 2020, 10:48   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,169
There is no PFS3 driver for Linux, so no. For data interchange either FFS or FAT(32) are simplest I think.
mark_k 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
HDF mounting problem Redeken support.WinUAE 15 05 April 2015 01:33
Mounting extra (HDF) drive Nomad of Norad New to Emulation or Amiga scene 9 18 July 2008 20:08
Drag and Drop HDF mounting? killergorilla request.UAE Wishlist 5 02 July 2008 12:12
Creating and mounting hardfiles from amiga side rare_j support.WinUAE 8 13 June 2008 23:10
Linux mounting hdd AliasXZ New to Emulation or Amiga scene 8 06 February 2008 23:36

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 22:33.


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