revjim.net Rotating Header Image

Portable Ubuntu Problems

I've tried three times now and just can't seem to figure out how to get a portable USB Hard Drive set up in such a way that my PC will boot Ubuntu from it when it is plugged in. I'm a fairly competent guy when it comes to Linux and technology in general. So the fact that I can't figure out what the entire Ubuntu eating world seems to understand is driving me nuts!! If you think you can help, read on.

I'm using Ubuntu 7.10. I stick the LiveCD in my CDRom drive and boot. I'm greeted with the beautiful Ubuntu interface. I start the Installation by double-clicking on the "Install" icon. I answer all the easy questions.

I choose to partition the drive myself. I create three primary partitions. The first is ext2, 40GB, and will be where Ubuntu gets installed. The second it swap, 4GB. The third is FAT32, 136GB, and intended to be used as storage readable by Ubuntu or Windows. I also click the "advanced' button a few steps later and tell Grub not to install the bootloader because the default location is "hd0", which I do NOT want, and I don't, yet, know where I want it.

The install runs.

When finished, I mount my new Ubuntu installation in a temporary location: '/mnt/new'. I use /proc/partitions to figure out which partition to mount. Then, I issue the following command: 'grub-install –root-directory /mnt/new/ /dev/sdb'.

Reboot. It doesn't work. Back to the LiveCD.

I mount my Ubuntu installation again. I create a file — "HEREIAM.txt" — in the root of it so that I can use Grub's "find" feature to locate the right partition. I run Grub, issue "find /HEREIAM.txt" and find that my drive is now known as "(hd2,0)" to Grub. I then do "root (hd2,0)" followed by "setup (hd2)".

Reboot. It doesn't work. Back to the LiveCD.

I'm certain that my BiOS is setup right to boot off the drive. Just to be triple sure, I've selected the manual boot menu and picked it myself more than once. The drive never lights up or does anything remotely interesting during the boot procedure. I never see the Grub bootloader, I never see any error messages.

I get a black screen. Blinking underbar cursor in the top left. A get a few new lines, then it runs into my usual Windows XP boot loader.

Any assistance you can offer is appreciated. A large tip leading to a successful installation will be awarded with the steak or sushi dinner.

Google Buzz
  • Martin Atkins
    When you say "it doesn't work", what exactly is happening? Is grub giving some sort of error?
  • Black screen. Blinking cursor at top left. Eventually a couple of new lines. Then it jumps to the windows bootloader and boots windows normally.
  • farrisgoldstein
    As much as I love Ubuntu, everytime I've tried to do manual partitioning I ended up with a mess to clean up. So I usually let it do it's thing, leaving unused space on the drive so I can change my file system layout later.

    That said, I think you might get quick results, or at least gain more information, if you run through the install again and just let it do what it wants with partitions (except maybe shrink it's / partition) and grub. This is, of course, counter-productive since by default it might install grub to your internal drive.

    You can get around all of it if you just take your internal drive out before you do the install. Sounds crazy, but it only takes 15 seconds on a Dell.
  • I don't have a Dell, so it'll take a bit longer to pull the drive out.
    Worse comes to worse, that's certainly an option. However, Ubuntu
    shouldn't be doing any grub-ery or fdisk-ery that I can't do manually...
    I just need to know what steps I'm missing. If I can't find a way to to
    this manually I might give it a shot, but, I'd be quite upset if I went
    through the trouble to pull it out and then have it still not boot off
    the internal drive once I plug the internal drive back in. :)
  • farrisgoldstein
    Bastard! You told me last week you were using a Dell. What is it then? No matter what it is, it's probably easy to remove. And, given the nature of my job, whatever model it is, I've probably stripped it down.

    If you follow these steps, which will take only a minute or two more than an Ubuntu install, you will end up with either a working system or proof that something is "wrong." Throw out your "This should work, so I won't use a logical algorithm to figure out why it won't" pride for just long enough to get it done. I paint myself into this corner all the time and it's very liberating to just give into the process:

    1) Take out the internal drive.
    2) Install Ubuntu, as plain-jane as possible, and let the installer handle grub. If you MUST muck with the partitioning, JUST shrink the size of the "/" filesystem it wants to make, then rearrange when you're through. This is, in my opinion, faster and cleaner anyway.
    3) Replace the internal drive, and make sure your BIOS is set to boot in "CDROM->USB->INTERNALHDD" order.

    If, after that, Ubuntu does not boot when the USB drive is plugged in, then it's almost certainly true that something is wrong, and no amount of manual grubbery will help you until you rule out which hardware/firmware/software is the culprit.
  • I'm using a Dell laptop... yes. However, I'm using my Desktop system to
    attempt the initial install on this USB Drive.

    From what I've seen in the partition my options are only 3: 1) use an
    entire disk and I get to pick which one, 2) find me the biggest hunk of
    free space possible and use all of it, 3) let me do it manually. I could
    let it take the entire drive, but then I have to deal with gparted, and
    shrinking and all that later. And, in truth, it shouldn't matter. To be
    absolutely certain, I even let it do the partitioning, looked at what it
    built, and then redid it manually in a similar fashion.

    I'm pretty sure something is "wrong". The problem with yanking the
    internal drive and going for it is that I'll never know what it did
    differently and, therefore, I'll never know what was required to get it
    right the first time. I don't mind letting the system do it, if I learn
    from the process. If it doesn't work it's even worse because, not only
    did I waste time and still not have a working system, but, I also don't
    get to know what things it tried.

    Ubuntu can't be the culprit because it's not even getting there. The
    hard drive indicates that it should work and my BIOS appears to support
    this fully. Additionally, I had the same problem trying to boot from a
    Flash Drive. I've tried booting the drive on other machines just to be
    sure it isn't my BIOS. They won't boot it either. Therefore, I'm 95%
    certain that the issue is either Grub/Boot Loader/MBR related or that
    what I'm doing is not possible.

    Most of the tutorials I've seen on doing this use a FlashDrive instead
    of a full USB drive and they use syslinux and a FAT partition instead of
    ext3.
  • farrisgoldstein
    Your scientific method is flawed anyway, since the ultimate goal is to boot this on your laptop, which has a different bios, different chipsets, different diseases and different sexual orientations.

    If you really want to LEARN what it's doing/when... Hey, it's F/OSS, and I'm pretty sure all the install scripts that do the grubbing and whatnot are easy to find.
  • The ultimate goal, actually, is, like the common FlashDrive Linux's
    goal, is to have a Portable Ubuntu installation that will operate on
    almost any machine with a moden BIOS that I care to attach it to. My
    understanding was that, like the LiveCD, it would "just work". It
    doesn't. At all.

    If my intent is only to get it to run on MY laptop, and no where else,
    then I'll just install Grub on to the MBR of the internal drive, and let
    it boot Windows or Linux and be done with it.
blog comments powered by Disqus