Help - Search - Members - Calendar
Full Version: Usb-stick Won't Boot
The CD Forum > Bart's PE Builder > Troubleshooting
TERRYHOAX
It's perhaps not the right forum, but here are the most specialist that knows everything about USB booting - so please forgive me.

I recognized that my USB-Stick with BartPE boots fine on my new Laptop Clevo 570U (Phoenix Bios), but if I try to format it for Dos-Boot (with the Hp Tool, version 2.1.8 and 2.0.6 tested) than the stick won't boot the system on the new Notebook - it hangs.
On my other Notebook it works without a problem.
I was trying to setup a multiboot on the USB-Stick, but first I have to find a solution why this won't work.

Anybody a hint or knows another tool I can give a try?
Ed_P
With my PNY USB stick which booted fine on my desktop pcs it failed on my Dell notebook until I formated it with PEtoUSB with the LBA option turned on. It still boots on the desktops and now with the notebook also. Whether that will help with your DOS boot I don't know. But have you heard of GRUB4DOS? biggrin.gif

Something else to try. smile.gif

And this section of the forum is perfect for this question. wink.gif
TERRYHOAX
Normally I use PEtoUSB 3.0.0.8 for copying my PE installation to the USB-Stick and the HP-Tool for the Dos-Boot to another stick.

In Readme.txt of PEtoUSB:
"PeToUSB does not make the device DOS bootable, it makes it 'XP'
bootable (ie: the bootstrap code will look for NTLDR)."

Nice hint with the LBA!
I also tried this tool here "BootFlashDOS" but it won't detect my sticks... argh...
http://codebeetle.com/page.php?al=bootflashdos


Another problem i found is:
If I try to partitioned the greater stick with 1 GB:
100 MB for Dos
900 MB for BartPE
(I am using the Hitachi Microdive drivers for the stick)
PEtoUSB only detects the first partition...

Grub4Dos should be a further step following here
http://www.msfn.org/board/index.php?showtopic=69211&hl=


But first I must get a working Dos-Boot with my USB-Stick and I don't know how?
Is there another tool with the LBA-Option?
jaclaz
As a few people already found out on their own experience, the problem is not in the stick or in the way it is formatted, but rather in how the motherboard BIOS "sees" it.

If you can get the stick to boot with PeToUSB there is no problem, you just add to it grldr (from Grub4DOS) NTLDR and a boot.ini pointing to grldr and you are set
See this:
http://www.911cd.net/forums//index.php?sho...mp;#entry121721
or you can directly copy to the stick grldr renamed as NTLDR, see here:
http://www.911cd.net/forums//index.php?showtopic=18031


Though I think that the problem might be in the actual MBR.

The only thing that you can try that gives you the most "probabilities" (nothing is "certain" in this) is using the makebootfat "special" bootsector.
Read these:
http://www.911cd.net/forums//index.php?showtopic=18167
http://www.911cd.net/forums//index.php?showtopic=18266
http://www.911cd.net/forums//index.php?showtopic=17191
and threads therein referenced, try my "manual" ways.

Also have a look at the problem sangin reported here:
http://www.911cd.net/forums//index.php?sho...181&st=1877

jaclaz
TERRYHOAX
I am using the Hitachi Microdive drivers for the stick in XP-OS.
I tried the following:

1. make 2 prime partitions

first 100MB for Dos
seccond 900 MB for BartPE

2. Then manually copied:
-NTLDR
-NTDETECT.COM
-BOOT.INI

boot.ini added the line:
C:\grldr="Grub4Dos"

from grub_for_dos-0.4.2pre11.zip I add these files:
-grldr
-menu.lst

menu.lst
----------
CODE
timeout 30
color=white/blue

title Dos Utils
unhide (hd0,0)
hide (hd0,1)
rootnoverify (hd0,0)
chainloader +1
makeactive
boot

title BartPE
hide (hd0,0)
unhide (hd0,1)
rootnoverify (hd0,1)
chainloader +1
makeactive
boot



3. Then I copied to "Dos" the full (old) USB-Stick with Dos system and programs

-io.sys
-msdos.sys
-command.com
....

4. copied to the other partition my Bartpe
-> minint etc.


5. Boot the stick

-> Boot-menu appears

-> Error 31 disk write error

Then I go with "C" into the console:

with these lines I can boot Bartpe manually without problems:

CODE
chainloader (hd0,1)/NTLDR
boot


If I modify the menu.lst like this... the same error appears as above

If I try to boot Dos in the Grub console with:

CODE
chainloader (hd0,0)/io.sys
boot


the boot-menu appears from Dos, but I can't boot - nothing happens.

Okay, it's like some kind of naive, but I gave my best.

What I made wrong and is there a way to succeed - especially to boot the Dos-partition?

Thank you for guidance !
Ed_P
Well I don't have an answer but I do see somethings that may help.

Your menu.lst commands are hiding and unhiding the two partitions. Don't know why but it's what those commands do.

The commands you are using to boot with are not in the menu.lst. And since they work for BartPE why aren't they in the menu.lst?

It's possible the command you're trying to boot DOS with is being directed to the partition after it has been hidden by the commands in the menu.lst.
jaclaz
@Ed_P
Hiding the second primary partition is actually theoretically correct for booting DOS, but, if I recall correctly, there is no need to actually hide it, it should just be ignored by DOS/Win9x.

@TERRYHOAX
QUOTE
-> Error 31 disk write error


This error is most probably caused by the
CODE
makeactive


or by the
CODE
unhide (hd0,0)
hide (hd0,1)


it seems like it cannot write to disk, it is possible that this is a limitation of the motherboard implementation of USB or that of Grub4DOS.

Besides there is an error in your menu.lst, the "boot" directive is not needed in menu.lst.

I still do not see the need to have such a complex setup, you can put dos and BartPE files together on the (one and only) primary partitions with no problems, but if you want to go on with your setup you have to try solving the problem as follows:
1) Enter the Grub4Dos menu and without choosing any of the two entries, go to command prompt
2) Enter commands one by one until you find which one generates the "Error 31"
3) Continue entering commands one by one and see if the error is generated again
4) Modify the menu.lst entry taking out the command(s) that give the error
5) Substitute the "rootnoverify" directive with the "root" one, as the latter actually checks the filesystem and is a little more "verbose" it can help to troubleshoot the problem.


It is also possible that for any reason, the DOS system files are not properly written to the stick, to make sure you should not "copy" them but rather "sys" them.

To do so, easier thing, now that you have Grldr more or less working, is to use it to boot a DOS floppy image, as hinted here:
http://www.911cd.net/forums//index.php?s=&...st&p=112780

and see if from the image you can see the USB stick, otherwise you will need to make a USB capable DOS floppy, this is a good base for it:
http://johnson.tmfc.net/dos/usbdrv.html

Otherwise you can re-format the stick with the HP Format utility, telling it to put DOS files on it, see my FAQ:
http://home.graffiti.net/jaclaz:graffiti.n...SB/USBfaqs.html

make sure that plain DOS works, then use a partition resizing utility to create the other partition.

jaclaz
cdob
A working example for comparing:
I'm using a USB Stick, FAT32 formated, one partition and grub4dos.
BartPE and DOS does boot.
CODE
title /minint/SETUPLDR.BIN
chainloader /minint/SETUPLDR.BIN

title DOS (IO.SYS)
chainloader /IO.SYS

But as always at USB booting, another BIOS may get another results.
TERRYHOAX
Okay now it boots correct, but there's now a problem in Dos:

I boot a floppy-image dos.ima but if I choose a program to boot it can't find the files...

normally you have in the root the bootfiles in the dir "Bootcd" the program files.

my menu.lst looks like this

CODE
color=white/blue
timeout 10
default /default

title BartPE
chainloader /ntldr
savedefault --wait=2

title DOS
map --mem /dos.ima (fd0)
map --hook
chainloader (fd0)+1
root (fd0)
savedefault --wait=2

title commandline
savedefault --wait=2
commandline

title back to dos
savedefault --wait=2
quit

title reboot
savedefault --wait=2
reboot



The steps I made:
1. I make one prime partition of the usb-stick
2. I format & installed with PEtoUSB my BartPE files to stick
3. Then I installed Wingrub with boot from mbr
4. I modified in /Grub the menu.lst as above
5. I copied these files to the stick (from grub4dos)
CODE
grldr
bootlace.com

6. The I copied my Dos Boot-CD files to stick
/BootCd
7. Then I copied the extracted Dos.ima to stick
The dos.ima has exact all files of the root-dir of my other usb-stick
8. write protect the stick

The problem must be that the image works as a floppy drive and is separated from the files on the usb-stick.

What I made wrong here and how I can fix it?
cdob
QUOTE
I boot a floppy-image dos.ima but if I choose a program to boot it can't find the files...
Do you have a example?
Which program do you run inside floppy image?
Ed_P
QUOTE (TERRYHOAX @ Oct 31 2006, 01:47 PM) *
Okay now it boots correct, but there's now a problem in Dos:

I boot a floppy-image dos.ima but if I choose a program to boot it can't find the files...

Were the missing files on the floppy that you created the ima with? Where are the programs the DOS floppy is trying to run? On the CD? The hd?

QUOTE (TERRYHOAX @ Oct 31 2006, 01:47 PM) *
my menu.lst looks like this

CODE
color=white/blue
timeout 10
default /default

title BartPE
chainloader /ntldr
savedefault --wait=2

The default parm on my menu is set to 0 (default 0) which indicates the 1st menu item. What does default /default do? And savedefault? I've never heard of it.
TERRYHOAX
QUOTE (cdob @ Oct 31 2006, 11:22 PM) *
Do you have a example?
Which program do you run inside floppy image?

my little usb-stick works fine, but without the image:
in the root are the dos-system files and the dos.ima
in the dir bootcd are the program-files for dos
the Image must be boots different as I boot with io.sys directly from usb-stick.
But the stick is formatted with windows file-system and not with hp-tool for dos-boot, so i can't boot io.sys directly.


QUOTE (Ed_P @ Nov 1 2006, 12:08 AM) *
Were the missing files on the floppy that you created the ima with? Where are the programs the DOS floppy is trying to run? On the CD? The hd?
The default parm on my menu is set to 0 (default 0) which indicates the 1st menu item. What does default /default do? And savedefault? I've never heard of it.


the /default i copied from the grub4dos menu.lst
cdob
QUOTE
But the stick is formatted with windows file-system and not with hp-tool for dos-boot, so i can't boot io.sys directly.
Which file system do you use?
There is FAT12 (floppy), FAT aka FAT16, FAT32 and NTFS.
'chainloader /IO.SYS' works at FAT12, FAT16 and FAT32.

Most likely it's not the file-system.
Try format again, but copy DOS files first.

And remember case, IO.SYS is not io.sys.
Try uppercasing DOS boot files.

Which DOS version do you like to boot?


The dos.ima solution dosn't know the USB stick.
DOS can't access a USB stick by default.
You have to include DOS USB drivers in dos.ima.

That's contrary to grub4dos 'chainloader /IO.SYS'.
DOS dosn't access a USB stick, DOS access a kind of hard disk.
TERRYHOAX
@cdob
Thank you for your hints!
I format it Fat16. The Ima contains all drivers and is Dos7. The problem must lay here

CODE
title DOS
map --mem /dos.ima (fd0)
map --hook
chainloader (fd0)+1
root (fd0)
savedefault --wait=2


