Mounting JFS or HPFS partitions from other HD in OpenSuse

I am new to Linux/Suse world, having loaded Suse and Ubuntu several years ago to see how they looked and operated. Only got back into the Linux world as of last week.

For background, to save many of the obvious questions that may follow, I am networked in my home office with a new workstation running W7 and my older PC running Ecomstation (nee OS/2) and OpenSuse 13.2. I previously had W7 installed on the PC, but once I had Samba working in OS/2 and seeing my W7 shares on the workstation, I nixed the W7 installation on the PC. I then decided to install OpenSuse on the vacancies left by the previous W7 installation. I have the Suse running fairly smoothly now, and the Samba shares have found the W7 workstation and my W7 laptop. However, seeing my OS programs and personal files on the same PC on which Suse is installed is another matter.

My PC has 2 physical HD’s: OS/2 runs on the older, smaller HD, Suse on the newer, larger one–they are designated “sda” and “sdb”, respectively in Suse. Using the disk partitioner utility in Suse, I have determined that on the other HD, the OS/2 Boot Manager is designated “/sda1”; Ecomstation OS is installed on “/sda2” (primary partition drive w:); my OS/2 programs reside on “/sda5” (logical drive x:) and my personal data on “/sda6” (logical drive y:). /sda2 and /sda6 are formatted as Journaled File System (JFS) and /sda5 as HPFS. I attempted to mount /sda6 by editing it in disc partitioner, located in sub-directory “/etc”. I was given a warning message that doing so would mirror files, etc. of the existing installation, but being a glutton for punishment, I proceeded. After a reboot, I was able to see this drive mounted in Suse and all the files and directories within it. However, if I try to open a file or a directory, I am denied access, as though the files and directories are requiring a share authorization. I decided to unmount this directory, but it keeps reappearing in Dolphin–I do have the option of mounting or unmounting it at least. Also, I find that Disc partitioner does not seem to recognize HPFS file system.

Any advice to boost my learning curve would be appreciated.

Regards

You are denied access when logged in as normal user or root? Please show output of “ls -l /path/to/mount/point” and “id -a” in code tags.

I appear to be logging in as a normal “user”.

Upon typing “ls-l/path/to/mount/point”, I get the reply “no such file or directory”

the “id -a” command returned: uid=1000(bigdaddy) gid=100(users) groups=100(users)

:slight_smile:
“/path/to/mount/point” should be read literally… ie <your> mount point.
Let me try to describe what you should be doing a bit differently…

ls -l *mount_path *

So, for instance, if you’re mounting to /mnt/ your command would be

ls -l /mnt/

I would not mount anything in /etc/. The warning you see is likely because there are many things in /etc/ which might cause conflict.
My personal SOP is to locate all my temporary mounts (mounting by command or temporary files and folders) in /mnt/… You can mount other permanent files and folders there, too if you want, create subfolders to /mnt/ and multiple mounts can be more or less in the same place.

The following might be an example of this (NOTE the following is only intended as examples and will not necessarily work as described!)

mkdir /mnt/hpfs
mount /mnt/hpfs /dev/sda5

You may also consider mounting User-specific (not to be used by system or multiple Users) as subdirectories in your /home folder.

mkdir ~/home/hpfs
mount ~/home/hpfs /dev/sda5

HTH,
TSU

On Fri 23 Oct 2015 02:26:01 PM CDT, tsu2 wrote:

hisnibs;2733286 Wrote:
> I appear to be logging in as a normal “user”.
>
> Upon typing “ls-l/path/to/mount/point”, I get the reply “no such file
> or directory”
>
> the “id -a” command returned: uid=1000(bigdaddy) gid=100(users)
> groups=100(users)

:slight_smile:
“/path/to/mount/point” should be read literally… ie <your> mount
point.
Let me try to describe what you should be doing a bit differently…

Code:

ls -l -mount_path -

So, for instance, if you’re mounting to /mnt/ your command would be

Code:

ls -l /mnt/

I would not mount anything in /etc/. The warning you see is likely
because there are many things in /etc/ which might cause conflict.
My personal SOP is to locate all my temporary mounts (mounting by
command or temporary files and folders) in /mnt/… You can mount other
permanent files and folders there, too if you want, create subfolders to
/mnt/ and multiple mounts can be more or less in the same place.

The following might be an example of this (NOTE the following is only
intended as examples and will not necessarily work as described!
)

Code:

mkdir /mnt/hpfs
mount /mnt/hpfs /dev/sda5

You may also consider mounting User-specific (not to be used by system
or multiple Users) as subdirectories in your /home folder.

Code:

mkdir ~/home/hpfs
mount ~/home/hpfs /dev/sda5

HTH,
TSU

Hi
With hpfs, it will probably only mount read-only (ro), if read/write
required, then it needs to be forced, plus you need to change
ownerships of files…


