Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
grub-install gives an error message I don’t understand

I'm new to Linux, am using CentOS 6.3, and am attempting to install CentOS 5.8 ISO to a pen-drive following instructions from here: http://ihazem.wordpress.com/2012/02/12/installing-centos-from-usb/

My pen-drive is /dev/sda and partion 1 is vfat. It's mounted on /mnt/usb. Here's what happens when I try to use grub-install:

[root@localhost ~]# grub-install –root-directory=/mnt/usb /dev/sda

This is the error message I get which I don't understand in this context:

"More than one install_devices? Usage: grub-install [OPTION] install_device Install GRUB on your drive.

-h, --help print this message and exit -v, --version print the version information and exit --root-directory=DIR install GRUB images under the directory DIR instead of the root directory --grub-shell=FILE use FILE as the grub shell --no-floppy do not probe any floppy drive --force-lba force GRUB to use LBA mode even for a buggy BIOS --recheck probe a device map even if it already exists This flag is unreliable and its use is strongly discouraged.

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into the DIR/boot directory specfied by --root-directory, and uses the grub shell to install grub into the boot sector."

What am I doing wrong?

Thanks

share|improve this question

migrated from stackoverflow.com Jan 30 '13 at 23:09

This question came from our site for professional and enthusiast programmers.

marked as duplicate by terdon, sudo, Dave M, Tog, BBlake Jan 31 '13 at 15:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 1 down vote accepted

You only have one - in front of your root-directory option, so it isn't being interpreted as a long option. What you want is --root-directory=/mnt/usb (instead of -root... as you have).

share|improve this answer
    
Thanks, I did notice this some time after posting. I c&p and edited the command and thought that the source had two hyphens that displayed as one and then didn't notice the difference in the copied text. Mea culpa. –  Nate Lockwood Jan 31 '13 at 20:55

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