Fedora Linux Support Community & Resources Center
  #16  
Old 17th July 2012, 04:58 AM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
linuxfirefox
Re: Bootloader Failing to Install

it still didn't work, I also noticed that when I run the command it won't write the grub.cfg file because is not generating anything off the scripts from /ect/grub.conf, the only file there is grub.conf.new and is missing content, if I run that command agaisnt grub.conf.new it makes the file brlank/empty when it writes to it so grub is installing but is not letting it create the file.

ultimately I installed it on a laptop and did the same partitioning, copied the laptops grub.cfg file, changed the volume/hard drive uuid on the lines of the file and made sure the kernel and ramdisk image matched and it worked, I also copied the /etc/grub.conf forlder and the /etc/default/grub file. I still get like 2 errors while it's booting but it boots all the time without having to do it manually so I'll look into those other errors
I know is a lazy fix but it will do for now, I wish I could make it generate its own file but I have no idea of what's going on, did I mention is and MBTBIOS? but raid is not settup that's the only hdd on it now.

if you know anything about making it work for itself I'd appreciate if you let me know, the original is missing like half of it and it ends before any of the lines where you can see the kernel or the ramdisk, here is the one from the laptop, I searched for the kernel, ramdisk and uuid of the hard drive through out the file and made match the desktop which but I had already updated to 3.4.4 and the laptop was 3.3.4 -- I got the volume uuid from the /etc/fstab file.

the working file content is:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="${saved_entry}"

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
1,1 Top

---------- Post added at 11:58 PM ---------- Previous post was at 11:56 PM ----------

My bad I guess it didn't paste the whole file:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="${saved_entry}"

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}

function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3' dfbf6d0c-4b93-40b0-bfbe-36024aea505a
else
search --no-floppy --fs-uuid --set=root dfbf6d0c-4b93-40b0-bfbe-36024aea505a
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-dfbf6d0c-4b93-40b0-bfbe-36024aea505a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
else
search --no-floppy --fs-uuid --set=root 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
fi
echo 'Loading Linux 3.4.4-5.fc17.x86_64 ...'
linux /vmlinuz-3.4.4-5.fc17.x86_64 root=UUID=dfbf6d0c-4b93-40b0-bfbe-36024aea505a ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.4.4-5.fc17.x86_64.img
}
submenu 'Advanced options for Fedora Linux' $menuentry_id_option 'gnulinux-advanced-dfbf6d0c-4b93-40b0-bfbe-36024aea505a' {
menuentry 'Fedora Linux, with Linux 3.4.4-5.fc17.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.4-5.fc17.x86_64-advanced-dfbf6d0c-4b93-40b0-bfbe-36024aea505a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
else
search --no-floppy --fs-uuid --set=root 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
fi
echo 'Loading Linux 3.4.4-5.fc17.x86_64 ...'
linux /vmlinuz-3.4.4-5.fc17.x86_64 root=UUID=dfbf6d0c-4b93-40b0-bfbe-36024aea505a ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.4.4-5.fc17.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.4.4-5.fc17.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.4.4-5.fc17.x86_64-recovery-dfbf6d0c-4b93-40b0-bfbe-36024aea505a' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
else
search --no-floppy --fs-uuid --set=root 9463ec1b-64d7-4a75-a90e-488eb4e3cbe2
fi
echo 'Loading Linux 3.4.4-5.fc17.x86_64 ...'
linux /vmlinuz-3.4.4-5.fc17.x86_64 root=UUID=dfbf6d0c-4b93-40b0-bfbe-36024aea505a ro single rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.4.4-5.fc17.x86_64.img
}
}
if [ "x$default" = 'Fedora Linux, with Linux 3.4.4-5.fc17.x86_64' ]; then default='Advanced options for Fedora Linux>Fedora Linux, with Linux 3.4.4-5.fc17.x86_64'; fi;
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Reply With Quote
  #17  
Old 17th July 2012, 10:36 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,550
linuxfirefox
Re: Bootloader Failing to Install

Quote:
Originally Posted by d3spinoz4

...when I run the command it won't write the grub.cfg file because is not generating anything off the scripts from /ect/grub.conf, the only file there is grub.conf.new and is missing content...
Well, I don't use GRUB 2 nowadays, and maybe things have changed. But the GRUB 2 scripts used to be in a directory named /etc/grub.d, not /etc/grub.conf. The /etc/grub.conf file was Fedora's old legacy GRUB config file, and I wouldn't expect it to be involved in a fresh installation of Fedora 17. The GRUB 2 config file is /etc/default/grub.

Anyway, if you meant to say /etc/grub.d, and if you mean that nothing exists in the directory, then here is what I think I would do next... Manually boot Fedora again. Establish a connection to the Internet. Re-install the grub2 package with yum. Then do the grub2-mkconfig and grub2-install stuff again.
Reply With Quote
  #18  
Old 18th July 2012, 01:20 AM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
linuxfirefox
Re: Bootloader Failing to Install

yeah I meant /etc/grub.d/ my bad -- the machine boots now with like one error message saying there is a file missing ( I can post that later) and I tried yum update grub2 but it didn't work either I will try install instead.

Thanks
Reply With Quote
  #19  
Old 18th July 2012, 02:50 AM
jlpierce Offline
Registered User
 
Join Date: Jul 2012
Location: Pekin, Indiana
Posts: 85
linuxopera
Re: Bootloader Failing to Install

Quote:
Originally Posted by d3spinoz4 View Post
yeah I meant /etc/grub.d/ my bad -- the machine boots now with like one error message saying there is a file missing ( I can post that later) and I tried yum update grub2 but it didn't work either I will try install instead.

Thanks
Use yum reinstall grub2 that will force an installation of the grub2 package.
Reply With Quote
  #20  
Old 18th July 2012, 03:56 AM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: Bootloader Failing to Install

Quote:
Originally Posted by d3spinoz4 View Post
yeah I meant /etc/grub.d/ my bad -- the machine boots now with like one error message saying there is a file missing ( I can post that later) and I tried yum update grub2 but it didn't work either I will try install instead.

Thanks
Probably something like Font file True missing??

F17 had a little glitch in it's anaconda setup and put SYSFONT=True on the kernel line and in /etc/sysconfig/i18n

You can change it manually in your /boot/grub2/grub.cfg file to SYSFONT=latarcyrheb-sun16 (which is what previous versions used) and add it to the GRUB_CMDLINE_LINUX in your /etc/default/grub file so it will be correctly added when you run grub2-mkconfig in the future.

You also need to change it in your /etc/sysconfig/i18n file as well.
Reply With Quote
  #21  
Old 19th July 2012, 05:20 AM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
windows_7ie
Re: Bootloader Failing to Install

didn't work, when I run the grub2-mkconfig command it doesn't generate the file at all and like I said when I run it agaisnt the grub.cfg.new file it makes it blank. Something is wrong with my grub2 installation or it could be the computer bios given that is an mpt raid bios?

---------- Post added at 12:20 AM ---------- Previous post was at 12:19 AM ----------

I also tried yum remove grub2 and then reinstalled it to no luck
Reply With Quote
  #22  
Old 21st July 2012, 07:32 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 969
macoschrome
Re: Bootloader Failing to Install

Quote:
Originally Posted by d3spinoz4 View Post
it still didn't work, I also noticed that when I run the command it won't write the grub.cfg file because is not generating anything off the scripts from /ect/grub.conf, the only file there is grub.conf.new and is missing content
It should be grub.cfg not grub.conf.

grub.cfg.new is a temporary file, and is renamed to grub.cfg once grub2-mkconfig completes successfully. Since the file is named wrong, maybe that's why it isn't being renamed, or possibly the script is failing somewhere, which you can troubleshoot with set -x and set +x or bash -x.
Reply With Quote
  #23  
Old 27th July 2012, 08:20 PM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
windows_7firefox
Re: Bootloader Failing to Install

Hi,
sorry for the late response, also my bad those were all just typos and i meant grub.cfg so it's not that the file was named incorrectly so after the installation the only file there is grub.cfg.new which only contains half of the content unlike the grub.cfg i copied from the laptop to make it work. i've tried "yum reinstall grub2" and it went through but it's still the same, if i issue the grub2-mkconfig command it doesn't create the grub.cfg file a at all and if I run it against an existing file lets say grub.cfg.new it makes it blank (i did back up the one created by the installation before doing that
also is there a chance that my issue is related to that core.img file being too large? if so what would cause it to be different from the laptop? the hardware profile?
i tried the font file missing fix and it worked now i don't get that error but i did a pause/break while booting to see the otherones and there is this one that i get before the grub boot menu:

error: file '/grub2/locale/en.mo/gz' not found

i still havent looked this one up on google but i will and try fixes that i find and post back
i also get another one related to a volume number not found but it may be because the hdd volume number from the laptop is different from the one on the desktop but I will search for that string and try to replace it.

---------- Post added at 03:20 PM ---------- Previous post was at 12:20 PM ----------

Hi I ran the troubleshoot command and here is the output:

bash-4.2$ bash -x /sbin/grub2-mkconfig grub.cfg.test
+ set -e
+ transform='s&^&&;s,grub,grub2,'
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/sbin
+ bindir=/usr/bin
+ sysconfdir=/etc
+ PACKAGE_NAME=GRUB
+ PACKAGE_VERSION=2.00~beta6
+ host_os=linux-gnu
+ datadir=/usr/share
+ '[' x = x ']'
+ pkgdatadir=/usr/share/grub
+ grub_cfg=
+ grub_mkconfig_dir=/etc/grub.d
++ basename /sbin/grub2-mkconfig
+ self=grub2-mkconfig
++ echo grub-probe
++ sed 's&^&&;s,grub,grub2,'
+ grub_probe=/usr/sbin/grub2-probe
++ echo grub-editenv
++ sed 's&^&&;s,grub,grub2,'
+ grub_editenv=/usr/bin/grub2-editenv
++ echo grub-script-check
++ sed 's&^&&;s,grub,grub2,'
+ grub_script_check=/usr/bin/grub2-script-check
+ export TEXTDOMAIN=grub
+ TEXTDOMAIN=grub
+ export TEXTDOMAINDIR=/usr/share/locale
+ TEXTDOMAINDIR=/usr/share/locale
+ . /usr/share/grub/grub-mkconfig_lib
++ transform='s&^&&;s,grub,grub2,'
++ prefix=/usr
++ exec_prefix=/usr
++ datarootdir=/usr/share
++ datadir=/usr/share
++ bindir=/usr/bin
++ sbindir=/usr/sbin
++ pkgdatadir=/usr/share/grub
++ test x/usr/sbin/grub2-probe = x
++ test x = x
+++ echo grub-mkrelpath
+++ sed 's&^&&;s,grub,grub2,'
++ grub_mkrelpath=/usr/bin/grub2-mkrelpath
++ which gettext
++ :
+ test 1 -gt 0
+ option=grub.cfg.test
+ shift
+ case "$option" in
+ test 0 -gt 0
+ '[' x9090 = x ']'
+ '[' 9090 '!=' 0 ']'
+ root=f
+ case "`uname 2>/dev/null`" in
++ uname
+ '[' f '!=' t ']'
+ gettext_printf '%s: You must run this as root\n' grub2-mkconfig
+ gettext_printf_format='%s: You must run this as root\n'
+ shift
++ gettext '%s: You must run this as root\n'
+ printf '%s: You must run this as root\n' grub2-mkconfig
grub2-mkconfig: You must run this as root
+ exit 1
Reply With Quote
  #24  
Old 27th July 2012, 08:31 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 969
macoschrome
Re: Bootloader Failing to Install

If you are not root the proper command variations are:

Code:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
To which you authenticate with your user (admin) password.

Code:
su -c 'grub2-mkconfig -o /boot/grub2/grub.cfg'
To which you authenticate with root password.
Reply With Quote
  #25  
Old 27th July 2012, 09:19 PM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
windows_7ie
Re: Bootloader Failing to Install

yeah i'm running it as root, i usually do sudo su or sudo su - to make the terminal as root and then run all of the commands
Reply With Quote
  #26  
Old 27th July 2012, 09:20 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 969
macoschrome
Re: Bootloader Failing to Install

Yeah I don't understand how you're getting a "You must run this as root" error if you're running it as root. I've never encountered this before with grub2-mkconfig.
Reply With Quote
  #27  
Old 27th July 2012, 09:25 PM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
windows_7ie
Re: Bootloader Failing to Install

hi I ran the bash -x troubleshooting on the laptop using:

bash -x /sbin/grub2/grub2-mkconfig /boot/grub2/grub.cfg.test and I attached the output on a file because it wouldn't let me post it on the text box because too many characters

sorry guys i don't know scripting either but is there something I should be looking at on it to try to figure it out? i guess that it let me post the one from the desktop with no issues so it's probably shorter than then one on the laptop.

thanks
Attached Files
File Type: txt grub2.txt (14.3 KB, 71 views)
Reply With Quote
  #28  
Old 27th July 2012, 09:31 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 969
macoschrome
Re: Bootloader Failing to Install

Quote:
Originally Posted by d3spinoz4 View Post
also is there a chance that my issue is related to that core.img file being too large?
Not if your bootinfoscript results are correctly reported for the computer you're having this problem with.

/dev/sda1 * 2,048 4,196,351 4,194,304 83 Linux

The start is 2048, so core.img is stuffed in the MBR gap. And 2048 is plenty of space for that.

The grub2-mkconfig script is complaining about authentication, thinks you're not root.

Quote:
bash-4.2$ bash -x /sbin/grub2-mkconfig grub.cfg.test
Your syntax appears to be wrong.

1. You don't have a -o flag before the filename.
2. You have the path to the file name wrong.
3. You have the filename wrong.

Please rename /boot/grub2/grub.cfg to /boot/grub2/grub.cfg.bak if you don't want it overwritten and stop naming the configuration file incorrectly. The proper line is:

grub2-mkconfig -o /boot/grub2/grub.cfg

And so far you haven't done that it seems.

---------- Post added at 02:31 PM ---------- Previous post was at 02:29 PM ----------

Quote:
Originally Posted by d3spinoz4 View Post
is there something I should be looking at on it to try to figure it out?
Yes. It's called, do this:

You keep forgetting -o even though you've been told it several times.
Reply With Quote
  #29  
Old 28th July 2012, 02:35 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 7,320
linuxfirefox
Re: Bootloader Failing to Install

chrismurphy is correct.

Without the -o option, grub2-mkconfig doesn't write an output file.

Code:
[root@tower20 etc]# grub2-mkconfig --help
Usage: grub2-mkconfig [OPTION]
Generate a grub config file

  -o, --output=FILE       output generated config to FILE [default=stdout]
  -h, --help              print this message and exit
  -v, --version           print the version information and exit

Report bugs to <bug-grub@gnu.org>.
So unless you specify the -o option, it will only generate output to stdout (your screen)
Reply With Quote
  #30  
Old 30th July 2012, 03:09 PM
d3spinoz4 Offline
Registered User
 
Join Date: Jun 2012
Location: USA
Posts: 14
linuxfirefox
Re: Bootloader Failing to Install

my bad I am running it as root, that particular time i had opened a new terminal and i forgot to get sudo. here is what I ran again:
[root@hiddencloud grub2]# grub2-mkconfig /dev/sda -o /boot/grub2/grub.cfg
Generating grub.cfg ...
[root@hiddencloud grub2]# ls
device.map grub.cfg.bak grub.cfg.real grubenv locale
fonts grub.cfg.new grub.cfg.test.new i386-pc themes
[root@hiddencloud grub2]#
i've done without specifiying /dev/sda as well to no luck, i ran it with bash -x on the desktop (broken grub2) and attached the file.
Attached Files
File Type: txt grub2test.txt (3.8 KB, 64 views)
Reply With Quote
Reply

Tags
bootloader, failing, install

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bootloader won't install farmkid Installation, Upgrades and Live Media 7 10th March 2012 08:46 PM
Where do I install the bootloader? SplitInfinity Installation, Upgrades and Live Media 5 12th October 2010 08:54 PM
Install / Bootloader help mordex Installation, Upgrades and Live Media 9 2nd November 2006 04:10 PM
Apt install failing Thoreau Using Fedora 2 18th August 2004 03:28 PM


Current GMT-time: 09:38 (Wednesday, 23-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat