Boot Multiple ISO from USB via Grub2 using Linux

 

Original: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/

 

 


Boot ISO Files directly from USB using Grub2 from Linux. Here is one way to create a Multiboot USB Flash Drive from a running Ubuntu (I used the Live CD). You may eventually need a large Flash Drive or USB Hard Drive in order to include every bootable ISO entry. I will add more Bootable ISO files to the grub.cfg file as I find time to test them. Contact me to submit working Bootable Linux ISO grub.cfg entries for inclusion.

 

I. Format your USB Flash Drive to use a Single Partition :

  1. Open a terminal and type sudo su
  2. Type fdisk -l (and note which device is your USB Drive)
  3. Type fdisk /dev/sdx (replacing x with your actual usb device)
  4. Type d (to delete the existing partition)
  5. Type n (to create a new partition)
  6. Type p (for primary partition)
  7. Type 1 (to create the first partition)
  8. Press Enter (to use the first cylinder)
  9. Press Enter again (to use the default value as the last cylinder)
  10. Type a (for active)
  11. Type 1 (to mark the first partition active "bootable")
  12. Type w (to write the changes and close fdisk)

II. Create a Fat32 Filesystem on the USB Flash Drive :

  1. Type umount /dev/sdx 1 (to unmount the mounted partition)
  2. Type mkfs.vfat -F 32 -n MULTIBOOT /dev/sdx 1 (to format the partition as fat32)

III. Install Grub2 on the USB Flash Drive :

  1. Type mkdir /media/MULTIBOOT (to create a directory for the mountpoint)
  2. Type mount /dev/sdx 1 /media/MULTIBOOT (to mount the USB)
  3. Type grub-install --force --no-floppy --root-directory=/media/MULTIBOOT /dev/sdx (to install Grub2)
  4. Type cd /media/MULTIBOOT/boot/grub (to change directory)
  5. Type wget pendrivelinux.com/downloads/multibootlinux/grub.cfg (to get the grub.cfg file)

IV. Test to make sure your USB Device Boots into Grub2 :

Reboot your Computer, and enter your BIOS or Boot Menu. Set the Boot Order to boot from the USB Device. Save your changes and Reboot. If all goes well, you should be presented with a Grub2 Boot Menu.

V. Adding the Bootable ISO files :

  1. Type cd /media/MULTIBOOT (assuming USB is still mounted here)
  2. Follow the instructions for the ISO Distro you would like to add below. Simply click to expand the instructions.

Type wget "releases.ubuntu.com/10.10/ubuntu-10.10-desktop-i386.iso" -O ubuntu.iso

Or rename your existing ISO ubuntu.iso and copy it to the USB device

Type wget ftp.heanet.ie/pub/linuxmint.com/stable/10/linuxmint-10-gnome-cd-i386.iso -O linuxmint10.iso

Or rename your existing ISO linuxmint10.iso and copy it to the USB device

Type wget "downloads.sourceforge.net/project/dban/dban/dban-2.2.6/dban-2.2.6_i586.iso?r=&ts=1292340298&use_mirror=surfnet" -O dban.iso

Or rename your existing ISO dban.iso and copy it to the USB device

Type wget "distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/tinycore-current.iso" -O tinycore.iso

Or rename your exisitng ISO tinycore.iso and copy it to your USB device

Type wget memtest.org/download/4.10/memtest86+-4.10.zip
Type unzip memtest86+-4.10.zip
Type cp memtest86+-4.10.bin memtest86+.bin

Or extract the contents of your memtest86+ zip. Rename the bin to memtest86+.bin and copy it to your USB device

Adding an Unlisted ISO : To try ISO Files that are not yet listed, use the existing menuentry examples in /boot/grub/grub.cfg and append any options normally found in the distributions syslinux.cfg file on the "append" line to the "linux" line of the menu entry.

Please inform me of entries you get to work and I will add them to the list, so that others may benefit as well.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值