[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

When BIOS does not support booting from USB device



This is a proposed contribution to the manual. There has been enough discussion of this topic in the Knoppix and Puppy Linux forums to qualify it as a FAQ. I am not a programmer, so this should be reviewed by someone who understands the software, and entered into the manual by someone who knows how to use git.


WHEN BIOS DOES NOT SUPPORT BOOTING FROM USB DEVICE:

It is often convenient, and sometimes necessary, to boot a live distro without using a CD. A USB flash drive is handy, but not all BIOS chips support booting from one. It is possible to boot debian-live from a Windows NTFS hard drive without without partitioning, without modifying the master boot record, and using only Windows software to write to the NTFS filesystem. This is done by chaining from the Windows bootloader to the grub4dos bootloader.

I'll assume here that someone using a Linux live CD for anything but installation will start with Windows on NTFS system drive C. The procedure to boot from C: involves copying some files to that drive and then adding one line to the Windows system file boot.ini. Using Windows to perform these operations avoids all risk of corrupting the NTFS system drive. The following instructions are for Windows XP; modification for Vista (and presumably Windows 7) can be found at http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial.

What files you need and where to put them:

* Copy vmlinuz, initrd.img, and filesystem.squashfs to C:/live
* Copy menu.lst to C:/boot/grub
* Copy grldr to C:/
* edit C:/boot.ini (save backup!) by adding the single line
         C:\grldr="show GRUB menu"

Where to get the files:

vmlinuz, initrd, and filesystem.squashfs can be obtained by burning the iso and copying them from the resulting CD, or directly from the "web" distribution. filesystem.squash may require renaming from something like debian-live-503-i386-rescue.squashfs.

Get grldr (the grub4dos bootloader, a Windows executable) from https://gna.org/projects/grub4dos/

For menu.lst, edit the following example to match your circumstances. (hd0,1) means the second partition in the first hard drive (hd0); (hd1,0) would be the first partition in the second drive. To identify the location and partitioning of your system disk in Windows XP, right click 'My Computer'->Manage->Storage->Disk Management (or examine system file C:/boot.ini). The boot codes may also require editing. They can be obtained by examining the isolinux.cfg files on the CD. The menu syntax seems to be a bit different for grub4dos than for isolinux, so keep to the following pattern.

######################################################################################
# menu.lst for grub4dos
# set the first option to be the default
default 0
# set the number of seconds delay before invoking the default option
timeout 10
# list of options
#
# keyword "title" starts a new option
#
title debian-live 6 alpha nonpersistent
  rootnoverify (hd0,1)
  kernel (hd0,1)/live/vmlinuz  boot=live union=aufs
  initrd (hd0,1)/live/initrd.img
  boot
#
title debian-live 6 alpha persistent
  rootnoverify (hd0,1)
  kernel (hd0,1)/live/vmlinuz  boot=live union=aufs persistent
  initrd (hd0,1)/live/initrd.img
  boot
#
title debian-live 6 alpha failsafe
  rootnoverify (hd0,1)
kernel (hd0,1)/live/vmlinuz boot=live union=aufs noapic noapm nodma no mce nolapic nosmp vga=normal
  initrd=/live/initrd.img
  boot

#######################################################################################

Note:
/live/filesystem.squash can be put on either system drive c: or on an external USB drive (flash or HD). The device where it resides will be mounted readonly. Manual mounting is required for any other device, or to remount the readonly device as read-write.




Reply to: