LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora - Installation (https://www.linuxquestions.org/questions/fedora-installation-39/)
-   -   GRUB: failed to add custom entry (https://www.linuxquestions.org/questions/fedora-installation-39/grub-failed-to-add-custom-entry-4175495012/)

brenogalvao 02-15-2014 06:32 AM

GRUB: failed to add custom entry
 
Hi all, first let me introduce myself:
Code:

$uname -a
Linux localhost.localdomain 3.12.8-300.fc20.x86_64 #1 SMP Thu Jan 16 01:07:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I have rencently installed Fedora on my Samsumg ultrabook, and GRUB did not find my windows partition.
After reading a lot, I tried what is described bellow, but the windows entry still does not appear on my initial GRUB screen.

What I did was to edit the file /etc/grub.d/40_custom to read:
Code:

#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Windows)" --class windows --class os {
insmod part_msdos
insmod ntfs
insmod ntldr
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root 1024008A240074CE
ntldr ($root)/bootmgr
}

I found the partition to be sda4 via fdisk -l, which gives
/dev/sda4 1902592 109708465 51.4G Microsoft basic data

and found the UUID of the partition via
Code:

#blkid
/dev/sda4: UUID="1024008A240074CE" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="b37fee96-7786-40f7-8b2c-2e2bb7cbda6e"

After this I ran grub2-mkconfig
Code:

# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.12.8-300.fc20.x86_64
Found initrd image: /boot/initramfs-3.12.8-300.fc20.x86_64.img
Found linux image: /boot/vmlinuz-3.11.10-301.fc20.x86_64
Found initrd image: /boot/initramfs-3.11.10-301.fc20.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-7278e60551444810a17394e52db51827
Found initrd image: /boot/initramfs-0-rescue-7278e60551444810a17394e52db51827.img

and saw that the 40_custom entry appears in the /boot/grub2/grub.cfg file

The problem is that, after all this work (that looked fine to me), no entry for windows appears on GRUB initial screen (when I turn on my computer)

can someone give me a hint on what is going on?

thanks in advance

yancek 02-15-2014 02:55 PM

Do an online search for 'bootinfoscript', go to the site and read the instructions then download it and run it. Post the output, a results.txt file which will provide detailed information on your drives/partitions and all the boot files, their location and the menuentries.

PTrenholme 02-15-2014 06:03 PM

Well, for my Win7 system, the blkid looks like this:
Code:

# blkid | grep sda1
/dev/sda1: LABEL="SYSTEM" UUID="98CAD0A9CAD08542" TYPE="ntfs" PARTUUID="945663c5-01"

and, modifying the menu entry created by grub2-mkconfig and putting it in /boot/grub2/custom.cfg, like this:
Code:

# cat /boot/grub2/custom.cfg
menuentry 'Windows 7 (ntldr test)' --class windows --class os $menuentry_id_option 'osprober-chain-98CAD0A9CAD08542' {
  savedefault
  insmod part_msdos
  insmod ntfs
  insmod ntldr
  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  98CAD0A9CAD08542
  else
    search --no-floppy --fs-uuid --set=root 98CAD0A9CAD08542
  fi
  ntldr ($root)/bootmgr
}

works with no problem.

Note that, by placing the menu entry code in /boot/grub2/custom.cfg you don't need to re-run mkconfig to implement your changes. provided you have a 41_custom like this:
Code:

# cat /etc/grub.d/41_custom
#!/bin/sh
cat <<EOF
if [ -f  \${config_directory}/custom.cfg ]; then
  source \${config_directory}/custom.cfg
elif [ -z "\${config_directory}" -a -f  \$prefix/custom.cfg ]; then
  source \$prefix/custom.cfg;
fi
EOF

in your /etc/grub.d directory so that block of code is in your grub.cfg file. (In fact, as you can see, the menu entry (or entries) can be in either ${config_directory} or ${prefix}. On my system, those are, respectively, /boot/grub2 and /boot.

brenogalvao 02-16-2014 06:15 PM

@PTrenholme
Thanks for the reply

I don't know if I fully understood you, but I created the file /boot/grub2/custom.cfg (it didn't exist) and pasted with your code replaced with my UUID and partition, such as

Code:

cat /boot/grub2/custom.cfg
menuentry 'Windows 7 (ntldr test)' --class windows --class os $menuentry_id_option 'osprober-chain-1024008A240074CE' {
  savedefault
  insmod part_msdos
  insmod ntfs
  insmod ntldr
  set root='hd0,msdos4'
  if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos4  1024008A240074CE
  else
    search --no-floppy --fs-uuid --set=root 1024008A240074CE
  fi
  ntldr ($root)/bootmgr
}

After this I restarted, but still, no entry appears on the intial grub screen..

What else can I do?

brenogalvao 02-16-2014 06:17 PM

Quote:

Originally Posted by yancek (Post 5118330)
Do an online search for 'bootinfoscript', go to the site and read the instructions then download it and run it. Post the output, a results.txt file which will provide detailed information on your drives/partitions and all the boot files, their location and the menuentries.

@yancek
thanks for the reply man! I ran that script and the result was:

Code:

                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector
    109709312 of the same hard drive for core.img. core.img is at this
    location and looks in partition 72 for .
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:      ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files:       

sda2: __________________________________________________________________________

    File system:      vfat
    Boot sector type:  FAT16
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files:       

sda3: __________________________________________________________________________

    File system:     
    Boot sector type:  -
    Boot sector info:
    Mounting failed:  mount: unknown filesystem type ''

sda4: __________________________________________________________________________

    File system:      ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files:        /bootmgr /Windows/System32/winload.exe
                      /ubuntu/winboot/wubildr /ubuntu/winboot/wubildr.mbr

sda5: __________________________________________________________________________

    File system:      ntfs
    Boot sector type:  Windows Vista/7: NTFS
    Boot sector info:  According to the info in the boot sector, sda5 starts
                      at sector 930084864. But according to the info from
                      fdisk, sda5 starts at sector 930084865.
    Operating System: 
    Boot files:       

sda6: __________________________________________________________________________

    File system:      vfat
    Boot sector type:  Unknown
    Boot sector info:  According to the info in the boot sector, sda6 starts
                      at sector 974675968. But according to the info from
                      fdisk, sda6 starts at sector 974675969.
    Operating System: 
    Boot files:        /efi/Asclepius/bootx64.efi /bootmgr /boot/bcd

sda7: __________________________________________________________________________

    File system:      BIOS Boot partition
    Boot sector type:  Grub2's core.img
    Boot sector info:

sda8: __________________________________________________________________________

    File system:      ext4
    Boot sector type:  -
    Boot sector info:
    Operating System: 
    Boot files:        /grub2/grub.cfg

sda9: __________________________________________________________________________

    File system:      swap
    Boot sector type:  -
    Boot sector info:

sda10: _________________________________________________________________________

    File system:      ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  Fedora release 20 (Heisenbug)
                      Kernel on an ()
    Boot files:        /etc/fstab

sda11: _________________________________________________________________________

    File system:      ext4
    Boot sector type:  -
    Boot sector info:
    Operating System: 
    Boot files:       

sdb1: __________________________________________________________________________

    File system:     
    Boot sector type:  -
    Boot sector info:
    Mounting failed:  mount: unknown filesystem type ''
mount: unknown filesystem type ''

sdb2: __________________________________________________________________________

    File system:     
    Boot sector type:  -
    Boot sector info:
    Mounting failed:  mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''

sdb3: __________________________________________________________________________

    File system:     
    Boot sector type:  -
    Boot sector info:
    Mounting failed:  mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''
mount: unknown filesystem type ''

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                  1  976,773,167  976,773,167  ee GPT


GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sda1          2,048    1,026,047    1,024,000 Windows Recovery Environment (Windows)
/dev/sda2      1,026,048    1,435,647      409,600 EFI System partition
/dev/sda3      1,640,448    1,902,591      262,144 Microsoft Reserved Partition (Windows)
/dev/sda4      1,902,592  109,708,465  107,805,874 Data partition (Windows/Linux)
/dev/sda5    930,084,865  974,675,968    44,591,104 Windows Recovery Environment (Windows)
/dev/sda6    974,675,969  976,773,120    2,097,152 Windows Recovery Environment (Windows)
/dev/sda7    109,709,312  109,711,359        2,048 BIOS Boot partition
/dev/sda8    109,711,360  110,735,359    1,024,000 Data partition (Windows/Linux)
/dev/sda9    110,735,360  118,370,303    7,634,944 Swap partition (Linux)
/dev/sda10    118,370,304  223,227,903  104,857,600 Data partition (Windows/Linux)
/dev/sda11    223,227,904  930,084,863  706,856,960 Data partition (Windows/Linux)

Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 22.4 GiB, 24015495168 bytes, 46905264 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

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1                  1 4,294,967,295 4,294,967,295  ee GPT

/dev/sdb1 ends after the last sector of /dev/sdb

GUID Partition Table detected.

Partition    Start Sector    End Sector  # of Sectors System
/dev/sdb1              34      262,177      262,144 Microsoft Reserved Partition (Windows)
/dev/sdb2      6,557,696    46,903,295    40,345,600 -
/dev/sdb3        264,192    6,555,647    6,291,456 -

"blkid" output: ________________________________________________________________

Device          UUID                                  TYPE      LABEL

/dev/sda1        22DAFC7EDAFC4F91                      ntfs      Windows RE tools
/dev/sda10      859daada-caf6-4c31-a95c-4e1a74a1c57d  ext4     
/dev/sda11      29e90b13-30a1-4ded-a7f4-6fac59a97b25  ext4     
/dev/sda2        76D1-C1F5                              vfat     
/dev/sda3                                                         
/dev/sda4        1024008A240074CE                      ntfs     
/dev/sda5        E4867E17867DEB06                      ntfs      SAMSUNG_REC2
/dev/sda6        0204-5A56                              vfat      SAMSUNG_REC
/dev/sda7                                                         
/dev/sda8        98b85bb7-cf64-476c-b30d-b53f205e0841  ext4     
/dev/sda9        43f51af7-2ec1-4b33-959a-8069e884f33e  swap     
/dev/sdb1                                                         
/dev/sdb2                                                         
/dev/sdb3                                                         

================================ Mount points: =================================

Device          Mount_Point              Type      Options

/dev/sda10      /                        ext4      (rw,relatime,seclabel,data=ordered)
/dev/sda11      /home                    ext4      (rw,relatime,seclabel,data=ordered)
/dev/sda2        /boot/efi                vfat      (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)
/dev/sda8        /boot                    ext4      (rw,relatime,seclabel,stripe=4,data=ordered)


============================= sda8/grub2/grub.cfg: =============================

--------------------------------------------------------------------------------
#
# 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
if [ "${next_entry}" ] ; then
  set default="${next_entry}"
  set next_entry=
  save_env next_entry
  set boot_once=true
else
  set default="${saved_entry}"
fi

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
}

terminal_output console
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora, with Linux 3.12.8-300.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.8-300.fc20.x86_64-advanced-859daada-caf6-4c31-a95c-4e1a74a1c57d' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt8'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt8 --hint-efi=hd0,gpt8 --hint-baremetal=ahci0,gpt8  98b85bb7-cf64-476c-b30d-b53f205e0841
        else
          search --no-floppy --fs-uuid --set=root 98b85bb7-cf64-476c-b30d-b53f205e0841
        fi
        linuxefi /vmlinuz-3.12.8-300.fc20.x86_64 root=UUID=859daada-caf6-4c31-a95c-4e1a74a1c57d ro vconsole.font=latarcyrheb-sun16  rhgb quiet
        initrdefi /initramfs-3.12.8-300.fc20.x86_64.img
}
menuentry 'Fedora, with Linux 3.11.10-301.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.11.10-301.fc20.x86_64-advanced-859daada-caf6-4c31-a95c-4e1a74a1c57d' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt8'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt8 --hint-efi=hd0,gpt8 --hint-baremetal=ahci0,gpt8  98b85bb7-cf64-476c-b30d-b53f205e0841
        else
          search --no-floppy --fs-uuid --set=root 98b85bb7-cf64-476c-b30d-b53f205e0841
        fi
        linuxefi /vmlinuz-3.11.10-301.fc20.x86_64 root=UUID=859daada-caf6-4c31-a95c-4e1a74a1c57d ro vconsole.font=latarcyrheb-sun16  rhgb quiet
        initrdefi /initramfs-3.11.10-301.fc20.x86_64.img
}
menuentry 'Fedora, with Linux 0-rescue-7278e60551444810a17394e52db51827' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-7278e60551444810a17394e52db51827-advanced-859daada-caf6-4c31-a95c-4e1a74a1c57d' {
        load_video
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt8'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt8 --hint-efi=hd0,gpt8 --hint-baremetal=ahci0,gpt8  98b85bb7-cf64-476c-b30d-b53f205e0841
        else
          search --no-floppy --fs-uuid --set=root 98b85bb7-cf64-476c-b30d-b53f205e0841
        fi
        linuxefi /vmlinuz-0-rescue-7278e60551444810a17394e52db51827 root=UUID=859daada-caf6-4c31-a95c-4e1a74a1c57d ro vconsole.font=latarcyrheb-sun16  rhgb quiet
        initrdefi /initramfs-0-rescue-7278e60551444810a17394e52db51827.img
}

