Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install Lubuntu to a USB drive, but I'm having a difficult time installing GRUB to the drive. The rest of the install seems to go fine.

This is what I have tried

  1. Went through the normal install process. At the end of the process I got an error

    Executing 'grub-install /dev/sdf' failed. This is a fatal error.

    It then prompted me to try to reinstall GRUB or continue without a bootloader. I attempted to reinstall, but this seemed to have no effect as I was left with a non-bootable drive.

  2. After the normal install failed I tried

    mount /dev/sdf1 /mnt/USB
    grub-install --force --no-floppy --root-directory=/mnt/USB /dev/sdf
    

    This gave me an error. I can't remember the exact error at the moment, but I can try to run it again later and edit the question.

  3. I then ran Boot-Repair and used the advanced options to select "Reinstall GRUB" on "/dev/sdf". Boot-Repair wouldn't do this on my normal install (I don't know why) and told me I needed to boot into a LiveCD environment.

    I did this and Boot-Repair ran, but gave an error. I don't know why, it simply said, "Boot-Repair ran with errors." Nothing more descriptive than that. Needless to say, I still couldn't boot.

  4. I finally tried the following

    sudo mount -t ext3 /dev/sdf1 /mnt/USB
    sudo mount -t proc none /mnt/USB/proc
    sudo mount -o bind /dev /mnt/USB/dev
    sudo chroot /mnt/USB /bin/bash
    grub-install /dev/sdf
    

    This gave no errors and seemed to successfully install GRUB to my USB drive. Unfortunately it still doesn't boot.

When I boot from the drive I get a blank screen with a flashing cursor.

How can I install GRUB to this disk and get it to successfully boot? Moreover, why is the GRUB install failing in the first place?

share|improve this question
    
are you sure the option --root-directory is correct? Isn't it --boot-directory? –  Samik Jun 18 '12 at 13:30
    
@Samik According to the man page you are correct. I copied the command from here. I can try running that command again later today with the correct parameter name. –  Kris Harper Jun 18 '12 at 13:37
    
you can also try this procedure –  Samik Jun 18 '12 at 13:55
add comment

2 Answers

GRUB install can fail on the USB because its MBR is too small.

To install Lubuntu on the USB, I would simply create a persistant live-USB, via UnetBootin or else. This will act as a normal install, and will solve your boot problem because it will use a bootloader that will fit your USB MBR.

share|improve this answer
    
This is not what I want. A live USB install is not a normal install. Why would the MBR be too small? Is there a way to increase the size? –  Kris Harper Jun 20 '12 at 12:58
add comment

I would use UNetBootIn in order to make the USB drive bootable with Lubuntu.

EDIT: From the DamnSmallLinux Wiki

"Some users have mentioned that grub-install whines about the --no-floppy argument. Try going without it, try going with it, try using sudo, try unplugging and replacing your USB stick. If your system auto-mounts the USB stick, try it with the stick both mounted and unmounted. You'll probably find a way to make it work."

share|improve this answer
    
I don't want a live USB install. I want a dedicated install to a USB drive. Doing the live install is easy. That's how I installed to the USB drive in the first place. –  Kris Harper Jun 20 '12 at 12:59
    
Expanded answer with some help from the damnsmalllinux wiki –  darryn.ten Jun 20 '12 at 13:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.