Cannot install GRUB


 
Thread Tools Search this Thread
Operating Systems Linux Debian Cannot install GRUB
# 1  
Old 01-19-2014
Debian Cannot install GRUB

Hello,
I cannot install grub to my ESP it seems. I have a PC with both Windows 8.1 and Debian installed and I can only boot into Windows since GRUB is not installed on my PC.

I am using a Ubuntu Live USB to install GRUB on /dev/sda1 (my ESP).

I am using the following commands from Ubuntu Live USB-:
Code:
 sudo mount /dev/sda7 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt /bin/bash

After this I am executing-:
Code:
 grub-install /dev/sda1

After executing that I am getting the following output-:
Code:
 root@ubuntu:/# grub-install /dev/sda1
Unrecognized option `/dev/sda1'
Usage: grub-install [OPTION]
Install GRUB on your EFI partition.

  -h, --help              print this message and exit
  -v, --version           print the version information and exit
  --modules=MODULES       pre-load specified modules MODULES
  --root-directory=DIR    install GRUB images under the directory DIR
                          instead of the root directory
  --grub-mkimage=FILE     use FILE as grub-mkimage
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE       use FILE as grub-probe
  --no-floppy             do not probe any floppy drive
  --recheck               probe a device map even if it already exists

grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory.

Report bugs to bug-grub@gnu.org.

Can anyone tell me what I am doing wrong ? Why is /dev/sda1 a unrecognized option ? I am at my wits end with this. Unless GRUB is installed I cannot use Debian I can only use Windows.
# 2  
Old 01-19-2014
Try :
Quote:

....
grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory.
....
Code:
$ sudo mount /dev/sda7 /mnt

Code:
$ sudo grub-install --root-partition=/mnt /dev/sda1

# 3  
Old 01-19-2014
# 4  
Old 01-20-2014
Quote:
Originally Posted by Akshay Hegde
Try :


Code:
$ sudo mount /dev/sda7 /mnt

Code:
$ sudo grub-install --root-partition=/mnt /dev/sda1

Do I do this before chrooting into my Debian system from my Ubuntu Live USB ? Or do I execute this after chrooting into my Debian system.

When I execute-:
$ sudo grub-install --root-partition=/mnt /dev/sda1 won't it install GRUB to /mnt and not my ESP ? Also won't it install the GRUB version found in Ubuntu, rather than the one found in Debian which is the one I am trying to install ?

---------- Post updated at 09:43 PM ---------- Previous update was at 09:21 PM ----------

Quote:
Originally Posted by Akshay Hegde
Try :


Code:
$ sudo mount /dev/sda7 /mnt

Code:
$ sudo grub-install --root-partition=/mnt /dev/sda1

I executed the following commands-:
Code:
sudo mount /dev/sda7 /mnt 
sudo mount --bind /dev /mnt/dev 
sudo mount --bind /dev/pts /mnt/dev/pts 
sudo mount --bind /proc /mnt/proc 
sudo mount --bind /sys /mnt/sys 
sudo chroot /mnt /bin/bash
Then I executed-:

$ grub-install --root-directory=/mnt /dev/sda1

The got the following output for that-:
Code:
root@ubuntu:/# grub-install --root-directory=/mnt /dev/sda1
Unrecognized option `/dev/sda1'
Usage: grub-install [OPTION]
Install GRUB on your EFI partition.

  -h, --help              print this message and exit
  -v, --version           print the version information and exit
  --modules=MODULES       pre-load specified modules MODULES
  --root-directory=DIR    install GRUB images under the directory DIR
                          instead of the root directory
  --grub-mkimage=FILE     use FILE as grub-mkimage
  --grub-mkdevicemap=FILE use FILE as grub-mkdevicemap
  --grub-probe=FILE       use FILE as grub-probe
  --no-floppy             do not probe any floppy drive
  --recheck               probe a device map even if it already exists

grub-install copies GRUB images into the DIR/boot directory specified by
--root-directory.

Report bugs to <bug-grub@gnu.org>.

When I ran the following command-:

Code:
grub-install --root-directory=/mnt

I got the following output-:
Code:
/mnt/boot/grub doesn't look like an EFI partition.