You directly boot dos with io.sys
You wrote that you format the stick as fat32.
Directly with Format in Windows?
and then you copy the Dos files - the complete Dos Bootcd - to the stick?
Then you copy the BartPE files to the stick?


Edit1:
I am trying now version 1) from here
http://www.911cd.net/forums//index.php?sho...mp;#entry112780

Is my installation of (Win)Grub okay?
CODE
- I installed Wingrub with boot from mbr
- I modified in /Grub the menu.lst as above
- I copied these files to the stick (from grub4dos)
grldr
bootlace.com


Menu.lst
--------
CODE
color=white/blue
timeout 10
default 0

title DOS
chainloader /Io.sys

title BartPE
chainloader /ntldr
jaclaz
@Ed_P
The default /savedefault is a newish feature of Grub4dos to "remember" and set as default next time you boot last item booted, it only affects which entry is highlighted next time you boot.

@TERRYHOAX
Hey, why don't we go on with a somewhat minimal "order" instead of trying everytime a new "semi-random" attempt? blink.gif

As I already posted and cdob too, you need DOS USB drivers to access the stick from DOS, IF DOS was not booted directly from the stick.

The procedure is to first thing make the stick bootable under DOS, and later add Grub4dos and BartPE.

Do use the HP format utility using DOS files, as in my FAQ's ( #4), DO NOT DO ANYTHING MORE, and see if you can boot DOS directly.

jaclaz
TERRYHOAX
QUOTE (jaclaz @ Nov 1 2006, 11:53 AM) *
@Ed_P
The default /savedefault is a newish feature of Grub4dos to "remember" and set as default next time you boot last item booted, it only affects which entry is highlighted next time you boot.

@TERRYHOAX
Hey, why don't we go on with a somewhat minimal "order" instead of trying everytime a new "semi-random" attempt? blink.gif

As I already posted and cdob too, you need DOS USB drivers to access the stick from DOS, IF DOS was not booted directly from the stick.

The procedure is to first thing make the stick bootable under DOS, and later add Grub4dos and BartPE.

Do use the HP format utility using DOS files, as in my FAQ's ( #4), DO NOT DO ANYTHING MORE, and see if you can boot DOS directly.

jaclaz


Thank you for your guidance. I was lost... smile.gif

I format the stick like here (quoting from your faq #4)
http://www.bay-wolf.com/usbmemstick.htm

I only copied the dos-files and try to boot from usb-stick.
It doesen't work: nothing happens. the stick tried to boot and hangs.

So I need USB-Drivers?
http://johnson.tmfc.net/dos/usbdrv.html
i don't have a floppy...

by the way in my dos.ima is this file
usb_aspi.cab
I think these are USB-Drivers?

When I boot with the Dos.ima everything went okay, but when there are "loading CDRom Drivers" came an error " no bootfiles found"

What now?
jaclaz
I begin thinking that there is a communication problem....

When I say
QUOTE
Do use the HP format utility using DOS files, as in my FAQ's ( #4), DO NOT DO ANYTHING MORE, and see if you can boot DOS directly.
It does NOT mean copy DOS files to it before trying to boot it, you should supply DOS files to the HP Format Utility.

If you tried using FAT32, try again using FAT16, go through the troubleshooting steps in FAQ #10.

QUOTE
So I need USB-Drivers?
http://johnson.tmfc.net/dos/usbdrv.html
i don't have a floppy...

Actually, NO, you DO NOT NEED usb drivers if you boot FROM the USB device.
On the contrary, you NEED them if you boot from another device.
And you don't need a floppy, if you are able to boot through Grub4DOS a floppy image, THAT image must contain USB drivers to access the stick.

IF you don't succeed following the above, don't worry, we can still use a virtual machine like QEMU to solve the problem.

Quick tutorial:
1) Download Qemu manager from here:
http://www.davereyn.co.uk/
http://www.davereyn.co.uk/download.htm
you want the package "Qemu Manager Version 3.0 For Windows (October 2006) With QEMU 0.8.2 and KQEMU support"
http://www.davereyn.co.uk/qem/setupqemuk30.exe
and install it
2) Download Roadkil's Diskimage here:
http://www.roadkil.net/DiskImg.html
and use it to ake an image of the stick on your hard disk
3) Start Qemu manager, make a new virtual machine setting the freshly made stick image as first "hard disk C:" (hda) and a good, working Win98 installation floppy image as "floppy disk A:" (fda) and check the checkbox boot from floppy
4) Boot the VM and once it has booted from floppy, use FDISK on the virtual hard disk drive to make a new DOS primary partition, set it as active.
5) Re-boot the VM and once it has booted from floppy, use FORMAT C: /S to format it transferring to it the DOS system files
6) Shutdown the VM, uncheck the "boot from floppy" and try booting the VM (from hard disk)
7) If it works, and it should, close Qemu and use Roadkil's Diskimage to transfer back the image to the stick
8) Try booting from the stick, if it does not work, try again using a smaller primary partition, and/or replying NO to the initial FDISK question "Do you want to enable large hard disk support", as an alternative, you can experiment with Ranish Partition Manager 2.40 here:
http://www.ranish.com/part/
that gives more control on paritioning, see also my page here:
http://home.graffiti.net/jaclaz:graffiti.n...B/USBstick.html
for more hints/things to try


jaclaz
TERRYHOAX
QUOTE (jaclaz @ Nov 1 2006, 03:35 PM) *
I begin thinking that there is a communication problem....

When I say

It does NOT mean copy DOS files to it before trying to boot it, you should supply DOS files to the HP Format Utility.


Sorry, perhaps my english is to bad to understand you or my description was false.
I format the stick with the HP Utility in Fat32 (Fat16 tried also before) with supplying the Dos files -> 'create a dos startup disk' -> 'using system dos files located...'
What I made wrong? smile.gif

