Jump to content











Photo
- - - - -

GRUB4DOS and IBM OS/2

dos windows os/2 linux

  • Please log in to reply
13 replies to this topic

#1 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 06 May 2015 - 06:39 AM

Hello, everyone! I'm new here at reboot.pro! :)

For quite a while, I've been running the latest version of GRUB4DOS (2015-05-05) that successfully multiboots MS-DOS 6.22 on hd0,0 (boot drive), Windows 95 OSR2 on hd0,2, Damn Small Linux 4.4.10 on hd1,2 and Puppy Linux 4.3.1 on hd2,4. This project is done using the following configuration under Microsoft Virtual PC 2007. There are three 8 GB virtual hard disks (24 GB total) split up into multiple partitions:

 

1st hard disk image

  • drive C: MS-DOS 6.22 (2,047 MB primary)
  • drive F: 2,047 MB logical drive
  • drive I: Windows 95 OSR2 partition mapped as drive C (4,095 MB seconary partition)

2nd hard disk image

  • drive D: 2,047 MB primary
  • drive G: OS/2 Warp 4 (2,047 MB logical drive mapped as drive C)
  • dev/hdb3: Damn Small Linux 4.4.10 (2,047 MB seconary partition)
  • /dev/hdb4: Linux Swapfile (2,047 MB triatary partition)

3rd hard disk image

  • drive E: 2,047 MB primary
  • drive H: 2,047 MB logical drive
  • /dev/sdc3: Puppy Linux 4.3.1 (4,095 MB seconary partition)

The VM is configured with:

* 64 MB of allocated system memory
* 16 MB of video memory
* MS-DOS 6.22 is the main OS where the GRUB4DOS bootloader is installed

Four MS-DOS hard disk images and Floppy Bird game installed on hd0,2, Memtest86+ 5.01 and the hard disk maintenance boot disk image with FreeDOS 1.1 on hd0,0.

Now how did I get Windows 95 OSR2 working in a dual boot configuration when used with GRUB4DOS? The bootlace bootloader had to be installed and in order to map the undisplayed drive as drive C, I had to write this configuration in MENU.LST:

unhide (hd0,2)
hide (hd0,0)
hide (hd0,4)
hide (hd1,0)
hide (hd1,4)
hide (hd2,0)
hide (hd2,4)
map --floppies=1
chainloader +1
boot

Now, I'm attempting to install OS/2 Warp 4 on hd1,4 (second hard drive, logical partition). Prior to installing OS/2, I added these lines in the OS/2 Warp 4 boot menu:

unhide (hd1,4)
unhide (hd0,0)
unhide (hd0,4)
unhide (hd1,0)
unhide (hd2,0)
root (hd1,4)
map --floppies=1
chainloader +1
boot

The text mode installation from floppy drive was successful, however, when I attempted to select OS/2 Warp 4 from the boot menu, this error message is displayed in the upper left corner of the virtual machine:

OS/2 !! SYS01475
OS/2 !! SYS02027

The error message above indicates that OS/2 from installation diskettes is not able to recongise the boot drive when installed on hd1,4. The OS2BOOT file is actually located on drive G, however...when other partitions are hidden, it is mapped as drive C on hd1,4. Simply copying OS2BOOT from the installation diskette image has no effect. :(

This error only occurs when the drive where OS/2 Warp is installed on is formatted as a FAT partition. On a HPFS partition, OS/2 Warp 4 would refuse to boot when run under GRUB4DOS and when OS/2 is sharing the drive with MS-DOS 6.22, OS/2 kills the GRLDR bootloader by not finding it even if the bootloader is present on hd0,0 (drive C)!

Has OS/2 been tested operate under GRUB4DOS? What should I do to try to fix this issue?

If it is necessary, I'll try to get some help at the OS/2 World forums also.

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 May 2015 - 10:56 AM

Hello, everyone! I'm new here at reboot.pro! :)
 

Good :).

 