It seems its a problem with the Grub configuration.
# 5  
Old 01-21-2014
Unless /dev/sda7 is a FAT32 fileystem, GRUB is going to complain.
# 6  
Old 01-24-2014
Quote:
Originally Posted by fpmurphy
Unless /dev/sda7 is a FAT32 fileystem, GRUB is going to complain.
Can you give the correct command?? I am new to Linux.
# 7  
Old 01-24-2014
Take another look at the link I posted in my post #3.

That guy had a EFI partition, like you. He installed Debian, like you.
He found that a bootloader was not installed, like you.
He was trying to dual boot Windows, like you.

He spent a lot of time but was good enough to publish his solution.

Here's another link you may find useful:
Managing EFI Boot Loaders for Linux: EFI Boot Loader Installation
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

"/boot/grub/grub.conf" VS "/etc/grub.conf"

can someone please explain me the difference between these two files: "/boot/grub/grub.conf" and "/etc/grub.conf" .. (7 Replies)
Discussion started by: stunn3r
7 Replies

2. Red Hat

Can we specify which grub.conf to use in grub-install.

Hi, Can we specify which grub.conf to use while installing grub on RHEL. We are working on application which requires different grub configurations needed, depending on certain criteria we need to update grub with correct grub.conf. Can we use grub-install for this purpose? (4 Replies)
Discussion started by: successlin
4 Replies

3. Solaris

Solaris 10 install dvd drive boots, but not recoginized by install process

I am trying to build a Sun Ultra 10 with solaris 10. This computer is one of a collection that was donated to the non-profic company I work for. All media was wiped before I recieved them, so I am starting from stratch. I downloaded the Solaris 10 ISO and burned a DVD. The computer came with a... (4 Replies)
Discussion started by: gwillhight
4 Replies

4. Boot Loaders

How to install grub on USB flash drive?

I wanna install grub on my flash drive for rescue usage. My computer installs winxp, and I have fedora12 installed in vmware. I did like this: step1: format the flash drive as FAT in winXP. step2: in fedora12, mount the flash drive on /media/flash step3: excute the command: grub-install... (10 Replies)
Discussion started by: vistastar
10 Replies

5. SCO

Install GRUB on SCO Unixware 7.1.1

Hi, I am trying to install the linux boot loader (GRUB) on a non-linux machine (Unixware 7.1.1). The thing is I want to boot the linux kernel (vmlinuz) and the linux ram disk (initrd.img) from unixware and boot the machine with it. Does anyone have a good way to do this? (10 Replies)
Discussion started by: teen_racer19
10 Replies

6. Ubuntu

How to install grub on an Empty HDD?

I wanna install grub/grub2 on my empty hard disk drive. For that I boot my machine from ubuntu 10.04 Live OS and tried to install it but failed. So what to do now ? Also I think some toolset , if I want to boot the vanilla Linux kernel (please suggest me the link for that) , So after... (8 Replies)
Discussion started by: aarsh
8 Replies

7. Linux

install macbook pro fedora10 ???((<<if can install, how to install? >> ))

If may install can Tells everybody ??? (0 Replies)
Discussion started by: kzBSD
0 Replies

8. UNIX for Dummies Questions & Answers

grub problem- keeps rebooting as soon as it tries to do grub

Hi, I installed solaris 10 a few weeks ago. It was working fine during the past two weeks. However, now when I start to load to the drive, I get this problem: The BIOS screen comes up like normal, then screen goes blank and a message "Grub loading stage 2" flashes real quick then the computer... (1 Reply)
Discussion started by: moesays
1 Replies

9. HP-UX

Oracle 9i install: Error in invoking target install of makefile

I receive an error while installing Oracle 9i: Error in invoking target install of makefile /opt/oracle/product/9.2.0/sqlplus/lib/ins_sqlplus.mk Furthermore: $ whoami oracle $ echo $ORACLE_HOME /opt/oracle/product/9.2.0 $ pwd /opt/oracle/product/9.2.0/sqlplus/lib $ ll total... (5 Replies)
Discussion started by: chris2005
5 Replies
Login or Register to Ask a Question