Results 1 to 10 of 15

Thread: Howto help USB boot drives

Threaded View

  1. #1
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Howto help USB boot drives

    Content of the posts

    1. A tool that helps boot some computers from [other] USB boot drives - Chainloader - (This first post, no link needed)

    2. Check download and clone image in Windows

    3. Chainloading with the 40_custom method when you have linux and grub installed

    4-5. Add a pendrive to grub simply by inserting the pendrive and doing 'sudo update-grub'

    6. Pendrive speed test

    7. Pendrive ability to boot

    8. Pendrive lifetime

    9. Repair the partition table and file system of a pendrive

    13. Checking the iso file and the boot drive - detailed tips

    14. Restore a USB boot drive



    A tool that helps boot some computers from [other] USB boot drives - Chainloader

    What is new, why this tutorial, when I have already written Howto make USB boot drives? Isn't it enough to be able to use mkusb or the other tools?

    It can be hard to boot some computers with some USB pendrives. New and fast USB 3 pendrives are nice when booted, but can be unwilling to boot from the built in menu of some computers. This is described at the following links

    https://help.ubuntu.com/community/In...#Prerequisites
    https://help.ubuntu.com/community/In...puter_from_USB

    I have found, that

    - the same USB pendrive can boot with one operating system, but not another one, in some computers, while it boots happily in other computers with almost any operating system,

    - the Ubuntu 13.04 based grub2 bootloader is 'a good booter' in many computers (it is used in the original One Button Installer),

    - many USB pendrives boot when selected from the grub menu, even if they will not boot from the built in menu of some computers.

    So I made a small chainloader, that

    - is willing to boot and

    - is able to chainload to other pendrives or other mass storage devices.

    When this chainloader is installed into a pendrive, that is good for booting (but maybe slow), we have a tool to help [other] USB boot drives.

    Comparison with Plop


    Maybe you have used or heard of Plop, a tool to boot from one device (typically a CD or floppy drive) and help booting another drive, typically a USB drive. That tool is useful for old computers. The chainloader is useful for middle-aged computers, for example computers without a CD/DVD drive, where it can be hard to boot from a USB drive, and when you want to run from a fast USB 3 drive that is unwilling to boot.

    UEFI

    New computers are often delivered with another operating system that is locked into UEFI, which makes things complicated. This chainloader is not running in UEFI mode. Use other tools and methods, for example according to the following links

    https://help.ubuntu.com/community/UEFI
    https://help.ubuntu.com/community/UEFIBooting
    https://help.ubuntu.com/community/Boot-Repair


    Pendrives that are good for booting


    The following pendrives were tested by Pendrivelinux a few years ago. At least some of them are still available in the market (and I do not mean the second hand market)

    SanDisk – Cruzer Micro 128M-2G
    RIDATA – Ritek Mini Spin 128M-2G
    OCZ – Rally2 (Old Style) 128M-2G
    OCZ – Mini Kart 128M-1-2G
    PQI – PQI i810 1-2G
    PNY – Attache 1-2G

    I have SanDisk – Cruzer Micro 4 GB and 16 GB, and they are also good booters.

    I have SanDisk – Cruzer Blade 4 GB (I bought a 10-pack). They are good booters and quite cheap (at least in Sweden) and I can recommend them for the chainloader.

    USB 3 pendrives

    The Kingston DataTraveler Ultimate G2 16GB USB 3 pendrive is tested and recommended as a good booter by http://usb.userbenchmark.com/ but it can be hard to find in the market today.

    I have Sandisk Extreme USB 3.0 16GB and 32GB and they are very fast and give good value for the money. I have also a Transcend JetFlash 700 USB 3.0 32GB. It is not very fast compared to Sandisk Extreme but definitely faster than standard USB 2 pendrives and a good booter, that I have tested for a long time. I use it for the One Button Installer; there is space enough for many tarballs. Sandisk Cruzer Blade 4 GB is cheap and slow, and a reliable booter, that has only failed once for me during years.

    Tests of speed and ability to boot are described in posts #6 and #7 (in this thread).

    The Chainloader software

    A compressed image file of the chainloader software is available at the following links

    http://phillw.net/isos/linux-tools/
    https://drive.google.com/folderview?...jA&usp=sharing

    Code:
    -rw-r--r-- 1 root root 24426712 dec 31 23:41 chainloader-101MB_13.04.img.xz
    The corresponding md5sum is

    Code:
    8d41e2873511e08c05a1ddc3c061d230  chainloader-101MB_13.04.img.xz
    and it can be installed with the following command (if mkusb is in the same directory)

    Code:
    sudo bash mkusb chainloader-101MB_13.04.img.xz
    mkusb helps you write to the correct target device (your pendrive). The chainloader expands from 24MB to 101MB. You can use a small pendrive (if it is a good booter).

    The file grub.cfg looks like this (and you can modify it if you wish)

    Code:
    set timeout=20
    set default=1
    
    #echo listing available drives (hdX) and partitions (hdX,msdosY) 
    #ls
    #echo -n "Press ESC to continue to the menu "
    #sleep -v -i ${timeout}
    
    menuentry "Boot (chainload) first drive (on hd0) usually internal, maybe not now" {
            insmod part_msdos
            insmod fat
            set root='(hd0)'
            chainloader +1
    }
    menuentry "Boot (chainload) drive (on hd1)" {
            insmod part_msdos
            insmod fat
            set root='(hd1)'
            drivemap -s (hd0) ${root}
            chainloader +1
    }
    menuentry "Boot (chainload) drive (on hd2)" {
            insmod part_msdos
            insmod fat
            set root='(hd2)'
            drivemap -s (hd0) ${root}
            chainloader +1
    }
    menuentry "Boot (chainload) drive (on hd3)" {
            insmod part_msdos
            insmod fat
            set root='(hd3)'
            drivemap -s (hd0) ${root}
            chainloader +1
    }
    menuentry "Boot (chainload) drive (on hd4), edit if necessary: set root='(hd5)' ..." {
            insmod part_msdos
            insmod fat
            set root='(hd4)'
            drivemap -s (hd0) ${root}
            chainloader +1
    }
    menuentry "List available drives (hdX) and partitions (hdX,Y)" {
        ls
        echo -n "Press ESC to continue to the menu "
        sleep -v -i 20
    }
    menuentry "Long list drives (hdX) and partitions (hdX,Y)" {
        ls -l
        echo -n "Press ESC to continue to the menu "
        sleep -v -i 20
    }
    menuentry "Long list drive 1 (hd1) and partition 1 (hd1,1), edit if necessary" {
        ls -l (hd1,1)
        echo -n "Press ESC to continue to the menu "
        sleep -v -i 20
    }
    Chainloading with the 40_custom method when you have linux and grub installed

    In the particular case, that you have linux and grub installed there is also the 40_custom method, and it is better than using a USB chainloader. As already described, some pendrives boot from grub even if they won't boot from the computer's own (bios/uefi) USB boot menu entry. See the a detailed description in post #3.
    Last edited by sudodus; September 12th, 2016 at 12:02 PM. Reason: the first post will be updated when necessary

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
  •