USB Boot default, boot from HDD if not found

Started by Quzar, June 16, 2010, 00:13:07 AM

Previous topic - Next topic

Quzar

First off, thanks for this wonderful set of programs. I've used PLoP many times to enable usb or CD booting on systems lacking it.

Here is what I am currently attempting to do:
My system is an small format device running Windows XP Embedded. I would like to be able to periodically update this install via usb. Due to the nature of XPe, the best way to do this is to ghost a new image onto the machine. I have a usb pendrive set up that allows me to boot from it, and it will automatically run ghost (no intervention required!). The machine is able to boot from USB fine.

The only problem is that it is not possible to permanently set usb as the default boot device. Each time the usb device is inserted, one must go into the bios boot menu and move usb to the highest priority. What I would like very much to do is have plop run from windows (I already have that portion figured out and set up), default to boot from any attached USB storage device, and if none are found boot into Windows XPe.

I am able to set up the usb boot via "plpcfgbt stm=hidden cnt=on cntval=1 dbt=usb plpbt.bin" just as the configuration describes, but if no usb drive is detected plop hangs on error.

I believe that the proper way to do this may be to either use the 'installed' version, or through profiles, but documentation is lacking.

Thank you for any input you can provide.

Elmar

hi,
in simple word, its required to set a boot sequence in the boot manager. this is not available.

you said, that the bios has usb support. i assume, the bios provides access to the usb device as last hard disk when th usb drive is available and not set as boot device. so, you need a small program that checks the exist of the usb drive as last hard disk. if its available, then it should boot this drive. its not very difficult to write such a program, but maybe its possible to do the same with grub or grub4dos. you would be more flexible with grub/grub4dos if its possibe with them.

best regards
elmar

Quzar

Well, with plop set to usb default, it is able to boot a usb drive fine when attached, the problem is that if no usb drive is attached, it simply fails, whereas I want it to 'look for anything else'.

Thank you for your prompt reply, I will read up on GRUB and see if that better suites my needs.

Quzar

After a number of failed attempts I've settled with the following:

1) Installed grub4dos via grubinst.exe in windows XPe.
2) XPe's bootsector is not recognized properly by grub4dos, so grldr cannot be run from here. This is fine, and adds a bit of extra 'security' to the autoboot pendrive process.
3) Copy grldr and menu.lst onto whatever device is desired.
4) Have the following in menu.lst:


hiddenmenu
timeout 0
default 0

title USB
root (hd1,0)
chainloader (hd1,0)/io.sys


5a) When the pendrive is inserted, the new bootloader checks for gbldr and finds it on the pendrive. This loads up io.sys and starts the dos boot (here it would be preferable for grub to simply find the fact that the drive is bootable and boot it from the bootsector).
5b) When the pendrive is not inserted, no gbldr is found and grub loads the 'old' bootloader which goes to ntldr.

If you (or anyone else) can offer suggestions I'd greatly appreciate it. If not, here is at least a 'working' (though not ideal) solution.
This is all far from ideal, but seems to work fine and is only intended for a single device (to allow unattended/noninteractive machine ghosting).