Author Topic: Sharing drive between OS/2 and linux  (Read 21250 times)

Ben Hjelt

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Sharing drive between OS/2 and linux
« on: December 14, 2021, 08:39:16 pm »
Small external drive formatted as JFS on ArcaOS (not with mkfs.jfs -O on linux, did not work) ends up no named in linux and cannot even be mounted manually:
Code: [Select]
wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
A filesystem check shows no errors:
Code: [Select]
fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 12/14/2021 21:25:25
The current device is:  /dev/sdb1
Block size in bytes:  4096
Filesystem size in blocks:  7679996
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 6 - Perform Approved Corrections
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
 30719984 kilobytes total disk space.
        0 kilobytes in 1 directories.
        0 kilobytes in 0 user files.
        0 kilobytes in extended attributes
    37792 kilobytes reserved for system use.
 30682192 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

 ??? I would rather not format the drive as FAT32, is network sharing my only real option then?

Sean Casey

  • Full Member
  • ***
  • Posts: 133
  • Karma: +3/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #1 on: December 14, 2021, 09:43:16 pm »
I mount my OS/2 HPFS file systems read/write on Linux. 

Ben Hjelt

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #2 on: December 14, 2021, 09:53:27 pm »
HPFS has that 2GB file size limit, no?

ivan

  • Hero Member
  • *****
  • Posts: 1625
  • Karma: +20/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #3 on: December 14, 2021, 11:25:52 pm »
A lot depends on how you expect to share that drive.  are OS/2 and Linux running on the same computer or separate computers?  If separate computers are they running at the same time and if so how do you connect the drive to both computers?

Also what type od data are you sharing?  I have 2 OS/2 computers, 2 ArcaOS computers and 4 Linux computers that can all share everything on 2 NAS boxes which allows backup as well as file sharing.

You need to define what you want to do, once you know that how to do it will be obvious.  Give us details of your setup and we should be able to give you advice.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #4 on: December 15, 2021, 12:25:06 am »
Small external drive formatted as JFS on ArcaOS (not with mkfs.jfs -O on linux, did not work) ends up no named in linux and cannot even be mounted manually:
Code: [Select]
wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
A filesystem check shows no errors:
Code: [Select]
fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 12/14/2021 21:25:25
The current device is:  /dev/sdb1
Block size in bytes:  4096
Filesystem size in blocks:  7679996
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 6 - Perform Approved Corrections
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
 30719984 kilobytes total disk space.
        0 kilobytes in 1 directories.
        0 kilobytes in 0 user files.
        0 kilobytes in extended attributes
    37792 kilobytes reserved for system use.
 30682192 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

 ??? I would rather not format the drive as FAT32, is network sharing my only real option then?

You never said which Linux distribution you're using. At least the fact that fsck.jfs succeeded shows that you have the JFS module installed, I believe. A lot of distributions don't include it or the HPFS module. Debian based ones still do it seems and others can install it.
One thing with OS/2 formatted JFS partitions is that they have no permissions, so unless you do a chown and chmod to make you the owner, they will only mount as root.
Here with Mint, depending on which desktop I'm using (need to reboot to remember, have the stock one and a simpler one installed), clicking on my USB drive in Computer will fail with a permission error or brings up 2 sudo popups that allow me to mount it as root.
I'd guess that you are mounting it with the wrong filesystem based on your errors, especially with fsck.jfs working. Unluckily I forget the mount incarnation needed to do it manually.
Mint also correctly mounts OS/2 JFS with the case insensitive flag.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #5 on: December 15, 2021, 05:33:38 am »
Here's how things look here when booted to Mint-Cinnamon. Today it didn't open the USB drives AOS formatted JFS 1 TB volume as sudo but the context menu allows it. Some folders have previously been chown by me. I also took the opportunity to trim my SSD's ArcaOS volumes. /dev/sda7 is my AOS HPFS 4GB boot volume.

Ben Hjelt

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #6 on: December 15, 2021, 09:32:33 am »
Give us details of your setup and we should be able to give you advice.
A couple of linux machines and one ArcaOS 5.0.7 + Windows XP ;D dual boot desktop. The external drive would be a clone of my old thumbdrive that is filled with tools and drivers for many systems. I do have a OpenBSD NAS in use already, maybe carrying a hard drive around is passé.

Mint also correctly mounts OS/2 JFS with the case insensitive flag.
That's why i also use JFS on my Devuan machines (root, home and a case insensitive wine partition).

