3 Pages V  < 1 2 3 >  
Reply to this topic
 grub4dos info, to those who get "disk error" message
post May 25 2007, 10:26 AM
Post #16
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,230
Thank(s): 564


Italy


Yep,
so, as expected, First Sector of Physical drive is a MBR, so far there is nothing "new", this is the normal behaviour of the HP utility, i.e. place a MBR on the stick with just one partition entry, active, covering the entire capacity, formatted with the chosen filesysten, FAT16, FAT32 or NTFS (the latter in this case).

First sector of Logical drive (partition) is the standard 2K/XP/2003 NTFS bootsector.


Let's however have a look at the MBR, at first look it appears to be "standard"
(the default one in English) beginning with 33C08E, it means that it is one that comes from "Windows":
http://www.boot-land.net/forums/index.php?...c=2220&st=3

more exactly, it is the version that comes with 2K/XP/2003, though it appears to have some slight modifications:
1) bytes 202, 203 and 204 are EB1A90 instead of B80102
2) bytes 437, 438 and 439 are 000000 instead of 2C4463
(the third difference, i.e. the presence of Disk Signature 69708B00 is "normal", it only means that the stick has been mounted/accessed under a 2K/XP/2003 OS)

The 2C4463 appears is an offset for "help messages", 2C4463 is the offset for English, reference is here:
http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm

Much more interesting is the other modification, on the same page there is a disassembly that reads:
CODE
06CA B80102        MOV     AX,0201     ;|   INT 13,  Function 2

the code changed to EB1A90 means:
CODE
EB1A jmp E6
90 NOP


more in detail:

CODE
000000CA: EB1A                         jmps        0000000E6  --- (4)
000000CC: 90                           nop
000000CD: BB007C                       mov         bx,07C00;"| "
000000D0: 8B4E02                       mov         cx,[bp][02]
000000D3: 8B5600                       mov         dx,[bp][00]
000000D6: CD13                         int         013
000000D8: 7351                         jae         00000012B  --- (5)
000000DA: 4F                           dec         di
000000DB: 744E                         je          00000012B  --- (6)
000000DD: 32E4                         xor         ah,ah
000000DF: 8A5600                       mov         dl,[bp][00]
000000E2: CD13                         int         013
000000E4: EBE4                         jmps        0000000CA  --- (7)
000000E6: 8A5600                       mov         dl,[bp][00]
000000E9: 60                           pusha


so with reference to the linked page, the code appears to jump unconditionally over a section of code:
QUOTE
06C1 7723 JA 06E6 ; Check for Extended INT 13.
06C3 7205 JB 06CA
06C5 394608 CMP [BP+08],AX
06C8 731C JNB 06E6 ; Check for Extended INT 13.

06CA B80102 MOV AX,0201 ;| INT 13, Function 2
06CA EB1A JMP 06E6 ;| SKIP UNCONDITIONALLY OVER code in RED below:
06CC 90 NOP
06CD BB007C MOV BX,7C00 ;| (ES):BX = Memory Buffer
06D0 8B4E02 MOV CX,[BP+02] ;|
06D3 8B5600 MOV DX,[BP+00] ;|
06D6 CD13 INT 13 ;| "Read 1 Sector into Memory"

06D8 7351 JNB 072B
06DA 4F DEC DI
06DB 744E JZ 072B
06DD 32E4 XOR AH,AH ;| INT 13, Function 0
06DF 8A5600 MOV DL,[BP+00] ;| DL=Drive Number
06E2 CD13 INT 13 ;| "Reset DISK System"

06E4 EBE4 JMP 06CA



; The following are the "INT 13 Extensions Installation Check" and
; the Extended READ sectors from Hard Drive (Function 42h) routines.

06E6 8A5600 MOV DL,[BP+00] ;| DL = Drive Number.


If you look at the last few lines before the modified code, you will see that they contain CONDITIONAL jumps, that only if INT13 Extensions are found, will jump to E6 (GREEN code).

Most probably this is done to workaround "defective" BIOSes that do not correctly give information about INT13 Extensions on the USB bus.

This has of course NOTHING to do with the drive being seen as A:\ or C:\, the stick thus formatted has a MBR and therefore, at least from the MBR and bootsector side, it will appear as C:\, besides the bootsector has on offset 21 the "F8" media descriptor, that corresponds to "Hard drive".

Nor it has ANYTHING to do with the reported grldr/grldr.mbr thingie.

BUT it is a GREAT find!
yahoo.gif

This finally explains WHY the "HP" utility appears to boot from a larger number of systems!

It simply skips over a (probably unneeded on modern motherboards, read motherboards with USB boot capability) check that can possibly be a cause of error with some "bad" BIOSes. (Int13h extensions, read LBA addressing) have been implemented at least since 1995, as Windows 95 First edition came with the new 0E and 0F "LBA addressed" partitition types:
http://en.wikipedia.org/wiki/INT_13
http://www.linux.com/howtos/Large-Disk-HOWTO-4.shtml
http://oldfiles.org.uk/powerload/tmeline2.htm
http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
I had looked, say, several tens of times to the MBR produced by the HP utility, but since it is (except from those few bytes) identical to the standard 2K/XP/2003 MBR I always assumed (wrongly) that it was the same one.

I have no idea, nor enough Assembly knowledge, to understand why:
1) the 2C4463 has been "zeroed" out, the only effect should be that in case of a booting error no message is shown on the screen
2) why the unconditional jump has been placed AFTER two conditional ones, logic should call for placing the unconditional one BEFORE them
Maybe some member with more knowledge in this field can share some light on the above.

Anyway, a large part of the mistery has nonetheless being solved, and I am very happy about it, thanks to Mike69 for making me have this closer look at it! smile.gif

jaclaz

P.S.: @Mike69 Now we can go on, can you simply try deleting the grldr.mbr/ntldr.mbr from the stick and see if it stops booting?


--------------------
+Quote Post
post May 25 2007, 10:57 AM
Post #17
Mike69
Member   **
Group: Members

  Joined: 17-July 06 From: Hell

Posts: 59
Thank(s): 0


lol...i got to say...i didnt understant a lot of your post jaclaz, i simply dont have that kind of knowledge (you must think im stupid or something...lol)

as you said the pen boots without the ntldr.mbr file...(i could swear it didnt boot before)

my goal in this topic was simply to share how to bypass the "disk error" issue
because i used bootlace and grubinst in my pen and it didnt work on some motherboads, but it was always on fat / fat32 fs
and then i tryed ntfs and it shows the ntldr is missing error, and then i remeberd to read somwhere to rename grldr to ntldr and a tryed it!! could you ask the person who builds grub4dos to make an option to remove the --ignore-floppies option and build a tool based on the hp format utility to install grub mbr?

you still havent answered me about why some mobos on a fat pen boot to a:\ and others to c:\

be cool
+Quote Post
post May 25 2007, 11:49 AM
Post #18
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,230
Thank(s): 564


Italy


QUOTE
you still havent answered me about why some mobos on a fat pen boot to a:\ and others to c:\


Well, rather obviously, if the SAME pen, with the SAME boot files and SAME OS on it, behaves DIFFERENTLY on different systems, the difference must be in the system (read BIOS) or in the settings in the BIOS.

I guess nothing (except maybe a BIOS update for the manufacturer) can be done to change this behaviour.

However, I have NEVER seen a BIOS set to boot from USB "HDD" to load a stick with a proper MBR (like the one you are now using) on it to recognize the active partition as "floppy", "superfloppy" or however have the booted OS assign to it the a:\ letter, but of course there might be some.

Now, just for the fun of it, can you try replacing the grldr (renamed NTLDR) on the stick with a standard one (i.e. one that has NOT the --ignore-floppies hexedited out) and see if it stops booting or finding the "dummy" menu.lst?

If some later releases of Grub4dos give you problems, try reverting to an earlier version.

jaclaz


--------------------
+Quote Post
post May 25 2007, 12:39 PM
Post #19
Mike69
Member   **
Group: Members

  Joined: 17-July 06 From: Hell

Posts: 59
Thank(s): 0


i changed to the original one and it boots on all motherboards...but wont find menu.lst on all of them.

examples:

1 - wont find menu.lst
asus p4p800-e deluxe
asus t2-ph2

2 - find menu.lst
asus p5b
all hp notebooks dv1000,dv4000,5000,dv6000,dv8000,dv9000 series

if i use bootlace or grubinst to install grub mbr, group 2 will boot fine but not group 1 (disk error)
if i use fat it boots from all groups - group1: a:\ group2: c:\
if i use hp format utility and ntfs with grub files it boots from both groups but wont find menu.lst in group1
if i edit grldr and remove the --ignore-floppies it boots from both groups


ps.i want to make a folder to insert bios upgrades files and how can i use grub to boot and give a command line prompt to do it? (we already talked about this in pm´s)
+Quote Post
post May 26 2007, 12:17 PM
Post #20
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,230
Thank(s): 564


Italy


A question, when you say:

QUOTE (Mike69)
if i use fat it boots from all groups - group1: a:\ group2: c:\


You mean DOS booted through Grub4dos, don't you?
If yes, can you post the relevant menu.lst entry?

Anyway I'll have a couple nights sleep on these results and see what I can find. wink.gif

jaclaz

P.S. The thread related to BIOS upgrading has been splitted and is here:
http://www.boot-land.net/forums/index.php?showtopic=2265


--------------------
+Quote Post
post Jul 23 2007, 09:33 AM
Post #21
Mike69
Member   **
Group: Members

  Joined: 17-July 06 From: Hell

Posts: 59
Thank(s): 0


hi,


sorry for the late reply...

i mean a standart usb pen drive formatted with hp utility
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topic
2 User(s) are reading this topic ()



Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts Grub4dos iso Size Limit?
1 sara - pmedia 106 Today, 08:31 AM
Last post by: Wonko the Sane
No new grub4dos booting ubuntu iso
29 mipstien 12,435 27th August 2010 - 10:27 AM
Last post by: Wonko the Sane
No new Topic has attachmentsGRUB4DOS + WinVBlock
47 Sha0 2,744 25th August 2010 - 01:12 PM
Last post by: Wonko the Sane
No New Posts Grub4Dos savedefault does not work
4 davidwolf 1,507 17th August 2010 - 09:13 PM
Last post by: tinybit
No new Pinned: Topic has attachmentsGrub4dos Guide/Tutorial
79 diddy 67,758 15th August 2010 - 08:26 AM
Last post by: Wonko the Sane