Jump to content

Booting XP via freeldr from NTFS


Dietmar

Recommended Posts

It sounds like a "queer" limit.

When you happen to have another of these "Hive not found error", could you try running "extents":

http://reboot.pro/index.php?showtopic=18570

and check where the not working file is?

I mean - roughly - a normal XP install should be around 1.5-2 GB, even if you have (why?) a 4 GB pagefile, an "added" file should be at most around 6 GB distant from the PBR.

There was an issue in early NT (3.5 and 4.0) that didn't allow boot volume larger than 7.8 GB:

https://groups.google.com/g/comp.sys.ibm.ps2.hardware/c/O7H6_nk5FEs

but even if you have a 128 (or 256) GB partition the freeldr.sys should anyway be well below 7.8 GB.

jaclaz

Link to comment
Share on other sites


Hi @jaclaz, nice to see you!:thumbup

I just prepare a very easy XP SP3, only with the Sata1006 driver and acpi.sys 7777 integrated.

This I build with the nice Ramsey Integrator, because the error "Hive not found" happens not, when you take an original XP SP3 CD.

Here is the output of extents, waaaoh what a nice tool!

The question is, if the message from freeldr is correct for Hive "system" or if another bootfile is not found

Dietmar

PS: And soon I paste here also from the same XP install an output with working freeldr.

 

***************************
Bytes Per Sector:512
Sectors per Cluster:8
Cluster size :4096
Filesystem :NTFS
***************************
Filename:L:\WINDOWS\system32\config\system
File Cluster count :576 -> in bytes: 2359296
File size in bytes :2359296
File cluster first :363856
Extents count :6

extents_[0] -  VCN : 0 LCN : 363856 Lba : 2912896 Sectors : 2048
extents_[1] -  VCN : 256 LCN : 342773 Lba : 2744232 Sectors : 512
extents_[2] -  VCN : 320 LCN : 340357 Lba : 2724904 Sectors : 512
extents_[3] -  VCN : 384 LCN : 340053 Lba : 2722472 Sectors : 512
extents_[4] -  VCN : 448 LCN : 279942 Lba : 2241584 Sectors : 512
extents_[5] -  VCN : 512 LCN : 332216 Lba : 2659776 Sectors : 512

 

And here is the working one, yepp, there are differences.

This is the XP from the same installation, only copy files by hand

***************************
Bytes Per Sector:512
Sectors per Cluster:8
Cluster size :4096
Filesystem :NTFS
***************************
Filename:L:\WINDOWS\system32\config\system
File Cluster count :576 -> in bytes: 2359296
File size in bytes :2359296
File cluster first :216893
Extents count :1

extents_[0] -  VCN : 0 LCN : 216893 Lba : 1737192 Sectors : 4608

 

 

 

 

Edited by Dietmar
Link to comment
Share on other sites

@jaclaz

What helps for working freeldr boot is, to copy the whole folder system32 to another harddisk with enough free space.

Than delete the folder system32 on that XP, FROM where it is taken.

Run "Defrag" on this xp, which has now no folder system32.

Copy the folder system32 back to its original place.

So, it has to do something with, how the files in system32 are sitting to each other or

that one of the bootfiles is fragmented but until now, we do not found out, which file this is.

With a lot of work, you can make an XP with only the bootfiles, one by one, for to understand this problem.

freeldr has this problem, ntldr not

Dietmar

Edited by Dietmar
Link to comment
Share on other sites

I did some tests with NVMe drivers to check how well the copy procedure worked to get XP booting via freeldr.

I completed five fresh installations of XP from Ramsey using four different drivers and five different NVMe devices.

The copy procedure worked in four out of five NVMe devices tested.

The only failed attempt was on a samsung 970 Evo Plus with the MS NVMe v2.0 driver. I tried 4 times without success.

The strangest thing is that booting worked fine on a samsung 970 Evo using the same MS NVMe v2.0 driver.

I have also noticed other things, but I think the one above is the strangest.

 

Edited by Andalu
Link to comment
Share on other sites

@Dietmar

I did a partition clone from the working NVme drive under freeldr (970Evo) to the non-working NVMe drive (970evo plus) and now the latter also boots via freeldr.

I still don't know the reason for the non-working drive by applying the same copy method that worked for 4 other NVMe drives and 3 SSDs.

I also noticed that when deleting the firadisk.sys file, booting via freeldr displays the message "cannot load boot driver system32\drivers\firadisk.sys!" even though booting then proceeds normally.


I add more notes regarding the NVMe drivers used during my tests on the MSI Z590-A board:

OFA drivers v1.3 and v1.5 sometimes fail to boot via freeldr (in most cases) and ntldr (fewer times) giving bsod D1 for nvme.sys. On the times when booting works, the bsod often occurs at shutdown.