### 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.
menuentry "Windows)" --class windows --class os {
insmod part_msdos
insmod ntfs
insmod ntldr
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root 1024008A240074CE
ntldr ($root)/bootmgr
}

### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=================== sda8: Location of files loaded by Grub: ====================

          GiB - GB            File                                Fragment(s)


================= sda8: Location of files loaded by Syslinux: ==================

          GiB - GB            File                                Fragment(s)


============== sda8: Version of COM32(R) files used by Syslinux: ===============

 extlinux/cat.c32                  :  COM32R module (v4.xx)
 extlinux/chain.c32                :  COM32R module (v4.xx)
 extlinux/cmd.c32                  :  COM32R module (v4.xx)
 extlinux/config.c32                :  COM32R module (v4.xx)
 extlinux/cpuid.c32                :  COM32R module (v4.xx)
 extlinux/cpuidtest.c32            :  COM32R module (v4.xx)
 extlinux/disk.c32                  :  COM32R module (v4.xx)
 extlinux/dmitest.c32              :  COM32R module (v4.xx)
 extlinux/elf.c32                  :  COM32R module (v4.xx)
 extlinux/ethersel.c32              :  COM32R module (v4.xx)
 extlinux/gfxboot.c32              :  COM32R module (v4.xx)
 extlinux/gpxecmd.c32              :  COM32R module (v4.xx)
 extlinux/hdt.c32                  :  COM32R module (v4.xx)
 extlinux/host.c32                  :  COM32R module (v4.xx)
 extlinux/ifcpu64.c32              :  COM32R module (v4.xx)
 extlinux/ifcpu.c32                :  COM32R module (v4.xx)
 extlinux/ifplop.c32                :  COM32R module (v4.xx)
 extlinux/kbdmap.c32                :  COM32R module (v4.xx)
 extlinux/linux.c32                :  COM32R module (v4.xx)
 extlinux/ls.c32                    :  COM32R module (v4.xx)
 extlinux/lua.c32                  :  COM32R module (v4.xx)
 extlinux/mboot.c32                :  COM32R module (v4.xx)
 extlinux/meminfo.c32              :  COM32R module (v4.xx)
 extlinux/menu.c32                  :  COM32R module (v4.xx)
 extlinux/pcitest.c32              :  COM32R module (v4.xx)
 extlinux/pmload.c32                :  COM32R module (v4.xx)
 extlinux/pwd.c32                  :  COM32R module (v4.xx)
 extlinux/reboot.c32                :  COM32R module (v4.xx)
 extlinux/rosh.c32                  :  COM32R module (v4.xx)
 extlinux/sanboot.c32              :  COM32R module (v4.xx)
 extlinux/sdi.c32                  :  COM32R module (v4.xx)
 extlinux/sysdump.c32              :  COM32R module (v4.xx)
 extlinux/vesainfo.c32              :  COM32R module (v4.xx)
 extlinux/vesamenu.c32              :  COM32R module (v4.xx)
 extlinux/vpdtest.c32              :  COM32R module (v4.xx)
 extlinux/whichsys.c32              :  COM32R module (v4.xx)
 extlinux/zzjson.c32                :  COM32R module (v4.xx)

