James Harris asked why BIOS boots only sdg:
...
> So, does anyone know how the BIOS identifies that only the last disk
> should be booted? I can guess but it would only be a guess....
I think it got really nothing to do with partition-entries,
perhaps because your MBRs in sda,sdc,sdd contain zeros at start ?
I remember to once read that the first (two or 3) bytes of MBR0 were checked
to be in a certain range (IIRC F6>0 >5 ?) in addition to 55-AA.
My variant KESYS-MBRs start with code (without a jump over data) and for
sure not all of them got a partition table, this last bytes from 1BE..1FD
may contain text or other data and I haven't any problem to boot HDs.
Thanks for posting a detailed image of a GRUB-MBR, looks like it put
garbage into the initial data-fields, ... to fool other tools ? :)
Just for fun and as a distraction from daily stress, I analysed what
and how it does. And if my interpretation isn't totally wrong then
your Linux-part is almost 1 TB large while the remaining space is
just ~9.4 GB ?
__
wolfgang
> etc. And eventually we get to the boot disk, sdg, which looks like
> this:
> sdg:
> 0000 eb 48 90 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0
> 0010 fb be 00 7c bf 00 06 b9 00 02 f3 a4 ea 21 06 00
> 0020 00 be be 07 38 04 75 0b 83 c6 10 81 fe fe 07 75
> 0030 f3 eb 16 b4 02 b0 01 bb 00 7c b2 80 8a 74 03 02
> 0040 ff 00 00 20 01 00 00 00 00 02 fa 90 90 f6 c2 80
000 eb 48 90 JMP 04a |nop
003 ... 049 ;data block (maybe modified by code in here)
04a FA 90 90 CLI |nop|nop
04d F6 C2 80 TEST DL,080
> 0050 75 02 b2 80 ea 59 7c 00 00 31 c0 8e d8 8e d0 bc
050 75 02 JNZ 054
052 B2 80 MOV DL,080
054 EA 59 7C 00 00 JMP FAR 0000:7c59 ;which mean next line here
059 31 C0 XOR ax,ax
05b 8E D8 MOV DS,ax
05d 8E D0 MOV SS,ax
05f BC 00 20 MOV SP,2000 ;stack top at 0000:2000
> 0060 00 20 fb a0 40 7c 3c ff 74 02 88 c2 52 be 7f 7d
062 FB STI
063 A0 40 7C MOV AL,[7C40] ;offset 040 = FF here
066 3C FF CMP AL,FF
068 74 02 JZ 06c
06a 88 C2 MOV DL,AL ; ?
06c 52 PUSH DX
06d BE 7F 7D MOV SI,7d7f ;offset 017f="GRUB"0
> 0070 e8 34 01 f6 c2 80 74 54 b4 41 bb aa 55 cd 13 5a
070 E8 34 01 CALL 01A7 ;show it
073 F6 C2 80 TEST DL,80
076 74 54 JZ 0cc
078 B4 41 MOV AH,41
07a BB AA 55 MOV BX,55AA
07d CD 13 INT 13
07f 5A POP DX
> 0080 52 72 49 81 fb 55 aa 75 43 a0 41 7c 84 c0 75 05
080 52 PUSH DX
081 72 49 JC 0cc
083 81 fb 55 aa CMP BX,AA55
087 75 43 JNZ 0cc
089 A0 41 7C MOV AL,[7c41] ; 041 = 00
08c 84 C0 TEST AL,AL
08e 75 05 JNZ 095
> 0090 83 e1 01 74 37 66 8b 4c 10 be 05 7c c6 44 ff 01
090 83 E1 01 AND CX,+1
093 74 37 JZ 0cc
095 66 8B 4C 10 MOV ECX,[SI+010]
099 BE 05 7C MOV SI,7C05
09c C6 44 ff 01 MOV byte [SI-1],01 ; 004 b
> 00a0 66 8b 1e 44 7c c7 04 10 00 c7 44 02 01 00 66 89
0a0 66 8B 1E 44 7C MOV EBX,[7c44] ; 044 = 0000_0001
0a5 C7 04 10 00 MOV word [SI],0010 ; 005 w
0a9 C7 44 02 01 00 MOV word [SI+2],0001 ; 007 w
0ae 66 89 5c 08 MOV [SI+8],EBX ; 00D q
> 00b0 5c 08 c7 44 06 00 70 66 31 c0 89 44 04 66 89 44
0b2 C7 44 06 00 70 MOV word [SI+6],7000 ; 00B w
0b7 66 31 c0 XOR eax,eax
0ba 89 44 04 MOV [SI+4],ax ; 009 w
0bd 66 89 44 0C MOV [SI+0C],eax 011 q
> 00c0 0c b4 42 cd 13 72 05 bb 00 70 eb 7d b4 08 cd 13
0c1 B4 42 MOV AH,42
0c3 CD 13 INT 13
0c5 72 05 JC 0cc
0c7 BB 00 70 MOV BX,7000
0ca EB 7D JMP 0149
:
0cc B4 08 MOV AH,08
0ce CD 13 INT 13
> 00d0 73 0a f6 c2 80 0f 84 ea 00 e9 8d 00 be 05 7c c6
0d0 73 0a JNC 0dc
0d2 f6 d2 NOT DL
0d4 80 0f 84 OR byte[BX],084 ;set bit7+2 [???]
0d7 ea 00 e9 8d 00 JMP FAR 008d:e900 ;what's at 09_b900 ??
0dc be 05 7c MOV SI,7C05
0df c6 44 ff 00 MOV byte[SI-1],0 ;004 b
> 00e0 44 ff 00 66 31 c0 88 f0 40 66 89 44 04 31 d2 88
0e3 66 31 C0 XOR eax,eax
0e6 88 f0 MOV AL,DH
0e8 40 INC AX
0e9 66 89 44 04 MOV [SI+4],eax
0ed 31 D2 XOR DX,DX
0ef 88 CA MOV DL,CL
> 00f0 ca c1 e2 02 88 e8 88 f4 40 89 44 08 31 c0 88 d0
0f1 C1 E2 02 SHL DX,2
0f4 88 E8 MOV AL,CH
0f6 88 F4 MOV AH,DH
0f8 40 INC AX
0f9 89 44 08 MOV [SI+8],AX ; 00D w
0fc 31 C0 XOR ax,ax
0fe 88 D0 MOV AL,DL
> 0100 c0 e8 02 66 89 04 66 a1 44 7c 66 31 d2 66 f7 34
100 C0 E8 02 SHR AL,2
103 66 89 04 MOV [SI],eax ; 005 q
106 66 A1 44 7C MOV eax,[7C44] ; = 0000_0001
10a 66 31 D2 XOR edx,edx
10d 66 F7 34 DIV dword[SI]
> 0110 88 54 0a 66 31 d2 66 f7 74 04 88 54 0b 89 44 0c
110 88 54 0A MOV [SI+0a],DL ; 00f b
113 66 31 D2 XOR edx,edx
116 66 F7 74 04 DIV dword[SI+04] ; 009 q
11a 88 54 0B MOV [SI+0b],DL ; 010 b
11d 89 44 0C MOV [SI+0c],AX ; 011 w
> 0120 3b 44 08 7d 3c 8a 54 0d c0 e2 06 8a 4c 0a fe c1
120 3B 44 08 CMP AX,[SI+08]
123 7D 3C JNL 0161 ;if >=
125 8A 54 0D MOV DL,[SI+0d] ; 012 b (is an AH as well)
128 C0 E2 06 SHL DL,6
12b 8A 4C 0A MOV CL,[SI+0a] ; 00f b
12e FE C1 INC CL
> 0130 08 d1 8a 6c 0c 5a 8a 74 0b bb 00 70 8e c3 31 db
130 08 D1 OR CL,DL
132 8A 6C 0C MOV CH,[SI+0c] ;011 b
135 5A POP DX
136 8A 74 0B MOV DH,[SI+0b] ;010 b
139 BB 00 70 MOV BX,7000
13c 8E C3 MOV ES,BX
13e 31 DB XOR BX,BX
> 0140 b8 01 02 cd 13 72 2a 8c c3 8e 06 48 7c 60 1e b9
140 B8 01 02 MOV AX,0201
143 CD 13 INT 13
145 72 2A JC 171
147 8C C3 MOV BX,ES
:
149 8E 06 48 7C MOV ES,[7C48] ; = 0200
14d 60 PUSHA
14e 1E PUSH DS
14f b9 00 01 MOV CX,0100
> 0150 00 01 8e db 31 f6 31 ff fc f3 a5 1f 61 ff 26 42
152 8E DB MOV DS,BX
154 31 F6 XOR SI,SI
156 31 FF XOR DI,DI
158 FC CLD
159 F3 A5 REP MOVSW ;512 byte from 70000 to 2000
15b 1F POP DS
15c 61 POPA
15d ff 26 42 7c JMP[7C42] ; this read as 2000
> 0160 7c be 85 7d e8 40 00 eb 0e be 8a 7d e8 38 00 eb
:
161 BE 85 7D MOV SI,7D85 ;"Geom"
164 E8 40 00 CALL 01A7
167 EB 0E JMP 177
:
169 BE 8A 7D MOV SI,7D8A ;"Hard Disk"
16c E8 38 00 CALL 01A7
16f EB 06 JMP 177
> 0170 06 be 94 7d e8 30 00 be 99 7d e8 2a 00 eb fe 47
:
171 BE 94 7D MOV SI,7D94 ;"Read"
174 E8 30 00 CALL 01A7
177 BE 99 7D MOV SI,7D99 ;" Error"
17a E8 2A 00 CALL 01A7
17d EB FE jmp self
> 0180 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44
> 0190 69 73 6b 00 52 65 61 64 00 20 45 72 72 6f 72 00
> 01a0 bb 01 00 b4 0e cd 10 ac 3c 00 75 f4 c3 00 00 00
17f "GRUB",0
185 "Geom",0
18a "Hard Disk",0
194 "Read",0
199 " Error",0
1a0 BB 01 00 MOV BX,0001 ;write msg to screen
1a3 B4 0E MOV AH,0E
1a5 CD 10 INT 10
1a7 AC LODSB ;call entry point
1a8 3C 00 CMP AL,0
1aa 75 f4 JNZ 1a0
1ac c3 RET
1ad ...1b7 ;all 00
1b8 a6 98 0a 00 00 00 ;dunno what's this.
partition-entries:
1be 80 01 01 00 83 fe ff ff(0000003f)(734353b6) ;Loonix
1ce 00 fe ff ff 05 fe ff ff(734353f5)(012d05cc) ;extension
> 000001b0 00 00 00 00 00 00 00 00 a6 90 0a 00 00 00 80 01
> 000001c0 01 00 83 fe ff ff 3f 00 00 00 b6 53 43 73 00 fe
> 000001d0 ff ff 05 fe ff ff f5 53 43 73 cc 05 2d 01 00 00
> 000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00