Re: Ubuntu on an external drive---how to?



On Mon, Jun 2, 2008 at 1:17 PM, Derek Broughton <news@xxxxxxxxxxxxxx> wrote:
Kanda Kumar V wrote:

I've tried installing the boot loader (the grub) into /dev/sda (my
external drive) and when i reboot after the installation finishes.. i'm
getting grub error 17. i can't boot from my external USB device... i've
set my boot priority in BIOS as 1. USB hdd 2.CD drive 3.internal disk(the
windows one)...

my external drive is an Western digital USB external HDD.

Grub error 17 is "can't mount partition" (please post the error messages, we
shouldn't have to go looking)

Which makes one wonder if you really have grub pointing at the right
device/partition.

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

--
derek

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.
As a result, it is necessary to make some customization of the
menu.lst file as well as rerunning grub. I learned how to do those
things while fiddling with Fedora USB installs, and I don't think a
newbie linux user is going to succeed very well at it.

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

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) ).

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.

This method does not automatically create a "dual boot" configuration,
it does not know about your MS Windows and won't give that option.
But you can put it in easily enough by editing the menu.lst file.

If you persist in trying to reconfigure grub and deal with your
startup problem, email me again and I'll try to remember the details.
As I recall, if the boot gets far enough to fail inside grub, then you
end up at a command line prompt where you can type grub commands.
Your system now thinks it will find linux at root (hd1), but instead
it is on disk (hd0). You type "root (hd0,0)" to tell it your boot
partition is on that one magic spot. then in the kernel line, you
make sure you tell it root= points to your / partition, and then you
need to fire up the initialram disk. I did not take notes on how I
did it, and I don't think you should try to. INstead, just take the
easy method outlined above.

PJ



--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Naming harddisks (Linux)
    ... But I also see that for an USB drive it uses /dev/sdas the ... Does GRUB recognize SCSI drives? ... The first step in understanding the boot process is to ... The bootloader's job is to load the OSs kernel. ...
    (comp.os.linux.misc)
  • Re: GRUB Problems with Dell Optiplex GX1
    ... inappropriate boot image when they turn it on... ... It will boot from a floppy, but installing it to ... FreeBSD folks tend not to use Grub, ...
    (freebsd-questions)
  • Re: GRUB Problems with Dell Optiplex GX1
    ... inappropriate boot image when they turn it on... ... It will boot from a floppy, but installing it to ... FreeBSD folks tend not to use Grub, ...
    (freebsd-questions)
  • Another Ubuntu on external drive question
    ... but neither seems able to find the USB drive from ... partition and a swap, and everything ran fine until installing Grub (as ... rebooted (first resetting the USB HD to have a higher boot priority in the ...
    (Ubuntu)
  • Re: GRUB Problem: Cant Boot off my USB Disk
    ... My PC BIOS supports booting from USB devices, so I decided to load FC5 ... I may be experiencing a syntax or GRUB ... I can select to boot off that device when I turn on my PC (by ...
    (comp.os.linux.setup)