Both versions of the OFA driver give the above D1 bsod already during GUI mode on the first attempt to install XP.

The MS and Silicon Motion drivers work in both modes.

Link to comment
Share on other sites

@dietmar

When you copy back the system32 folder you are effectively (in theory) rewriting the whole thing sequentially, so it is another way to defrag those files (in good ol' NT4.00 times we didn't have defrag - let alone contig or wincontig - so our Poor Man's Defrag was just to copy the whole volume contents to another one and then copy it back to the original after having deleted the original files).

So, in two steps (running defrag on the "system32less" volume and then copying back the system32 you are doing a sort of very thorough defrag (at least for contents of system32).

You could try doing the same (copy out/defrag/copy back in) but copying out - instead of the whole system32 folder - only the system32\config one.

The placements of the two files (the one in 6 segments and the contiguous one) in extents are both within "usual" or "normal" limits, so it cannot be that the problem.

What about the placement of the actual freeldr.sys?

jaclaz

 

Link to comment
Share on other sites

4 minutes ago, Andalu said:

 

I also noticed that when deleting the firadisk.sys file, booting via freeldr displays the message "cannot load boot driver system32\drivers\firadisk.sys!" even though booting then proceeds normally.

This seems "normal" to me, you deleted the file but freeldr still finds an entry for it in the Registry, but since the actual booting (from disk) does not need the firadisk driver to be loaded, you have just a warning message and booting goes on normally.

jaclaz

Link to comment
Share on other sites

@jaclaz

at the end of the XP installation, one of the first things I do is uninstall the firadisk driver from the hidden devices and delete its file from the system32\drivers folder to avoid any conflict with other drivers.

I did not expect that message to appear with freeldr, which does not appear with ntldr, although the registry is the same.

Link to comment
Share on other sites

@jaclaz

It is not enough to do the same copy methode with whole folder "config" in system32.

Still the message "Hive not found" appears in this case.

And the Win Defrag, contig.exe and Wincontig make a very bad job:

When you later make a test with for example contig.exe you see, that a lot of files are still fragmented(!).

But via my copy method of system32, you see only one block and ALL:thumbup files there in are contigous.

On the Reactos side they mentioned, that they also noticed this problem with "Hive not found" as a very strange thing, that happens also in Reactos Setup.

They think, that the entries in freeldr.ini are not exact the same as in Hive system.

This I thought before also. But you can set in freeldr.ini what ever you want, still the message "Hive not found" remains.

Newer versions of freeldr.sys cant boot via NTFS. It was very funny, how I come to this special Debug version of freeldr.sys.

On Twitter a guy from Reactos team told, that he makes a try with NTFS. I think, that he can do this only because of the leaked SP1 Source files.

And then I look in nightly builds for this Author. Not on any other places is noticed, that this freeldr.sys can boot XP.

I tested also freeldr.sys around this special build. No NTFS boot

Dietmar

 

Edited by Dietmar
Link to comment
Share on other sites

@Dietmar

So, putting together all the bits of info together, the "hive not found" is probably connected to the "overall fragmentation" of the whole filesystem, I imagine that there is somehow a "borked" implementation of NTFS reading routines with a cap (let's say a limited in size cache) to number of file fragments the can be counted, if a number of files are read before "reaching" the \system32\config\system AND if they are too fragmented THEN the loader fails.

This would also make sense if "plain" install (from original CD) works and "custom" install (like the one via "Ramsey integrator") doesn't, as - likely - the overall filesystem, and particularly the \system32\ contents will likely be more "compact" in the former.

Maybe just copying out the system32 and copying it back in (without defragging the system32less volume) would then be enough to allow booting.

@Andalu

Most probably, *somehow* a reference to firadisk.sys remains after uninstall/removal (whether it remains in one of the Registry backing files or *somewhere else* would be interesting to know).

Could it be something related to CurrentControlSet? Maybe ControlSet001 and ControlSet002 differ (related to firadisk.sys) and NTLDR gets the "right" one while freeldr.sys gets the "other" one.

Or maybe for some reasons it remains in some "special drivers needed for boot" list (only wild guesses, mind you).

jaclaz

 

 

Link to comment
Share on other sites

@jaclaz

freeldr displays the message "cannot load boot driver system32\drivers\firadisk.sys!" when the firadisk.sys file is no longer found in the system32\drivers folder even though references to it are still present in the registry.

I have noticed this behavior by moving firadisk.sys from the system32/drivers folder to system32 without first uninstalling it in Device Manager and without editing the registry to delete its references (in any case some of them cannot be removed in the normal way because blocked by the system).

Edited by Andalu
Link to comment
Share on other sites

  • 5 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...