Author Topic: Moving an OS/2 installation from HPFS to JFS  (Read 3076 times)

John Poltorak

  • Full Member
  • ***
  • Thank You
  • -Given: 16
  • -Receive: 0
  • Posts: 233
    • View Profile
Moving an OS/2 installation from HPFS to JFS
« on: May 06, 2016, 09:39:36 am »
Can someone comment on this scenario in terms of whether it should work or not?

I have two disks, one of which I currently boot from, and the other I want to configure as my main disk - disk 2.

Disk 2 has two partitions plus space for a BM partition. Partition 1 is formatted HPFS and has OS/2 installed and is defined as C:. Partition 2 is formatted JFS and is defined as Z:.

If I copy everything from partition 1 to partition 2 and change drive letters C: -> D: and Z: -> C: should I expect to be able to boot from partition 2 if both are marked bootable in boot manager? (Assuming JFS support is included in config.sys)

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 26
  • Posts: 512
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #1 on: May 06, 2016, 10:58:43 am »
No, it's near to impossible to change boot drive letters in OS/2. If you want to change others, then you should do that from the WPS you want to use finally to keep at least program objects, links and object handles working.

Copying data files (without existing WPS objects) works better without the WPS. Use either a file manager or xcopy x:\ y:\ /h/o/t/s/e/r/v. I usually omit the /v option (verify) to speed up the process.

In your case it should not be necessary to change drive letters. Plan your partition sizes on the new disk. If you want to change the destination file system, then you can't use DFSee to copy partitions (which is faster). You have to copy files. Therefore boot from another partition (or from CD/DVD) and use xcopy or a file manger.

Even when you'll end up with two hard disk which both have the same drive letters and LVM, the volumes from the disk with the booted volume come first. LVM then assigns new letters to the other ones.

It's worth to mention a WPS bug: If you format a volume and use the WPS to copy files without a reboot after that, filenames get 7.3 names. Just reboot in between or don't use the WPS for that.
« Last Edit: May 06, 2016, 11:02:56 am by Andreas Schnellbacher »

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 43
  • Posts: 972
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #2 on: May 06, 2016, 01:21:26 pm »
Hi John

If I read it clearly you plan on

1] Copying your installation on drive C: to Z:
2] Changing the drive letter for C: to D:
3] Changing  the drive letter for Z: to C:

You will definitely be able to boot from the new C:

You may have some problems with D: related to Desktop location in the os2.ini file being set as C:\Desktop - I have seen some info about this somewhere but, Sorry, cannot spot it at the moment; guess you could try "googling"...


Regards

Pete



Alex Taylor

  • Sr. Member
  • ****
  • Thank You
  • -Given: 11
  • -Receive: 18
  • Posts: 281
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #3 on: May 06, 2016, 01:22:36 pm »
Actually, since (if I read correctly) you are using the old volume's drive letter on the new volume, this should work fine - as long as you write the correct boot sector with bootable JFS on the new partition.  (Simply formatting it isn't necessarily enough.)  I believe the SYSINSTX command is what you need.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 22
  • Posts: 487
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #4 on: May 06, 2016, 01:24:29 pm »
Quote
If I copy everything from partition 1 to partition 2 and change drive letters C: -> D: and Z: -> C: should I expect to be able to boot from partition 2 if both are marked bootable in boot manager? (Assuming JFS support is included in config.sys)
I would say yes. Maybe a sysinstx is required. And the JFS partition have to be marked as bootable - think the partition type have to be 07 instead 35. But others have to comment on this. I for myself usually let the latest eCS2.2beta installer set up the new bootable JFS partition and after that I transfer the files from the source partition.

@Andreas Schnellbacher - although not what John needs as far as I understand him correctly, changing boot drive letter is not impossible. Find/replace all f.i. C:\ to X:\ in config.sys and the two ini files will do most of the job (carefully checking every occurrence is mandatory). Find/replace recursively in *.cmd files maybe necessary too. Of course without using the WPS for any copying. Not something I would suggest anyone else but doable.

John Poltorak

  • Full Member
  • ***
  • Thank You
  • -Given: 16
  • -Receive: 0
  • Posts: 233
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #5 on: May 06, 2016, 01:43:16 pm »
Hi John

If I read it clearly you plan on

1] Copying your installation on drive C: to Z:
2] Changing the drive letter for C: to D:
3] Changing  the drive letter for Z: to C:

You will definitely be able to boot from the new C:

You may have some problems with D: related to Desktop location in the os2.ini file being set as C:\Desktop - I have seen some info about this somewhere but, Sorry, cannot spot it at the moment; guess you could try "googling"...


Regards

Pete

Hi Pete,

You understand me correctly. The main issue seems to be to run SYSINSTX because the boot sector is different between HPFS and JFS.

I'm initially concerned about booting up to a command prompt rather than worrying about the Desktop. However the os2.ini file should still be correct if it had C:\Desktop as the location of the Desktop because the JFS drive would be renamed as C:.

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 43
  • Posts: 972
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #6 on: May 06, 2016, 02:55:05 pm »
Hi John

With regard to Desktop location and drive letter in the os2.ini file: It is the os2.ini file on D: that will be the problem when trying to boot D: to a Desktop. You should not have any problems with the "new" C:

There is an app called INI2Rexx on hobbes  http://hobbes.nmsu.edu/download/pub/os2/util/wps/ini2rexx.zip 

This requires a copy of fastini.dll - included with INITools and WPTools. I also have a later version in my Tame/2 directory so you may already have this support file somewhere but may need to put a copy into the INI2Rexx directory

This app is a rexx script which will make a rexx script copy of the os2.ini file which you can then edit to change drive letters around.
 
In your case you would need to do this *before* copying c: to d:

Open a command line window in the directory with ini2rexx installed and use

 inirexx c:\os2\os2.ini

This will generate the file c:\os2\os2.cmd - mine was around 5Mb

You can then use an editor to search for and change all instances of C: to D:

Perform your C: to Z: copy and then change drive letters C to D: and Z: to C:

Boot from your "new" C: drive.

Open a command line window and Copy D:\OS2\OS2.INI to D:\OS2\OS2.INI.FromC
Delete the D:\OS2\OS2.INI file
Run D:\OS2\OS2.CMD

With a little luck you will be able to boot to a working Desktop from D: as a result.


Regards

Pete

John Poltorak

  • Full Member
  • ***
  • Thank You
  • -Given: 16
  • -Receive: 0
  • Posts: 233
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #7 on: May 06, 2016, 04:39:09 pm »

With a little luck you will be able to boot to a working Desktop from D: as a result.


It's C: that I want to boot from which is what I can do at the moment, except I want to switch drive letters so that what was Z: will  become C:.

I'll make the switch shortly and see how it goes. I may end up with an unusable system so could be gone for a while :).

John Poltorak

  • Full Member
  • ***
  • Thank You
  • -Given: 16
  • -Receive: 0
  • Posts: 233
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #8 on: May 06, 2016, 04:57:24 pm »
Amazingly, it worked and I've booted up on JFS partition with 300GB free disk space!

Andreas Schnellbacher

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 26
  • Posts: 512
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #9 on: May 06, 2016, 05:35:57 pm »
@Andreas Schnellbacher - although not what John needs as far as I understand him correctly, changing boot drive letter is not impossible. Find/replace all f.i. C:\ to X:\ in config.sys and the two ini files will do most of the job (carefully checking every occurrence is mandatory). Find/replace recursively in *.cmd files maybe necessary too. Of course without using the WPS for any copying. Not something I would suggest anyone else but doable.
Hi Andi, that's why I wrote near to impossible. It's more work to move the old installation to another drive letter than to start from a re-installed boot drive. Daniela Engert explained the option how to move the installation, but copying has to be made with the WPS then. Most WPS objects refer to file objects from the boot drive. They might lose their link if you change boot drive letters and perform the copy without the WPS.

Even the both ini files contain several places with hard-coded drive letters. If you keep the drive letters of your Apps drive, then the objects keep working. Otherwise you have to adjust countless config files, e.g. those for Mozilla apps, manually.

After all, I seem to have misunderstood John a bit.

John Poltorak

  • Full Member
  • ***
  • Thank You
  • -Given: 16
  • -Receive: 0
  • Posts: 233
    • View Profile
Re: Moving an OS/2 installation from HPFS to JFS
« Reply #10 on: May 06, 2016, 06:56:40 pm »
Hi Andreas,

I'm aware of the problems of moving an installation from one drive to another because of all the embedded paths, that's why I wanted to switch to a different partition and because LVM lets you reassign drive letters, you can have the original drive letter on a different partition. And it worked a lot easier than I thought it would.