This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Booting gPXE from a memory stick partition with SYSLINUX ====== Much like the howto [[:usbwithstorage]], this will guide you through installing gPXE on your flash drive (or any other FAT/ext234/btrfs partition for that matter) without losing ability to store files on it. In fact, using EXTLINUX or SYSLINUX, it's possible to use this method to make almost any medium gPXE-bootable. **Warning:** Following this guide is generally quite safe, but if you have important data on your USB stick, you may want to make a backup first just to be safe. ==== Getting SYSLINUX ==== I'll leave this part mostly down to you. It's probably available in your distribution's package manager, but if not, you can get it from http://syslinux.zytor.com ==== Making the partition bootable ==== The partition will first need to be labelled as "boot" using fdisk. Start fdisk. As root: <code>fdisk /dev/sdb</code> Replace /dev/sdb with your disk. Type "p" to show your partition table. Eg, heres mine: <code> Device Boot Start End Blocks Id System /dev/sdb1 1 1012 1035245 83 Linux </code> Identify which partition it is which you want to make bootable. If, like me, you only have one, this task is trivial. Type "a" to toggle the bootable flag, and it will ask you which partition number. This done, you can type "w" to write the changes and exit. ==== Building and copying the gPXE image ==== Simply enter the source directory (gpxe-*/src) and: <code>make bin/gpxe.lkrn</code> This creates a gPXE image which acts a bit like a linux kernel, meaning SYSLINUX will recognise it as its own. Copy this to your mounted flash drive: <code>cp bin/gpxe.lkrn /media/disk/</code> Replace /media/disk/ with the appropriate path. ==== Installing SYSLINUX ==== //Follow these steps if you are using a FAT16 or FAT32 partition// Now SYSLINUX will need a config file. Here's how you can make a really simple one. No menus or anything: <code>cat > /media/disk/syslinux.cfg << EOF default gpxe label gpxe kernel /gpxe.lkrn EOF </code> If you want anything more complex, see the SYSLINUX documentation. Now that the config's done, you can unmount and install SYSLINUX on the partition. As root: <code>umount /dev/sdb1 syslinux -s /dev/sdb1</code> Replacing /dev/sdb1 with your partition. Continue with the "Installing an MBR" section below. ==== Installing EXTLINUX ==== //Follow these steps if you're using an ext2/3/4 or btrfs partition. ext4 and btrfs are only supported in EXTLINUX 4.0.0 and later// EXTLINUX requires a different filename for its config file compared to SYSLINUX. Generate a simple one like this: <code>cat > /media/disk/extlinux.conf << EOF default gpxe label gpxe kernel /gpxe.lkrn EOF </code> To install EXTLINUX, you don't even need to unmount the medium. As root, simply: <code>extlinux -i /media/disk/</code> Continue with the "Installing an MBR" section below. ==== Installing an MBR ==== You should have a SYSLINUX mbr.bin file somewhere on your system. For me, it was /usr/share/syslinux/mbr.bin As root, write this to your flash drive: <code>dd if=/usr/share/syslinux/mbr.bin of=/dev/sdb</code> And you're done! Now you should be able to boot gPXE from the memory stick.


Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code syslinux (generated for current page)