USB-Boot (en) USB-Boot (en) USB-Boot (en)
Start | Impressum & Datenschutz | Sitemap | Suche
Login/LogoutSucheTermineThinClient-ProjektTYPO3 goes eComStationVerein, allgemeinVereinslokalitätVereinspersonaliaVorträge/VortragsreihenWeb-LinksWikisIBM-8364-S20 (de)USB-Boot (en)USB-Tricks (de)Impressum Druckansicht          Startseite  Wikis  USB-Boot (en)  

[Article: Wiki-eCS-OS/2-USB-Boot-en--BUG-BMGR-GRUB-boot-code-stage1 | Discussion ]
HomePage Reload page Edit Versions Download HTML

Problem MBR with GRUB boot code stage1

Version 0.9 2007-03-20 Rainer


Contents

[Edit]1 History

0.9 2007-03-20 Problem description, analyze and work around


[Edit]2 CF Card with GRUB MBR in CF-to-IDE Adapter --> kernel exception condition at boot

Test case:

CF Card with PRM data structure, MBR with GRUB boot code stage1 and one primary FAT16 partition with LVM information and mini OS/2 System.

  1. The CF Card is in the CF-to-IDE adapter in the Ultra Bay 2 nd HDD adapter of the IBM ThinkPad T23
  2. Power on
  3. the BMGR boot menu ist presented
  4. Select a OS/2 system
  5. exception condition of the kernel - last driver loaded OS2LVM.DMD ?

USB-Boot-GRUB-MBR-Code-CF-to-IDE-Kernel-Exception-14-103a-W4.png

Bild: GRUB-MBR-Code-CF-to-IDE-Kernel-exception-14-103a-W4

USB-Boot-GRUB-MBR-Code-CF-to-IDE-Kernel-Exception-14-104a-UNI.png

Bild: GRUB-MBR-Code-CF-to-IDE-Kernel-exception-14-104a-Uni

The kernel exception is produced on a system with with DANIS506.ADD version 1.7.10


At this stage of the documentation of the test result I had the idea to test it with IBM1S506.ADD.

Done it. Test results: no kernel exception oops :-)


The drive is letter is assigned and the drive is not accessible to normal operations. Same symptoms as describes in the next paragraph. I have not check the LVM start protocol to verify the details, just the DFSee output. Problem status: 2007-03-07 Rainer



[Edit]3 CF Card in USB Card Reader --> LVM detects no valid file system in partition

Test case:

CF Card with PRM data structure, MBR with GRUB boot code stage1 and one primary FAT16 partition with LVM information and mini OS/2 System.

  1. The CF Card is in the USB Card reader and processed via USBMSD.ADD.
  2. A drive letter C: is assigned to first partition of the PRM.
  3. The drive is not accessible for normal operations!

  4. Replace the GRUB boot code with DFSee standard or the latest IBM LVM code
  5. shutdown, power of reboot
  6. normal operation, no anormalies!!


Snippet from DFSee 8.12 log file

Number of disks   : 4

P-Geo Disk 1 Cyl : 16383 H: 16 S:63  Bps:512   Size : 0x0FFFFFFF =  131071 MiB
L-Geo Disk 1 Cyl : 20673 H:240 S:63  Bps:512   Size : 0x12A18710 =  152624 MiB
BIOS Int13 limit : 1024, I13X support needed beyond : 7560.0 MiB
MBR crc c51e1623 : 0x7ea9d168 = IBM OS/2 LVM, 14.105 May 2006, I13X

P-Geo Disk 2 Cyl :     0 H:  0 S:0   Bps:512   Size : 0x00000000 =     0.0 KiB
L-Geo Disk 2 Cyl :     0 H: 64 S:32  Bps:512   Size : 0x00000000 =     0.0 KiB
Error, disk 2 PD2 : reading the MBR info in the 1st sector failed!
DUMMY, disk 2 seems reserved with no media present (USB/PCCARD etc)

P-Geo Disk 3 Cyl :     0 H:  0 S:0   Bps:512   Size : 0x00000000 =     0.0 KiB
L-Geo Disk 3 Cyl :   512 H: 12 S:32  Bps:512   Size : 0x00030000 =    96.0 MiB
Error, disk 3 PD3 : reading the MBR info in the 1st sector failed!
DUMMY, disk 3 seems reserved with no media present (USB/PCCARD etc)

P-Geo Disk 4 Cyl :     0 H:  0 S:0   Bps:512   Size : 0x00000000 =     0.0 KiB
L-Geo Disk 4 Cyl :   991 H: 32 S:63  Bps:512   Size : 0x001E7C20 =   975.5 MiB
BIOS Int13 limit : none, no limit for this disk
MBR crc 089522ac : 0xc398b73f = Linux GRUB loader and bootmanager
.
snip
.
DFSee  OS/2  8.12 : executing: fdisk -r-
Command timestamp : Monday 2007-03-05 20:05:05
+---+--+-----------------+--+--------+--------+-----------+----------+--------+
|ID |Dr|Type, description|ux|Format  |Related |VolumeLabel|LVM Volume|Size MiB|
+---+-------------+--------+-------------------+
|01*|  |Prim 0b FAT32    | 1|FAT32   |MSWIN4.1|IBM_PRELOAD|VN_W2K_FAT|  4097.4|
|02>|  |Prim 0a IBM-BMGR | 2|BMGR    |LVM     |I13X-aware |, [ BOOT M|     7.3|
.
snip
.
|26 |  |Log  04 FAT16-32M|28|FAT     |IBM 4.50|VL_OS2MAINT|VN_Y_26_Ma|    22.1|
|27 |  |Log  07 Inst-FSys|29|HPFS    |IBM 4.50|VL_Y_M-HPFS|VN_Y_27_Ma|   103.3|
|28*|Y:|Log  07 Inst-FSys|30|HPFS    |IBM 4.50|VL_Y_MECR12|VN_Y_28_M_|   125.4|
|30 |  |FreeSpace Pri/Log|  |-- -- --|-- -- --|- - - - - -|          | 56057.6|
+---+-------------+--------+-------------------+
|29>|-c|Prim 06 FAT16    | 1|FAT     |IBM 4.50|VL_C_1_DA1 |VN_C_PRM_1|   100.3|
|33 |  |FreeSpace Pri/Log|  |-- -- --|-- -- --|- - - - - -|          |   875.1|
+---+--+-----------------+--+--------+--------+-----------+----------+--------+
  > = Active/Startable * = Bootable r = Removable R = Removable+Active/Bootable


Snippet from DFSee documentation:

 column: Dr        D:      = Actual drive letter, capital including a colon,
                             indicates partition is accessible as volume D:
                   -d      = Drive 'D:' in LVM (preferred), but NOT mounted
                   Fd      = Drive 'D:' in LVM (preferred), but mounted as F:
                             will be displayed in LVM itself as: 'D:  ==>  F:'
                   D2 D3   = Second or 3rd partition of a multiple LVM volume
 

Snippet from LVM Log File

*******************************************************************************
*                                                                             *
*                                 LVM Log File                                *
*                                                                             *
*******************************************************************************

This log file was created on Mon Mar  5 17:11:10 2007
.
.  
snip
.
.
Searching drive 3 BootManager Alias Table for Primary Partition at sector 63 for size 205569.
Not migrating drive 3 primary partition with previous LVM partition name "PN_C_PRM_1GB_DA2".
OS2LVM knows about drive letter C, on drive 4, which LVM doesn't! Error_Code=8ad18
We have a PRM with no unhidden native file systems.
OS2LVM is allowing reFORMAT via default drive letter.
.
.


[Edit]4 Analyze, Result and Work Around


Analyze


This is the Hex Dump via DFSee 8.12 auf the GRUB MBR of the CF Card

[PgUp]   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f [ItemUp]  [LineUp]│   
000000  eb 48 90 00 8e d0 bc 00 01 fb fc 33 c0 8e d8 8e [.H.........3....]│   
000010  c0 be 00 7c bf 00 7e b9 00 02 f3 a5 68 20 7e c3 [...|..~.....h ~.]│   
000020  be fa 7e bb be 7f 80 7f 04 0a 74 41 83 c3 10 81 [..~.......tA....]│   
000030  fb fe 7f 7c f1 33 c0 cd 13 b4 08 b2 81 cd 03 02 [...|.3..........]│   
000040  ff 00 00 20 01 00 00 00 00 02 fa eb 07 80 c2 80 [... ............]│   
000050  75 02 b2 80 ea 59 7c 00 00 31 c0 8e d8 8e d0 bc [u....Y|..1......]│   
000060  00 20 fb a0 40 7c 3c ff 74 02 88 c2 52 be 7f 7d [. ..@|..t...R..}]│   
000070  e8 34 01 f6 c2 80 74 54 b4 41 bb aa 55 cd 13 5a [.4....tT.A..U..Z]│ 
000080  52 72 49 81 fb 55 aa 75 43 a0 41 7c 84 c0 75 05 [RrI..U.uC.A|..u.]│   
000090  83 e1 01 74 37 66 8b 4c 10 be 05 7c c6 44 ff 01 [...t7f.L...|.D..]│   
0000A0  66 8b 1e 44 7c c7 04 10 00 c7 44 02 01 00 66 89 [f..D|.....D...f.]│   
0000B0  5c 08 c7 44 06 00 70 66 31 c0 89 44 04 66 89 44 [\..D..pf1..D.f.D]│   
0000C0  0c b4 42 cd 13 72 05 bb 00 70 eb 7d b4 08 cd 13 [..B..r...p.}....]│ 
0000D0  73 0a f6 c2 80 0f 84 ea 00 e9 8d 00 be 05 7c c6 [s.............|.]│ 
0000E0  44 ff 00 66 31 c0 88 f0 40 66 89 44 04 31 d2 88 [D..f1...@f.D.1..]│   
0000F0  ca c1 e2 02 88 e8 88 f4 40 89 44 08 31 c0 88 d0 [........@.D.1...]│   
000100  c0 e8 02 66 89 04 66 a1 44 7c 66 31 d2 66 f7 34 [...f..f.D|f1.f.4]│   
000110  88 54 0a 66 31 d2 66 f7 74 04 88 54 0b 89 44 0c [.T.f1.f.t..T..D.]│   
000120  3b 44 08 7d 3c 8a 54 0d c0 e2 06 8a 4c 0a fe c1 [;D.}..T.....L...]│   
000130  08 d1 8a 6c 0c 5a 8a 74 0b bb 00 70 8e c3 31 db [...l.Z.t...p..1.]│   
000140  b8 01 02 cd 13 72 2a 8c c3 8e 06 48 7c 60 1e b9 [.....r*....H|`..]│   
000150  00 01 8e db 31 f6 31 ff fc f3 a5 1f 61 ff 26 42 [....1.1.....a.&B]│   
000160  7c be 85 7d e8 40 00 eb 0e be 8a 7d e8 38 00 eb [|..}.@.....}.8..]│   
000170  06 be 94 7d e8 30 00 be 99 7d e8 2a 00 eb fe 47 [...}.0...}.*...G]│   
000180  52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44 [RUB .Geom.Hard D]│   
000190  69 73 6b 00 52 65 61 64 00 20 45 72 72 6f 72 00 [isk.Read. Error.]│   
0001A0  bb 01 00 b4 0e cd 10 ac 3c 00 75 f4 c3 00 00 00 [..........u.....]│   
0001B0  00 00 00 00 00 00 00 00 00 00 00 00 33 cc 80 01 [............3...]│   
0001C0  01 00 06 1f 3f 65 3f 00 00 00 01 23 03 00 00 00 [....?e?....#....]│   
0001D0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]│ 
0001E0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [................]│ 
0001F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa [..............U.]│   

Comment:

Change the "less" character in the DUMP Output to "." 
to work round of Wiki parse/format problem. 


The GRUB MBR looks like an BR with an BPB data structure.

A Jump Short instruction followed by a NOP instruction in the first 3 bytes.


LVM and DANIS506 does try to handle the MBR as an BR with an PBP.


Work Around

Change the first 3 bytes of the MBR from


  eb 48 90    ==>  90 eb 47


The ill behaviour of DANIS506 and the LVM vanished after the mod.







Last changed: 05.10.2009 11:27 by [Anonymous] - HomePage Reload page Edit Versions Download HTML

Druckansicht          Startseite  Wikis  USB-Boot (en)  
Vereinstermine