Jump to content











Photo
- - - - -

Need Help - USB Multi Boot (DOS & Linux)


  • Please log in to reply
19 replies to this topic

#1 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 15 May 2008 - 05:33 PM

Hi everyone.
I'm amazed to find such a specific forum. I've read some related topics but as i can see there's too much to learn to make something quite simple, to you guys off course. :lol:

I have some bootable DOS diskettes that I frequently use at work, as well as 1 bootable Linux (grub) diskette. All I want is to use a single USB pen drive to boot from and choose one of their images. Pretty easy? Can you guys help me? I've already downloaded grub4dos / Wingrub and Diskimg that seems to be useful in this case.

Hope to hear soon.
:thumbup:

#2 ispy

ispy

    Silver Member

  • Tutorial Writer
  • 646 posts
  • Location:PILGRIM

Posted 15 May 2008 - 06:45 PM

Hi garotobom :lol: ,

Booting from a USB stick is not an exact science (Your BIOS needs to be able to support booting from USB), sometimes it works on others it does not. Here are some tutorials for background info but for specifics in respect of Grub4dos it might be worth posting a question in the Grub4Dos section:
http://www.boot-land...?showtopic=4624
Good Luck & WELCOME!

Regards,

ispy :thumbup:

#3 was_jaclaz

was_jaclaz

    Finder

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

Posted 15 May 2008 - 06:57 PM

Hi everyone.
I'm amazed to find such a specific forum. I've read some related topics but as i can see there's too much to learn to make something quite simple, to you guys off course. :lol:

I have some bootable DOS diskettes that I frequently use at work, as well as 1 bootable Linux (grub) diskette. All I want is to use a single USB pen drive to boot from and choose one of their images. Pretty easy? Can you guys help me? I've already downloaded grub4dos / Wingrub and Diskimg that seems to be useful in this case.

Hope to hear soon.
:thumbup:


Welcome to the Forum. :thumbup:

Check this also:
http://www.boot-land...?showtopic=3963

jaclaz

#4 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 16 May 2008 - 01:53 AM

Hi garotobom ;) ,

Booting from a USB stick is not an exact science (Your BIOS needs to be able to support booting from USB), sometimes it works on others it does not. Here are some tutorials for background info but for specifics in respect of Grub4dos it might be worth posting a question in the Grub4Dos section:
http://www.boot-land...?showtopic=4624
Good Luck & WELCOME!

Regards,

ispy :thumbup:



Sure man, I appreciate your help.
But I really don't know where to start from... My BIOS does support booting from USB.

I'm actually tryin this procedure you linked. Should I use STEP 2(Freedos) or 3(syslinux) ? Will I be able to boot from a Linux and also DOS "images" using this method?!

Just finished(used step 3) . At least the Pendrive is bootable now. But ir only shows
"syslinux 3.63 2008-04-10 EBIOS Copyright © 1994-2008 H. Peter Anvin
.(<--a dot here) and the blinking cursor.

any hints?

#5 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 16 May 2008 - 02:03 AM

Welcome to the Forum. ;)

Check this also:
http://www.boot-land...?showtopic=3963

jaclaz



I'm Kinda lost here... lol
I had already checked the topic above, noted some important points, but not really linked it to my problem... I've already replied to ispy and really hope u 2 guys can help me...
:thumbup:

#6 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 16 May 2008 - 08:52 AM

You can also try this tutorial:
http://www.911cd.net...showtopic=18846

#7 was_jaclaz

was_jaclaz

    Finder

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

Posted 16 May 2008 - 10:25 AM

I think we need some order here.

@ispy @ktp
I am afraid that your links, though very good ;), may confuse garotobom, he may become affected by "featuritis" :thumbup:, which is a bad thing until he has had some success.
Later, having more options, possibility and methods becomes a very good thing, but when in the initial learning stages it makes more difficult to focus attention properly.


The original question:

I have some bootable DOS diskettes that I frequently use at work, as well as 1 bootable Linux (grub) diskette. All I want is to use a single USB pen drive to boot from and choose one of their images.

seems clear to me.

@garotobom

Steps that are needed:
1) Have the Pen drive made bootable
2) Have it bootable with grub4dos on the MBR
3) Create on the pendrive a menu.lst loading the various disk images

Step 1):
FAQ #4 and #10 here:
http://home.graffiti...SB/USBfaqs.html

Step 2):
use grubinst:
http://grub4dos.sour...oot_code_to_MBR
or it's GUI version:
http://www.disklessa...-bin-w32-19.zip

Step 3):
Copy to the stick the floppy images and edit menu.lst to load them, the procedure can be found here for a number of floppy images/methods:
http://www.boot-land...?showtopic=3963

Post if any of the three steps above are not clear or you have doubts, or you actually need something different from your original request.

jaclaz

#8 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 20 May 2008 - 02:56 AM

I think we need some order here.

@ispy @ktp
I am afraid that your links, though very good ;), may confuse garotobom, he may become affected by "featuritis" :thumbup:, which is a bad thing until he has had some success.
Later, having more options, possibility and methods becomes a very good thing, but when in the initial learning stages it makes more difficult to focus attention properly.


The original question:

seems clear to me.

@garotobom

Steps that are needed:
1) Have the Pen drive made bootable
2) Have it bootable with grub4dos on the MBR
3) Create on the pendrive a menu.lst loading the various disk images

Step 1):
FAQ #4 and #10 here:
http://home.graffiti...SB/USBfaqs.html

Step 2):
use grubinst:
http://grub4dos.sour...oot_code_to_MBR
or it's GUI version:
http://www.disklessa...-bin-w32-19.zip

Step 3):
Copy to the stick the floppy images and edit menu.lst to load them, the procedure can be found here for a number of floppy images/methods:
http://www.boot-land...?showtopic=3963

Post if any of the three steps above are not clear or you have doubts, or you actually need something different from your original request.

jaclaz



From the beggining.
So, FAQ #4, I should use the second option : http://fuzzymunchkin...ot/?page_id=632 (that covers also Linux booting...) right? If so, I get my USB Bootable by Section 2, step 8, right? Should I move to your 2nd Step (grubinst) ? Are hiren's boot contents and Debian Sarge needed for what I need?

Thanks, really, for your patience.

#9 was_jaclaz

was_jaclaz

    Finder

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

Posted 20 May 2008 - 02:21 PM

Forget about Linux for the moment, you want to boot a number of floppy images (it does NOT MATTER what OS is inside those floppy images) from a USB stick, right?

Just use the HP format utility with DOS 7.x files.

Make sure you can boot from it.

Go to step 2) use grubinst.

Make sure you can boot from it.

Go to step 3), add your floppy images and corresponding entries in menu.lst.

Try booting from each of them.

jaclaz

#10 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 26 May 2008 - 11:46 AM

Forget about Linux for the moment, you want to boot a number of floppy images (it does NOT MATTER what OS is inside those floppy images) from a USB stick, right?

Just use the HP format utility with DOS 7.x files.

Make sure you can boot from it.

Go to step 2) use grubinst.

Make sure you can boot from it.

Go to step 3), add your floppy images and corresponding entries in menu.lst.

Try booting from each of them.

jaclaz


Once more, thanks for your patience.
So step 1 and 2 passed by with no problem. I'm actually with some diffuculties at the final one. Can you describe how would be a simple menu.lst, all I want is let's say, choose from 4 different images. I had no trouble managing Roadkil's Disk Image. So what would be the menu.lst to choose booting from image1.img , image2.img, image3.img and image4.img all in d:\images ?

;)

#11 was_jaclaz

was_jaclaz

    Finder

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

Posted 26 May 2008 - 12:38 PM

Well, the point is the "d:\images".

"d:" is the drive letter assigned to a partition by your current OS.

I can only guess that you have a XP system with just one big partition on the internal hard disk (that has drive letter C: ) and the USB stick with one partition that gets "D:".

When grub4dos (or any other bootmanager for that matters) boots there are no drive letters, but only drives (numbered from 0) and partitions on them (as well numbered from 0).

Normally your internal hard drive will be (hd0) in grub4dos, but since you are going to boot from the USB stick, the stick will become first drive (hd0), and your internal hard drive will become (hd1).

The first partition on first disk is (hd0,0).

Thus, \images directory on USB stick will become (hd0,0)/images

So you can do:

color black/cyan yellow/cyan
timeout 30
default 0


title dosfloppy.gz (grub4dos) 0
root (hd0,0)
map --mem /images/dosfloppy.img.gz (fd0)
map --hook
root (fd0)
chainloader (fd0)/IO.SYS

title dosfloppy (grub4dos) 0
root (hd0,0)
map --mem /images/dosfloppy.img (fd0)
map --hook
root (fd0)
chainloader (fd0)/IO.SYS

title unhook memory
map --unhook

title myfloppy.gz (grub4dos) 1
root (hd0,0)
map --mem /images/myfloppy.img.gz (fd0)
map --hook
root (fd0)
chainloader (fd0)+1

title myfloppy (grub4dos) 1
root (hd0,0)
map --mem /images/myfloppy.img (fd0)
map --hook
root (fd0)
chainloader (fd0)+1

title myfloppy.gz (memdisk) 2
root (hd0,0)
kernel /images/memdisk.gz
initrd /images/myfloppy.img.gz

title myfloppy (memdisk) 2
root (hd0,0)
kernel /images/memdisk.gz
initrd /images/myfloppy.img


You can substitute the
root &#40;hd0,0&#41;

with something like:
find --set-root /images/myfloppy.img

Basically the sequence is as follows:
1) the disk booted by BIOS is current "root"
2) the entries "root (hd0,0)" or "find --set-root /images/myfloppy.img" can be omitted ONLY if you never loop back through grub4dos from a booted .img, the idea is to make sure that you can set correctly root, no matter what you booted from/attempted before.
3) once "root" has been established, the floppy image is mapped in memory to first floppy disk (fd0)
4) memory mapping is hooked, i.e. it is "set" definitely
5) root is established on the mapped floppy
6) either the system file or bootsector oon the floppy is chainloaded

When using memdisk steps 3 to 6 are replaced by "kernel /images/memdisk.gz" and "initrd /images/myfloppy.img.gz" as they are performed "internally" by memdisk.

What I often advise is to experiment with command line, press "c" when booted to grub4dos to access it.

Example type:

find (

and press the TAB key, you will see a list of available devices, like hd0 hd1 cd rd
press h and press the TAB key again
press 0 and press the TAB key again
press 0)/ and press the TAB key again
press ENTER
(you'll see a list of directories and files on (hd0,0) )

You can also manually type any of the above listed menu.lst entries, pressing ENTER every line, in order to see the "feedback" grub4dos gives.

Once you have entered all the lines in an entry, type

boot

and press ENTER
to actually boot (the "boot" command is implied as last command in a menu.lst entry, but must be given explicitely from command line)

Read around for the various commands available and experiment a bit....

jaclaz

#12 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 26 May 2008 - 11:07 PM

I really don't know what to do.

My pendrive wasn't bootable anymore, I must have messed it up trying something.
So I started it all over...


So I did STEP 1 again (HP software and Win98 files) ... tested booting OK!

in STEP2 , as I use WinXP I downloaded GRUB4DOS,extracted the files and now I should use the command "bootlace" instead of "grubinst" right? You were right when you assumed I have only one HD single partitioned, drive C: for Windows XP. So the right to do is at prompt type " bootlace /dev/hdb " ???

and looking ahead, dosfloppy and myfloppy are 2 random images you choose, like mine image1, image2... ?

#13 was_jaclaz

was_jaclaz

    Finder

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

Posted 27 May 2008 - 04:15 PM

To install grub4dos from DOS use bootlace.com
To install under 2K/XP use grubinst:
http://www.disklessa...hp?name=product
http://www.disklessa...-bin-w32-19.zip
(use the grubinst_gui.exe which is the GUI version)

DO NOT use bootlace.com from 2K/XP.

You should read the base tutorial:
http://grub4dos.sour...ub4dos_tutorial
http://grub4dos.sour...oot_code_to_MBR

AND the README_GRUB4DOS.txt:

BOOTLACE.COM cannot function well under Windows NT/2000/XP/2003. It is expected
(and designed) to run under DOS/Win9x and Linux.

After having installed the grub4dos MBR, you must copy grldr and menu.lst to root of the stick

and looking ahead, dosfloppy and myfloppy are 2 random images you choose, like mine image1, image2... ?

Yes, the only "peculiar" thing is that the menu entry that has "chainloader (fd0)/IO.SYS" will only work for a DOS (or win9x/Me) floppy as it chainloads DIRECTLY the system file IO-SYS, bupassing the floppy image bootsector.
All the others use the floppy image bootsector, so they should be able to boot both DOS and Linux based images.

jaclaz

#14 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 28 May 2008 - 12:26 AM

To install grub4dos from DOS use bootlace.com
To install under 2K/XP use grubinst:
http://www.disklessa...hp?name=product
http://www.disklessa...-bin-w32-19.zip
(use the grubinst_gui.exe which is the GUI version)

DO NOT use bootlace.com from 2K/XP.

You should read the base tutorial:
http://grub4dos.sour...ub4dos_tutorial
http://grub4dos.sour...oot_code_to_MBR

AND the README_GRUB4DOS.txt:

After having installed the grub4dos MBR, you must copy grldr and menu.lst to root of the stick


Yes, the only "peculiar" thing is that the menu entry that has "chainloader (fd0)/IO.SYS" will only work for a DOS (or win9x/Me) floppy as it chainloads DIRECTLY the system file IO-SYS, bupassing the floppy image bootsector.
All the others use the floppy image bootsector, so they should be able to boot both DOS and Linux based images.

jaclaz



So I've downloaded grubinst, installed and copied grldr and menu.lst to the root. When I boot from my desktop it shows the following:

Try (hd0,0): NTFS5: No grldrTry (hd0,1): NTFS5: No grldrTry (hd0,2): invalid or nullTry (hd0,3): invalid or nullTry (fd0): FAT16: disk errorError: Cannot find GRLDR in all devices. Press Ctrl+Alt+Del to restart
I think it's searching for the file you told me to copy, but not at the USB stick (HD1), but no idea why...


When I try to boot it from my Laptop it shows only the message: "Missing MBR-helper"
no clue here too...


P.S. I tested in both computers after step 1. No problems there.

#15 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 28 May 2008 - 03:14 AM

Try &#40;fd0&#41;&#58; FAT16&#58; disk error

This indicates (fd0) is FAT16. So we could guess it is your USB device.

Try once more with the latest version labelled "geometry-tune" at http://grub4dos.jot.com/

At this moment grubinst does not feature "geometry-tune", so you might have to use bootlace.com, or manually build/edit your MBR(of your flash drive) according to the GRLDR.MBR(see readme).

Here is a way about how to use bootlace.com:

First, you make your flash drive bootable to DOS and make sure the flash drive is recognized as (hd0), i.e., a hard drive. This can be done on any machine that can boot to DOS with your flash drive(and recognized as C:).

Then at the DOS prompt run this command:

bootlace.com 0x80

The bootlace.com should come from the latest build labelled "geometry-tune". This step can also be done on any machine that can boot to DOS with your flash drive(and recognized as C:).

At last, copy grldr into the root dir of your flash drive, and reboot. The grldr file should also come from the latest build labelled "geometry-tune".

#16 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 May 2008 - 09:09 AM

It seems like the stick is seen as floppy instead of HD, that's strange.

Temporarily, try doing the following:
1) have the USB stick booting DOS (with HP utility and Win98 dos files)
2) copy to the stick grub.exe and menu.lst
3) boot from the stick and from the C:\ command prompt, run grub.exe
(if the stick boots in DOS with another letter like A:\, it could be some setting in your BIOS ;))

What happens? :thumbup:
Please report.

Another thing to try and find the problem:
1) download HD hacker:
http://dimio.altervista.org/eng/
2) save both the MBR and bootsector (Physical and Logical drives respectively) just after using the HP utility
3) run the grubinst (or bootlace.com from DOS) to install the grldr.mbr
4) save again both MBR and bootsector
5) compress the 4 files to a .zip or .7z abd attach the archive to your next post, I'll have a look at them.

jaclaz

#17 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 28 May 2008 - 12:33 PM

It seems like the stick is seen as floppy instead of HD, that's strange.

Temporarily, try doing the following:
1) have the USB stick booting DOS (with HP utility and Win98 dos files)
2) copy to the stick grub.exe and menu.lst
3) boot from the stick and from the C:\ command prompt, run grub.exe
(if the stick boots in DOS with another letter like A:\, it could be some setting in your BIOS ;))

What happens? :thumbup:
Please report.


My desktop stopped booting from USB stick. I'm pretty sure I've tested it before, and now, all of a sudden it doesn't work anymore. "Funny" thing is I tested a bootable diskette in a USB floppy and it booted normally... :thumbup:

My laptop showed no problem with the same stick. It booted as C:\ and grub.exe ran pretty fine. The menu poped up with no problem at all. But I guess it won't work this way, I mean, booting like this, creating an autoexec.bat that calls grub, then load my images from the menu... ?

