LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 03-24-2014, 12:30 PM   #1
charging-ibis
Member
 
Registered: Dec 2011
Location: Columbus, OH
Distribution: Slackware 13.37
Posts: 38

Rep: Reputation: 0
Angry Grub2 install keeps failing - Really need help


Hello everybody.

I am installing Mint 16 64bit. I am using a live DVD

The installation is successfull except for the installation.
I had gotten an error message that Bootloader Failed to install.
I did go online and followed the instructions to the 'T'.
Linux will not boot without the bootloader. This is the last part that I have to do to cross over. I also want to state that option 2 about running a program 'boot-repair' is not possible for me from the live disk. It is not on there nor the live disk is allowing me to add a repository nor is it found in the repository that came with the live DVD.
(I want to try and solve this issue through the CLI).

Other forums said to the following outlined:
  • mount /dev/sda to /mnt
  • Perform 'sudo grub-install --root-directory=/mnt/ /dev/sda'
  • Then perform ' sudo chroot /mnt'
  • Next 'sudo update-grub'

This seems to work on normal scenarios but I am pretty sure that others share the same frustration and road block as me.
I feel like I am going around in circles with the solutions. So allow me to show you the output step by step.

So here is the layout of my partition if relavent.

Code:
mint@mint ~ $ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d0348

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   147916799    73957376   83  Linux
/dev/sda2       147918846   156301311     4191233    5  Extended
/dev/sda5       147918848   156301311     4191232   82  Linux swap / Solaris
Here is the first out put.

Code:
mint@mint ~ $ sudo mount /dev/sda1 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda
grub-probe: error: failed to get canonical path of /cow.
Installation finished. No error reported.
So how dose 'grub-probe' fail to get the cononical path of '/cow' when clearly it is here?
Code:
mint@mint ~ $ mount
/cow on / type overlayfs (rw)
.........
.........
Now another post says to just do a 'update-grub', here is what I get(still):
Code:
mint@mint ~ $ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of /cow.
I get the same thing even when i chroot to '/mnt', just to be thorough
(There is 2 of the same command, one w/sudo and one w/o sudo):

Code:
mint@mint ~ $ sudo chroot /mnt
mint / # sudo grub-install --root-directory=/mnt /dev/sda
sudo: unable to resolve host mint
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Path `/mnt/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
mint / # grub-install --root-directory=/mnt /dev/sda
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Path `/mnt/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
mint / # update-grub
/usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
I looked in '/boot/grub', I only saw this and I was wondering if this is ok provided that there is no 'menu.lst'.

Code:
mint@mint ~ $ ls -F /boot/grub
fonts/  gfxblacklist.txt  grubenv  i386-pc/  locale/
I am making note that I do not have a seperate boot partition of course.

Now the question is, is there some type of file that I can configure while running the live DVD that will allow grub-probe to see the 'canonical path of /cow' and to see that there is in fact a device for / which is the 'cononical path of /cow'? I see that nobody online is really thouroughly addressing the real issue here. Is there something arbitrary that I am missing here or that has yet to be addressed?

~Thanks
 
Old 03-24-2014, 01:56 PM   #2
charging-ibis
Member
 
Registered: Dec 2011
Location: Columbus, OH
Distribution: Slackware 13.37
Posts: 38

Original Poster
Rep: Reputation: 0
I now looked into usin 'grub-probe', and these are the 3 outputs that i have gotten, how ever I still do not understand how I am getting these results:

Code:
mint@mint ~ $ sudo grub-probe --target=fs /boot/grub
grub-probe: error: failed to get canonical path of /cow.
mint@mint ~ $ sudo grub-probe --target=fs /cow
grub-probe: error: failed to get canonical path of /cow.
mint@mint ~ $ sudo grub-probe --target=fs /
grub-probe: error: failed to get canonical path of /cow.
What I cannot wrap my head around where exactly the problem is located. It seems to be somewhere around here perhaps.
 
Old 03-24-2014, 03:15 PM   #3
somedude
Member
 
Registered: Nov 2003
Distribution: Mint, openSUSE, Mandriva, Knoppix, puppy, Arch
Posts: 68

Rep: Reputation: 16
Not sure what's going on with your grub, but you don't seem to have an active partition shown by fdisk.
 
Old 03-24-2014, 05:56 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,150

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
"active partition" is a M$oft anacronism - grub ignores it.

@charging-ibis, with that configuration you should be able to use the DVD to chroot for you (you are missing some bind mounts that's why the chroot fails). Also, with current grub2, you should be using:
--boot-directory rather than --root-directory. You can try that first if you wish.
Else boot the DVD, and when is says "booting in ... seconds", hit one of the arrow keys - that'll give you a boot menu. Select "Boot from local drive".
That should put you in the system you installed. Open a terminal and check the root mountpoint (/) is on /dev/sda1 (or a UUID is fine too).
Then try the "sudo grub-install /dev/sda" followed by "sudo update-grub" (no quotes). No need for the --boot-directory as you are in a chroot.
 
Old 03-24-2014, 06:39 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,389

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
For chroot to work need to do the following;
Code:
sudo mount /dev/sda1 /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

Code:
sudo chroot /mnt

Code:
grub-install /dev/sda
grub-install --recheck /dev/sda
update-grub

Code:
exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

Last edited by colorpurple21859; 03-24-2014 at 06:40 PM.
 
Old 04-02-2014, 12:45 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I have found it easier to have another os (Debian) on an external hdd.
All I do is boot to external drive
Quote:
sudo update-grub
which adds the os on internal drive to its grub. Reboot, select the entry in grub menu to boot to internal hdd. Once booted unmount & remove external hdd. Open terminal & run
Quote:
sudo grub-install /dev/sda
Reboot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo) enorbet SUSE / openSUSE 9 12-08-2013 04:09 AM
kcm-grub2 - No valid GRUB2/BURG installation could be detected cristi92b Linux - Newbie 2 06-14-2012 08:01 AM
Grub2 failing to load xinquan Linux - General 10 06-12-2011 02:21 PM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
LILO install failing, Boot failing, but Installation fine. sramelyk Slackware 9 08-23-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration