Jump to content











Photo
- - - - -

Change from USB-ZIP to USB-HDD by removing partition boot flag!?


  • Please log in to reply
10 replies to this topic

#1 Paulus

Paulus
  • Deactivated
  • 7 posts

Posted 06 June 2008 - 07:28 AM

I recently posted my experience in trying to boot from a WD external USB drive.
The HD booted in one PC, but not in another. I use grub4dos as boot manager in the MBR.

The PC that would not boot from this HD, recognised this HD as USB-ZIP. This is a
Dell Inspiron 531 with MCP61 motherboard and 1.09 Dell BIOS.

After some experimenting, I found some very mysterious and disturbing behaviour.

Having 4 partitions (as suggested by Jaclaz) did not solve my booting problem.

However when I removed the boot flag on ALL my partitions, suddenly the BIOS
recognised this device as a USB-HDD device! It then would start up grub4dos
from the MBR, which in turn will search all partitions for grldr, and booting continued
succesfully!

When I then turned on the boot flag again on a (FAT32) partition, the device was recognised
as USB-ZIP again. When further investigating, it turns out the BIOS does try to boot,
but it will boot from the Partition Boot Record (PBR) in the partition marked as bootable!
It will NOT execute code in the MBR.

When I installed grub4dos in the PBR too, I had the problem that grub4dos could not
find grldr, and thus would not succesfully boot.

Is it possibly to make a compatible setup with grub4dos both in MBR and PBR that actually
will boot the grldr?

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 06 June 2008 - 07:51 AM

VERY interesting report! :thumbup:

Why it does so remains a mistery to me. ;)

For the record, the original thread is here:
http://www.boot-land...?showtopic=4830

Does it does so whatever partition entry is used?

Or moving the partition address data to or from 4th entry in partition changes anything?

If the grldr.mbr installed in the MBR can load the grldr and it's menu.lst, with NO partitions flagged active, you actually do not "need" the PBR at all.

You can try to either:
1) "skip" the PBR alltogether, by rooting to a drive and chainloading directly the system file:
find --set-root /NTLDR
chainloader /NTLDR
or
find --set-root /IO.SYS
chainloader /IO.SYS
2) use the the "makeactive" directory to change boot flag for the partition after first booting
3) experiment with two newish features of grub4dos, "--in-situ" and "partnew" commands
http://www.boot-land...opic=3287&st=50
http://www.911cd.net...showtopic=21562

I would be interested in seeing your MBR and boot records.

Would it be possible that the BIOS of that machine somehow, if it finds not any "80" (boot flag) in the partition tables defaults to chainload CHS 0/0/1 (PBR of first partition on geometry nx255x63)?

But if it does so, how is the grldr.mbr loaded? :thumbup:

Which exact version of grub4dos are you using/testing?

jaclaz

#3 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 06 June 2008 - 08:26 AM

I recently posted my experience in trying to boot from a WD external USB drive.
The HD booted in one PC, but not in another. I use grub4dos as boot manager in the MBR.

The PC that would not boot from this HD, recognised this HD as USB-ZIP. This is a
Dell Inspiron 531 with MCP61 motherboard and 1.09 Dell BIOS.

After some experimenting, I found some very mysterious and disturbing behaviour.

Having 4 partitions (as suggested by Jaclaz) did not solve my booting problem.

However when I removed the boot flag on ALL my partitions, suddenly the BIOS
recognised this device as a USB-HDD device! It then would start up grub4dos
from the MBR, which in turn will search all partitions for grldr, and booting continued
succesfully!

When I then turned on the boot flag again on a (FAT32) partition, the device was recognised
as USB-ZIP again. When further investigating, it turns out the BIOS does try to boot,
but it will boot from the Partition Boot Record (PBR) in the partition marked as bootable!
It will NOT execute code in the MBR.

When I installed grub4dos in the PBR too, I had the problem that grub4dos could not
find grldr, and thus would not succesfully boot.


Thank you for telling us the interesting/strange behavior/story of the BIOS.

Is it possibly to make a compatible setup with grub4dos both in MBR and PBR that actually
will boot the grldr?


Yes, it is. You may first try to install a DOS on the partition. Make sure the DOS can boot normally. Then, at the DOS prompt, run this command

bootlace.com  --floppy  --chs  0x00

This will install GRLDR's boot record on the boot sector of the floppy (fd0). The 0x00 stands for the BIOS drive number for (fd0). Note that your USB-ZIP drive is supposed to be recognized as floppy (fd0).

At last, copy grldr into the root dir of the floppy (fd0), and reboot.

#4 Paulus

Paulus
  • Deactivated
  • 7 posts

Posted 06 June 2008 - 11:16 AM

Does it does so whatever partition entry is used?


Looking back, it does this both for the 3rd and 4th partition entry. I have no reason to believe
that it will work differently for the 1st and 2nd entries.

Or moving the partition address data to or from 4th entry in partition changes anything?


I do not entirely grasp your meaning here, but I did not actually do any partition editing. I just deleted
my 3rd partition, and made 2 new partitions in place. I did not change anything else in the MBR.

Just after this, I used breeblebox to toggle the partition's boot flag, with the reported result.


If the grldr.mbr installed in the MBR can load the grldr and it's menu.lst, with NO partitions flagged active, you actually do not "need" the PBR at all.


Technically, yes, if only I was using grub4dos in all cases. Strictly speaking however, the BIOS should not skip
the MBR. But now that it does, I want to have a solution that works also with a proper PBR in place.

I would be interested in seeing your MBR and boot records.


I will send them to you later.

Would it be possible that the BIOS of that machine somehow, if it finds not any "80" (boot flag) in the partition tables defaults to chainload CHS 0/0/1 (PBR of first partition on geometry nx255x63)?

But if it does so, how is the grldr.mbr loaded? ;)


No! I only have grub4dos in the MBR and in the active FAT32 partition. Other partitions do not have grub4dos
and are ntfs, extended and raw. I know for certain that the PBR of these partitions do not get executed in
any case mentioned in my report.

When NO boot flag is present, the disk is seen as USB-HDD and the MBR will be executed. Hence this will work
as a normal disk. However, this gives problems when using a standard MBR, because it does not know which partition
to boot from (which one is active) once MBR code is executed.

When a boot flag is present, the disk is seen as USB-ZIP, the MBR is NOT executed, but the PBR
of the active/bootable partition is executed. However, when installing grub4dos in the PBR of a FAT32
partition made active, it does NOT find the grldr file (although it is present). So apparently, something is amiss.
How can I repair it in such a way that in *this case* the grldr file is found.

Which exact version of grub4dos are you using/testing?


Latest stable version (2nd may 2008)

#5 Paulus

Paulus
  • Deactivated
  • 7 posts

Posted 06 June 2008 - 11:24 AM

You may first try to install a DOS on the partition. Make sure the DOS can boot normally. Then, at the DOS prompt, run this command

bootlace.com  --floppy  --chs  0x00

This will install GRLDR's boot record on the boot sector of the floppy (fd0). The 0x00 stands for the BIOS drive number for (fd0). Note that your USB-ZIP drive is supposed to be recognized as floppy (fd0).

At last, copy grldr into the root dir of the floppy (fd0), and reboot.


Hi Tinybit, thanks for your reply.

I did use grubinst for Windows (the ..._gui.exe) (because I have no DOS available).
It works fine for the MBR. I also used it to install the PBR.
In that case it could not find grldr.

What I understand from the documentation, bootlace should do about the same as grubinst, correct?
Or is grubinst maybe broken for installing in the PBR?

#6 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 06 June 2008 - 01:57 PM

Hi Tinybit, thanks for your reply.

I did use grubinst for Windows (the ..._gui.exe) (because I have no DOS available).
It works fine for the MBR. I also used it to install the PBR.
In that case it could not find grldr.

What I understand from the documentation, bootlace should do about the same as grubinst, correct?
Or is grubinst maybe broken for installing in the PBR?


In the old days DOS was the de facto standard. Even now it is still considered as the de facto standard and all BIOSes seem to be able to boot into DOS in one way or the other. If DOS cannot be booted, then we would know/confirm there is something wrong with the BIOS.

Where is your grldr, by the way? And what is the error message displayed on the screen?

Note the grldr should be placed in the root dir of the active partition(with grldr boot record installed on its boot sector), or else grldr will not be found.

Generally grubinst and bootlace work in the same way. But there are some minor differences between them. Any way, try to boot DOS and see if we could find out something new.

#7 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 06 June 2008 - 02:17 PM

There are several sources for getting DOS.

Look here:
http://www.freedos.org/
http://www.bootdisk.com/

;)

#8 Seifer

Seifer
  • Members
  • 8 posts
  •  
    Turkey

Posted 16 June 2010 - 04:07 PM

One of my usb drive (Toshiba Transmemory 16GB pen drive) started to show as usb-zip0 in bios. and eventually i can not boot from it anymore. i ve read this topic but still could not change my usb drive back to usb-hdd. How can i change it back?
i have used hp format utility and normal windows format.

#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 16 June 2010 - 05:50 PM

i have used hp format utility and normal windows format.

Try using first thing RMPREPUSB (NOT selecting USB-ZIP ;)):
http://www.boot-land...?showtopic=9460
http://www.boot-land...?showtopic=7739

:thumbup:
Wonko

#10 steve6375

steve6375

    Platinum Member

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

Posted 16 June 2010 - 07:02 PM

Hi,
From experience with some very dodgy BIOSes, I can say this when experimenting - ALWAYS switch off the PC and switch it on again whenever you change the USB PBR or MBR! I have seen BIOSes which detect the 'type' of USB device on a cold boot (switch on) but do NOT redetect the type of device (e.g ZIP or HDD) on a warm reboot. After DAYS !!! of pulling my hair out I discovered this!

By definition, a BIOS that treats a USB storage device as a USB-ZIP device will boot directly to the PBR (no MBR executed). See the explanation in the PDF of RMPrepUSB for more details. When the BIOS loads the PBR code and jumps to it, the USB device will respond to BIOS calls via the floppy Int 13h routines, so any code you have must expect to find files on a floppy drive. However, to fix this you could try swapping the mapping around in the menu.lst - maybe something like (untested!) ...

#MAP REAL HDD AS ANOTHER HDD
map (hd0) (hd32)
#MAP FDD (actually our USB drive) as first hd ptn
map (fd0) (hd0,0)+1
map --hook
#ADJUST number of disks to suit system (assume only one HDD and one USB drive in system and no floppy disk drive)
map --floppies=0
map --harddrives=2
# now use chainloader etc to boot to boot file here...


HTH
Steve

#11 Seifer

Seifer
  • Members
  • 8 posts
  •  
    Turkey

Posted 16 June 2010 - 07:19 PM

thank you Wonko the Sane and steve6375 for your answers.

RMPREPUSB successfully changed the boot flag to usb-hdd.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users