Jump to content











Photo
- - - - -

xp setup: ntldr not found, but boots fine on newer motherboard


Best Answer Wonko the Sane , 10 February 2013 - 12:23 PM

Try writing these values in the partition table:

0C-80-1023-254-63-1023-254-63-63-7566552

:unsure:

 

BTW, till now we are exactly in the situation described by the originally referenced post, if for *any* reason the ASUS bios does not "like" the partition table or the geometry reported by the device, it will automagically determine a suitable geometry, disregarding the values in the PBR BPB.

 

In Legorol's case the "determined" Head number was 64, in your case it is 128.

This must be connected to the size of the device, Legorol was using a 1Gb stick, you are using a 4 Gb stick.

It makes sense:

1024*64*63*512=2,113,929,216

1024*128*63*512=4,227,858,432

 

As a matter of fact these geometries are easily replicable in Qemu (+Qemu manager), whose (Bochs originated) BIOS is a "strict" one.

 

:cheers:

Wonko

Go to the full post


  • Please log in to reply
131 replies to this topic

#126 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 02 March 2013 - 09:12 PM

*no edit button*

 

I installed xp on a reliable (i think) pc an used that to run winnt32, but it did not create a bootsect.dat.

Not sure If I got any switches wrong, or if my xp source iso is not up for the job (I slipstreamed sp3 in there some time ago). Perhaps I should re-rip the source...

 

For now I'll use the dos&winnt.exe method, since it worked in the past and I need to install xp to a pc before monday.

 

By the way: the questions this topic was stared with are pretty much awnsered. I know now why the old asus mobo was behaving 'odd' and I have learnd quite a lot about booting and the chs lba addressing scheme differences.

 

I'd like to keep asking small questions in here, is it's ok. And I'll post the results on the 'moved partition' test as soon as I get (in my view) reliable results. I'll mark this treat solved, as the most important questions are answered.

 

*edit:fixed a sentence*

 

*edit2*

BTW The method I used with winnt32 was winnt32.exe /cmp:"testcommand" /makelocalsource /noreboot /syspart:<UFDletter>: /tempdrive:<UFDletter>:

 

I got this method working the first time I tried it, but forgot to add a command to the winnt.sif to rename the files and folders on the UFD before the setup deletes them, so far I could not reproduce.

I'm not sure what I did different. Possibly I forgot the /noreboot the first time. I could try that...

But it has to wait untill the XP system I'm installing is working propperly.


Edited by Fiction, 02 March 2013 - 09:23 PM.


#127 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 03 March 2013 - 11:19 AM

Ok, this might verry well be a problem caused by a weak understanding of the matter, but I'm trying to test a few differnent partitiontabels, and see if the drive is bootable.

 

However, I'm unable to get both the PBR and the MBR code to work propperly, without reformatting the entire drive.

 

Can you guys advice me tools that are able to:

1 add bootcode (both ntldr and bootmgr, preferably a msdos bootcode) to the mbr and pbr without altering the partition table RMPrepUSB reformats the entire drive if I hit '6 Prepare Drive'

2 Partially unrelated: Something I could install on windows 7 that would be able to run winnt32.exe. I am running winnt32.exe from virtualbox now, when needed and is slows down the process a fair bit.

 

If I recall correclty RMPrepUSB had a File>USB function, but I thought it wrote to the MBR only? I've seen the words 'NTLDR' and 'BOOTMGR' mentioned literally in the PBR, so I am confident some bootcode has to be written to the PBR right?

You can have:

MBRFIX:
http://www.sysint.no...ting/mbrfix.htm

you should already have bootsect.exe:

http://technet.micro...7(v=ws.10).aspx

please understand how the version coming with Windows 7 has an added /mbr switch:

http://technet.micro...7(v=ws.10).aspx

Additionally, to replace code in the MBR is extremely simple, the CODE is just the first 440 bytes -or 446 including disk signature, so you can use any dd-like tool, take care - if you use dsfi/dsfo - that it wants "whole sectors", i.e. multiples of 512 bytes - when writing to device (whilst 440 or any number of bytes is OK on files), see here:

http://reboot.pro/to...-alpha/?p=29134

 

:cheers:

Wonko



#128 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 03 March 2013 - 12:04 PM

You can use RMPrepUSB to replace the MBR boot code with either  standard (actually win7) MBR, grub4dos mbr or wee MBR without changing the serial number or partition table on the disk.

Use the BootLoaders menu tab at the top of RMPrepUSB.



#129 Fiction

Fiction

    Member

  • Members
  • 70 posts
  • Location:The Netherlands
  • Interests:Everything IT related, Physics, Mathematics, Fantasy, sci-fi
  •  
    Netherlands

Posted 04 March 2013 - 11:32 AM

you should already have bootsect.exe:

 

I am experiencing more difficulty then expected while testing this partition. I created the bootcode in the MBR using RMPrepUSB then I changed the partition table, destroying the PBR in the process. This is what made it hard: I did not know how to fix the PBR. I tried simpy bakcing up and restoring the PBR but this would not boot. After a while I decided to use a bootsect.exe to to the trick. This would at least boot on a pc with a 'normal' bios. After that I tested it on the weird asus bios

    So what about the weird asus bios? Well it would not boot with a 'default' BPB, but it would boot if I changed the head in there to 128 in stead of 255. I hear you thinking: that is the behaviour of the PBR, right? Well I'm not sure about that, I did not get a NTLDR warning, nor a warning from the MBR ('Invalid partition table. Error loading operating system. Missing operating system.'). No, I got a bios warning: 'disk boot failure, insert system disk and press enter'. Seemingly the bios wont even look at the MBR of the drive! I should probably check if the HP patch has any effect on this (I only read about a NTFS version and I'm using FAT32 but I'll re-read).

    Further more, berhaps I should try a different version of your batch thingy (I'll try to find the newest version), sins partitioning this way seems like an unnecessary amount of work this way.

I appears I do :frusty:
Spend so much time trying to do it with tiny hexer I forgot. :frusty:
Bootsect does the job well, except for the dos code, but I actually DID get that working using tiny hexer yesterday (have not tryed on volumes with a 'weird' starting sector yet, but should work I suppose).

 

Af few more intelegent questions (I hope):

1 I looked the the second and third sector from the volume (PBR) they all (3) seem like bootsectors to me... all three of them ended with 'magic bytes'. The second sector was all 0-s execept for 2 groups of 4 or so nonzero bytes. The third sector seemed like an important piece of code. I think the third sector contains more bootcode and the second one contains some volume-specific bytes.

Am I correct here?

Any of you know what these bytes in the second cluster are?

2 I am getting pretty tired of testing if a flashdrive should be bootable by normall computers or not. All this rebooting. Virtual box and VmWare do not support usb booting. I know I could do this indirectly, but I heard about Qemu? However it seems it is only downloadable als tar.bz2. How should I 'compile' this file in windows?



#130 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 04 March 2013 - 11:48 AM

#1 it depends (obviously) by the filesystem used AND (in the case of FAT32) on WHICH OS was used to format the partition.

Read:

http://thestarman.pc.../mbr/index.html

*everything* :w00t:, but specifically:

http://thestarman.pc...r/ntFAT32BR.htm

and:

http://thestarman.pc...mbr/MSWIN41.htm

In a nutshell the FAT32 bootrecord is actually THREE sectors long.

  • If formatted in DOS, it is made of sectors 0,1,2.
  • If formatted in NT based systems it is made of sectors 0,1,12
  • If formatted under ReactOS :w00t:, it is made of sectors 0,1,14

 

#2

Meet Qemu Manager ;):

http://reboot.pro/to...ger#entry167861

(home site is down currently, hence use the Wayback Machine)

 

:cheers:

Wonko



#131 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 04 March 2013 - 11:53 AM

RMPrepUSB has QEMU and is designed to be used with USB Flash drives.

It also can install different bootloaders, will give you info on MBR and PBRs and allows to to edit sectors (CTRL+D). etc. etc. etc.



#132 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 04 March 2013 - 12:03 PM

RMPrepUSB has QEMU and is designed to be used with USB Flash drives.

It also can install different bootloaders, will give you info on MBR and PBRs and allows to to edit sectors (CTRL+D). etc. etc. etc.

Good :), I guess we should close the board, ask ALL other programmers around to delete their web pages and tools and replace *everything* with a link to RMPREPUSB?  :dubbio:

 

(we will need to make an exception for wimb and his tools :thumbsup: that apparently, like or together with RMPREPUSB, are the answer to *all* and *any* problem)

 

Just for the record, though RMPREPUSB is an exceptionally good program :worship:, it's functions simply CANNOT be compared to a full fledged VM GUI for Qemu.

 

Additionally, of course IMHO :ph34r:, the general idea is to have Fiction learn about  the matter at hand (as opposed to contributing to make yet another "trained monkey" only capable to push a few buttons in sequence) :ranting2:.

 

:cheers:

Wonko






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users