Sign in with
Sign up | Sign in
Your question
Closed

Can I create USB boot stick from scratch?

Tags:
Last response: in Linux/Free BSD
Share
October 23, 2011 6:26:49 AM

I used MultiBootISOs.exe (now replaced by YUMI.exe) to create a diagnostic FAT32 USB boot stick for my Vista32 system and everything works perfectly. I like that it allows me to add my own ISOs instead of choosing from a set of preset ISOs.

The only "system" files in the USB root are:
1.) Boot (hidden folder):
-BCD (binary file)
-BCD.LOG (binary file)

2.) ldlinux.sys (hidden binary file)

3.) grub.exe

4.) syslinux.cfg (text file containing following):
  1. default grub
  2. LABEL grub
  3. KERNEL grub.exe

The rest of the stick contains menu.lst and a bunch of diagnostic ISOs and folders referenced within menu.lst. I make changes simply by adding or subtracting ISOs and amending menu.lst as needed.

Are the 4 items listed above generic enough that they can be downloaded from the Internet and copied to my USB stick to make it bootable from scratch? Is it necessary to make the boot folder and ldlinux.sys hidden?

Finally, I'd like to know if my menu.lst would work for a 64-bit system as is, or if I'd have to change the hd32 references to hd64 to make it work. Thanks.

Heavily edited menu.lst sample:
  1. default 0
  2. timeout 120
  3. color NORMAL HIGHLIGHT HELPTEXT HEADING
  4. splashimage /bgimage/tux.xpm.gz
  5. foreground=0000FF
  6. background=0066FF
  7.  
  8. title Avira AntiVir Rescue System v20111019080734
  9. find --set-root /avira_rescue_system.iso
  10. map --mem /avira_rescue_system.iso (hd32)
  11. map --hook
  12. root (hd32)
  13. chainloader (hd32)
  14.  
  15. title Lucid Puppy Linux 5.2.5
  16. find --set-root /lupu-525.iso
  17. map /lupu-525.iso (hd32)
  18. map --hook
  19. root (hd32)
  20. chainloader (hd32)
  21.  
  22. title YLMF Linux 1.0
  23. find --set-root /YlmF_OS_EN_v1.0.iso
  24. map /YlmF_OS_EN_v1.0.iso (hd32)
  25. map --hook
  26. root (hd32)
  27. chainloader (hd32)
  28. kernel /casper/vmlinuz file=/preseed/ylmf.seed boot=casper
  29. iso-scan/filename=/YlmF_OS_EN_v1.0.iso quiet splash
  30. initrd /casper/initrd.lz
  31.  
  32. #this is for a space
  33. title
  34. kernel
  35. initr
  36.  
  37. title Restart The Computer
  38. reboot

Best solution

October 23, 2011 6:44:36 PM

You did some excellent homework before heading over here, and you have most of it right.

The only things that you're missing are

1) There's likely a bit of some early bootloader code in the USB stick's MBR (first 512 bytes of the drive, usually hidden for the casual observer) so you'd likely need to grab the non-partition tables parts of the MBR (the first 446 bytes) and put them into the drive you wish to use to create a boot usb drive (ref)

2) The menu.lst entries are to tell grub how to find various bits of code referenced in each entry. It seems like, for some reason, it was under the impression that this usb drive was the 33rd disk on your system... and doing a bit of research it seems that's the way grub4dos works, as far as virtual optical drives are concerned. So, no, it has nothing to do with bit-ed-ness
Share
October 23, 2011 10:44:51 PM

Thanks for your prompt and informative response bmouring. I was hopiing things would be easier but your step 1 info makes the homemade option too fiddly for me. I'll stick with using 3rd party apps to create the initial boot USB.
Score
0
Related resources
October 24, 2011 2:10:18 PM

Nice little project and something I might have to have a play with. There are a few methods you can use to set up the boot sector, try having a look at this list:

http://www.bootdisk.com/pendrive.htm

Personally I just use unetbootin for the convenience. Prior to that I've used a batch file that copied the boot sector over which did much the same thing.
Score
0
October 26, 2011 12:21:27 PM

audiovoodoo said:
Nice little project and something I might have to have a play with. There are a few methods you can use to set up the boot sector, try having a look at this list:

http://www.bootdisk.com/pendrive.htm

Personally I just use unetbootin for the convenience. Prior to that I've used a batch file that copied the boot sector over which did much the same thing.
Thanks for your reply too. Most of the methods from your link required 3rd party assistance. However, those that didn't were a bit too convoluted for my skills.
Score
0
October 27, 2011 1:32:59 PM

audiovoodoo said:
Nice little project and something I might have to have a play with. There are a few methods you can use to set up the boot sector, try having a look at this list:

http://www.bootdisk.com/pendrive.htm

Personally I just use unetbootin for the convenience. Prior to that I've used a batch file that copied the boot sector over which did much the same thing.



The nerd that I am, I have a normal, as-compatible-as-possible x86 GRUB stage1 image on my phone, ready to be dd'd into a drive's MBR
Score
0
November 8, 2011 12:07:35 AM

Best answer selected by mel2000.
Score
0
November 8, 2011 2:58:13 AM

This topic has been closed by Amdfangirl
Score
0
!