Results 1 to 10 of 100

Thread: Howto Boot Ubuntu From Live USB using extlinux Bootloader

Threaded View

  1. #1
    Join Date
    Aug 2006
    Location
    Teesside, United Kingdom
    Beans
    246
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Post Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Existing tutorials on the internet that cover this subject all seem to describe using the syslinux bootloader which uses the FAT filesystem, which being a Windows filesystem doesn't have support for symlinks or user permissions. This means files need to be moved around to account for the lack of symlinks and even suggest that you need to use Windows to accomplish this, all of this is completely unnecessary.
    You will need to download the ISO for the livecd you wish to use from ubuntu.com

    First things first we want to format the partition, so we will use gparted, which means we need to install it (<-- Please take advantage of these links, it is a tool called apturl, and will automatically download and installed from the repositories in your sources.list with gdebi)

    Code:
    sudo apt-get install gparted
    Ok? so fire up gparted in System > Administration > Partition Editor, change to the usb drive, for me this is /dev/sdb. right click the partition /dev/sdb1, format to > ext2



    Then click apply, it shouldn't take long.



    Now right click on your freshly formatted partition and go to "Manage Flags", select the boot flag

    Does your disk now look like this?

    Good you can close gparted.

    Now we need to copy the files from the livecd to usb disk, but before we can do that we need to mount the ISO you downloaded

    Before we can mount it we need a directory to mount it to..
    Code:
    mkdir iso
    Replace myiso with the name of the livecd iso you downloaded.
    Code:
    sudo mount myiso.iso ./iso/ -t iso9660 -o ro,loop=/dev/loop0
    Now we can just copy over the files to the USB disk in root nautilus (run "gksu nautilus"), to mount the USB disk again just unplug it and plug it back in MAKE SURE YOU SHOW HIDDEN FILES IN NAUTILUS (ctrl + H) as there is a hidden folder called .disk.

    or you could do it in the console

    Code:
    sudo cp -r ./iso/* /media/disk/
    Done? alright, we don't need the ISO anymore so you can unmount it and delete the folder if you like.
    Code:
    sudo umount ./iso && rm -r ./iso
    We're nearly done just another few steps.

    Next we need to install the bootloader, extlinux is part of the syslinux package, so thats what we need to install

    Code:
    sudo apt-get install syslinux
    Unlike LILO which installs entirely to the MBR(master boot record), extlinux is like Grub and installs itself to the file system.
    Code:
    sudo extlinux --install /media/disk/isolinux
    extlinux and isolinux are part of the syslinux family and speak the same language, ie there configuration files are the same, but just have a different name, the ubuntu livecd uses isolinux because it uses the iso9660 filesystem. We're using ext3 so we use extlinux.
    Open up your USB drive in nautilus and in isolinux/ rename isolinux.cfg to extlinux.conf

    or in the console

    Code:
    sudo mv /media/disk/isolinux/isolinux.cfg /media/disk/isolinux/extlinux.conf
    Now create a master boot record on the usb disk.

    Code:
    sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/*YOUR USB DRIVE*
    (where *YOUR USB DRIVE* should be replaced with the path of your drive eg sda or sdb, but NOT sda1 or sdb1)

    When you boot from the usb you will be presented with a prompt like this

    Code:
    boot:
    Just hit enter and the live session will boot.
    Last edited by mick8985; September 9th, 2008 at 10:31 PM. Reason: improvement

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •