Hello dear guest!

Boot Land is a community driven site established since 2006 and focused on data recovery/backup boot disks, research of Windows 2000/XP/2003/Vista/7 install/deployment/antivirus tools, customizing Windows PE systems and even learning how to recover from disaster situations.

How about joining our boot disk community? So do it. Life's short!

  - You get free access to our newsletter with all the interesting buzz about boot disks
  - We share publicity revenue with everyone who wishes to participate at the forums
  - Publicity is never, never, never displayed to members (along with many other cool things)
http://boot-land.net/register

8 Pages V   1 2 3 > »   
Reply to this topic
 Create universal flash boot disk with fbinst
Rating 4 V
post May 7 2009, 08:18 AM
Post #1
Bean123
Newbie   *
Group: Members

  Joined: 18-January 08
Posts: 29
Thank(s): 37


Hi,

Latest fbinst can be downloaded from gna:

http://download.gna.org/grubutil/

The tricky thing about flash boot disk is compatibility. There are three modes, HDD, ZIP and FDD, and different bios uses different disk parameter. Some bios support lba mode to access flash disk, some don't. Some of them even skips a certain number of sectors at the beginning of disk. It's difficult to create a flash disk that would work in all these circumstance.

This is what fbinst is for. I've come up with a special disk layout that works arond the various compatibility issue. Here are the steps to create an universal flash boot disk in Windows XP:

1. Insert the usb drive
fbinst would scratch the drive later, make sure to backup useful files.

2. List disk devices in system

Enter the following command in command prompt:

fbinst --list

The result may look something like this:
(hd0): 488392065 (233g)
(hd1): 3919860 (2g)

In this example, (hd1) is the flash disk

3. Format the usb drive

fbinst (hd1) format --force

WARNING: this step would destroy existing data in usb drive.

This would create the necessary disk layout, and add a single fat data partition. Remember to replace (hd1) with the actual device detected in step 2.

You can use the following options with format command:

--force
Without the --force option, fbinst only initializes the structure in mbr, leaving the data partition intact. However, this requires that the data partition is located at sector 0x3f00. Recommend to use --force once to create the necessary layout, then use format without --force when reinitialize is required.

--fat16
Format data partition as FAT16

--fat32
Format data partition as FAT32

--base NUM

Set base sector. In 1.2, the default value (63) works nicely, tt's not recommended to use other value.

--align
Optimize data storage in fat partition.

--size NUM
Set the size of fat partition, for example:

fbinst --size 500m (hd1) format

Without --size option, it uses all availble space in the flash disk.

--zip

Format flash as USB-ZIP. Please note that this option merely set some field in mbr to influence bios, however, different bios uses different algorithm to determine ZIP/HDD mode, so there is no guarantee which mode is detected by a certain bios.

I believe ZIP mode is more generic than HDD. Some bios can't boot from flash disk created with HDD mode. However, ZIP disk would be (fd0) at boot time, and the data partition is (fd0,0), some application can't handle this properly. To solve this, you can use grub4dos's map command to map (fd0) to (hd0).

Some bios use the MSWIN4.1 and FAT16 signature in the first data partition to determine ZIP mode. By reformatting the data partition as NTFS, you can change these two signatures and therefore trick the bios into using HDD mode.

4. Load grldr into mbr

fbinst (hd1) load c:/grldr

This commands store grldr to mbr, which would be loaded automatically on startup.

You can also use ntldr instead of grldr.

5. Other commands

You can use fbinst -h to display command usage.

* fbinst 1.3 update:

Support multiple boot entries and embedding data files in the 8m reserve area, you can also specify the size of reserve area.

To edit boot menu, use the following commands:

text TEXT
Add text item, it can be used to print header or footer information in the boot menu.

menu TEXT CSIP [KEY]
Add menu item, CSIP is the entry point. KEY is the hotkey, default value is the number key 1-9 for the first nine menu items. TEXT can be empty string "", which defines a hidden item. It's not showed in screen, but you can still boot in with the right hotkey.

load FILE ADDR
Add load item, load the content of FILE in memory address ADDR.The boot item must follow a menu item, and there can be more than one of them.

file FILE NAME
Add file item. It's used to add embedded file to the reserved area. The files can be access in grub4dos via the (ud) device.

clear
Clear all items.

For example, here is a steps to create a boot menu:
fbinst (hd1) text "Please select menu"
fbinst (hd1) menu "F1. grub4dos" 2000:0 F1
fbinst (hd1) load c:/grldr 0x20000
fbinst (hd1) menu "F2. grub2" 2000:0 F2
fbinst (hd1) load c:/g2ldr 0x20000
fbinst (hd1) text "---------"
fbinst (hd1) menu "F3. ntldr" 2000:0 F3
fbinst (hd1) load c:/ntldr 0x20000
fbinst (hd1) menu "" 2000:0 F4
fbinst (hd1) load c:/grldr_old 0x20000
fbinst (hd1) file c:/aa.img aa.img
fbinst (hd1) file c:/bb.img bb.img

There are two options that can be configured using config command:

default
The default menu item. The index starts with 0.

timeout
Timeout. If timeout is 0, it doesn't show the menu and boot default item directly. However, even with timeout=0, you can still force the menu to show by pressing ESC key at startup.

Here is the config samples:
fbinst (hd1) config --default 0
fbinst (hd1) config --timeout 5

fbinst 1.3 also allows you to customize the size of reserved area. The minimum size is 0x3f00, but you can set it higher. For example:

fbinst (hd1) format --reserve 10m --force

Without --force, format would try to create the necessary disk layout without scratching the partition table. But it requires that there is at least 0x3f00 sectors (about 8m) before the first partition. If reserved space is not enough, it just print an error message and quit. In this case, you don't need to use --reserve, as it would allocate all space before the first partition to reserve area by default.

And now there are two area for embedded data, one is sector 0-0x3f00, another is 0x3f00 to the end of reserved area. By default, it will fill the first area, when it's full, the file pointer is moved to the second area automatically, but you can also make the file pointer jump to second area with this:

fbinst (hd1) config --extended-data

One advantage of the second area is that it uses direct copy without inserting additional information, so you can use "map" instead of "map --mem" in grub4dos.

* grub4dos update
This version of grub4dos understands fb structure, it get disk geometry from fb instead of detect it again.

It also support virtual device (ud), which can be used to access the files embedded in reserved area using the file command in fbinst.

* grub4dos update
now support direct map on files in the extended area, find command can find files in (ud) device.

* fbinst 1.3 final
New command "restore", used to restore fb mbr scratched accidentally.

fbinst (hd1) restore

New command "export"
Export files

fbinst (hd1) export "aa.img" c:/aa.img

Download:
http://download.gna.org/grubutil/

Corresponding grub4dos:
http://nufans.net/grub4dos/grub4dos-0.4.4-2009-05-23.zip


16 user(s) said "Thank you!" to Bean123 for this fantastic post:
amalux, bugz, c.l, cdob, donando, fuwi, ilko, ktp, maanu, McR, Nuno Brito, online, soporific, tinybit, vmbray, wimb
+Quote Post
post May 7 2009, 09:03 AM
Post #2
maanu
Silver Member   ****
Group: Advanced user

  Joined: 31-October 08
Posts: 739
Thank(s): 89


Pakistan


so what i could understand is , it is some sort of triple boot thing ? i mean thats the only way AFAIK by which u can make ur usb more compatible ,No ?

on how many systems u have checked it ? and how would a noob like me ll know that how many sectors it missed when it boots ( in ur case 193)
+Quote Post
post May 7 2009, 09:19 AM
Post #3
was_jaclaz
Finder   ******
Group: Advanced user

  Joined: 14-July 06 From: Gone in the mist

Posts: 7,224
Thank(s): 547


Italy


QUOTE (maanu @ May 7 2009, 11:03 AM) *
so what i could understand is , it is some sort of triple boot thing ? i mean thats the only way AFAIK by which u can make ur usb more compatible ,No ?

See here:
http://www.boot-land.net/forums/index.php?showtopic=7507
http://www.boot-land.net/forums/index.php?...=5766&st=77

QUOTE (maanu @ May 7 2009, 11:03 AM) *
on how many systems u have checked it ?

That's reserved info, sorry. All it can be revealed is more than 1, less than 100. happy22.gif

QUOTE (maanu @ May 7 2009, 11:03 AM) *
and how would a noob like me ll know that how many sectors it missed when it boots ( in ur case 193)

by taking a leap forward, reading, trying to understand and learn and thus ceasing being a n00b? unsure.gif

roll1.gif

cheers.gif


jaclaz


--------------------
+Quote Post
post May 7 2009, 09:28 AM
Post #4
maanu
Silver Member   ****
Group: Advanced user

  Joined: 31-October 08
Posts: 739
Thank(s): 89


Pakistan


i understand u like to respond with " links " not words laugh.gif nvm

now , what i wanted to ask basically was , he said " universal " then how would a usb formatted with having 193 sectors in mind on that peticular bios will work UNIVERSALLY ?

and how is it differentiate with triple boot that tinybit suggested ? (although i already know about his post there "


and can i take ur recent defend as " universally bootable usb " is somehow possible now ? biggrin.gif

ps i would love to have reply from the original poster unless u'r using dupe account laugh.gif wink.gif
+Quote Post
post May 7 2009, 10:48 AM
Post #5
tinybit
Frequent Member   ***
Group: Developer

  Joined: 14-August 07
Posts: 404
Thank(s): 53


China


@maanu

you does not seem to have tried it.

just try it before you post, please.

It has proved(in the Chinese forum) to be much better on bootability than the usual boot-installers.

Note that it is a work in progress, and bugs may resides.
+Quote Post
post May 7 2009, 11:04 AM
Post #6
maanu
Silver Member   ****
Group: Advanced user

  Joined: 31-October 08
Posts: 739
Thank(s): 89


Pakistan


QUOTE (tinybit @ May 7 2009, 11:48 AM) *
@maanu

you does not seem to have tried it.

just try it before you post, please.

It has proved(in the Chinese forum) to be much better in bootability than the usual boot-installers.

Note that it is a work in progress, and bugs may resides.



yes i have not tried it yet (which i ll now ) , but im confused ,i dont understand the difference for as long as i could read between this one and ur recommendations u recently did about use triple MBR if there is error " missing mbr helper " .

also i have been looking around on chinese forums to understand the different techinques . but sadly google translate does not give me full grasp to understand it . but i downloaded some read-to-use pe's just for testing purposes . and they all have one thing common , cab compresses images to boot , and .wim app packages . and grub4dos as boot loader.

can u give the links to some chinese forums where things like this discussed, and is it developed by grub4dos team or not ? what is its home ? (talking about fbinst )

thank u so much tinybit for replying . biggrin.gif

edit :
it seems this is its home
http://translate.google.com.pk/translate?h...ficial%26sa%3DG

and i guess bean developed it...

edit 1 :

can somebody through some light on it (although bit off topic )

http://72.14.203.132/translate_c?hl=en&...tMsWo3edQi0qSYg

all i can understand ,is .it somehow integrated ntldr and ntdetect.com in one file . i cant find the register button there , can any1 get that file .plz ?
+Quote Post
post May 7 2009, 02:30 PM
Post #7
Bean123
Newbie   *
Group: Members

  Joined: 18-January 08
Posts: 29
Thank(s): 37


@maanu

It's not the same as triple MBR, the disk layout is new, which aims to solve the geometry detection problem, although it also means more space is reserved at the beginning of disk (about 8m).

193 is not the number of sectors per track, it's the number of boot sectors. Some bios skip the first few sectors. I make multiple copies of mbr so that it can boot from either one of them. Using this option won't cause regression on normal system.
1 user(s) said "Thank you!" to Bean123 for this fantastic post:
maanu
+Quote Post
post May 7 2009, 06:11 PM
Post #8
maanu
Silver Member   ****
Group: Advanced user

  Joined: 31-October 08
Posts: 739
Thank(s): 89


Pakistan


QUOTE (Bean123 @ May 7 2009, 02:30 PM) *
@maanu

It's not the same as triple MBR, the disk layout is new, which aims to solve the geometry detection problem, although it also means more space is reserved at the beginning of disk (about 8m).

193 is not the number of sectors per track, it's the number of boot sectors. Some bios skip the first few sectors. I make multiple copies of mbr so that it can boot from either one of them. Using this option won't cause regression on normal system.


bean so nice of u for replying .

8 mb issue was all over the original chinese topic , i could not understand even with google translate . but now everything is clear .

i ll test it as soon as my friend returns me my usb . hopefully soon .

ps can u plzz get me (us) that integrated ntldr and ntdetect.com file ? it is in the last link i posted ?

there is no way else then someone who is registered can get it.. sad.gif
+Quote Post
post May 7 2009, 07:06 PM
Post #9
Bean123
Newbie   *
Group: Members

  Joined: 18-January 08
Posts: 29
Thank(s): 37


QUOTE (maanu @ May 7 2009, 06:11 PM) *
bean so nice of u for replying .

8 mb issue was all over the original chinese topic , i could not understand even with google translate . but now everything is clear .

i ll test it as soon as my friend returns me my usb . hopefully soon .

ps can u plzz get me (us) that integrated ntldr and ntdetect.com file ? it is in the last link i posted ?

there is no way else then someone who is registered can get it.. sad.gif


here it is.
Attached File(s)
Attached File  ntldr.rar ( 162.07K ) Number of downloads: 200
 
3 user(s) said "Thank you!" to Bean123 for this fantastic post:
amalux, maanu, McR
+Quote Post
post May 7 2009, 07:14 PM
Post #10
maanu
Silver Member   ****
Group: Advanced user

  Joined: 31-October 08
Posts: 739
Thank(s): 89


Pakistan


thank u so very much bean ,. much appreciated .

i ll disturb u again if i ll need any thing from there laugh.gif cool.gif
+Quote Post

8 Pages V   1 2 3 > » 
Reply to this topic
1 User(s) are reading this topic ()


  

Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts Booting from Acronis Secure Zone
1 Frozen 100 Yesterday, 11:47 AM
Last post by: Wonko the Sane
No New Posts BOOT-Land, seems like a place to solve my boot problem..
Need to repair my XP MBR
1 Bob K. 124 Yesterday, 10:43 AM
Last post by: Wonko the Sane
No New Posts Boot CD for XP pro with USB Keyboard Support
6 petercherry 493 7th February 2010 - 06:04 PM
Last post by: Wonko the Sane
No new Topic has attachmentsCreate ISO_RAM (with grub4dos & WinVBlock)
Alternative method to BootSDI.script
14 acus 783 5th February 2010 - 05:07 AM
Last post by: acus
No New Posts Boot WDS and LTSP with pxelinux
2 awergh 291 4th February 2010 - 06:11 PM
Last post by: Icecube