Another thing to try and find the problem:
1) download HD hacker:
http://dimio.altervista.org/eng/
2) save both the MBR and bootsector (Physical and Logical drives respectively) just after using the HP utility
3) run the grubinst (or bootlace.com from DOS) to install the grldr.mbr
4) save again both MBR and bootsector
5) compress the 4 files to a .zip or .7z abd attach the archive to your next post, I'll have a look at them.


Just did it. Hope it helps.

Attached Files



#18 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 May 2008 - 01:05 PM

My laptop showed no problem with the same stick. It booted as C:\ and grub.exe ran pretty fine. The menu poped up with no problem at all. But I guess it won't work this way, I mean, booting like this, creating an autoexec.bat that calls grub, then load my images from the menu... ?


Yes, if it boots and the stick is seen as C:\ it works allright, it will only take a handful of seconds more when booting.

That's why I called it a temporary solution, we should be able to find a working solution without "going through" DOS.

You can use config.sys instead of Autoexec.bat, to load grub4dos as well.

If you confirm that you booted from the stick, and that you have a C:\ prompt at it, you can try running from the stick bootlace.com as suggested by tinybit on his last post.

I'll have a look at the posted files and see if I can find something "wrong" in them.

jaclaz

#19 garotobom

garotobom
  • Members
  • 9 posts
  •  
    Brazil

Posted 28 May 2008 - 03:35 PM

Yes, if it boots and the stick is seen as C:\ it works allright, it will only take a handful of seconds more when booting.

That's why I called it a temporary solution, we should be able to find a working solution without "going through" DOS.

You can use config.sys instead of Autoexec.bat, to load grub4dos as well.


Just did it. Used config.sys then used the following menu.lst to test :

color black/cyan yellow/cyantimeout 30default 0   title Boot from floppy image   map /images/dos622.img (fd0)   map --hook   chainloader (fd0)+1   rootnoverify (fd0)
and all I get is a lot of junkie characters then "error 30: Disk read error" message. Tried with different working diskette images made with Roadkil's disk image.

If you confirm that you booted from the stick, and that you have a C:\ prompt at it, you can try running from the stick bootlace.com as suggested by tinybit on hos last post.

I'll have a look at the posted files and see if I can find something "wrong" in them.

jaclaz


Will try this next, then post the results...

thanks again

#20 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 May 2008 - 04:51 PM

Just did it. Used config.sys then used the following menu.lst to test :

color black/cyan yellow/cyantimeout 30default 0   title Boot from floppy image   map /images/dos622.img (fd0)   map --hook   chainloader (fd0)+1   rootnoverify (fd0)
and all I get is a lot of junkie characters then "error 30: Disk read error" message. Tried with different working diskette images made with Roadkil's disk image.

If you use a pre-made menu entry, we cannot say which part produces the error. ;)You should try the commands one by one from command line, and post the feedback of each one.Also, using a menu entry almost, but not quite, completely unlike the suggested ones has a rather low probability of success. :thumbup:Given that you have a /images/dos622.img file, double check the CaSe NaMe, then try this menu.lst, EXACTLY AS IT IS:

timeout 30default 0title dos622.img 0root (hd0,0)map --mem /images/dos622.img (fd0)map --hookroot (fd0)chainloader (fd0)/IO.SYStitle dos622.img 1find --set-root /images/dos622.imgmap --mem /images/dos622.img (fd0)map --hookroot (fd0)chainloader (fd0)/IO.SYStitle dos622.img 2root (hd0,0)map --mem /images/dos622.img (fd0)map --hookroot (fd0)chainloader +1title dos622.img 3find --set-root /images/dos622.imgmap --mem /images/dos622.img (fd0)map --hookroot (fd0)chainloader + 1title unhook memorymap --unhook

If an entry does not work, before attempting to use another one, run the "unhook memory" entry.If none of the above entries work, do enter the commands one by one on command line and report feedback of each command.I had a quick look at the MBR and bootsector you posted, and the only problem I can see is that the CHS addresses are not on a head boundary. Since the partition is 0E (LBA mapped, this should not be a problem if motherboard BIOS supports booting from a LBA mapped partition, but it may cause a problem if motherboard wants CHS mapping). This would explain why the stick boots on one PC but not on the other.Once we have solved the problem about grub4dos not booting the floppy image(s) will see to find a solution to have the stick boot in the other PC also.
jaclaz

P.S.: Of course, any of the above won't work if the USB stick is seen as (fd0), are you positive that you get a C:\ prompt in DOS?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users