Now I try your faq #10
TERRYHOAX
Thank you for your patiance & guidance!
I made with Qemu a working hd-image and copied it to the stick.
The USB-Stick boots in Dos 7.1 as drive c:

But how I can boot now my Dos-BootCd?
If I try to copy the files to the stick, the bootmenu from dos appears:
boot from cd
boot from windows
but if I select something nothing happens..

Also I tested to install Wingrup to MBR.. doesn't work now...
jaclaz
QUOTE (TERRYHOAX)
The USB-Stick boots in Dos 7.1 as drive c:

smile.gif GOOD.

Now follow these steps:
1) Download and copy to the stick this utility BOOTPART:
http://www.winimage.com/bootpart.htm
2) Copy to the stick a copy of NTLDR, NTDETECT.COM and BOOT.INI
3) Edit the copy of boot.ini on the stick adding to it the line:
CODE
C:\GRLDR="Grub4dos"

4) Copy to the stick grldr from the grub4dos package and menu.lst
5) boot from the stick in DOS and run this commands:
CODE
BOOTPART WIN98 C:\BOOTSECT.W98 "Windows 98"

this will make a copy of the bootsector for Win98/DOS7.1 and add an entry to boot.ini
6) run this command
CODE
BOOTPART WINNT BOOT:C:

this will rewrite the bootsector on the stick with one invoking NTLDR
7)Reboot you should boot to a multichoice boot.ini from which you can choose (at least) between "Windows 98" and "Grub4dos"
8)Reboot to your "main" system and put into menu list these two entries:
CODE
title Windows 98
find --set-root /io.sys
chainloader /io.sys

title BartPE
find --set-root /minint/setupldr.bin
chainloader /minint/setupldr.bin

9) copy to the stick the contents of your BartPE /I386 to /minint
10) Try booting from the stick, you should be able to select (and boot from) both DOS and BartPE
11) if you want to "get rid" of the "intermediate" NTLDR, delete from the stick NTLDR, NTDETECT.COM and BOOT.INI and rename grldr to NTLDR


As said before, let's make things with an order:
QUOTE
But how I can boot now my Dos-BootCd?
If I try to copy the files to the stick, the bootmenu from dos appears:
boot from cd
boot from windows
but if I select something nothing happens..

Also I tested to install Wingrup to MBR.. doesn't work now...

It's the first time you refer to a "Dos-BootCd", please post details, until now you wanted to dual boot between DOS and BartPE from a USB stick, things must be done one at the time.
DO NOT USE WINGRUB until you fully understand the implications of modifying (without need) the MBR.
One of the "strong points" of Grub4dos' grldr is that it can be invoked from a standard MBR.


jaclaz
TERRYHOAX
Thank you for your help!
I can boot now between Dos & BartPE! smile.gif

QUOTE (jaclaz @ Nov 1 2006, 09:04 PM) *
11) if you want to "get rid" of the "intermediate" NTLDR, delete from the stick NTLDR, NTDETECT.COM and BOOT.INI and rename grldr to NTLDR


that doesn't work for me:
The stick hangs & won't boot.
I copied these files back and modified the boot.ini adding C:\GRLDR="Grub4dos" and the stick boots again... puhh

But how I can boot my Dos BootCd... If I copy the BootCD files - and not overwriting any boot-files - the stick boots in dos and the dos-menu appears, but - as above - when I select something... nothing happens: the system hangs... because the system can't find the files.

Is there a chance to get this working? smile.gif
Ed_P
Can you post your DOS menu?
TERRYHOAX
QUOTE (Ed_P @ Nov 1 2006, 11:37 PM) *
Can you post your DOS menu?

when grub boots it shows:
"filesystem is fat, partition type 0x6... will boot MS-Dos 7.x from drive=0x80, partition=0x0(hidden sectors=0x3f)
Then the Dos-Menu appears, if I select there a program, Dos hangs instantly when it tries to make a ramdisk.

The path must be the problem...How must be the path in autoexec.bat ? All to C:\ ?
Ed_P
Without seeing what was requested I can't help you.
jaclaz
Yep, what Ed_P said, however yes, if you boot from grldr to DOS with the menu.lst entry I gave before the stick will be mapped as C:.

About the grldr renamed to NTLDR not working, it's strange, it used to work. Maybe some of the newish releases of Grub4dos has broken the compatibility? blink.gif

jaclaz
TERRYHOAX
I changed only the pathes to c: and deleted some drivers (cdrom,..) and now it works fine!

Thank you for your patience & help!
jaclaz
QUOTE (TERRYHOAX)
Thank you for your patience & help!


No prob, the only thing is that you wil need to change your signature from "looking for" to "just found" wink.gif tongue.gif

jaclaz
TERRYHOAX
QUOTE (jaclaz @ Nov 2 2006, 11:51 AM) *
No prob, the only thing is that you wil need to change your signature from "looking for" to "just found" wink.gif tongue.gif

jaclaz


done!


I play a little bit around and found out that this works now for me flawless:

1. Format FAT16 in Windows XP
2. copy the files/folders

a)Dos
/Dos
dos.ima (a working image, the programs should refer to C:\)

b)BartPE
copy the contents of your BartPE on the stick
/i386 to /minint
/programs
ntdetect.com

3.Install Wingrub with boot from mbr
it writes:
Mbr.org
Grldr

4.copy grub4dos
a) prepared menu.lst to root of the stick
cool.gif copy from grub4dos to root of the stick
grldr (overwriting)
bootlace.com (needed for image-booting)

5. write protect the stick

6. Reboot & Test

----------------------
Some notes:
If I make with Roadkil's Diskimage a image backup of my stick, it goes over 100%.
The normal capacity is about 996 MB. I can write here about 2 GB without getting an error... strange but cool smile.gif

Then I have a question to the boot-time:
Grub4dos needs some time (about 20sec) to come to the Bootmenu.
It searches the menu.lst.
My menu.lst lays in the root. Is there any way to speed the search up?
Perhaps it has something to do with the Wingrub installation - it's comfortable & simple to install - I don't know...




----------------------------
jaclaz
Well, please do not take it as an offence, but there is something "wrong" in your setup/ideas.

When you install the Grub loader with wingrub to the MBR, it does two things:
1) it writes a number of sectors starting from the MBR, if I recall correctly 6 or 8
2) copies grldr to the root of the stick

Since the version of grub4dos that comes with wingrub is REALLY old, it is possible that you have some conflicts when booting the newish grldr that you later write on the stick, this "could" be the cause of the 20 seconds delay you experience.

The bootlace.com has NOTHING to do with booting images, it is the DOS program needed to install Grub4dos to the MBR, plese do re-read attentively the readme.txt that comes with latest releases of grub4dos.

The "correct" procedure is to boot from the stick in DOS and run bootlace.com with the proper syntax to install the latest grldr.mbr "paired" with the same release of grldr.

If it's a problem booting in DOS, there is, quite obviously, a workaround using a hex editor or similar sector copying program, there is an old tutorial here:
http://www.911cd.net/forums//index.php?sho...0806&st=188
and this newer thread where a similar method, using other apps is hinted:
http://www.911cd.net/forums//index.php?sho...4181&st=894
http://www.911cd.net/forums//index.php?sho...c=15837&hl=

About the Disk Image going more than 100%, if the difference is relative, say 6 to 10 %, it can be caused by the limitation caused by contrasting disk geometry between the "real" one and the one "imposed" by the win2k/XP USB drivers (unused sectors), the matter is "talked to death" on my original USB page:
http://home.graffiti.net/jaclaz:graffiti.n...B/USBstick.html

The amount you are reporting must be caused by something else.

To see the difference, after having read, re-read, and re-re-read (I know that it is a little boring and also a bit difficult) my page above referenced, you should be able to use Ranish Partition Manager (from DOS) and Beeblebrox (from win2k/XP) to find the "real" geometry in sectors of your device. The size of the image file created with Disk Image is however EXACTas that program simply reads and copies sectors one at a time until it finds last sector.

The progress bar calculates however 100% on the size reported by Windows, and that can make the, as said, usually small difference.

The Excel file linked to in one of the threads above referenced might help you in calculating the "slack" space you are currently "wasting", and that is normally accessible by DOS or LINUX, but NOT from Win2K/XP.

jaclaz
cdob
QUOTE (TERRYHOAX)
You directly boot dos with io.sys
You wrote that you format the stick as fat32.
Directly with Format in Windows?
and then you copy the Dos files - the complete Dos Bootcd - to the stick?
Then you copy the BartPE files to the stick?
Well, you asked and deserve a answer:

I used ufdprep.exe (old release formatufd.exe) from Windows XP Embedded SP2 Feature Pack 2007. This has gone public lately.
http://www.microsoft.com/downloads/details...;displaylang=en
This create a ntldr boot sector.
Next I copied grub4dos grldr to ntldr, BartPE files and Win98 DOS files.

I don't use Wingrub.

grldr boot without delay.

But be aware: this create a FAT32 partiton. You have to have a proper BIOS.
Jaclaz's solution support more BIOS versions.

Windows XP IO.SYS and chainloader /IO.SYS didn't work in my case.
QUOTE ( grub4dos readme.txt)
Update 9: Directly boot NTLDR of WinNT/2K/XP and IO.SYS of Win9x/ME and KERNEL.SYS of FreeDOS.
Works as designed. XP IO.SYS is not mentionend.
TERRYHOAX
QUOTE (jaclaz @ Nov 2 2006, 09:59 PM) *
Well, please do not take it as an offence, but there is something "wrong" in your setup/ideas.

When you install the Grub loader with wingrub to the MBR, it does two things:
1) it writes a number of sectors starting from the MBR, if I recall correctly 6 or 8
2) copies grldr to the root of the stick

Since the version of grub4dos that comes with wingrub is REALLY old, it is possible that you have some conflicts when booting the newish grldr that you later write on the stick, this "could" be the cause of the 20 seconds delay you experience.

The bootlace.com has NOTHING to do with booting images, it is the DOS program needed to install Grub4dos to the MBR, plese do re-read attentively the readme.txt that comes with latest releases of grub4dos.

The "correct" procedure is to boot from the stick in DOS and run bootlace.com with the proper syntax to install the latest grldr.mbr "paired" with the same release of grldr.

If it's a problem booting in DOS, there is, quite obviously, a workaround using a hex editor or similar sector copying program, there is an old tutorial here:
http://www.911cd.net/forums//index.php?sho...0806&st=188
and this newer thread where a similar method, using other apps is hinted:
http://www.911cd.net/forums//index.php?sho...4181&st=894
http://www.911cd.net/forums//index.php?sho...c=15837&hl=


Hi jaclaz,

thank you for your advice. Yes, the Dos-Boot is in that way I described a problem. I need an Image to boot Dos.
It works for me flawless to write the mbr at first with Wingrub. Reboot, boots the stick and rewrites the mbr with grub4dos:

bootlace.com 0x80 --force-backup-mbr

-> written with success

-> reboot

-> et voila: it normal boots directly to the grub boot-menu


QUOTE (cdob @ Nov 2 2006, 10:24 PM) *
Well, you asked and deserve a answer:

I used ufdprep.exe (old release formatufd.exe) from Windows XP Embedded SP2 Feature Pack 2007. This has gone public lately.
http://www.microsoft.com/downloads/details...;displaylang=en
This create a ntldr boot sector.
Next I copied grub4dos grldr to ntldr, BartPE files and Win98 DOS files.

I don't use Wingrub.

grldr boot without delay.

