Page 1 of 10 123 ... LastLast
Results 1 to 10 of 100

Thread: Howto Boot Ubuntu From Live USB using extlinux Bootloader

  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

  2. #2
    Join Date
    May 2006
    Location
    100acrewood
    Beans
    7,480
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Excellent. I will try this out soon. Looks neat!

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

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Well give some feedback when you do give it a try, So I know I haven't missed something.

  4. #4
    Join Date
    Sep 2006
    Location
    Denmark
    Beans
    202
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Thanks for this - I've been looking for something like it for a while now. One or two things, though....

    The bit with mbr.bin had me a bit confused: As the extlinux install reported that my device was sda1, I substituted sda1 for sdb in the 'sudo cat mbr.bin > ...' line, untill after a false start or two, I realized that it should be just '/dev/sda'. Probably a noob mistake but maybe you should be a bit more uhm abstract about it?

    Secondly when it finally did boot my Hardy Beta livecd USB, it reported a few 'bad keywords' in extlinux.conf and after seeing the orange spirit level animation for a couple of seconds I was dumped into something called busybox. None of this is to fault your tutorial, I guess it's just a warning that there might be more to it than just this.

    EDIT: Checked out the extlinux.conf file which contains a number of references to /cdrom/... might this be an issue?
    Code:
    DEFAULT /casper/vmlinuz
    GFXBOOT bootlogo
    APPEND  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash --
    LABEL live
      menu label ^Try Ubuntu without any change to your computer
      kernel /casper/vmlinuz
      append  file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash --
    LABEL live-install
      menu label ^Install Ubuntu
      kernel /casper/vmlinuz
      append  file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.gz quiet splash --
    LABEL check
      menu label ^Check CD for defects
      kernel /casper/vmlinuz
      append  boot=casper integrity-check initrd=/casper/initrd.gz quiet splash --
    LABEL memtest
      menu label Test ^memory
      kernel /install/mt86plus
      append -
    LABEL hd
      menu label ^Boot from first hard disk
      localboot 0x80
      append -
    DISPLAY isolinux.txt
    TIMEOUT 300
    PROMPT 1
    F1 f1.txt
    F2 f2.txt
    F3 f3.txt
    F4 f4.txt
    F5 f5.txt
    F6 f6.txt
    F7 f7.txt
    F8 f8.txt
    F9 f9.txt
    F0 f10.txt
    Last edited by chochem; April 2nd, 2008 at 11:08 AM.

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

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Sorry, you are right I should have made that more clear with the cat command, I will correct that. As for being dumped into busybox, I have never had this problem. It just booted straight into ubuntu for me and all the tutorials for using syslinux and FAT advise the same, to make no changes. I have been experimenting here. Where I place the kernel on the hard drive to give USB support before booting the liveusb, you could try replacing the references to cd with /dev/sda1 as shown. (in extlinux.conf on the usb), Note that with this setup only choice is "LABEL live" you should comment out all the other options that way any errors they cause, won't confuse the situation.
    --edit
    I have noticed that damn smalls isolinux.cfg, uses relative, rather than absolute paths. ie if extlinux.sys is in the root directory as it is in my tutorial, instead of
    Code:
    /cdrom/preseed/ubuntu.seed
    you should be able to do
    Code:
    preseed/ubuntu.seed
    I will experiment more with this..
    Last edited by mick8985; April 2nd, 2008 at 02:36 PM.

  6. #6
    Join Date
    Sep 2006
    Location
    Denmark
    Beans
    202
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Okay, I tried shaving it down to this:

    Code:
    DEFAULT /casper/vmlinuz
    GFXBOOT bootlogo
    APPEND  file=preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz
    LABEL live
      menu label ^Try Ubuntu without any change to your computer
      kernel /casper/vmlinuz
      append  file=preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz
    DISPLAY isolinux.txt
    TIMEOUT 300
    PROMPT 1
    F1 f1.txt
    F2 f2.txt
    F3 f3.txt
    F4 f4.txt
    F5 f5.txt
    F6 f6.txt
    F7 f7.txt
    F8 f8.txt
    F9 f9.txt
    F0 f10.txt
    but I still get 'unknown keyword' and no menu, just a command line, saying 'boot'. Hitting enter starts the default live cd behaviour but as I said, I end up in BusyBox. As it's exactly the same behaviour as before, I guess you're right that the cdrom thing is not to blame. Other than that I have no clue.

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

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Yes with this method, and also the syslinux/FAT method you will only get the boot: prompt. but when you hit enter, it should boot straight to livecd, that isn't an issue (Although I do plan on trying to implement it so you get the full boot menu as on the livecd in future). I think since you are changing the path to /preseed/ubuntu.seed and getting the same error as before, that it isn't loading ubuntu.seed correctly. Can you compare the directory structure on the livecd is the same as the USB and nothing has gone wrong when you copied the files?
    Last edited by mick8985; April 2nd, 2008 at 05:43 PM.

  8. #8
    Join Date
    Aug 2006
    Location
    Pittsburgh, PA
    Beans
    424
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Hello,

    I've been wanting to try this for awhile now, especially since I have a friend who wants Ubuntu, but has a finicky CD Drive. It always drops out during the install and something gets corrupted. So thanks!

    Anyways, I was wondering if it is possible to still maintain a data partition on the USB Drive. I have a 4GB drive with some data on it and would like to turn part of it into a live CD and leave the rest as a FAT partition for data use.

    I assume this is just a matter of making 2 partitions with gparted one for the live cd and one for the data and then copying the data over.

    Do you see any issues with this idea?

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

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    Musicwave, Yeah go for it, make the first partition ext3, and about 1gb for good measure

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

    Re: Howto Boot Ubuntu From Live USB using extlinux Bootloader

    chochem, I just downloaded the hardy cd from ubuntu.com, and it appears to be defective, as even when you burn to cd and try to boot the live session from the menu, it says IO error, Reboot? have tried on 3 computers. Can you test your iso on a cd?

Page 1 of 10 123 ... LastLast

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
  •