=============================== sda10/etc/fstab: ===============================

--------------------------------------------------------------------------------

#
# /etc/fstab
# Created by anaconda on Mon Jan 27 23:54:51 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=859daada-caf6-4c31-a95c-4e1a74a1c57d /                      ext4    defaults        1 1
UUID=98b85bb7-cf64-476c-b30d-b53f205e0841 /boot                  ext4    defaults        1 2
UUID=76D1-C1F5          /boot/efi              vfat    umask=0077,shortname=winnt 0 0
UUID=29e90b13-30a1-4ded-a7f4-6fac59a97b25 /home                  ext4    defaults        1 2
UUID=43f51af7-2ec1-4b33-959a-8069e884f33e swap                    swap    defaults        0 0
--------------------------------------------------------------------------------

============== sda10: Version of COM32(R) files used by Syslinux: ==============

 boot/extlinux/cat.c32              :  COM32R module (v4.xx)
 boot/extlinux/chain.c32            :  COM32R module (v4.xx)
 boot/extlinux/cmd.c32              :  COM32R module (v4.xx)
 boot/extlinux/config.c32          :  COM32R module (v4.xx)
 boot/extlinux/cpuid.c32            :  COM32R module (v4.xx)
 boot/extlinux/cpuidtest.c32        :  COM32R module (v4.xx)
 boot/extlinux/disk.c32            :  COM32R module (v4.xx)
 boot/extlinux/dmitest.c32          :  COM32R module (v4.xx)
 boot/extlinux/elf.c32              :  COM32R module (v4.xx)
 boot/extlinux/ethersel.c32        :  COM32R module (v4.xx)
 boot/extlinux/gfxboot.c32          :  COM32R module (v4.xx)
 boot/extlinux/gpxecmd.c32          :  COM32R module (v4.xx)
 boot/extlinux/hdt.c32              :  COM32R module (v4.xx)
 boot/extlinux/host.c32            :  COM32R module (v4.xx)
 boot/extlinux/ifcpu64.c32          :  COM32R module (v4.xx)
 boot/extlinux/ifcpu.c32            :  COM32R module (v4.xx)
 boot/extlinux/ifplop.c32          :  COM32R module (v4.xx)
 boot/extlinux/kbdmap.c32          :  COM32R module (v4.xx)
 boot/extlinux/linux.c32            :  COM32R module (v4.xx)
 boot/extlinux/ls.c32              :  COM32R module (v4.xx)
 boot/extlinux/lua.c32              :  COM32R module (v4.xx)
 boot/extlinux/mboot.c32            :  COM32R module (v4.xx)
 boot/extlinux/meminfo.c32          :  COM32R module (v4.xx)
 boot/extlinux/menu.c32            :  COM32R module (v4.xx)
 boot/extlinux/pcitest.c32          :  COM32R module (v4.xx)
 boot/extlinux/pmload.c32          :  COM32R module (v4.xx)
 boot/extlinux/pwd.c32              :  COM32R module (v4.xx)
 boot/extlinux/reboot.c32          :  COM32R module (v4.xx)
 boot/extlinux/rosh.c32            :  COM32R module (v4.xx)
 boot/extlinux/sanboot.c32          :  COM32R module (v4.xx)
 boot/extlinux/sdi.c32              :  COM32R module (v4.xx)
 boot/extlinux/sysdump.c32          :  COM32R module (v4.xx)
 boot/extlinux/vesainfo.c32        :  COM32R module (v4.xx)
 boot/extlinux/vesamenu.c32        :  COM32R module (v4.xx)
 boot/extlinux/vpdtest.c32          :  COM32R module (v4.xx)
 boot/extlinux/whichsys.c32        :  COM32R module (v4.xx)
 boot/extlinux/zzjson.c32          :  COM32R module (v4.xx)

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown GPT Partiton Type
5850cbb887c11947baf0379ca2d4c97e
Unknown GPT Partiton Type
dee2bfd3af3ddf11ba40e3a556d89593
Unknown BootLoader on sda6

