Jump to content

Boot Grub4Dos From HDD To Any Bootable Image File On Another HDD


Recommended Posts

The others are seemingly fine, it is only the disk 0 that looks problematic from what I could observe.

The ID for the Extended Partition is 0x05 that means (if specifications are followed) "Hey, I am based on CHS addressing".

The CHS address is saying "Hey, the EMBR is on sector 16,434,498"

The LBA address is saying "Hey, the EMBR is on sector  29,543,538".

Windows NT's normally use LBA addresses, so if (as I presume) the EMBR is actually on sector 29,543,538, and from then on everything is correct, the volume inside the extended is normally accessible/mountable.

Grub4dos (or any other bootmanager) might look for the EMBR on sector 16,434,498, find it not, then try to find it via the LBA address and attempt to auto-correct internally the addreses/settings, and this could be the reason for the delay/issue (but not necessarily this is the actual cause, there may be other issue not detected till now).

You don't need to secure erase the disk, there is no real reason for that, it would take time and stress the disk with continuous writing. 

jaclaz

Link to comment
Share on other sites


Drive0 Partitions C and E

So can be done while XP3 is booted

Ensure all data of drive E is backed up

Using a Partition Manager

Delete Partition E

Create a new Partition E (4K NTFS)

Copy data back to Partition E
Link to comment
Share on other sites

I Have changed all the PC HDD Cables and replaced with another PSU to one with more wattage, old one had enough but to be sure.

Have checked all drives (not USBs) with MHDD scan in DOS all good this took time.

Tried again with Partition F on the IDE controller it still has an issue hanging at Boot to second menu with Grub4Dos but Partition D doesn't have still. I have left it with Partition D for now, but prefer Partition F drive to on the IDE controller. Still I am sure there is something not correct with Partition F as Partition D has no issues with it. I used to think it may also have been 4GB USB but tried that as a normal NTFS 4k boot and again as no boot extended. And just before posting this forum it was FAT32 that I tried. Seems it is Partition F hope the results may show that. And now more extensive with your Scripts used more detailed about all the drives.

Have downloaded a few tools you mentioned and your scripts for TinyHexerMBR. These results are all in the archive posted here.

 

The Archive Password I will PM to you.

Drives and USBs Results.rar

Link to comment
Share on other sites

Hmmm, I don't know.

Seemingly the HD0 is just fine (this should be the one you just re-partitoned).

The HD1, HD2 and HD4 have the same issues (or non-issues):

The Extended partition entry in the MBR points to sector 16065 (correctly represented as CHS 1/01/) first partition should normally be on 63=0/1/1 or, with the new MB alignment 2048=0/32/33, but it is perfectly possible that a whole head is reserved when making the Extended partitioning the first and only one.

The entry for the volume in the EMBR is not balanced, the sectors before are 63 (correct, same as in the bootsector)  that translates to 0/1/1, but the CHS entry is 1/1/1 (which corresponds to LBA 16128), this is IMHO strange, but it shouldn't be a problem.

The HD3 is mish-mash, the first partition has 2048 (0/32/33) which is a sign that the partitioning was made with MB alignment,  there is a hidden one head partition with ID21 (this could be the effect of using some USB related tools like RMPREPUSB), then there is a partition with ID0 (which for windows is a non-partition) that it is inside the extent of the first partition (this could be an effect of a grub4dos partnew command mapping an image, manually or by some "boot from iso/img" automation for some Linux distro).

The volume on HD4 has another issue:

Sec Per Clust: 128

(should be 8).

But is the slowness/need to issue [ geometry --lba1sector (130) ] now solved (changing cables/HD settings)?

about:

Quote

uuid instead of 5 partitons listed I see 6 and also 3 invalid partitions.

The grub4dos should see:

HD0=2 volumes/partitions
HD1=1 volume/partition
HD2=1 volume/partition
HD3=3 volumes/partitions
HD4=1 volume//partition

total of 8.

If instead of uuid you run:

geometry (hd0)
geometry (hd1)
etc.

you should be able to verify how many (and how many are seen as "invalid") volumes/partitions on each disk.

If my guess is correct, the invalid ones should be the volumes on HD1, HD2 and HD4 (3 in total because of the unbalanced CHS/LBA) but maybe they are counted differently.

jaclaz

Link to comment
Share on other sites

I have changed the drives back to how they were when we first started this is.

Drive0 is Drive0 Partitions C active boot and E (Internal IDE Controller)
Drive2 is Drive 1 Partition D (Internal IDE Controller)
Drive1 is Drive2 Partition F (PCI IDE Controller)
Drive3 is Partition G (Grub4Dos USB Drive)

I can post the Drives And USBs Results again if needed. The only difference likely will be only Drive1 and Drive2 are swapped and the Partition Letters remain the same

---



Testing with drive config as above

Grub4Dos (1st Boot Menu then Key press c and typed geometry (hd#)

These geometry results below are the same for 1st boot Menu and The Payload Menu

geometry (hd0)

Drive 0x80 (LBA): C/H/S=9729/255/63, Sector Count/Size=156296385/512
Partition Num: 0, Active, File System type is NTFS, Partition Type 0x07
Partition Num: 1, ......... File System type is NTFS, Partition Type 0x07


geometry (hd1)

Drive 0x81 (LBA): C/H/S=9729/255/63, Sector Count/Size=156296385/512
Partition Num: 4, ......... File System type is NTFS, Partition Type 0x07


geometry (hd2)

Drive 0x82 (LBA): C/H/S=30401/255/63, Sector Count/Size=488392065/512
Partition Num: 4, ......... File System type is NTFS, Partition Type 0x07


geometry (hd3)

Drive 0x83 (LBA): C/H/S=510/255/63, Sector Count/Size=8177148/512
Partition Num: 0, Active, File System type is NTFS, Partition Type 0x07
Partition Num: 1, ......... File System type is Unknown, Partition Type 0x21


A check to see if any other drives list with geometry (hd#). Found these all are ghosting the same geometry information as (hd3) all have Error 25 Disk Read Error

geometry (hd4)
geometry (hd5)
geometry (hd6)

Drive 0x83 (LBA): C/H/S=510/255/63, Sector Count/Size=8177148/512
Partition Num: 0, Active, File System type is NTFS, Partition Type 0x07
Partition Num: 1, ......... File System type is Unknown, Partition Type 0x21

Error 25 (https://grub4dos.chenall.net/e/25)
Disk Read Error


I Continued to check with geometry to see if any further drives found

geometry (hd7)

Error 21 (https://grub4dos.chenall.net/e/21)
Selected Disk Does Not Exist


geometry (hd8)

Error 21 (https://grub4dos.chenall.net/e/21)
Selected Disk Does Not Exist


-------


Find (1st Boot Menu then Key press c and typed find)


(hd0,0)
(hd0,4)
(hd1,4)
This is where it hangs for 1 minute with geometry --lba1sector (130) . Then reports the same line after 20 seconds more, then twice more each after 5 seconds. After 1min30secs continues with.
(hd2,4)
(hd3,0)
(hd3,1)
(hd3,3)



Find (Payload Menu then Key press c and typed find)


(hd3,0)
(hd0,0)
(hd0,4)
(hd1,4)
This is where it hangs for 1 minute with geometry --lba1sector (130) . Then reports the same line after 20 seconds more, then twice more each after 5 seconds. After 1min30secs continues with.
(hd2,4)
(hd3,1)
(hd3,3)


If type ls (hd3,1) Or type ls (hd3,3) both produce Error 25 Disk Read Error


-------


uuid (Key press c and typed uuid)

These geometry results below are the same for 1st boot Menu and The Payload Menu


(hd0,0)
(hd0,4)
(hd1,4)
(hd2,4)
(hd3,0)

They all list quickly but it hangs after listing (hd3,0) for 20 seconds then exits to grub>


---


I noticed an issue with Grub4Dos

I was looking around listing drives for example ls (hd0,0) a drive with many files it will list a page of files and folders. Then it will pause when screen is full and says similar to.

To stop Hit Q to Quit and any other key to continue listing.

Pressing q or Q does not stop the list and exit to grub> it keeps on listing the next screen of files and folders. There is no exit to grub> need to reboot PC


---


Is there a command to skip the geometry --lba1sector from showing and hanging, so no check is made for a selected drive or all drives. Where it is written in Grub4Dos boot menu.lst that for me is on partition C: And can be on command line in Grub4Dos.
Link to comment
Share on other sites

I am able to use an hex editor to change with the correct advice what to change. This would save a lot of time to backup current files of a drive re-prep and then copy files back. As I did for Partition E which took a while to do. My thinking is the worst Drive from what you have written Drive2 Partition F the one that also has an issue with Grub4Dos when it is n the IDE controller, the only drive that has an issue with the IDE controller.

Hex editor layout I have here the layout is like this offset (hex) 00 to 0F  With as below it would be easy to follow change Drive hex values to fix them. While ignoring not change any values at locations that have any XX XX XX XX these are there so easier to read  correct locations.


Drive1

OLD. 1920 XX AB

NEW 1920 XX A0

..

OLD. 2020 46 56 XX 36 02 03 41 XX XX XX XX A2

NEW 2020 56 76 XX 86 00 00 01 XX XX XX XX 02


Drive2

OLD. 7000 XX XX XX XX 07 B6 XX D5 XX XX XX C4
NEW 7000 XX XX XX XX 0A B7 XX DB XX XX XX C1


Of course the values would need checked they are correct and at the correct hex locations. This is what I think you were referring to earlier in the posts and would probably make things very easy and quicker than having to redo each drive manually with less wear on each drive.

I have done again Drives1 and Drive2 with your Tiny Hexer MBR scripts and again MBR_Backup script you can see what is actual now.

Is there a batch file that can be used tat will do the Tiny Hexer MBR from with Tiny Hexer MBR from Structure Viewer a script batch here to process all scripts of yours for open drive or all drives or External Batch for the same. Reason as When save first script all scripts there after have the same initial script name so lot of name editing is needed. And with many drives a lot of to and fro needed to gather them all.


Updated Archive Of drives now and drives that will remain as were when started this post topic. The Password I will PM you here.

Drives and USB Results 05 March 2022 (Disk1 D Disk2 F).rar

Link to comment
Share on other sites

I don't know, from your previous reports it seems that the "culprit" is the disk (hd2) or the volume (hd2,4) (the disk with 30401 cylinders), yet it doesn't seem from the partinfofw data to be in any way problematic (or at least not more problematic than the other disks). 

I am afraid I wasn't clear, you don't really need to "save from Tiny Hexer" the text or html of the view, the MBR_Backup makes a 1:1 (or dd-like) copy of the relevant sectors, with "appropriate" names and I can open them in Tiny Hexer and view them through the structure viewers

I am starting to suspect that there is some incompatibility between grub4dos and your PCI IDE controller.

Right now (question) if I get it right, the only disk that you "really-really" need is the disk 0, connected to the internal IDE controller, right?

And on that disk you have on C: a WIndows XP system that is bootable and on E: some data.

If the disk can boot (alone) to XP you can add to your boot.ini a line:

Quote

C:\grldr="Grub4Dos"

and copy to the C: volume the grldr file.

This should be able to boot (to grub4dos prompt) without any other disk connected.

Then try again to boot after having added the disk (the one with 30401 cylinders) only to the other on-board IDE.

Does the slowdown happen?

Then try again booting after having moved the second disk from the on-board IDE to the PCI controller.

Does the slowdown happen?

This way we remove from the equation the other disks and compare results for the same disk when differently connected.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

The PCI HDD controller works on all drives except Drive2 has issues as you say it is not correct so I will later re-partition as did with Drive1 (hd0,4) logical partition E which fixed that. So it will work with the PCI HDD controller. The PCI IDE controller works fine with Grub4Dos not an issue normally so long as the Drive partitioning is good. I guess this is the same for all HDD controllers.

Thanks for now I have plenty advice to read, try and do what you have written.

I will persevere with this as the scope for what is possible using Grub4Dos with HDD this way far outweighs for me what can be done with USB. For someone that doesn't use USB for portable between computers. As USB Flash is limited by writes but not reads I decided on HDD which for me is far more suitable faster and not limited the same. I think it is a shame that more is not written, for using Grub4Dos with HDD instead of USB. Grub4Dos not installed to MBR but using Grub4Dos with boot.ini and grldr, menu.lst in C;\ drive (or other Windows boot drive).
Link to comment
Share on other sites

Well, there is very little to write on the specific topic.

It simply works.

It is essentially an additional choice/possibility, personally I prefer (on USB as well as ln any other device) to use (if an XP or a 7 is involved) this approach, as it allows booting grub4dos without mingling with the MBR and following few sectors and because (though nowadays it is far less common) the grub4dos MBR code might have some incompatibilities with a given BIOS (making, whilst the MBR->PBR->NTLDR->BOOT.INI chain is more likely to be compatible (at least on not recent hardware) as *any* motherboard would have been booted to XP or 7.

The even lesser known fact is that the Windows 7 BOOTMGR (but not AFAICR later versions) parses the "old" XP BOOT.INI just fine for the entries that are NOT leading to a windows (i.e. NOT the (multi) ones), see here:

http://reboot.pro/index.php?showtopic=19730&page=2

https://msfn.org/board/topic/140412-release-siginets-plop-usb-boot-manager-installer/

So by adding or editing a simple text file you can add (or remove) the option to boot to grub4dos to both "normal" XP and 7 installs.  

jaclaz

 

 

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...