mount -t hfsplus -o force,rw /dev/sdX /some/mount


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 | GNOME 3.10.1 | 3.12.48-52.27-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

well, duh, of course. Pardon the gaff, but as a newbie to the Linux/Unix world, I am still getting my head around the architecture of the systems. The back slashes vs forward slashes alone has me thinking I’m in the southern hemisphere (LOL)

Okay, I get the gist of what you are saying and will play with that. Guess I need to get up to speed with all the command lines in Linux–reminds me of the old DOS days.

As per your example, I would probably want to make a sub-directory in the default HOME directory on sbd3, something like mkdir ~ home/bigdaddy/os2_data and mount ~ home/bigdaddy/os2_data /dev/sda6. Presumable sdb1 (SWAP) and sbd2 (BtrFS) should be avoided.

Will let you know what happens.

Regards

p.s. to last missive. Upon first attempt, mkdir worked but mount did not–advising me that it can only be done whilst logged on as “root”. Proceed, in spite of all the warnings not to enter “root”?

Regarding permissions
“mkdir” as a normal User typically permissible only within your /home directory.
Mounting a large file system like an entire partition generally should be done with root permissions although later you may be able to access the contents of the mounted file system as a normal User.

Use Malcolm’s syntax. I’d be curious though whether declaring and specifying the hpfs format is still necessary today given that the file system is now a root module.

TSU

pps. I tried mounting that directory in Root mode, but I got an error message stating: “mount point dev/sda6 does not exist”

Now, Suse is supposed to recognize JFS, but the partitioner program says sda6 is Enc Type is HPFS/NTFS and the FS Type is JFS. Does this mean I have to go through the procedure outlined above for mounting HPFS files even though it is JFS?

I tried Malcolm’s suggestion, but I got the error message: “/home/bigdaddy/os2_data is not a block device”

Hi
Your using the wrong order :wink: device first /dev/sda6 and then mount point /home/bigdaddy/os2_data;


mount -t hfsplus -o force,rw /dev/sda6 /home/bigdaddy/os2_data

If you get a type error, try hpfs, hfs or jfs…

JFS keeps owner and access permissions like Unix filesystems. Like in a Unix filesystem, you cannot access file unless file grants you permissions to do it. First try as root - it should always have access. You can also mount JFS using uid=1000 option to force all files to appear to belong to you. But this may screw up permissions for real OS/2 later fir files you touch.

it did not seem possible to mount any of my sda devices in the sub-directories I created, but I successfully mounted sda5 (OS2 programs) in the /HOME directory. The DF command listed the mount points, so I just tried the default locations.

As a check, I tried mounting sda2 the same way. using the hfsplus option, suggested, but no luck. I get an error stating: “wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other problem” This is the same problem encountered trying to mount sda6. What is interesting, both sda2 and sda6 are configured as JFS, but sda5 is only HPFS. Furthermore, I did not need the hfsplus -o… options to mount it.

Why you try to mount them as HFS+ then?

may be at a dead end by this approach.

The suggestion made by you, Malcolm, did not work because I think you might have HFS mixed up with HPFS; the former is a Mac FS, the latter is IBM. What I could find online re. HPFS also applied to NTFS. I believe the two were pretty much interchangeable up to Warp 3, the rift started around Warp 4 version of OS/2? Anyways, I tried using one suggestion, mounting said device (sda6) using Sudo and guidelines provided. End result was error message stating that sda6 was not an NTFS partition, etc. That makes sense as sda6 is supposed to be JFS.

Now, regarding JFS, it seems there are more than one flavour of this system–one is used in the Mac world, another in the IBM/OS2 sphere, but this is what I am getting second-hand from online sources. One source did state that the OS/2 version of JFS was basically incompatible with Linux installations, end of story.

Based on this, I think my easiest solution is to back up my data on sda6 and then reformat it as HPFS instead of JFS; OpenSuse was able to mount sda5 which is HPFS vs sda2 and sda6 which are JFS.

Will advise on my findings when ready.

PPS to last update.

Eureka, finally success (at a price.)

I tried reformatting sda6 in the JFS through Ecomstation, but alas, same problem as described above when I tried to mount it in Open Suse. Back to the OS/2 drawing board and reformatted sda6 in HPFS but limited now to the maximum 64 Gbyte partition size. Having cleaned up all the Linux links residing on the previous sda6, I now had a clean partition in HPFS format; now I was able to mount both sda5 and sda6 in the respective sub-directories under /HOME/BIGDADDY/~…

A start, for a newbie. Thanks for all the help with this. I am sure you will be hearing from me again. My next pet peeve is accessing OpenSuse from my W7 box. Constantly asking for a login and password to no affect. Looked at up to 15 different sites which had about the same number of suggestions–none of which work. I think this is W7 problem, mostly. At least I can Samba my across the other direction from either OS/2 or OpenSuse.