00000000  eb 58 90 4d 53 44 4f 53  35 2e 30 00 02 08 0e 10  |.X.MSDOS5.0.....|
00000010  02 00 00 00 00 f8 00 00  3f 00 ff 00 00 60 18 3a  |........?....`.:|
00000020  00 00 20 00 f9 07 00 00  00 00 00 00 02 00 00 00  |.. .............|
00000030  01 00 06 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040  80 00 29 56 5a 04 02 4e  4f 20 4e 41 4d 45 20 20  |..)VZ..NO NAME  |
00000050  20 20 46 41 54 33 32 20  20 20 33 c9 8e d1 bc f4  |  FAT32  3.....|
00000060  7b 8e c1 8e d9 bd 00 7c  88 56 40 88 4e 02 8a 56  |{......|.V@.N..V|
00000070  40 b4 41 bb aa 55 cd 13  72 10 81 fb 55 aa 75 0a  |@.A..U..r...U.u.|
00000080  f6 c1 01 74 05 fe 46 02  eb 2d 8a 56 40 b4 08 cd  |...t..F..-.V@...|
00000090  13 73 05 b9 ff ff 8a f1  66 0f b6 c6 40 66 0f b6  |.s......f...@f..|
000000a0  d1 80 e2 3f f7 e2 86 cd  c0 ed 06 41 66 0f b7 c9  |...?.......Af...|
000000b0  66 f7 e1 66 89 46 f8 83  7e 16 00 75 39 83 7e 2a  |f..f.F..~..u9.~*|
000000c0  00 77 33 66 8b 46 1c 66  83 c0 0c bb 00 80 b9 01  |.w3f.F.f........|
000000d0  00 e8 2c 00 e9 a8 03 a1  f8 7d 80 c4 7c 8b f0 ac  |..,......}..|...|
000000e0  84 c0 74 17 3c ff 74 09  b4 0e bb 07 00 cd 10 eb  |..t.<.t.........|
000000f0  ee a1 fa 7d eb e4 a1 7d  80 eb df 98 cd 16 cd 19  |...}...}........|
00000100  66 60 80 7e 02 00 0f 84  20 00 66 6a 00 66 50 06  |f`.~.... .fj.fP.|
00000110  53 66 68 10 00 01 00 b4  42 8a 56 40 8b f4 cd 13  |Sfh.....B.V@....|
00000120  66 58 66 58 66 58 66 58  eb 33 66 3b 46 f8 72 03  |fXfXfXfX.3f;F.r.|
00000130  f9 eb 2a 66 33 d2 66 0f  b7 4e 18 66 f7 f1 fe c2  |..*f3.f..N.f....|
00000140  8a ca 66 8b d0 66 c1 ea  10 f7 76 1a 86 d6 8a 56  |..f..f....v....V|
00000150  40 8a e8 c0 e4 06 0a cc  b8 01 02 cd 13 66 61 0f  |@............fa.|
00000160  82 74 ff 81 c3 00 02 66  40 49 75 94 c3 42 4f 4f  |.t.....f@Iu..BOO|
00000170  54 4d 47 52 20 20 20 20  00 00 00 00 00 00 00 00  |TMGR    ........|
00000180  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001a0  00 00 00 00 00 00 00 00  00 00 00 00 0d 0a 44 69  |..............Di|
000001b0  73 6b 20 65 72 72 6f 72  ff 0d 0a 50 72 65 73 73  |sk error...Press|
000001c0  20 61 6e 79 20 6b 65 79  20 74 6f 20 72 65 73 74  | any key to rest|
000001d0  61 72 74 0d 0a 00 00 00  00 00 00 00 00 00 00 00  |art.............|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  ac 01 b9 01 00 00 55 aa  |..............U.|
00000200