You have a couple misunderstandings in the way to use grub4dos that may undermine your line of thought (though cannot say if clearing them will help you in booting to the OS/2).

  1. If you hide partitions you hide partitions. (i.e. you DO NOT remap drives or disks).
  2. It is not at all clear from your report HOW EXACTLY you installed grub4dos (you do not "install bootlace", you use bootlace to install grub4dos to either the MBR+hidden sectors or to a volume boosector)

 

Generically speaking, unless really *needed* and for a very sound reason you do not normally hide partitions.

 

If - for any reason - the OS/2 needs to be on first disk, you remap that disk to first disk:

map (hd1) (hd0)

map (hd0) (hd1)

map --hook

 

If - for any reason - the OS/2 needs to be on first (primary) partition, you may want to try either partnew or the map --in-situ grub4dos commands.

 

The exact way the grub4dos is installed (to the MBR or to the PBR or run as grub.exe) might also make a difference, though it would be less probable.

 

But with all due respect :) what is the actual reason for wanting to boot the OS/2 from a logical volume?

I mean, it is a Virtual Machine, just create a new disk, and install to it OS/2 "normally" to a "normal" first primary partition.

 

Or use the OS/2 boot manager, which will however need/use it's own smallish primary partition.

 

:duff:

Wonko



#3 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 07 May 2015 - 03:31 AM

Good :).

 

You have a couple misunderstandings in the way to use grub4dos that may undermine your line of thought (though cannot say if clearing them will help you in booting to the OS/2).

  1. If you hide partitions you hide partitions. (i.e. you DO NOT remap drives or disks).
  2. It is not at all clear from your report HOW EXACTLY you installed grub4dos (you do not "install bootlace", you use bootlace to install grub4dos to either the MBR+hidden sectors or to a volume boosector)

 

Generically speaking, unless really *needed* and for a very sound reason you do not normally hide partitions.

 

If - for any reason - the OS/2 needs to be on first disk, you remap that disk to first disk:

map (hd1) (hd0)

map (hd0) (hd1)

map --hook

 

If - for any reason - the OS/2 needs to be on first (primary) partition, you may want to try either partnew or the map --in-situ grub4dos commands.

 

The exact way the grub4dos is installed (to the MBR or to the PBR or run as grub.exe) might also make a difference, though it would be less probable.

 

But with all due respect :) what is the actual reason for wanting to boot the OS/2 from a logical volume?

I mean, it is a Virtual Machine, just create a new disk, and install to it OS/2 "normally" to a "normal" first primary partition.

 

Or use the OS/2 boot manager, which will however need/use it's own smallish primary partition.

 

:duff:

Wonko

 

Thank you for the welcome!

The reason that I wanted to install OS/2 Warp 4 on a logical partition on the second hard disk is for testing purposes. MS-DOS maps the FAT formatted OS/2 Warp 4 partition as drive G. As you may know, GRUB4DOS has been untested to work with OS/2 whatever it's installed on a FAT or HPFS partition and if anything goes wrong, I backup one of the hard disk images  to the E:\Backup\MS-DOS sub-directory.

I first installed GRUB4DOS via the CONFIG.SYS by adding DEVICE=C:\GRUB\GRUB.EXE prior to initalising the device drivers from CONFIG.SYS and AUTOEXEC.BAT files. When I was going to install Windows 95 OSR2 on the second primary partition of the first hard drive, I had to use BOOTLACE to install GRUB4DOS with this command:

BOOTLACE 0x80 --force-backup-mbr

The command backs up the MBR on the first hard drive. I don't know if there is a way to use BOOTLACE to write the GRLDR boot record to the MBR on the first partition of the hard drive, instead of the entire 1st hard drive.

I've looked at the GRUB4DOS README.TXT file about the map--in-situ command to mape hd1,4 as hd0 when I attempt to boot OS/2 and get back to you. :)



#4 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 07 May 2015 - 04:38 AM

I tried to update my previous comment, but got a "you do not have permission to edit". :(

 

Anyways, I tried the --in-situ (hd1,4)+1 (hd0) command and got this error message at the GRUB4DOS command line:

Error 64: Cannot use --in-situ because the partition table is full (i.e., all the 4 entries are in use.

Tried to wipe hd1,4 and recreate the logical drive via partnew and got a Invalid Argument error message. I'm still learning how to use GRUB4DOS as the boot loader. Getting OS/2 Warp 4 to work under GRUB4DOS is not easy despite the fact that MS-DOS recognises the OS/2 partition on the logical drive.

I've heard about the osFree FREELDR, which looks very much like the ReactOS FREELDR, but will not even boot from a FAT partition. Hmm...


Edited by ppgrainbow, 07 May 2015 - 04:39 AM.


#5 wendy

wendy

    Frequent Member

  • Lady
  • 290 posts
  • Location:one mile from the QR main line
  • Interests:Operating systems, Weights and Measures, Geometry
  •  
    Australia

Posted 07 May 2015 - 07:38 AM

You install the boot-manager system, and tell that to automatically boot OS/2.  Then you boot the boot-manager partition from grub.

 

If it is a recent version of OS/2, you could try something like OS4's boot loader, which sort of works like NTLDR.



#6 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 07 May 2015 - 07:48 AM

You install the boot-manager system, and tell that to automatically boot OS/2.  Then you boot the boot-manager partition from grub.

 

If it is a recent version of OS/2, you could try something like OS4's boot loader, which sort of works like NTLDR.

 

Where can I get the bootloader for OS4?

 

I can install OS/2 on a drive other than C by following this procedure: http://www.jacco2.dds.nl/fdiskbug.html

 

I might come up with something...and if I do, I'll post a update.



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 07 May 2015 - 11:20 AM

....When I was going to install Windows 95 OSR2 on the second primary partition of the first hard drive, I had to use BOOTLACE to install GRUB4DOS with this command:

BOOTLACE 0x80 --force-backup-mbr

The command backs up the MBR on the first hard drive. I don't know if there is a way to use BOOTLACE to write the GRLDR boot record to the MBR on the first partition of the hard drive, instead of the entire 1st hard drive.

Just to disambiguate and avoid possible misundersatandings.

Each DISK has one (and only one) MBR (Master Boot Record) which is "fixed" at first absolute sector or LBA 0.

Following it are a number of "hidden sectors", usually between 62 and 127, rarely more than 2047 before the beginning of the first partition.

Each Volume (which is the same as Partition if primary) has it's own VBR (Volume Boot record) or PBR (Partition Boot Record) or more generically "bootsector".

 

Though the way grub4dos is installed/loaded does not make a real difference in most cases from the viewpoint of functionalities, one needs to know the differences (or side effects) that each method may imply.

 

When you install grub4dos to the MBR you are actually writing a "small" grldr, called grldr.mbr to the MBR and to the following 17 hidden sectors, the previous MBR (a "normal" MBR is only one sector is sized) is backed up on second sector or LBA1, this code does a number of things before loading the "real" grldr.

 

When you install grub4dos to the VBR you are actually writing a small piece of code that loads the grldr in the same (or a similar way) to what the NT bootsector loads NTLDR or BOOTMGR or the DOS bootsector loads IO.SYS.

 

grub4dos (grldr or grub.exe) once loaded can directly chainload NTLDR, BOOTMGR or IO.SYS.

 

grub4dos (grldr) can be chainloaded by both NTLDR and BOOTMGR (no "install" is involved).

 

The grub.exe loaded through config.sys is the most "complex" way and it should be used only after having tested that loading grub.exe from the DOS command line gives the desired results and when - for any reason - there is not the possibility to load grldr.

 

Back to topic:

grub4dos has not a specific provision to directly load OS/2 system files, so you need to be able to boot OS/2 "normally" through it's own "means" and grub4dos can only change (if needed) BIOS mappings.

 

You are doing two variations together:

  1. booting OS/2 from a logical volume
  2. having the logical volume on a non-first disk

while the "standard OS/2 install is AFAIK/AFAICR on a primary volume on first disk, you should IMHO set (temporarily) aside the complexity of the multi-disk and create an image that is capable to boot (without grub4dos) from logical volume on first disk, and only later "shift" the disk from first to second.

 

:duff:

Wonko



#8 wendy

wendy

    Frequent Member

  • Lady
  • 290 posts
  • Location:one mile from the QR main line
  • Interests:Operating systems, Weights and Measures, Geometry
  •  
    Australia

Posted 08 May 2015 - 07:34 AM

Here is OS/4 downloads:   http://ru2.halfos.ru/core/downloads/

 

These only support OS/2 4.5+  (ie OS/2 eServer or Aurora or eComStation)

 

The lists are all of the builds, you only need the latest ones from both lists.

 

The first list is a boot manager that allows alternate versions of "os2ldr"

 

I never had much luck loading OS2 from a boot sector (even at 8192 bytes), and the only way i had success with it is through something like loading this file.

 

But i have seen a boot cdrom prepared where OS/2 is loaded like winnt in non-emulation mode.  As always, the OS/2 boot is much smaller, and i think it works in isolinux too.

 

Veit Kannegieser at  http://kannegieser.n...amm/index_e.htm  is worth the look too.



#9 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 08 May 2015 - 08:35 AM

Here is OS/4 downloads:   http://ru2.halfos.ru/core/downloads/

 

These only support OS/2 4.5+  (ie OS/2 eServer or Aurora or eComStation)

 

The lists are all of the builds, you only need the latest ones from both lists.

 

The first list is a boot manager that allows alternate versions of "os2ldr"

 

I never had much luck loading OS2 from a boot sector (even at 8192 bytes), and the only way i had success with it is through something like loading this file.

 

But i have seen a boot cdrom prepared where OS/2 is loaded like winnt in non-emulation mode.  As always, the OS/2 boot is much smaller, and i think it works in isolinux too.

 

Veit Kannegieser at  http://kannegieser.n...amm/index_e.htm  is worth the look too.

 

Thank you for the link.

 

I've tried to mess around with the OS4 bootloader, attempted to load bootos2.mdl in GRUB4DOS and got a "Unrecoverable Processor Error" under Virtual PC. By using OS/2 Warp 4 without any fixpacks lower than 15, I won't have any success.

 

I also tried to install VPART4DOS and somehow it overwrote the GRUB4DOS boot sector! I also had no success with Plop Boot Manager also.

 

However, I'm guessing that the only way to get OS/2 Warp 4 working would be to remove the GRUB4DOS boot loader and install VPARTDOS, point to the OS/2 installation to Drive G (mapped on hd1,4) and apply Fixpack 15, which brings the version of OS/2 Warp 4 to version 4.5 (internal revision 14_062_W4.

 

It may or may not work when I use GRUB4DOS bootloader after I applied FP15, uninstalled VPARTDOS and use the OS4 bootloader.



#10 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 12 May 2015 - 02:02 AM

Okay...after days of frustration, the problem has been solved!

I finally got OS/2 Warp 4 to work with GRUB4DOS. If I want to dual or multi-boot Microsoft MS-DOS with OS/2 or Windows 95, here's what I did:

1. In the MENU.LST file I changed the following:

unhide (hd0,4)
unhide (hd1,4)
hide (hd0,0)
hide (hd0,2)
hide (hd1,0)
hide (hd2,0)
hide (hd2,4)
root (hd0,4)
map --floppies=1
chainloader +1
boot

Upon booting OS/2 Warp 4, only hd0,4 and hd1,4 are shown. Only hd0,4, the logical drive is set to boot OS/2 Warp 4. All other partitions are hidden to avoid conflict with MS-DOS's CONFIG.SYS and AUTOEXEC.BAT files. The best practice is to keep partitions hd0,4 and hd1,4 when starting MS-DOS or Windows 95.

OS/2 Warp 4 installation requires floppy disk images to be inserted. I changed and added the following:

unhide (hd0,4)
unhide (hd1,4)
hide (hd0,0)
hide (hd0,2)
hide (hd1,0)
hide (hd2,0)
hide (hd2,4)
root (hd0,4)
map --floppies=1
chainloader (fd0)+1
rootnoverify (fd0)
boot

If I want to get OS/2 Warp 4 partition bootable along with MS-DOS and Windows 95, it has to be installed on the first hard disk or I will get the "OS/2 !! SYS01475" and "OS/2 !! SYS02027" error messages on startup.

Incase I ever screw something up, I'm gonna be backuping up the 1st hard disk image.

Now, OS/2 Warp 4, MS-DOS 6.22 and Windows 95 OSR2 are all bootable under GRUB4DOS. :)


Edited by ppgrainbow, 12 May 2015 - 02:03 AM.


#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 May 2015 - 09:36 AM

Okay...after days of frustration, the problem has been solved!

NO.

As a matter of fact now your OS/2 has been installed according to its own declared limitations, i.e. the booting files needing to reside on first BIOS disk.

I thought that the point was to workaround that limitation, which your current setup does not.

 

:duff:

Wonko



#12 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 12 May 2015 - 03:41 PM

As far as I know, OS/2 installation never worked when it booted off the logical partition of the second hard drive...so, I had to install it on the logical hard drive of the first BIOS disk where the GRUB4DOS MBR is installed.



#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 12 May 2015 - 04:58 PM

As far as I know, OS/2 installation never worked when it booted off the logical partition of the second hard drive...so, I had to install it on the logical hard drive of the first BIOS disk where the GRUB4DOS MBR is installed.

Yes, but grub4dos offers the possibility (as I originally posted) to exchange the BIOS drive order, which may or may not work, but that you seemingly have not even tested :frusty:.

 

In other words you came here with a problem and then found a solution to another problem (which actually is seemingly not a problem).

 

If you want to test the remapping feature:

1. create a new VM

2. insert in it only one disk

3. create in this first disk the main OS/2 partiton and the bootable logical partition

4. once this setup works (without grub4dos or with grub4dos in one of the other partitions on this disk) create a new disk and on it install grub4dos

5. then change order of the disks so that the one with both the "system" partition and the "boot" (logical) partition becomes second disk

6. then try chainloading the (hd1,4) from gtrub4dos (which will surely result in the same error as before), i.e.

root (hd1,4)

chainloader +1
boot

7. then try exchanging disks, i.e.:

 

map (hd1) (hd0)
map (hd0) (hd1)
map --hook

root (hd0,4)
chainloader +1
boot

 

As said the above may (or may not) work.

 

As a generic reminder, you only use the boot command on command line as in menu.lst it is implied.

 

:duff:

Wonko



#14 ppgrainbow

ppgrainbow

    Member

  • Members
  • 70 posts

Posted 13 May 2015 - 02:04 AM

Yes, but grub4dos offers the possibility (as I originally posted) to exchange the BIOS drive order, which may or may not work, but that you seemingly have not even tested :frusty:.

 

In other words you came here with a problem and then found a solution to another problem (which actually is seemingly not a problem).

 

If you want to test the remapping feature:

1. create a new VM

2. insert in it only one disk

3. create in this first disk the main OS/2 partiton and the bootable logical partition

4. once this setup works (without grub4dos or with grub4dos in one of the other partitions on this disk) create a new disk and on it install grub4dos

5. then change order of the disks so that the one with both the "system" partition and the "boot" (logical) partition becomes second disk

6. then try chainloading the (hd1,4) from gtrub4dos (which will surely result in the same error as before), i.e.

root (hd1,4)

chainloader +1
boot

7. then try exchanging disks, i.e.:

 

map (hd1) (hd0)
map (hd0) (hd1)
map --hook

root (hd0,4)
chainloader +1
boot

 

As said the above may (or may not) work.

 

As a generic reminder, you only use the boot command on command line as in menu.lst it is implied.

 

:duff:

Wonko

 

Thanks again. Everything is all good now. The "boot" command line has been stripped out of the MENU.LSIT file. I'll be playing around with the OS/2 Warp 4 logical partition to see how things work out.







Also tagged with one or more of these keywords: dos, windows, os/2, linux

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users