Ubuntu on an external drive---how to?

Derek Broughton news at pointerstop.ca
Tue Jun 3 00:37:56 UTC 2008


Paul Johnson wrote:

>> Regardless of whether /dev/sda really is the USB drive, there are a
>> couple of other options.
>>
>> 1) You probably can't boot from a USB device if usbstorage, and probably
>> other modules aren't in the initrd image in /boot.  I can't begin to
>> imagine how you make sure the right modules are there.
>>
>> 2) You might try installing grub to the USB drive's partition superblock,
>> rather than the MBR, and chaining from the internal drive's grub.  The
>> entry in the internal drive's boot menu.lst would look like:
>>
>> title           USB Boot
>> root            (hd1,0)
>> makeactive
>> chainloader     +1
>>
> I have done this in Ubuntu 8.04. First, I did it the way you did, and
> after trying to reboot, end up with a grub error.  That grub error
> happens because the boot from the CDROM treats the internal disk as
> sda, but when you boot off the external usb disk, then it becomes sda.

Grub doesn't care, because grub doesn't use those designations.  Grub will
always call the boot device (hd0), and the booting partition is (hd0,N),
where "N" is the partition number, starting from 0.

> There is a second, fool proof strategy, which I have also done.

I don't want to say your system is wrong - it probably works most of the
time, but "fool proof"???

> Step 1. Remove your hard disk from your laptop.
> 
> Step 2. Insert the USB drive, boot from the DVD, and install onto the
> external drive.  I use the custom partition option, because I don't
> like the way Ubuntu does by default.  When It asks about installing a
> boot loader, accept the default (I recall that says (hd0) ).

...which worked just fine for me leaving the internal drive connected (which
is a good thing, because it's usually more trouble than it's worth to
disconnect an internal drive in a laptop, and I only own laptops).

> Reboot after installing, make sure all is OK.
> 
> When you re-insert your hard disk, you can still boot from the USB
> device.  The USB device will be found as sda, just as if it was the
> only drive.

?? 

If both your internal and external drives are /dev/sd*, then whichever one
you boot from is going to be called /dev/sda...  They're just labeled in
the order they're found, and the device you boot from is going to be the
first.
-- 
derek





More information about the ubuntu-users mailing list