3 Pages V   1 2 3 >  
Reply to this topic
 How to patch FAT32 boot sector
post Jul 26 2009, 03:30 PM
Post #1
ktp
Silver Member   ****
Group: Advanced user

  Joined: 16-February 07
Posts: 653
Thank(s): 37


Hello,

I remember reading an article about patching FAT32 boot sector (by setting 3 or 4 NOPs to the boot sector code) in order to fix MS boot sector code. In U_SET_XP program the wording is "CHS knockout".

I desperately searched using Google/BootLand but could find again this article :-(.
What I need is to know the old binary values to be patched, and the new values (NOPs).

Thank you.


+Quote Post
post Jul 26 2009, 03:34 PM
Post #2
was_jaclaz
Finder   ******
Group: Advanced user

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

Posts: 7,230
Thank(s): 564


Italy


Here wink.gif:
http://www.911cd.net/forums//index.php?sho...1702&st=129

cheers.gif

jaclaz


--------------------
1 user(s) said "Thank you!" to jaclaz for this fantastic post:
ktp
+Quote Post
post Jul 26 2009, 03:57 PM
Post #3
ktp
Silver Member   ****
Group: Advanced user

  Joined: 16-February 07
Posts: 653
Thank(s): 37


Thank you Master jaclaz for your quick answer !
+Quote Post
post Jul 26 2009, 04:07 PM
Post #4
was_jaclaz
Finder   ******
Group: Advanced user

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

Posts: 7,230
Thank(s): 564


Italy


QUOTE (ktp @ Jul 26 2009, 05:57 PM) *
Thank you Master jaclaz for your quick answer !


You are welcome.

jaclaz


--------------------
+Quote Post
post Jul 26 2009, 04:12 PM
Post #5
ktp
Silver Member   ****
Group: Advanced user

  Joined: 16-February 07
Posts: 653
Thank(s): 37


For the records :

FAT32 boot sector ("MSWIN4.1" or "MSDOS5.0" found starting at address 0x03) :
At address 0xE6, 4 bytes 0x0F, 0x82, 0x4A, 0x00 => patched to 0x90 0x90 0x90 0x90

NTFS boot sector ("NTFS" found starting at address 0x03) :
At address 0xD9, 4 bytes 0x0F, 0x82, 0x3A, 0x00 => patched to 0x90 0x90 0x90 0x90

With this patch, I think I can solve my booting problem with my mp3 player :
http://www.boot-land.net/forums/index.php?showtopic=8493

Now I will go to experiment with this !
+Quote Post
post Jul 26 2009, 04:26 PM
Post #6
was_jaclaz
Finder   ******
Group: Advanced user

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

Posts: 7,230
Thank(s): 564


Italy


QUOTE (ktp @ Jul 26 2009, 06:12 PM) *
With this patch, I think I can solve my booting problem with my mp3 player :


I cannot see how it could be related to it.

From what you posted, your only hope is finding a way to have makebootfat (or it's principles, i.e. double or triple use MBR, as tinybit suggested) working.

http://www.boot-land.net/forums/index.php?showtopic=7507

jaclaz


--------------------
+Quote Post
post Jul 26 2009, 04:50 PM
Post #7
ktp
Silver Member   ****
Group: Advanced user

  Joined: 16-February 07
Posts: 653
Thank(s): 37


@jaclaz

The problem is that I cannot use MBR : the mp3 player (= USB key) has only boot sector (in other words either you select under HDHacker boot sector for E: or Physical drive 1, the content is the same).

Originally the mp3 player came with an almost nulled (all zeroes) boot sector (no boot sector code, only the 55AA and few signature bytes at start). After formatting to FAT32 with XP, and patching the boot sector, I still have the "Disk error, Press any key to restart" message. chkdsk gives no problem, and the mp3 player works fot its music functions.

I understand that triple MBR assumes MBR, or in my case no MBR is possible.
+Quote Post
post Jul 26 2009, 06:04 PM
Post #8
was_jaclaz
Finder   ******
Group: Advanced user

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

Posts: 7,230
Thank(s): 564


Italy


QUOTE (ktp @ Jul 26 2009, 06:50 PM) *
I understand that triple MBR assumes MBR, or in my case no MBR is possible.


Triple MBR assumes nothing.

You are assuming something. wink.gif

The idea is to have some code that LOOKS to the BIOS and Windows as a MBR, but that can ALSO be seen as a bootsector (so that the MP3 thingie will still think it is a bootsector) and NO hidden sectors.
Or, if you prefer, a bootsector that has also partition data and disk signature.

Please try reading the above comparing it with this:
QUOTE (ktp @ Jul 26 2009, 06:50 PM) *
The problem is that I cannot use MBR : the mp3 player (= USB key) has only boot sector (in other words either you select under HDHacker boot sector for E: or Physical drive 1, the content is the same).

Doesn't it look strangely similar? happy22.gif

What if you actually READ:
http://www.boot-land.net/forums/index.php?...c=7507&st=5

AND this:
http://www.boot-land.net/forums/index.php?showtopic=761

AND links within the latter? unsure.gif

Then, once you have got the hang of it, you can start experimenting with either makebootfat or tinybit's solution.

jaclaz


--------------------
+Quote Post
post Jul 26 2009, 06:36 PM
Post #9
ktp
Silver Member   ****
Group: Advanced user

  Joined: 16-February 07
Posts: 653
Thank(s): 37


@jaclaz

Thank you for your help. I tried makebootfat using your mkboot.cmd batch file. But as soon as I replug the mp3 player it automatically does a "Memory checking", which results in an automatic reformat of the USB key to factory mode by the player itself. The bootsector is reset to almost null as said previously.

Edit: if I install grub4dos to it, I got "disk error" message too from grub4dos boot code.

So the only boot sector it seems to accept is FAT32 boot sector, but then my BIOS could not boot it (Disk error), even after patching with 4 NOPs as said. So the problem is why the boot sector code cannot read the ntldr on the disk.
+Quote Post
post Jul 26 2009, 06:52 PM
Post #10
was_jaclaz
Finder   ******
Group: Advanced user

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

Posts: 7,230
Thank(s): 564


Italy


QUOTE (ktp @ Jul 26 2009, 08:36 PM) *
I tried makebootfat using your mkboot.cmd batch file. But as soon as I replug the mp3 player it automatically does a "Memory checking", which results in an automatic reformat of the USB key to factory mode by the player itself. The bootsector is reset to almost null as said previously.

Edit: if I install grub4dos to it, I got "disk error" message too from grub4dos boot code.

So the only boot sector it seems to accept is FAT32 boot sector, but then my BIOS could not boot it (Disk error), even after patching with 4 NOPs as said. So the problem is why the boot sector code cannot read the ntldr on the disk.


NO.
The whole point is NOT that one.

The point is that even if you make it load NTLDR, any Windows NT based system WON'T boot from the stick, as it would miss Disk Signature and thus you won't have a valid arcpath.

Sure makebootfat won't work "as is", but maybe you can manually use it's "short MBR".

  • Format the stick as FAT32 (with NO partitions, as superfloppy).
  • Try using it as MP3. Make sure that the MP3 function does not change anything.
  • Post the bootsector.



jaclaz


--------------------
+Quote Post

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



Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts Boot Land Stats, August
4 Nuno Brito 155 Yesterday, 02:07 PM
Last post by: NFX
No New Posts boot full ubuntu from grub4dos
3 sara - pmedia 146 Yesterday, 08:12 AM
Last post by: Wonko the Sane
No New Posts HOW TO Integrate Fedora 13 Into a Sardu + G4D Multiboot USB
HOW TO
4 fms 237 29th August 2010 - 03:51 PM
Last post by: Wonko the Sane
No new Topic has attachmentsTool to Add Seagate DiscWizard to PE3 Wim
Free Acronis TrueImage 11
14 oriensol 1,372 29th August 2010 - 03:03 AM
Last post by: oriensol
No new booting vista/2008/w7 from usb sub folder
grub4dos launches bootmgr but bootmgr cannot find what it needs?!?
112 anystupidname 16,945 27th August 2010 - 07:41 PM
Last post by: steve6375