Booting entry on HD0 modifies MBR on HD1

User discussion and information resource forum for BootIt Bare Metal and BootIt UEFI
Post Reply
SelfRef
Posts: 4
Joined: Wed Jun 19, 2024 11:26 pm
Location: Poland
Contact:

Booting entry on HD0 modifies MBR on HD1

Post by SelfRef »

Context:

I have prepared a workstation that contains Pentium 4-based PC with native SATA and IDE interfaces. The system HDD is connected to SATA and has BootIt installed along with MS-DOS, Windows XP and Arch Linux. The IDE ribbon is connected to a removable bay (mobile rack) that allows to insert any IDE HDD from outside the case. I'm using this PC mostly for backup old hard drives (using ddrescue) that do not support LBA addressing (thus won't work with IDE-USB adapters).

Issue:

I noticed that when I connect a second drive in removable bay (HD1) and boot into any OS from system drive (HD0), BootIt is modifying MBR table on HD1, even if it's not supposed to. This gives me a headache because old systems like DOS are very sensitive to such changes and I have absurd situations like this:

1. I have an old PC like 486 with MS-DOS
2. I put its HDD in removable bay and turn on workstation
3. The HD1 is visible in Partition Work window with original MBR table
4. I boot any OS from HD0, for example MS-DOS or Linux
5. I reboot to BootIt again
6. Now I can see the MBR table of HD1 is altered with different CHS values
7. When I put HDD back in old PC, OS will often not boot because geometry of partitions is changed

Solution:

I want to prevent BootIt to modify in any way MBR on HD1 during booting. I need to be able to boot to Linux and make a raw copy with dd/ddrescue. There are no entries that use anything but HD0. I read the manual and checked multiple different settings like disabling geometry, and I didn't find the correct way to fix it.

Any help would be welcome.

You can see a example - the changed Cylinders value of partition on HD1. This change happen only by booting OS from HD0.
Before boot
Before boot
1.jpg (245.02 KiB) Viewed 1301 times
After boot
After boot
2.jpg (244.02 KiB) Viewed 1301 times
TeraByte Support
Posts: 3688
Joined: Thu May 05, 2011 10:37 pm

Re: Booting entry on HD0 modifies MBR on HD1

Post by TeraByte Support »

The ending head/sector is what may affect the system changing the geometry. The second form looks correct (174,000 sectors / 170 = 1023 - 1 = 1022), but if you want it to ignore a hard drive, there is an option when setting up a boot item under "MBR Details", highlight the drive and click the ignore button, save changes.
SelfRef
Posts: 4
Joined: Wed Jun 19, 2024 11:26 pm
Location: Poland
Contact:

Re: Booting entry on HD0 modifies MBR on HD1

Post by SelfRef »

Thank you for the response.

Yes - the "fixed" ending Cylinders number is technically correct for this drive, however the original PC where HDD's from often use different geometry and sadly my Pentium 4 PC has limited BIOS and I cannot set the same values.

In case of the above example, the original PC had wrong geometry set up - 1024/10/17 and should be 1024/14/17 and this is especially annoying to find, but this is how someone formatted the drive and the only I'm trying to do is to create a 1:1 image without altering the data.

And about the Ignore drive method in boot entry - that works as solution, totally forgot about that option :)
With only one caveat - BootIt saves that setting for a specific HD1 and when I replace it with a different one, I have to set Ignore again (I can live with that).


I recently also started using Image for DOS and it's really wonderful backup software, but if I may suggest something - it would be perfect if Image could create "raw images" like ones Linux's dd/ddrescue create. I saw it can create TBI image with unused sectors/no compression which in theory is raw disk image, but it isn't compatible with software that operates on raw images (like pcem, 86box, fdisk, mount, etc.). Or at least a tool for converting such image to raw img would be fine - then I probably wouldn't need to boot Linux at all, only to use ddrescue.
TeraByte Support
Posts: 3688
Joined: Thu May 05, 2011 10:37 pm

Re: Booting entry on HD0 modifies MBR on HD1

Post by TeraByte Support »

If you're using signatures to match drives then it would be specific for that drive signature, otherwise it would simply be the HD number.

You can copy a drive to a virtual (raw) hard drive of whatever name you want, add a virtual hard drive, for the type use raw and not the normal .vhd, vdi, .vhdx, .vmdk Once the copy is done you'll have a raw file (if you don't included unused sectors, they will be zero in the target).
SelfRef
Posts: 4
Joined: Wed Jun 19, 2024 11:26 pm
Location: Poland
Contact:

Re: Booting entry on HD0 modifies MBR on HD1

Post by SelfRef »

TeraByte Support wrote: Thu Jun 20, 2024 6:28 pm You can copy a drive to a virtual (raw) hard drive of whatever name you want, add a virtual hard drive, for the type use raw and not the normal .vhd, vdi, .vhdx, .vmdk Once the copy is done you'll have a raw file (if you don't included unused sectors, they will be zero in the target).
Oh, I didn't know Image can do that. I'll definitely try that one. Thanks :)
SelfRef
Posts: 4
Joined: Wed Jun 19, 2024 11:26 pm
Location: Poland
Contact:

Re: Booting entry on HD0 modifies MBR on HD1

Post by SelfRef »

I tested some options related with copying hard drive to image (using Copy function, not Backup). And from what I see, copying to .raw image does not work for some reason? I even tried to install fresh MS-DOS 6.22, put Image for DOS with it and run from there but same thing.

1.jpg
1.jpg (63.29 KiB) Viewed 790 times

But after that I tried copying drive to .vhd image and it works well. I would even say using fixed .vhd format is more convenient because it's still well recognized by 86Box and can be mounted in Linux.

2.jpg
2.jpg (94.83 KiB) Viewed 790 times

At this moment, the only thing I think could be added is filling the virtual drive size automatically during creating to the size of cloned drive. When using Copy function the source size is known so the size of vdrive could be already set to 1:1 of the source by default, right? That would be very handy ;)

4.jpg
4.jpg (90.47 KiB) Viewed 790 times
Post Reply