English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 August 2009, 20:56   #1
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
Problem restoring HDF on a CF

I've got some problem on restoring some partitions that I previously backupped on my PC running WinUae, using TSgui.lha from aminet.

This is the scenario: CF with 4 partitions:

DH0: 427mb
DH1: 502mb
DH2: 502mb
DH3: 502mb

all dumped to HDFs, I have of course 4 files, they're all different in size. I have re-partitioned the CF with the same sizez. Now I am able to restore DH3: probably because I "guessed" the correct size in blocks, but no luck for the other partitions...Tsgui always says the partitions sizes don't match!

I tried all the possible variants of blocks that makes DH0: 427mb big but the always don't match..

How can I calculate the partition size in blocks from a HDF file?



any help will be appreciated!
KONEY is offline  
Old 05 August 2009, 21:19   #2
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,652
Can't you just mount the hdf and copy the files in WinUAE?
Photon is offline  
Old 05 August 2009, 21:36   #3
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
Ah yes, tried that too but it always says "NOT A DOS DISK" on the amiga side

I start suspecting the HDF are not good but if it's so why DH3: has been restored correctly at the first go?
KONEY is offline  
Old 05 August 2009, 21:41   #4
prowler
Global Moderator
 
prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
If you mount the HDFs in WinUAE, isn't the geometry displayed? From this you can work out the required number of blocks.
prowler is offline  
Old 05 August 2009, 22:20   #5
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,025
Quote:
I have of course 4 files, they're all different in size.
How big are the files in bytes ?


Quote:
Now I am able to restore DH3:
Does it work after it has been restored, i.e. can you read files from it ?


Quote:
How can I calculate the partition size in blocks from a HDF file?
Number of blocks in a file = size of the file in bytes / 512
Number of blocks in a partition = number of cylinders * blocks per cylinder

Note that you have to adjust the number of blocks per cylinder so that each HDF holds a whole number of cylinders. But do not make a cylinder too small because then the partition table will overwrite the first partition (and vice versa). The partition table has to fit into two cylinders because the first partition usually starts in cylinder 2. One cylinder should be around 1000 blocks (for IDE drives it's usually 1008).
thomas is offline  
Old 05 August 2009, 22:20   #6
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 6,045
Send a message via MSN to FOL
Im really lost here.

I have backedup to HDF many times and then sorted my CF, then put every back on CF.

I mount the HDF in WinUAE and CF, then copy hdf files to CF.

EDIT:- Unless your talking about typing in the block size etc etc. However youve now forgotten them.

Last edited by FOL; 05 August 2009 at 22:26.
FOL is offline  
Old 05 August 2009, 22:48   #7
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
oh my....it's getting a nightmare!

I've done like Prowler said, mounting an image as a disk and making a SCSI enquiry, I get a cylinder value (a few less than I was using) and I tried to enter that amount on the partition size. No way, it always complain that sizes don't match...

Partition info says that the partition highes sector is 875423, the filesize of the HDF is 448.229.376 which divided per 512 makes 875448, so very near...maybe because the first 2 cylinders are reserved...yes it myst be this...

I'm getting confused...I didn't expect it to be so difficult
KONEY is offline  
Old 05 August 2009, 23:02   #8
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
Quote:
Originally Posted by FOL View Post
Im really lost here.
EDIT:- Unless your talking about typing in the block size etc etc. However youve now forgotten them.
Yes I guess I have to type them back, I wrote down sizes in MB thinking it was enought...
KONEY is offline  
Old 06 August 2009, 00:01   #9
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 6,045
Send a message via MSN to FOL
Quote:
Originally Posted by KONEY View Post
Yes I guess I have to type them back, I wrote down sizes in MB thinking it was enought...
doesnt the defaults work?
0,0,0,512?

Just saying cause I have never messed with the settings, defaults have always worked for me.
FOL is offline  
Old 06 August 2009, 00:10   #10
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
zero cylinders?
KONEY is offline  
Old 06 August 2009, 00:42   #11
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 6,045
Send a message via MSN to FOL
Quote:
Originally Posted by KONEY View Post
zero cylinders?
We are talking about the HardDrive mounting screen right?
FOL is offline  
Old 06 August 2009, 00:47   #12
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
Ah no I was talking about the partitioning one, sorry!

Ok now I got your advice: it's to try and mount the HDF as a device, beyond restoring it do a disk.
I think they're already set that way, tomorrow I'll be doing a test, thanx!
KONEY is offline  
Old 06 August 2009, 00:57   #13
FOL
PSPUAE DEV
 
FOL's Avatar
 
Join Date: Nov 2006
Location: Wales / UK
Age: 45
Posts: 6,045
Send a message via MSN to FOL
Quote:
Originally Posted by KONEY View Post
Ah no I was talking about the partitioning one, sorry!

Ok now I got your advice: it's to try and mount the HDF as a device, beyond restoring it do a disk.
I think they're already set that way, tomorrow I'll be doing a test, thanx!
Im still confused as to what your talking about.

How were you using / mounting the HDF's?
FOL is offline  
Old 06 August 2009, 13:29   #14
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
I was:

1) trying to restore the HDF into a partition, from a file, using an amiga program (fails due to different sizes issues, because I don't know how to make the partitions exact)

In alternative:
2) trying to mount the HDF into winuae, normally, as usual, as a Harddisk, to eventually copy all the files into a partition (fails as well, says the disk is Not a DOS disk)

KONEY is offline  
Old 06 August 2009, 13:36   #15
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,025
@Koney: did you read my answer ? I am able to walk you through if you allow me to help you.
thomas is offline  
Old 06 August 2009, 13:53   #16
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
Yes man, sorry, I did. I made the calculation but I didn't get any useful number!

How big are the files in bytes ?
DH0 came a 448.229.376 bytes file


Does it work after it has been restored, i.e. can you read files from it ?
Totally, I boot from it (DH3) and load programs flawlessly

Thanx!
KONEY is offline  
Old 06 August 2009, 14:08   #17
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,025
Quote:
DH0 came a 448.229.376 bytes file
Please give the sizes of all files. As all files came from the same HDD, they all need the same geometry. Calculation might be easier if you have multiple values to double-check.


This could work for DH0:

Surfaces (Heads) = 8
Sectors (Blocks per Track) = 63
Blocks per Cylinder = 504
Cylinders = 1737
thomas is offline  
Old 06 August 2009, 18:46   #18
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 672
yes of course!

Code:
DH0: 448.229.376 (427 mb)
DH1: 527.129.064 (502 mb)
DH2: Didn't make any HDF as it was empty (502 mb)
DH3: 526.934.016 (502 mb)

DH3: was correctly restored,
I will try the settings you provided for DH0:! thanx
KONEY is offline  
Old 06 August 2009, 19:30   #19
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,025
DH1 is not valid. This size is not divisible by 512. A typo perhaps ?

Edit: bullhsit. I had fat fingers when using the calculator. Everything is fine.

Edit2: now I see. 2 and 9 are swapped in the middle. Should be 527.192.064. I need new glasses :-)

Last edited by thomas; 06 August 2009 at 19:38.
thomas is offline  
Old 06 August 2009, 19:49   #20
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,025
Here is the result:

With 512 bytes per block we get:

DH0: 448,229,376 Bytes = 875,448 Blocks
DH1: 527,192,064 Bytes = 1,029,548 Blocks
DH3: 526,934,016 Bytes = 1,029,168 Blocks

The 504 blocks per cylinder which I guessed matches for all three partitions, so we get:

DH0: 875,448 Blocks = 1,737 Cylinders
DH1: 1,029,548 Blocks = 2,043 Cylinders
DH3: 1,029,168 Blocks = 2,042 Cylinders

So to restore all three or four partitions to one HDD use the following procedure. Note that it deletes all data which was on the HDD so make sure it is empty.

- run HDToolbox
- go to "change drive type"
- "define new"
- "read configuration"
- multiply the "blocks per cylinder" with the "cylinders" and remember the result.
- divide the result by 504 and enter it as new number of cylinders
- enter heads = 8
- enter blocks per track = 63
- enter blocks per cylinder = 504
- click on ok until you are back on the main page.
- go to "partition drive" and enable "advanced options".
- delete all partitions but one.
- enter 1737 into "total cylinders"
- create a new partition and enter 2043 into "total cylinders"
- create a new partition for df2 if you like
- create a new partition and enter 2042 into "total cylinders"
- go back to the main page, "save changed to drive" and quit.
- now you can use TSGUI to restore the HDFs.
thomas 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
HDF problem with partitioning kwaku85 support.WinUAE 10 23 April 2012 18:43
Problem with Dynamic HDF tero support.WinUAE 13 27 October 2009 17:33
hdf ndos problem flibble42 support.WinUAE 12 21 September 2008 02:03
HDF files problem Yesideez support.WinUAE 1 13 September 2007 09:16

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 14:50.

Top

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