But be aware: this create a FAT32 partiton. You have to have a proper BIOS.
Jaclaz's solution support more BIOS versions.

Windows XP IO.SYS and chainloader /IO.SYS didn't work in my case.Works as designed. XP IO.SYS is not mentionend.


Thank you also for your information! FAT16 works for me fine and with the Dos-Image it's the easiest way for me.

Also I tested now my stick an 3 different PCs and it boots without problems!
jaclaz
QUOTE (TERRYHOAX)
Reboot, boots the stick and rewrites the mbr with grub4dos:

bootlace.com 0x80 --force-backup-mbr

-> written with success

-> reboot

-> et voila: it normal boots directly to the grub boot-menu


Did this solve the twenty seconds boot delay as expected?

jaclaz
TERRYHOAX
QUOTE (jaclaz @ Nov 3 2006, 12:12 PM) *
Did this solve the twenty seconds boot delay as expected?

jaclaz


Yes, it works fine now... smile.gif ...Luck?
jaclaz
QUOTE (TERRYHOAX)
...Luck?....


Yes, in finding a good advisor.... tongue.gif

jaclaz
TERRYHOAX
No it's getting serious smile.gif

I am trying to add the new damn small linux 3.1 to my stick:

-> I downloaded the dsl-31.iso and unpacked the content
-> copy Directory /boot/isolinux to stick (root)
-> copy Directory /knoppix to stick (root)

Then I tried to modify the menu.lst
but can't get it to work with this here:

chainloader /boot/isolinux/isolinux.bin

also tried:
find --set-root /boot/isolinux/isolinux.bin
chainloader --force (cd)/boot/isolinux/isolinux.bin

Anybody an idea how to boot the linux?
jaclaz
I am not an expert on the "linux side" of Grub4dos, but since DSL is Knoppix based, you should refer to the methods detailed here:
http://www.knoppix.net/forum/viewtopic.php?t=11796

However, if I am not mistaken, isolinux should be used with the "kernel" and "initrd" options, rather than by chainloading isolinux.bin

jaclaz
TERRYHOAX
I tried to modify the menu.lst, but I can't get it to work.

I tried these here:
1. chainloader /boot/isolinux/isolinux.bin

2.
find --set-root /boot/isolinux/isolinux.bin
chainloader --force (cd)/boot/isolinux/isolinux.bin

3.
kernel (cd)/boot/isolinux ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (cd)/boot/isolinux/minirt_usb6.gz
boot
-> error while parsing number
4.
I tried also booting with the bootimage bootfloppy-usb.img
-> doesn't work
I modified the img and copied from DSL /boot/isolinux the files to the image, but can't copy the (new) minirt24.gz to the image, because it's only 1,44MB
I succeeded in booting the DSL boot screen... but when DSL starts to boot it came an error:
"Kernel panic unable to mount root fs"

5. Also tried the dsl-3.1-syslinux.iso with the image and memdisk

root (hd0,0)
kernel /boot/isolinux/memdisk vga=0x0301
initrd /boot.img
booted to the DSL bootscreen, but then after starting
"can't find the fs"

I see only 2 possiblities:
point 3. above with the right commands which I don't know
or to point 4. with a greater image, but don't know how to create

Anybody can help me to succeed in booting this fine OS?
FM_81
Is there already a running GRUB or GRUB4DOS on the stick?
If YES, then: there is no need for ISOLINUX anymore, you can call it directly from GRUB.
If you unsure, post some LABELs from the original DSL-file ISOLINUX.CFG here, we'll try to convert it, it's not difficult ...

An example for MENU.LST, made from your post (untested):
CODE
title DSL
kernel (cd)/boot/isolinux/vmlinuz ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (cd)/boot/isolinux/minirt_usb6.gz

(These are only three lines, beginning with title, kernel, initrd)
Replace '/boot/isolinux/vmlinuz' with your correct path & kernelname.
It's also possible, to play a little with the kernel-parameters, for best results, or add more than one entry for different machines.
TERRYHOAX
QUOTE (FM_81 @ Dec 3 2006, 10:44 PM) *
Is there already a running GRUB or GRUB4DOS on the stick?


Yes

QUOTE (FM_81 @ Dec 3 2006, 10:44 PM) *
If YES, then: there is no need for ISOLINUX anymore, you can call it directly from GRUB.
If you unsure, post some LABELs from the original DSL-file ISOLINUX.CFG here, we'll try to convert it, it's not difficult ...


Thank you for your help! smile.gif

QUOTE (FM_81 @ Dec 3 2006, 10:44 PM) *
An example for MENU.LST, made from your post (untested):
CODE
title DSL
kernel (cd)/boot/isolinux/vmlinuz ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (cd)/boot/isolinux/minirt_usb6.gz

(These are only three lines, beginning with title, kernel, initrd)
Replace '/boot/isolinux/vmlinuz' with your correct path & kernelname.
It's also possible, to play a little with the kernel-parameters, for best results, or add more than one entry for different machines.



this is my ISOLINUX.CFG
CODE
DEFAULT linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
TIMEOUT 300

PROMPT 1
DISPLAY boot.msg
F1 boot.msg
F2 f2
F3 f3
LABEL dsl
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL memtest
KERNEL memtest
APPEND initrd=
LABEL dsl-txt
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL expert
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt24.gz nomce BOOT_IMAGE=expert
LABEL fb1280x1024
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=794 xmodule=fbdev initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL fb1024x768
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 xmodule=fbdev initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL fb800x600
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=788 xmodule=fbdev initrd=minirt24.gz nomce noapic quiet BOOT_IMAGE=knoppix
LABEL lowram
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=minirt24.gz noscsi noideraid nosound nousb nofirewire noicons minimal nomce noapic noapm quiet BOOT_IMAGE=knoppix
LABEL install
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=normal initrd=minirt24.gz noscsi noideraid nosound nofirewire legacy base norestore _install_ nomce noapic noapm quiet BOOT_IMAGE=knoppix
LABEL failsafe
KERNEL linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us vga=normal atapicd nosound noscsi nousb nopcmcia nofirewire noagp nomce nodhcp xmodule=vesa initrd=minirt24.gz BOOT_IMAGE=knoppix
LABEL userdef
KERNEL linux24
APPEND ###############


