Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: motorollin on August 28, 2006, 10:40:35 AM
-
Hi all
I've given up with XFS as it doesn't let me assign to drawers within the disk image. No matter what I do, the assign points to the root of the image.
I decided to give DiskImage a try. I created the image with this command:
CreateImage drive=hd0: DIUNIT 0 Mark:OS39
I then mounted it with this command:
mount DIHD0: from OS39.mountlist
I got an error that Keyword 'CONTROL' requires a string, so I commented out the line and it seemed to mount ok. I then inserted the image in to the device with this command:
DiskImageCtrl unit 0 insert Mark:OS39
The device was then reported as not being a valid DOS disk, so I tried to format it and got format failure "bad number".
For some reason the volume is reported as being 281MB, whereas the partition is just over 1GB and the data on it is about 30MB. I don't know where this size of 281MB has come from, and whether that is anything to do with it not working.
Any help would be much appreciated!
--
moto
-
Why didn't you use the HDF you already created for XFS ?
What does the DIHD0 mountlist look like ?
How big is the image file ?
The geometry you specified in DIHD0 should match the image size.
(HighCyl + 1) * BlocksPerTrack * Surfaces * BlockSize = image size
Bye,
Thomas
-
I did try the HDF I created for XFS, but the same problem occurred (non-dos disk). I'm just powering my Amiga back on so I can get the mountlist. Do you have any idea why assigning doesn't work properly with XFS?
--
moto
-EDIT
Here's the mountlist:
DIHD0:
Device = diskimage.device
Unit = 0
Flags = 0
FileSystem = L:FastFileSystem
Surfaces = 4
BlockSize = 128
SectorsPerBlock = 1
BlocksPerTrack = 246
Reserved = 2
Interleave = 0
LowCyl = 2
HighCyl = 2341
Buffers = 80
BufMemType = 1
MaxTransfer = 0x00ffffff
Mask = 0x7ffffffe
DosType = 0x53465300
GlobVec = -1
StackSize = 4096
# Control = 0
Mount = 1
#
-
The equation you gave me comes out at about 280MB. So do you think the mountlist was created incorrectly by CreateImage?
--
moto
-
Yes, the mountlist is not correct. The value for BlockSize is wrong. It should be 512. In memory the block size is stored as number of longwords, but the mountlist has to specify the number of bytes (four times the number of longwords; 128 longwords are 512 bytes).
Also if the image is only one partition, you should change
LowCyl to 0 and HighCyl to 2339.
Finally you should not use FFS with the DosType for SFS.
Bye,
Thomas
-
Thomas you're amazing - it works :-) Any thoughts in why the mountlist was incorrect? Bug in CreateImage? Someting weird about my partition layout on HDD?
--
moto
-
Yes, the BlockSize mistake is obviously a bug in CreateImage, so the other problems probably are bugs, too.
Bye,
Thomas
-
Do you have much experience with DiskImage? I am wondering if it is possible to specify the size of the image when you create it? I have a 16GB partition with not much on it, and would prefer for the image to be the size of the data, not the size of the partition.
--
moto
-
I have a 16GB partition with not much on it, and would prefer for the image to be the size of the data, not the size of the partition.
That's not possible. But you can create an empty HDF, format it and copy the data to it.
I am not very experienced with the tools which come with DiskImage. I only use diskimage.device and (because I cannot avoid it) DiskImageCtrl. I even don't remember which program I used to create my HDFs, probably WinUAE.
Bye,
Thomas
-
Ok, that's fine. I can create a disk image with WinUAE and format it. But how do I then create the mountlist in order to mount the device in to which I insert the image? Sorry for all the questions about this but I'm not very experienced when it comes to drive geometry and such.
--
moto
-
Try
Surfaces = 1
BlockSize = 512
BlocksPerTrack = 1
LowCyl = 0
HighCyl =
or
Surfaces = 1
BlockSize = 512
BlocksPerTrack = 32
LowCyl = 0
HighCyl =
The calculation is always the same as above:
(HighCyl + 1) * Surfaces * BlocksPerTrack * BlockSize = image size
Bye,
Thomas
-
That makes sense after seeing your equation - seems to be cheating the filesystem by setting all but two values 1 so they do not increase the image size, and then making sure the other two values give the correct image size when multiplied together. Thanks again.
--
moto
-
If you look at the "add hardfile" panel in WinUAE, you'll see that it uses the values from my second suggestion. So if you format the HDF with WinUAE, a mountlist following this suggestion should work.
Bye,
Thomas
-
I'll try creating one in WinUAE and then mount it. I'm hoping I don't need to format it in WinUAE first as this means keeping an installation of OS3.9 on the laptop. If I can just create it with the WinUAE executable and then format it once mounted on the Amiga I will be very happy :-)
--
moto
-
If you only want to create an empty file for use as an image with DiskImage, you can as well use a simple Rexx program like this:
/* rexx */
size = 10 * 1024 * 1024 /* size in bytes (10 mb) */
file = "ram:hdf" /* file name (will be overwritten if it exists */
buffsize = 32768
buffer = left("",buffsize,'00'x)
if Open(out,file,write) then do
do while (size >= buffsize)
call WriteCh(out,buffer)
size = size - buffsize
end
if size > 0 then
call WriteCh(out,left(buffer,size))
call Close(out)
end
Bye,
Thomas
-
I just opened a fresh WinUAE hardfile in a hex editor and it was full of zeroes anyway. I downloaded the empty file handler from Aminet which was effective for creating an empty file of {size in MB}*1024*1024 bytes, which worked with DiskImage once formatted. I'll give your Arexx method a try later.
Thanks
--
moto