Jump to content

[Guide] Making your USB Bootable


Netshroud

Recommended Posts

Making a USB bootable is rather easy. I have seen some guides which say you need a special bootable USB, but logically there is no reason why any USB shouldn't work.

First you need to create your partition table, or modify it. Bootable drives require an "active" partition which is the bootable one. If you're multi-partitioning your USB, make sure that the partition that contains the multipass files is the active one. I used diskpart (comes with windows) to do this.

list disk displays all disks in the system. My USB was disk 7, so I then issued select disk 7. I then ran clean to wipe the drive, then create partition primary. If you're multi-partitioning, run create partition primary size=n where n is the size of the partition in megabytes.

Next select the partition with select partition n where n is the partition for your multipass, shown with list partition. Make the volume active, then format it FAT or FAT32, with format fs=fat32 quick or format fs=fat32 quick. If this is a new USB, remove the "quick" option.

Now we can install our bootloader of choice.

Grub4DOS:

Run grubinst_gui (under Vista/7, right-click and select "Run as Administrator"). Select your USB drive, and click "Install". It should say that the MBR/BS has been successfully installed.

Copy grldr from the latest version of Grub4DOS to the root of your USB, and create a file called "menu.lst". To do this correctly, open notepad and save a blank file to the root of your USB as "menu.lst" with the quotes. Windows Explorer should detect it as a "LST file", a Visual Studio file, or a MASM listing. If it detects it as a text document, you did it wrong.

Grub2:

Run grub-install --no-floppy --root-directory=/media/MULTIPASS /dev/sdb, assuming that your USB is sdb, and is mounted to /media/MULTIPASS. Create a file called grub.cfg in /media/MULTIPASS/boot/grub.

Syslinux:

Run the Syslinux tool (syslinux.exe from the win32 folder for Windows, or syslinux-nomtools in the linux folder for Linux) to install Syslinux to your USB. Under windows, assuming your USB is the E: drive, it's syslinux -ma E:, but run this from a command prompt with elevated priviliges (right-click, Run as Administrator). Create a file called syslinux.cfg in the root of your USB drive.

Link to comment
Share on other sites

AFAIK it should be:

grub-install --no-floppy --root-directory=/media/MULTIPASS /dev/sdb

Fixed.

Anyone else run into the "Error: You need to load the kernel first" issue when working with grub2?

No, I can't say I have. Where does the error pop up?

Link to comment
Share on other sites

Anyone else run into the "Error: You need to load the kernel first" issue when working with grub2?

I've ran into this. The main thing I found wrong was my iso image was corrupted. After putting a working copy of the iso, it booted with no problem. It mostly means that it cannot find the kernel in the ISO or (loop). It Could mean that your iso file is bad, or the path/location of the kernel isn't correct in the grub.cfg. I'm a bit new to grub2, but thats my guess.

Link to comment
Share on other sites

Psychosis, great intro guide.

I installed Ubuntu into a Virtual, removed grub legacy and installed grub2 (no errors) then onto a 8gig USB stick (no errors).

I then created an ISO folder in /media/MULTIPASS/boot

and created a grub.cfg in /media/MULTIPASS/boot/grub

I threw a few ISO's in the ISO folder, and now's where my inexperience jumps in.

what should i do next?

I'm sure it'll probably not work immediately, i wanna try them all with loopback.

How do i get grub2 to auto-update my grub.cfg on the multipass?

Link to comment
Share on other sites

The entry depends on the distro. If you post a syslinux or isolinux entry, I can give you the Grub/Grub2 entry. Note that Loopback and Map only work for images that access the disk through the BIOS. Anything accessing the disk directly will not work (except some linux distros have an option to specify an ISO file to boot from, and it loads its files from there.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...