--------------------------
CODE
title DSL
kernel (cd)/boot/isolinux/linux24 ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (cd)/boot/isolinux/minirt24.gz



"Error 25 while parsing number"

Something I must do wrong sad.gif
FM_81
Replace in the two lines ... (cd)/boot/isolinux ... (cd) with the disk/partition of your USB. It's something like (hd1,0), you can use the find-command in the GRUB-shell, to get the right numbers.
For example, you can try
CODE
find /boot/isolinux/linux24
or some other file thats definately already exists on the stick. I assume here, that the DSL-ISO is already unpacked on the root of the stick.

It seems also, that your kernel-name is linux24, not vmlinuz.

Best regards, FM_81
TERRYHOAX
QUOTE (FM_81 @ Dec 5 2006, 08:43 AM) *
Replace in the two lines ... (cd)/boot/isolinux ... (cd) with the disk/partition of your USB. It's something like (hd1,0), you can use the find-command in the GRUB-shell, to get the right numbers.
For example, you can try
CODE
find /boot/isolinux/linux24
or some other file thats definately already exists on the stick. I assume here, that the DSL-ISO is already unpacked on the root of the stick.

It seems also, that your kernel-name is linux24, not vmlinuz.

Best regards, FM_81


it's (hd0,0)

then it should look like this? right? i'll test it in the evening. Thank you very much for your help!

title DSL
kernel (hd0,0)/linux24 ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (hd0,0)/minirt24.gz
FM_81
(hd0,0) is a little bit unusual, but generally possible. Normally is (hd0,0) the first part. of your first build-in harddisk.
Verify also, on which place your 'linux24' exists, if in a subdirectory, you must declare this!
FM_81
I'm really not a friend of ALL IN ONE SOLUTIONS, but before we get a more complicated sitiuation- here's mine:

files and folders on stick:
CODE
/boot
/boot/memtest
/boot/grub
/boot/grub/stage1
/boot/grub/fat_stage1_5
/boot/grub/stage2
/boot/grub/menu.lst
/boot/dsl
/boot/dsl/linux24
/boot/dsl/minirt24.gz
/boot/dsl/menu.lst
/DSL
/DSL/KNOPPIX
REMARK 1: The stick is FAT formatted, but I think FAT32 would also work.
REMARK 2: GRUB exists as normal STAGE1 -STAGE2 - construct, but GRUB4DOS should not be a problem.

contents of /boot/grub/menu.lst:
CODE
setkey greater bar
setkey less backslash
setkey doublequote at
setkey ampersand caret
setkey slash ampersand
setkey parenleft asterisk
setkey parenright parenleft
setkey equal parenright
setkey question underscore
setkey backslash minus
setkey z y
setkey Z Y
setkey y z
setkey Y Z
setkey plus bracketright
setkey asterisk braceright
setkey semicolon less
setkey colon greater
setkey minus slash
setkey underscore question
setkey caret backquote
setkey quote equal
setkey backquote plus
setkey bracketleft semicolon
setkey braceleft colon
setkey bracketright quote
setkey braceright doublequote
setkey bar bracketleft
setkey at braceleft
color white/red black/light-gray

title Damn-Small-Linux (USB-Stick als "/dev/sda1")
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL apm=power-off vga=791 nomce noapic noprompt quiet fromhd=/dev/sda1
initrd /boot/dsl/minirt24.gz

title Damn-Small-Linux (Spezial-Menue, Sonderfunktionen)
configfile /boot/dsl/menu.lst

title MEMTEST 86 +
kernel /boot/memtest

title Diskette
rootnoverify (fd0)
chainloader +1

title Kommandozeile
commandline

title Re-Boot
reboot

title Power off
halt
REMARK 1: All after kernel is one line.
REMARK 2: The first section with SETKEY makes only a german keyboard, not neccessary for US-keyboards.

contents of /boot/dsl/menu.lst:
CODE
default 0
timeout 60
color white/magenta black/light-gray

title DSL: Zurueck zum Hauptmenue
configfile /boot/grub/menu.lst

title DSL: Text-Modus
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL apm=power-off 2 vga=normal nomce noapic noprompt quiet
initrd /boot/dsl/minirt24.gz

title DSL: mit Grafikkonfiguration
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL apm=power-off vga=normal nomce noapic noprompt quiet
initrd /boot/dsl/minirt24.gz

title DSL: Framebuffer-Modus
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL apm=power-off vga=791 xmodule=fbdev nomce noapic noprompt quiet
initrd /boot/dsl/minirt24.gz

title DSL: Rechner mit < 32 MB RAM (SCSI und USB nicht deaktiviert)
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL apm=power-off vga=normal noideraid nosound nofirewire noicons minimal nomce noapic noapm quiet
initrd /boot/dsl/minirt24.gz

title DSL: Failsafe-Modus (SCSI und USB nicht deaktiviert)
kernel /boot/dsl/linux24 ramdisk_size=100000 init=/etc/init lang=de knoppix_dir=DSL vga=normal atapicd nosound nopcmcia nofirewire noagp nomce nodhcp noprompt xmodule=vesa
initrd /boot/dsl/minirt24.gz
REMARK: All after kernel is one line.

MfG FM_81
TERRYHOAX
QUOTE (FM_81 @ Dec 5 2006, 04:46 PM) *
Verify also, on which place your 'linux24' exists, if in a subdirectory, you must declare this!


Thank you very much!

