Page 1 of 6 123 ... LastLast
Results 1 to 10 of 55

Thread: HOWTO: Boot from USB Flash Drive using Grub

  1. #1
    Join Date
    Mar 2006
    Beans
    Hidden!

    HOWTO: Boot from USB Flash Drive using Grub

    I have found a way to use grub to boot from usb (avoids all detection issues at boot). This howto works specifically for xubuntu 8.10, but you can apply the same process for Ubuntu and Kubuntu.

    This is thanks to the USBCDX810.iso from www.pendrivelinux.com, which is designed to create a bootable cd-rom when your PC cannot / will not boot directly from a usb flash drive. Here's how you do it. (Howto probably not for Newbies )

    Requirements: A PC with some kind of Linux installed with grub as the bootloader. If you have a Windows install and want to acheive the same thing, see TJCIB's post further down. I did this using my Xubuntu 8.10 hard drive installation, you may need to modify paths if your distro / grub puts things / requires things in a different place.
    Download the USBCDX810.iso from here: http://downloads.sourceforge.net/pen.../USBCDX810.iso (only @ 10mb)

    Using gmountiso or similar iso mounting program mount the iso

    Create a new folder in your /boot directory, I used /boot/usb-boot
    Code:
     sudo mkdir /boot/usb-boot
    Copy the grub folder, vmlinuz and initrd.gz files across from the mounted iso to your new directory
    Code:
    cp -R /media/iso/boot/* /boot/usb-boot
    where /media/iso is the location of your mounted iso

    Next open up your grub menu.lst:
    Code:
    sudo nano /boot/grub/menu.lst
    Add the following to the bottom:

    title Run Xubuntu 8.10 from USB FLASH DRIVE
    root (hd0,0)
    kernel /boot/usb-boot/vmlinuz file=/cdrom/preseed/xubuntu.seed boot=casper noprompt cdrom-detect/try-usb=true persistent quiet splash
    initrd /boot/usb-boot/initrd.gz
    boot
    This assumes your system is running on the first partition of the first hard drive. Substitute (hd0,0) for the correct path. You can edit out quiet and splash if you like to watch what is going on, and remove the persistent entry if you are not running a persistent flash drive.

    Save out, unmount the iso and reboot, inserting your flash drive as you go.

    You may want to edit your bios settings to stop your PC directly booting from the flash drive. (Yes, this sounds odd, mine does, but I wanted a way of doing this from grub, so I stopped the bios from doing it)

    On reboot, press ESC if you need to show your grub menu, then select the Run "Xubuntu 8.10 from USB FLASH DRIVE" entry at the bottom, and with any luck, you should start booting up from your USB Flash Drive.

    A bit more work, but a more elegant solution in my opinion.

    pendrivelinux also has similar boot isos for Ubuntu and Kubuntu, and you can edit the menu.lst lines to your own preference.

    Enjoy

    See also zasf's post about the DIY approach for a boot CD

    EDIT

    Although the link for the boot cd is still up, pendrive linux have changed things a biyt and now tell you how to create a boot cd rather than providing one.

    For xubuntu 8.10 go here: http://www.pendrivelinux.com/usb-boo...r-xubuntu-810/

    They don't appear to have moved up to 9.04 yet
    Last edited by Jose Catre-Vandis; May 19th, 2009 at 12:15 AM.
    No longer participating......

  2. #2
    Join Date
    Jan 2008
    Location
    Belem, Brazil
    Beans
    197
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Boot from USB Flash Drive using Grub

    LOL,

    I just did the same thing logging my steps to make a howto.
    I was using Ubuntu. But got all the same steps as you except for the directory name which is personal preference.

    Thanks for confirming what I did.

    I also used
    http://www.icpug.org.uk/national/lin...00-linnwin.htm
    as a resource

    Fun mini-project!

  3. #3
    Join Date
    Jan 2008
    Location
    Belem, Brazil
    Beans
    197
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Boot from USB Flash Drive using Grub

    In an attempt to be a little more original (since you did my idea a few months before me) I thought I would try to do it through windows.

    I used the method from Win'N'Lin NewB combined with the files from pendrivelinux.com to hook into the Windows XP boot loader.

    This means no messing with your MBR or anything, it is basically just adding a few files and editing a few text items.

    Thanks for the inspiration!

  4. #4
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HOWTO: Boot from USB Flash Drive using Grub

    Why not list out the steps and the software/scripts/actions required to do it through windows?
    No longer participating......

  5. #5
    Join Date
    Jan 2008
    Location
    Belem, Brazil
    Beans
    197
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOWTO: Boot from USB Flash Drive using Grub

    I made a HOWTO for the method of hooking into the Windows Bootloaders instead of installing grub to the MBR.

    Here is the link
    http://ubuntuforums.org/showthread.php?t=1056601

    my credits are on that page, it wasn't a totally original idea =)

  6. #6
    Join Date
    Nov 2007
    Location
    InThisArmOfTheMilkyWay
    Beans
    60
    Distro
    Ubuntu

    Exclamation Re: HOWTO: Boot from USB Flash Drive using Grub

    You both need to clean this up and the original was HOW TO BOOT FROM GRUB BOT BIOS!!! STOP CONFUSING PEOPLE! Thats great you were able to do that but AGAIN IT IS TO MUCH INFO! And the info that is there is not that clear. So when you go into how to do this from WINDOWS is not only misleading it is misinformation! <snip>

    Confused and upset Newbie
    Last edited by bapoumba; February 17th, 2009 at 01:56 PM. Reason: Snipped inappropriate comment.

  7. #7
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HOWTO: Boot from USB Flash Drive using Grub

    @ mbele3000: not sure we understand what you mean..
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  8. #8
    Join Date
    Nov 2007
    Location
    InThisArmOfTheMilkyWay
    Beans
    60
    Distro
    Ubuntu

    Re: HOWTO: Boot from USB Flash Drive using Grub

    OK Grub and Dos are 2 different things and are for 2 different operating systems! The original guide is explaining how to boot a Ubuntu via Grub (even though the instructions are VERY UNCLEAR). Then TJCIB in the same thread confuses the matter by "explaining" how to do the same thing in Windows which has NOTHING to do with the original thread so it confuses things!
    I have a old IBM Netvista and the BIOS (DOS NOT GURB!) does not have a option to boot from USB. So I was searching to see if there was a way to do this through GRUB. I followed the instructions for doing the Grub thing and to no avail (very frustrating to say the least).
    The reason I left that "addition" to the thread was to express my frustration as a new user of Ubuntu and to say Please clean it up and clarify the steps in the Grub explanation and Differentiate the explanation regarding the Windows explanation.
    Than You All!

  9. #9
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HOWTO: Boot from USB Flash Drive using Grub

    Okay, the other members in this thread will say if I'm correct (I do not have much experience in the field), but you won't be able to boot from a usb drive if your bios does not support it.
    Grub is the default bootloader used by Ubuntu (there are others around) and not an OS (Operating System). The purpose of the thread is to delegate the usb boot to grub, and looks quite appropriate to me, although probably not what you are looking for.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  10. #10
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: HOWTO: Boot from USB Flash Drive using Grub

    As far as I understand it, my howto does not require a computer that can "Boot" from a USB drive, just a usb port with a bootable installation (e.g. pendrivelinux / Create a USB disk)

    I know this works on three counts. 1. I disabled my USB bootability in the bios on one PC and the setup I described worked. 2. On a ancient laptop that has just one usb port and nothing in the bios about booting from it, I am able to boot from the USB drive. 3. On another newer laptop that is supposed to boot from USB, but refuses and dies when trying through the bios, will boot up when using my method.

    To simplify things, I suggest that mbele3000 tries the pendrivelinux method to boot using the Boot CD with the usb drive in place. If this doesn't work, there must be something wrong with a) the usb installation, b) the CD, c) Instructions not followed quite right. Can mbele3000 try the usb drive and the CD on another PC for testing?. If this does work, then move to the next stage and follow my howto. The CD and the USB versions have to match - 8.10 to 8.10 in my example.

    Can't take credit for TJCIB's effort, haven't tried myself, but understand what has been done. To my mind this thread is about creating a bootable environment of a USB installation of 8.10, and although my howto was about doing it through grub, the thread became (hard drive) OS agnostic as we seek to boot Ubuntu from USB. If I want to boot Ubuntu from a USB stick, I beleive it is useful to know how to do this either through grub or dos, then end result is the same, Ubuntu booting up on a PC.

    I will edit the howto to include the need for grub to be installed on the hard drive of the computer, within a bootable environment, in my case, Linux. I guess TJCIB's effort is the same but requires a Windows installation. I try to make no assumptions about other users abilities and skill level when writing howtos, but still being a newbie (3 years in!) myself, it may be I will miss a step here and there. I wrote it as I did it. (If I go on any longer I'll have to start grovelling, and I am not quite sure why I should) Bring back "OMG Pink POnies"
    Last edited by Jose Catre-Vandis; February 17th, 2009 at 10:52 PM.
    No longer participating......

Page 1 of 6 123 ... LastLast

Tags for this Thread

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
  •