HDDriver + Linux?

All about the serious stuff.

Moderators: Mug UK, Zorro 2, Moderator Team

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

HDDriver + Linux?

Postby simonsunnyboy » Mon Sep 03, 2007 4:13 pm

I'm trying to access my SD Card for use with SatanDisk under Linux. The card has a single partition with TOS/Windows compatibility enabled.
Under Windows XP the card works as expected, I can access everything and STEEM can boot the same setup as my STE. However uner Linux I can't mount the filesystem. The partition is detected somehow: (listed from /proc/diskstats)

Code: Select all

  8   48 sdd 39 506 776 148 0 0 0 0 0 140 148
  8   51 sdd3 512 512 0 0


Neither the automounter finds a suitable filesystem nor does a manual mount. If I specify MSDOS or VFAT, mount complains "unknown superblock"
Is there anything I can do about this?
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Lautreamont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Fri Jan 27, 2006 9:11 pm
Location: Friceland

Postby Lautreamont » Mon Sep 03, 2007 7:37 pm

If

Code: Select all

mount -v /dev/sdd3 /mnt
failed, you'll have to rebuild your kernel with support for more filesystems. I don't know which ones.

fdisk may help if it works on your SD card:

Code: Select all

fdisk /dev/sdd
Look at the partitions table and you may have a clue.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Mon Sep 03, 2007 7:54 pm

Code: Select all

Command (m for help): p

Disk /dev/sdd: 517 MB, 517734400 bytes
64 heads, 32 sectors/track, 493 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         493      504816    6  FAT16
/dev/sdd3   ?     1830114     1830114           0    0  Empty
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(333, 66, 7) logical=(1830113, 56, 1)
Partition 3 has different physical/logical endings:
     phys=(33, 0, 0) logical=(1830113, 55, 32)
Partition 3 does not end on cylinder boundary.
/dev/sdd4            8193       16384     8388608    0  Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(0, 0, 0) logical=(8192, 0, 1)
Partition 4 has different physical/logical endings:
     phys=(0, 0, 0) logical=(16383, 63, 32)
Partition 4 does not end on cylinder boundary.

Command (m for help): q


That's what fdisk lists for me. I tried adding a sdd1 device but the mount fails aswell:

Code: Select all

$ sudo mount -v /dev/sdd1 /mnt/satandisk/ -t vfat
mount: /dev/sdd1 is not a valid block device


dmesg leaves the following lines:

Code: Select all

[14092.111314] sdd: Write Protect is off
[14092.111317] sdd: Mode Sense: 4b 00 00 08
[14092.111319] sdd: assuming drive cache: write through
[14092.113688] SCSI device sdd: 1011200 512-byte hdwr sectors (518 MB)
[14092.116311] sdd: Write Protect is off
[14092.116315] sdd: Mode Sense: 4b 00 00 08
[14092.116317] sdd: assuming drive cache: write through
[14092.116321]  sdd: AHDI sdd3
[14551.791944] FAT: bogus logical sector size 8192
[14551.792039] VFS: Can't find a valid FAT filesystem on dev sdd3.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
daeghnao
Captain Atari
Captain Atari
Posts: 479
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK
Contact:

Postby daeghnao » Tue Sep 04, 2007 8:18 am

Likely whatever HDDRIVER does to the partition table isn't supported by the standard DOS partition table support in the Linux kernel? You could try adding the Atari partition table support and see if that picks it up. I'll be messing about with satandisk today or tomorrow, and I only have Linux - may have to look deeply into the partition table structure to figure this one out.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Tue Sep 04, 2007 12:53 pm

As I'm using the Ubuntu LTS vanilla kernel, I don't know if Atari partition support is enabled. I might try to compile the necessary driver.
BTW my system is a 64Bit one, could this cause a filesystem issue? I think it shouldn't but who knows....actually my idea was: if Windows does eat it, it can't be that off standard :>
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ppera

Re: HDDriver + Linux?

Postby ppera » Tue Sep 04, 2007 12:58 pm

simonsunnyboy wrote:I'm trying to access my SD Card for use with SatanDisk under Linux. The card has a single partition with TOS/Windows compatibility enabled.
Under Windows XP the card works as expected, I can access everything and STEEM can boot the same setup as my STE. However uner Linux I can't mount the filesystem. The partition is detected somehow: (listed from /proc/diskstats)

Code: Select all

  8   48 sdd 39 506 776 148 0 0 0 0 0 140 148
  8   51 sdd3 512 512 0 0


Neither the automounter finds a suitable filesystem nor does a manual mount. If I specify MSDOS or VFAT, mount complains "unknown superblock"
Is there anything I can do about this?


You can do following: partition SD card Under DOS, Windows or Linux.
But use only FAT, BigDOS partitions in range of some 40-2GB (Without FAT32 support enabled). You can do it even with FDisk - if have USB support in BIOS of MBoard. Of course 2GB is not recommended, and you probably have no so big SD card. Better max 511MB per partition.
Then may work with all partitions on ST with Hddriver and BigDOS.
Bad side is that you will have no autoboot then...
Or wait little - my new driver will be ready soon (I need beta testers for it, since I have no Satandisk).
Last edited by ppera on Tue Sep 04, 2007 1:04 pm, edited 1 time in total.

ppera

Postby ppera » Tue Sep 04, 2007 1:03 pm

simonsunnyboy wrote:As I'm using the Ubuntu LTS vanilla kernel, I don't know if Atari partition support is enabled. I might try to compile the necessary driver.
BTW my system is a 64Bit one, could this cause a filesystem issue? I think it shouldn't but who knows....actually my idea was: if Windows does eat it, it can't be that off standard :>


Is system 32 or 64-bit has nothing with filesystem support.
Funny is all this 'compability' mess : FAT16 for TOS and for DOS is in theory compatible, but in praxis they use different sector sizes, different sector/cluster values, so DOS and TOS cen not read each other's partitions without extra programs as BigDOS. Linux is better in this case - it can read Atari's partitions itself, regardless of sector sizes. Why Hddrivers compatible partition is not good for Linux, I don't know - probably Uwe used some dirty trick for it.

Lautreamont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Fri Jan 27, 2006 9:11 pm
Location: Friceland

Postby Lautreamont » Tue Sep 04, 2007 8:19 pm

Don't trust too much what fdisk printed since it says that the partition table doesn't look like a partition table.
/dev/sdd3 is probably the only device created by the kernel. If there was a FAT filesystem on sdd1 and nothing on sdd3, the kernel would have created the /dev/sdd1 device but not /dev/sdd3.
Could you try other partition tools like sfdisk and cfdisk if you have them ("sfdisk -lV /dev/sdd" and cfdisk works like fdisk).

For the Atari partitions support:
On Debian there is a '/boot/config*' file with the options enabled when the kernel was compiled.
The keyword for Atari partitions support is "CONFIG_ATARI_PARTITION".
There's a good chance that your Ubuntu does the same. Check if you have a "CONFIG_ATARI_PARTITION=y" line in that file.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Sep 06, 2007 3:35 pm

I have troubles posting here...Atari partition support seems enabled and sfdisk reports a sdd1 partition.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Sep 06, 2007 3:36 pm

Code: Select all

$ sudo sfdisk -lV /dev/sdd
Password:

Disk /dev/sdd: 493 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdd1          0+    492     493-    504816    6  FAT16
/dev/sdd2          0       -       0          0    0  Empty
/dev/sdd3   ? 1830113+ 1830113-      0          0    0  Empty
/dev/sdd4       8192   16383    8192    8388608    0  Empty
                start: (c,h,s) expected (1023,63,32) found (0,0,0)
                end: (c,h,s) expected (1023,63,32) found (0,0,0)
Warning: partition 3 has size 0 and is bootable
Warning: partition 4 extends past end of disk


Tis is the sfdisk output for me.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
daeghnao
Captain Atari
Captain Atari
Posts: 479
Joined: Wed Oct 27, 2004 12:41 pm
Location: York, UK
Contact:

Postby daeghnao » Thu Sep 06, 2007 4:01 pm

simonsunnyboy wrote:

Code: Select all

$ sudo sfdisk -lV /dev/sdd
Password:

Disk /dev/sdd: 493 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdd1          0+    492     493-    504816    6  FAT16
/dev/sdd2          0       -       0          0    0  Empty
/dev/sdd3   ? 1830113+ 1830113-      0          0    0  Empty
/dev/sdd4       8192   16383    8192    8388608    0  Empty
                start: (c,h,s) expected (1023,63,32) found (0,0,0)
                end: (c,h,s) expected (1023,63,32) found (0,0,0)
Warning: partition 3 has size 0 and is bootable
Warning: partition 4 extends past end of disk


Tis is the sfdisk output for me.


Try:

Code: Select all

strings /dev/sdd | less


If you get gibberish rather than normal text coming through, as I did earlier today with my Falcon hard-drive, then it'll be a byte-swap problem.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Sep 06, 2007 4:28 pm

MEDIACHGTOS
tA~)1
README
ZIPCTRL CPX
\z)4
.
..
HDDRIVERPRG
USHD0803
0803
AHDI
Partitionen:
Partitions:
Keine Partitionen gefunden!
No partitions found!
Unzureichende Benutzerrechte!


Doesn't look like gibberish to me...for Windows the card is fully acceptable :/
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Thu Sep 06, 2007 4:45 pm

simonsunnyboy wrote:...for Windows the card is fully acceptable :/


Hmm, what you mean "for Windows"? You mean using Ppera's tool, or you can access your card directly with Windows (you shouldn't be able)?

FAT: bogus logical sector size 8192


This seems to be the problem. How you partitioned/formatted the card with HDDriver? Did you use DOS compatibility mode?

ppera

Postby ppera » Thu Sep 06, 2007 4:58 pm

But I was able to open partition with big ectors in Linux.
Don't remember exactly was some with 8KB sectors there...

I recommend to extract only partition (without table) with my program and try to mount it in Linux (loopback).

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Thu Sep 06, 2007 5:44 pm

Yes formatted with HDDriver and TOS/Windows compatibility, no further special options.
If i plug the card into the reader, the Explorer pops up and I can use any app with the SD Card.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Fri Sep 07, 2007 5:09 am

simonsunnyboy wrote:Yes formatted with HDDriver and TOS/Windows compatibility, no further special options.


This might be the problem. I understand that Linux support for Atari partitions, is for native AHDI partitions. It is possible that HDDriver DOS/Win compatibility partitions are not supported.

Try partition again without PC compatibility. But note than then you won't be able to read the card under Windows without extra tools.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Fri Sep 07, 2007 7:03 am

No, I won't reformat the card. Its main purpose is to run on the ST anyway.
But I still insist: if Windows can mount this, it must be possible with Linux too.

@ppera: I'll give your tool a try. Tried it with a complete image but I couldn't find away to mount that image into STEEM and Hatari did boot with 4 bombs from that.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Fri Sep 07, 2007 7:17 am

Ppera's drimg under Linux does the job! Not exactly mount but it can access the card and the file transfer options seem to work. I could extract with no problems and Ill boot my notebook in a few minutes to verify wether Windows can see the new files on the card. The ST has to wait anyway as I don't have it here.

Drimg compiled with no problems for me, I'm using Ubuntu LTS for AMD64.

One minor complaint: the font it the file selector is ugly for me. Would be nice if that was configurable. I'll try the other options aswell.
Nice tool - something like that was needed for ages. How about something similar that can deal with .ST and .MSA as well?
You do not have the required permissions to view the files attached to this post.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ppera

Postby ppera » Fri Sep 07, 2007 12:59 pm

simonsunnyboy wrote:Ppera's drimg under Linux does the job! Not exactly mount but it can access the card and the file transfer options seem to work. I could extract with no problems and Ill boot my notebook in a few minutes to verify wether Windows can see the new files on the card. The ST has to wait anyway as I don't have it here.
Drimg compiled with no problems for me, I'm using Ubuntu LTS for AMD64.

One minor complaint: the font it the file selector is ugly for me. Would be nice if that was configurable. I'll try the other options aswell.
Nice tool - something like that was needed for ages. How about something similar that can deal with .ST and .MSA as well?


You can mount single partitions easy in Linux with regular mount. And can extract them with my tool, even write back to disk (but it is not for beginners). To mount complete GemDOS partitioned drive we have 'Atari' option by Kernel config (but not so easy to set up).

Fonts in file selector? I think that it depends from Linux settings, not from program (I did not defined any specific font for FS).

ST and MSA support is in Windows Floppy Imager. I thought about Linux version, but there was not big interest. Do you want imaging floppies or to extract/copy files from/to images? Imaging ST format is possible under Linux with some floppy tools (Daeghnao wrote something about here).
Will see... I did not work on Linux Drimg for long time, over half year. Maybe during winter, next spring will continue.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Fri Sep 07, 2007 4:36 pm

I can live with the current things. Font included ;)

For floppies I don't want to read or write them but extracting and adding files into floppy images would be really nice.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ijor
Hardware Guru
Hardware Guru
Posts: 3854
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Fri Sep 07, 2007 9:14 pm

simonsunnyboy wrote:No, I won't reformat the card. Its main purpose is to run on the ST anyway. But I still insist: if Windows can mount this, it must be possible with Linux too.


Well, that depends on your meaning of "possible". I agree that Linux, in theory, should be able to mount this. But it might require further patching the Atari partition support in Linux.

If that is the case, then you'll need to decide. Either get native mount support for Windows, or for Linux. You always can access it with custom tools.

Tried it with a complete image but I couldn't find a way to mount that image into STEEM


You need to use Pasti to mount hard disk images in Steem.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Fri Sep 07, 2007 11:25 pm

As I get that ugly nag screen each STEEM boot, Pasti is enabled here....
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

ppera

Postby ppera » Sat Sep 08, 2007 11:26 am

simonsunnyboy wrote:I can live with the current things. Font included ;)

For floppies I don't want to read or write them but extracting and adding files into floppy images would be really nice.


Well. it is possible. Even under Linux - but with emulation. Or on real ST.
Probably Falcon too (where floppy write works not, but you don't need it for image manipulations). Of course, all can be done in Steem itself, with some limitations, little harder. And no compressed MSA save, as I know.

http://www.ppest.org/atari/imgrun.php

On bottom is Trackcopy program. (Name is old). It can read ST, MSA into RAMdisk, and then you can delete, add files, directories with desktop. Drive letter of RAMdisk is for now fixed to O. Just save into desired format after finishing file operations.

Maybe some ideas for further devel. ?

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5157
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Postby simonsunnyboy » Sat Sep 08, 2007 7:29 pm

Description of compressed MSA can be found in the Hatari source code.
I'D prefer a native tool as ofcourse extracting and adding files works under emulation but I don't like to mess with a emulator when I just wnt to build a diskimage of some stuff.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

Lautreamont
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Fri Jan 27, 2006 9:11 pm
Location: Friceland

Postby Lautreamont » Sat Sep 08, 2007 8:25 pm

simonsunnyboy wrote:For floppies I don't want to read or write them but extracting and adding files into floppy images would be really nice.

The mtools (mdir, mcopy ...) have a command line option (-i ?) to work with disk images instead of real floppies.

I believe daeghnao already wrote something about it, maybe in the wiki.

Which was the device file for your partition finally, simonsunnyboy, /dev/sdd1 or /dev/sdd3 ?


Social Media

     

Return to “Applications”

Who is online

Users browsing this forum: No registered users and 2 guests