CODE
title Damn-Small-Linux
kernel (hd0,0)/boot/isolinux/linux24 ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (hd0,0)/boot/isolinux/minirt24.gz


This works for me smile.gif
TERRYHOAX
Resume of a way for preparing an USB-Stick for booting Dos, BartPe and Linux
----------------------------------------------------------------------------------

Many thanks for realizing this goes especially to jaclaz and FM_81.
I won't got it without the help of this great forum!

I tested this way on two USB-Sticks (Extremememory USB 2.0 1 GB, NoName USB-Stick 2 GB) and 2 Laptops and 3 PC without a problem.
But I don't take any responsbility if this way don't work or your stick get damaged!


1. Format FAT16 in Windows XP
2. copy the files/folders

a)Dos
/Dos
dos.ima (a working image, the programs should refer to C:\)

b)BartPE
copy the contents of your BartPE on the stick
/i386 to /minint
/programs
ntdetect.com

c)Damn small Linux
download the dsl-xx.iso and unpacked the content:
-> copy Directory /boot/isolinux to stick (root)
-> copy Directory /knoppix to stick (root)
-> as which hd-partition is your usb-stick recognized?
for me it's (hd0,0)

you can check this with the grub command (bootmenu -> c)
find /boot/isolinux/linux24
-> edit the menu.lst

3.Install Wingrub with boot from mbr
it writes:
Mbr.org
Grldr

4.copy grub4dos
a) prepared menu.lst to root of the stick

example for german menu.lst (for english keyboard delete setkey commands)

CODE
setkey greater bar
setkey less backslash
setkey doublequote at
setkey ampersand caret
setkey slash ampersand
setkey parenleft asterisk
setkey parenright parenleft
setkey equal parenright
setkey question underscore
setkey backslash minus
setkey z y
setkey Z Y
setkey y z
setkey Y Z
setkey plus bracketright
setkey asterisk braceright
setkey semicolon less
setkey colon greater
setkey minus slash
setkey underscore question
setkey caret backquote
setkey quote equal
setkey backquote plus
setkey bracketleft semicolon
setkey braceleft colon
setkey bracketright quote
setkey braceright doublequote
setkey bar bracketleft
setkey at braceleft
color=white/blue
timeout 10
default 0

title DOS
map --mem /dos.ima (fd0)
map --hook
chainloader (fd0)+1
root (fd0)

title BartPE
find --set-root /minint/setupldr.bin
chainloader /minint/setupldr.bin

title Damn-Small-Linux
kernel (hd0,0)/boot/isolinux/linux24 ramdisk_size=100000 init=/etc/init lang=de apm=power-off vga=791 nomce quiet dma screen=1600x1200
initrd (hd0,0)/boot/isolinux/minirt24.gz

title Kommandozeile
commandline

title Re-Boot
reboot

title Power off
halt


cool.gif copy from grub4dos to root of the stick
grldr (overwriting)
bootlace.com (needed for image-booting)

5.Boot from the Usb-Stick to Dos and write new grub4dos bootsector
(overwriting Wingrub boot)

bootlace.com 0x80 --force-backup-mbr

6. write protect the stick

7. Reboot & Test
Bastian
hey would anyone know how to solve this problem?

when i use wingrub, no matter what i do wingrub will see no partitions listed in the "install to Mbr" drop down window sad.gif I can get every other step to work great, but no matter what i do i cannot install to the mbr...

even if someone had instructions for how to do this in grub4dos i would appreciate it!

thanks

~fizz
FM_81
@Bastian
Another solution to install GRUB on any drive, that the BIOS sees @ boot-time:
- You need a bootable floppy or CD, which gives you the GRUB-shell.
- Copy stage-files under an running OS to the drive (NTFS isn't so good), on which you will install GRUB (folder '/boot/grub')
- Boot into the GRUB-shell and make a find /boot/grub/stage2 => gives you a result like (hdx,y)
- Use now root (hdx,y) - and setup (hdx) -command to install GRUB to MBR of the desired drive.




Replying to
jaclaz
I don't get it. blink.gif

Just for the record, (and for the [n]th time) wink.gif :
1) Wingrub has been left in a old, "preliminary" state, it's use is NOT recommended
2) Grub4dos is NOT Grub, if you need specific Grub4dos features you won't find them in Grub
3) one of the GREAT advantages of Grub4dos as compared to other bootmanagers is that it can be invoked from:
a ) Dos
b ) Linux
c ) NT/2K/XP/2003 NTLDR
i.e. there is no need whatsoever to install it in the MBR.

Installing a bootmanager in the MBR is generally speaking NOT a very good idea, unless, like Partita or OS-BS it is exactly 512 bytes long.
All "bigger" ones will write something in the first few hidden sectors, which is normally OK, but that is no good if you use utilities like Partition Manager or Acronis, that also use the first hidden sectors.

However you will have a somehow non-standard drive that can give problems with some utilities.

The way I personally recommend is to rename grldr to NTLDR (and NTLDR to something else) and use the standard NT/2K/XP/2003 MBR as this way everything remains "standard", see here:
http://www.911cd.net/forums//index.php?sho...c=18045&hl=

This said, to get back to Bastian problem:
Are you sure that your drive has a MBR at all?
It could have been formatted as "superfloppy", thus there would be NO MBR at all.

The instructions to install the MBR in Grub4dos are already in the post by TERRYHOAX:
QUOTE
copy from grub4dos to root of the stick
grldr (overwriting)
bootlace.com (needed for image-booting)

5.Boot from the Usb-Stick to Dos and write new grub4dos bootsector
(overwriting Wingrub boot)

bootlace.com 0x80 --force-backup-mbr
and in the Grub4dos readme.txt there is a chapter about it:
QUOTE
*** bootlace.com - Install GRLDR.MBR bootstrap code to MBR ***


jaclaz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.