Ben Hjelt

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #7 on: December 15, 2021, 12:00:35 pm »
 :-[ Seems to be a bug in the latest Devuan 4/Debian 11!
The ArcaOS formatted disk can be mounted in Devuan 3/Debian 10:




The partition name encoding seems to be unknown though.
EDIT: fixed by renaming it to all lowercase in linux, displays as uppercase in OS/2
« Last Edit: December 15, 2021, 07:05:41 pm by Ben Hjelt »

Sean Casey

  • Full Member
  • ***
  • Posts: 133
  • Karma: +3/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #8 on: December 16, 2021, 04:41:46 am »
HPFS has that 2GB file size limit, no?

Yes, HPFS has a 2GB file size limitation and a 64GB volume size limitation.  I have a 20GB HPFS 386 partition, used by ArcaOS, I mount R/W under Linux.

Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux -JFS
« Reply #9 on: November 27, 2025, 03:51:18 pm »
I can't manage to mount a OS/2 created JFS partition on my Debian 12. No matter what I tried it does not work.
Code: [Select]
root@zazu:/dev# mount -t jfs /dev/sdc1 /media/500GB/
mount: /media/500GB: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
In dmesg I see nothing what would help -
Code: [Select]
root@zazu:/srv# dmesg | grep -i sdc
[    3.817598] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    3.817600] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[    3.817612] sd 3:0:0:0: [sdc] Write Protect is off
[    3.817615] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    3.817632] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.817650] sd 3:0:0:0: [sdc] Preferred minimum I/O size 4096 bytes
[    3.840623]  sdc: sdc1
[    3.840683] sd 3:0:0:0: [sdc] Attached SCSI disk
[  361.915751]  sdc: sdc1
[  362.183053]  sdc: sdc1
[  686.496790]  sdc: sdc1
[12970.328576]  sdc: sdc1

Superblock seems to be okay -
Code: [Select]
root@zazu:/dev# jfs_tune -l /dev/sdc1
jfs_tune version 1.1.15, 04-Mar-2011

JFS filesystem superblock:

JFS magic number: 'JFS1'
JFS version: 1
JFS state: clean
JFS flags: JFS_OS2  JFS_COMMIT  JFS_GROUPCOMMIT  JFS_INLINELOG 
Aggregate block size: 4096 bytes
Aggregate size: 976672248 blocks
Physical block size: 512 bytes
Allocation group size: 1048576 aggregate blocks
Log device number: 0xb
Filesystem creation: Thu Nov 27 16:56:38 2025
Volume label: 'JFS_BACKUP'

I tried different disks. Numerous attempts to create a JFS partition with MiniLVM and try to mount it in Linux. But can't get it to work.

fdisk complains that it does not start on sector boundary. But how can that be? I think OS/2 - ArcaOS can create partitions on sector boundaries only.
Code: [Select]
root@zazu:/dev# fdisk -l
Disk /dev/sdc: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AZLX-6
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdf5ee166

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1  *       63 976768064 976768002 465,8G  7 HPFS/NTFS/exFAT

Partition 1 does not start on physical sector boundary.

Any attempts to create the partition on Linux an see it on ArcaOS fails also. Help appreciated.

Mike Kölling

  • Full Member
  • ***
  • Posts: 143
  • Karma: +8/-0
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #10 on: November 27, 2025, 04:46:17 pm »
Hi Andy,
I have same problem with my Bunsenlab system. However if I start the PuppyLinux-System created by DFSee I can see the OS/2-JFS drives and have access. Mabye looking there might give you the hint for a solution. I am an absolute novice to Linux at all and I am just happy that I could get the Bunsenlab running and a working SAMBA4 on it.
Greetings, Mike

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #11 on: November 27, 2025, 06:04:29 pm »
Hi Andy, it is weird. The only time I've seen a similar message on Mint, it has been due to needing a chkdsk or fsck (after an OS/2 crash). Otherwise I just have permission problems which can be worked around. You could try doing a fsck-jfs /dev/sdc1 (think that is the command) and see what happens.
I usually just use the file manager to mount JFS partitions, double click on the device. You did use fdisk to make sure it is /dev/sdc1 you want? There's another command that I forget the name of to get the GUIID or whatever it is that Linux usually uses now.
BTW, OS/2 can't mount a Linux created JFS volume and Linux can only mount the standard OS/2 JFS volume with 4kb sectors, which your dmesg output says you have.
Later when I boot into Linux again, I'll try to see if I can find the actual mount command that the file manager uses. It does mount it with case insensitivity and I don't think xttrs (EAs) are enabled by default.
Other Linux dists often don't have JFS support and it needs to be installed, Debian and derivatives usually seem to have it.

Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #12 on: November 27, 2025, 10:28:33 pm »
I've just booted with Puppy DFsee16 stick and there I can read from that drive. mount shows rw,relatime options whatever that means. No clue why this does not work on Debian 12.

Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #13 on: November 27, 2025, 10:53:05 pm »
I've OpenSuse installed on this system too. But this can not mount it either :-(

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #14 on: November 27, 2025, 11:05:06 pm »
I've OpenSuse installed on this system too. But this can not mount it either :-(

Does OpenSuse install JFS support? You might have to install the module.