=============================== StdErr Messages: ===============================

cat: /tmp/BootInfo-fSZN1QOY/Tmp_Log: No such file or directory
cat: /tmp/BootInfo-fSZN1QOY/Tmp_Log: No such file or directory
  No volume groups found
mdadm: No arrays found in config file or automatically


can you help with this info?

cheers!

yancek 02-16-2014 07:12 PM

You do have an entry for windows for sda4 in the grub.cfg file so I don't know why you don't see it. You also have an EFI partition and I don't use UEFI and don't know if that might be part of the problem.

colorpurple21859 02-16-2014 07:17 PM

Quote:

menuentry "Windows)" --class windows --class os {
getting rid of the ")" should fix the problem

brenogalvao 02-16-2014 07:29 PM

Quote:

Originally Posted by colorpurple21859 (Post 5118943)
getting rid of the ")" should fix the problem

Hey colorpurple, thanks for the corrections, but I fixed that and still don't see the entry when booting :(

Anyone could give me something new to try?

colorpurple21859 02-16-2014 07:48 PM

You show it correct in post 4, but not in the bootinfo script in post 5. Where did you edit the entry. According to this http://www.rodsbooks.com/efi-bootloaders/grub2.html grub-mkconfig has to be rerun on efi for changes to custom file to take place.

brenogalvao 02-16-2014 08:08 PM

I ran bootinfo script before correcting as you said, so that is why the mistake is there

I did run "grub2-mkconfig -o /boot/grub2/grub.cfg" all the times I changed stuff.

thanks for answering, though

colorpurple21859 02-16-2014 08:31 PM

What is in /boot/efi? Should be a directory in there for Fedora with possibly a grub directory within it. If so try copying and/or run grub2-mkconfig -o /boot/efi/fedora/grub2/grub.cfg see if that fixes the problem

colorpurple21859 02-16-2014 09:07 PM

this might help http://www.ambitious-vision.net/en/f...8-uefi-how-to/

PTrenholme 02-16-2014 09:55 PM

From what you posted from the bootinfoscript output, it looks like your grub.cfg file includes the code to load the custom.cfg file. (It's the last few lines of the grub.cfg file listed in your post.) The only thing that could cause it to fail to load is if you placed in the /boot/grub, and your grub.cfg file is in some other place. (I looked at the logic a little more closely, and noted that it only looks in ${prefix} if ${config_directory} is not defined.)

Have you tried going into the GRUB2 command mode (Push the <ESC> key when the first menu is entered, and then a C. [The 'C' is from memory, so check the instructions at the bottom of your screen after the escape.]) and using the configfile <actual path>/custom.cfg command to see if the your custom.cfg file works?

(Oh, before you do that, after you get the grub> prompt, the set command will show you all the currently set values.)

Aside: The above "trick" is one way to have boot menus for, e.g., bootable USB devices that you seldom want to actually boot and not have your "everyday" menu cluttered with those entries. (A better way, of course, is to have those boot options as submenu entries in the custom.cfg file.)

<edit>
Well, I thought to try this when I booted this morning, and :redface: I had a "few" errors:
  1. The "escape" is not needed: Just type a "c" when the menu is displayed. (The instructions are at the bottom of the menu page.)
  2. When I ran the set, I found that, on my system, ${root} setting. It's not /boot: it's just /, prefix is /boot/grub2, and config_directory is not defined.
With that, a simple configfile $prefix/custom.cfg displayed (just) my custom menu entry.

But, in your case, you've found that your prefix value is /boot/efi/EFI/fedora/, so either move the custom.cfg file there, or run it "by hand" as I describe above to see it it will work.
</edit>

brenogalvao 02-17-2014 12:00 PM

hey guys,
so I checked the URL sent by colorpurple, and tried their version of /etc/grub.d/40_custom, which now shows the entry in Grub screen, but it fails to load. Now my custom entry is:

Code:

# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs-uuid --set=root 1024008A240074CE
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}

and it gives the error
Code:

error: file '/efi/Microsoft/Boot/bootmgfw.efi' not found
but now I think it is just a matter of finding the correct boot image for windows.

brenogalvao 02-17-2014 12:02 PM

Also,
Only now did I realize that my BIOS has the "secure boot" option disabled.
and it always gives a "Booting in insecure mode" message before entering GRUB

Still could use some help, if you guys don't mind

thanks for everything.

brenogalvao 02-17-2014 12:37 PM

I just realize that only
Code:

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
works, and not
Code:

grub2-mkconfig -o /boot/grub2/grub.cfg
as I was doing...

That is why nothing appeared in the initial boot list.

Still, I can't load Windows because of the errors I got

Also, I noted the fedora instalation removed what was there in the EFI partition, and the current one has nothing about windows.

PTrenholme 02-17-2014 02:01 PM

:redface: See my edit to post 13, above.

brenogalvao 02-17-2014 08:55 PM

Well, at least now the entries are appearing, and it narrowed down to these two (each with it's own error)
Code:

# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Windows-chain" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --no-floppy --fs-uuid --set=root 1024008A240074CE
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}

which gives the error
Code:

error: no such device: 1024008A240074CE
error: file: '/efi/Microsoft/Boot/bootmgfw.efi' not found
Press any key to continue...

and also
Code:

# cat /etc/grub.d/bkup40
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Windows-ntldr" --class windows --class os {
insmod part_msdos
insmod ntfs
insmod ntldr
set root='(hd0,msdos4)'
search --no-floppy --fs-uuid --set=root 1024008A240074CE
ntldr ($root)/bootmgr
}

