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-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 09:27 PM.