chenall / grub4dos

外部命令和工具源码:https://github.com/chenall/grubutils 下载:
http://grub4dos.chenall.net
GNU General Public License v2.0
648 stars 136 forks source link

Request: grubinst.exe detection of Removable drive #42

Open steve6375 opened 9 years ago

steve6375 commented 9 years ago

It is very useful to know if a USB drive is of the Fixed-disk or Removable type (e.g. when booting Windows PE or Windows Install file). If a USB drive is of the Removable type, Windows will use a \AutoUnattend.xml file automatically (but not if the drive is of the Fixed-disk type) If a USB drive is of the Removable type, Windows will only be able to access the first partition of the USB drive. grub4dos cannot detect if a drive is of the Removable type or Fixed-disk type (RMB bit). Is it possible for grubinst.exe to set a bit or byte in the MBR or PBR grub4dos boot sector to indicate what type of drive it is? e.g. Removable = 1 (Removable) , 2 (Fixed-disk) or (xx=anything else=unknown)

It must be compatible with old versions of grub4dos MBR\PBR which should = (unknown).

Then the normal grub4dos menu code or batch code can look at the MBR\PBR and determine the type of USB drive. DavidB has suggested a scheme http://reboot.pro/topic/20238-improving-grubinst-and-grubinst-gui-in-windows-and-linux/page-9#entry190809

steve6375 commented 9 years ago

What would you suggest as a suitable place for the 'Removable' flag in both the MBR and PBR? We don't really want a fork of grubinst and grubinstGUI, so will you accept any changes that DavidB makes as the new source or comment on them please? Thanks!

DavidBrenner3 commented 9 years ago

Like I said on reboot, I think it's a good idea.

Sorry guys for insisting, but could you please at least talk about this?

Thank you.