Booting a Linux SD card from Windows XP

From LSDevLinux
Revision as of 11:44, 9 October 2009 by Mayhewn (talk | contribs) (Categorize)

Jump to: navigation, search

We (LSDev) have used this process to make a Windows based eee dual boot into Windows or Linux. This process enables the computer to boot from an SD card (or USB stick, CD, etc.), even if the computer is not normally capable of booting from that device.

This process does not require alteration of the MBR (most dual boot processes require MBR alteration, which can render the computer unusable if done badly).

These instructions were compiled using Windows XP and Ubuntu Linux.

Install GRUB4DOS

  • Download GRUB4DOS.
    • Look for the at the bottom of the page (the exact number may have changed since this was written).
  • Copy the grldr file from the downloaded zip file into your C: drive.
  • Right-click on 'My Computer' in the start menu, then 'Properties'
  • Click 'Advanced' and the 'Settings' button under 'Startup and Recovery'
  • Click 'Edit'
  • Add the following line to the end of the file
  • Save the file, and close Notepad.

Install Linux start up files

  • Make a folder called Linux in C:
  • Copy a kernel and an initial ramdisk into this folder
    • You can use just about any generic kernel and initial ramdisk. Copy them from /boot in your linux distribution. The files will be called something like vmlinuz... (the kernel) and initrd... (the initial ramdisk). On Ubuntu Jaunty for example, you have:

Tie them both together

  • Open notepad to create a new file.
  • Paste in the text below, replacing the text in italics:
root (hd0,0)
kernel /Linux/kernel file name root=LABEL=Your SD card label
initrd /Linux/initrd file name

The SD card label is the name of the partition on which your linux is installed.

  • Save, choose 'All Files' as the type, and 'C:\menu.lst' as the name.

Using the system

If all works well, when you start your computer from now on you will see two options. Selecting the first one, 'Windows XP', or not doing anything will cause the computer to start Windows normally. Selecting the second option, 'Linux', will start your Linux on the SD card (your card must be inserted for this to work, it will never be installed to the hard disk).

To remove the boot process, delete the files that you put on to the computer and remove the C:\grldr="Linux" line that you added to the boot file.

To do

This article needs updating with instructions on how to use kexec to switch to the kernel from the installed Linux distribution.