which gives the error
Code:

error: file '/EFI/fedora/x86_64-efi/ntfs.mod' not found
error: file '/EFI/fedora/x86_64-efi/ntldr.mod' not found
error: no such device: 1024008A240074CE
error: can't find the command 'ntldr'.
Press any key to continue...

I think we are getting closer to the solution now :)

colorpurple21859 02-17-2014 09:05 PM

what is on /dev/sda7 and /dev/sda6

brenogalvao 02-18-2014 05:04 AM

sda6 has the label "SAMSUNG_REC" which I believe is related to my laptop recovery options.

In any case, it does seems to be bootable.. the files in it are:



Code:

ls -l
total 1872
drwxr-xr-x.  2 root root    4096 Aug  3  2012 bg-bg
drwxr-xr-x. 38 root root    4096 Aug  3  2012 Boot
-rwxr-xr-x.  1 root root  398156 Jul 25  2012 bootmgr
-rwxr-xr-x.  1 root root 1350896 Jul 25  2012 bootmgr.efi
drwxr-xr-x.  2 root root    4096 Aug  3  2012 cs-cz
drwxr-xr-x.  2 root root    4096 Aug  3  2012 da-dk
drwxr-xr-x.  2 root root    4096 Aug  3  2012 de-de
drwxr-xr-x.  8 root root    4096 Aug 24  2012 Drivers
drwxr-xr-x.  4 root root    4096 Aug  3  2012 EFI
drwxr-xr-x.  2 root root    4096 Aug  3  2012 el-gr
drwxr-xr-x.  2 root root    4096 Aug  3  2012 en-gb
drwxr-xr-x.  2 root root    4096 Aug  3  2012 en-us
drwxr-xr-x.  2 root root    4096 Aug  3  2012 es-es
drwxr-xr-x.  2 root root    4096 Aug  3  2012 et-ee
drwxr-xr-x.  2 root root    4096 Aug  3  2012 fi-fi
drwxr-xr-x.  2 root root    4096 Aug  3  2012 fr-fr
drwxr-xr-x.  2 root root    4096 Aug  3  2012 hr-hr
drwxr-xr-x.  2 root root    4096 Aug  3  2012 hu-hu
drwxr-xr-x.  2 root root    4096 Aug  3  2012 it-it
drwxr-xr-x.  2 root root    4096 Aug  3  2012 ja-jp
drwxr-xr-x.  2 root root    4096 Aug  3  2012 ko-kr
drwxr-xr-x.  2 root root    4096 Aug  3  2012 lt-lt
drwxr-xr-x.  2 root root    4096 Aug  3  2012 lv-lv
drwxr-xr-x.  2 root root    4096 Aug  3  2012 nb-no
drwxr-xr-x.  2 root root    4096 Aug  3  2012 nl-nl
drwxr-xr-x.  2 root root    4096 Aug  3  2012 pl-pl
drwxr-xr-x.  2 root root    4096 Aug  3  2012 pt-br
drwxr-xr-x.  2 root root    4096 Aug  3  2012 pt-pt
drwxr-xr-x.  2 root root    4096 Aug 24  2012 $RECYCLE.BIN
drwxr-xr-x.  2 root root    4096 Aug  3  2012 ro-ro
drwxr-xr-x.  2 root root    4096 Aug  3  2012 ru-ru
drwxr-xr-x.  2 root root    4096 Aug  3  2012 sk-sk
drwxr-xr-x.  2 root root    4096 Aug  3  2012 sl-si
drwxr-xr-x.  2 root root    4096 Aug  3  2012 sources
drwxr-xr-x.  2 root root    4096 Aug  3  2012 sr-latn-cs
drwxr-xr-x.  2 root root    4096 Aug  3  2012 sv-se
drwxr-xr-x.  2 root root    4096 Aug  3  2012 tr-tr
drwxr-xr-x.  2 root root    4096 Aug  3  2012 uk-ua
drwxr-xr-x.  8 root root    4096 Aug  3  2012 WinClon
drwxr-xr-x.  2 root root    4096 Aug  3  2012 zh-cn
drwxr-xr-x.  2 root root    4096 Aug  3  2012 zh-hk
drwxr-xr-x.  2 root root    4096 Aug  3  2012 zh-tw

whe I tried to mound sda7 ir said:
Code:

mount: /dev/sda7 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sda7,
      missing codepage or helper program, or other error

      In some cases useful info is found in syslog - try
      dmesg | tail or so.


brenogalvao 02-18-2014 08:05 AM

I learned a lot in this thread and now my ideas are more organized, so I will post another cleaner topic with the actual problem, so people don't have to read again all the mistakes I've done.
I checked and it doesn't seem to be against any rule of the forum, so, hope it is okay.


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