Linux Lubuntu - How to boot a USB 3.0 drive
Do You Have USB 3.0 ?
Does your PC have USB 3.0 ports ?
New motherboards have USB 3.0 ports. But not all can boot from them. Here is a workaround to take advantage of 3.0 speeds by booting Lubuntu (Ubuntu) Linux from one.
Extreme USB 3.0 ___ ack: sandisk.com
USB 3.0 vs USB 2.0
There's only one reason you would use USB3 over USB2.
In addition, USB 3.0 uses full duplex meaning it can read and write at the same time.
Drive Station ack: buffalotech.com
Here is a table showing the difference ;
480 Mb/s = ( 60 MB/s )
5 Gb/s = ( 625 MB/s )
280 Mb/s = ( 35 MB/s )
4 Gb/s = ( 500 MB/s )
Why can't I boot my USB 3.0 drive ?
Most people know we can boot a PC from a USB port. That port is most likely USB2.0. It was not until the latter part of 2009 that motherboards came out with USB3.0 ports. But even today (2013), this is no guarantee that a USB3.0 drive will boot. The hardware manufacturers have given priority to just making the devices work, 'booting' is still a low priority.
What's in a boot?
The word 'boot' involves a number of things. Here, I'll outline a common Linux process.
First the BIOS must recognise the drive as bootable,and load/execute the bootloader (known as 'bootstrapping').
The bootloader then loads a 'temporary' OS which must again recognise the drive and also be 'willing' to use it as the 'root' filesystem (i.e the 'real' OS).
For USB 3.0 to boot, 3 things must work ;
a) The device (thumbdrive,card reader or hard disk) must support booting by showing itself as a bootable device. This is dependent on the circuitry inside the device (and the format parameters of the partition.) This is no biggy, most USB3.0 drives can do this.
b) The motherboard BIOS (or add-on card) must support USB 3.0 booting.
This is the biggest stumbling block. The average lifespan of a PC is about 4-5 years. Which means most of us are using PCs that don't have that vital new BIOS.
c) The OS (Operating System, eg. Linux,Windows) must also support a USB 3.0 boot by having the right device drivers and must be willing to boot a removable drive. For Linux, this is no problem, but for Windows, well, see below.
So what now ? Are we screwed ?
Newer motherboards with USB3.0 also have USB2.0 ports for compatibility. In fact the chances are that you'll find more USB 2.0 ports than USB3.0.
As long as you can boot with a USB2.0 and using Linux, then you can 'piggyback' the USB2.0 boot to load the 'real' OS sitting on a USB3.0 drive. (sounds like fun eh?).
The Launch drive
In summary, we are borrowing the 'boot' off a USB2.0 port to load from a USB3.0 drive on a USB3.0 port.
Of course, this means you need a small flash drive or similar device on the USB2.0 port. This 'launch' drive can be as small as 30MB. It carries a copy of the kernel, and initial ramdisk and the bootloader.
Okay, let's get to the meat.
The following works for Lubuntu (Ubuntu) Linux.
e.g for our example,
I'm using /dev/sdc1 as the launch drive
and /dev/sdb1 as the main drive
Stuff You Need
A main drive (USB3.0)
e.g flash disk or external USB 3.0 harddrive with Lubuntu.
See (How to Install Lubuntu To a USB Stick) or ( How to Clone your system )
A 'launch' drive (USB2.0) e.g 1GB flashdrive, or sdcard+reader.
In Lubuntu, use gparted to delete all partitions and create a new ext4 partition. Also, flag it as 'bootable' within gparted.
As always, I recommend extlinux,
Install 'extlinux' using you package manager (e.g Synaptic).
After this, you will have the extlinux command ready at hand.
A running PC with Lubuntu (or derivaive of Ubuntu Debian) to create files.
1. Copy the kernel and initial ramdisk from the main drive to the launch drive.
cp /mnt/sdb1/boot/initrd.img-3.2.0-23-generic-pae /mnt/sdc1/
cp /mnt/sdb1/boot/vmlinuz-3.2.0-23-generic-pae /mnt/sdc1/
(or something similar, depending on your kernel version)
2. Create a file called extlinux.conf and put it on the launch drive
with these contents;
SAY Now booting the kernel using EXTLINUX...
APPEND ro root=UUID=88238cce-5b6c-4349-b617-090e9add0ac3 initrd=initrd.img-3.2.0-35-generic
(the last line (APPEND) is one long unbroken line)
(don't use the UUID in the example ! )
The key here is root=UUID=, is the main drive. Get the UUID by using the 'blkid' command;
blkid | grep /dev/sdb1
3. Install the bootloader onto the launch drive.
extlinux -i .
Don't forget the '.'
This will create ldlinux.sys, and update the boot sector to boot to it.
You should end up with the following files (or similar) on the Launch drive;
4. Ensure the Launch drive is inserted into the USB2.0 port.
Ensure the Main drive is inserted into the USB3.0 port.
5. Set your BIOS to boot the USB2.0 port the Launch drive is in.
You should now be running the main OS off USB3.0 !
If you wish, you can unmount the Launch drive or just leave it there.
That's all for now!