Editando 40_custom gera um erro

1

Eu editei o arquivo 40_custom para que eu possa inicializar o Linux iso a partir de uma partição diferente, mas quando eu executo sudo update-grub do terminal, eu recebo isso:

"/usr/sbin/grub-mkconfig: 262: usr/sbin/grub-mkconfig: /etc/grub.d/40_custom: not found".

Eu sei que está lá porque eu estava apenas editando o arquivo.

Aqui está o conteúdo do arquivo 40_custom:

"#!/bin/sh
exec tail -n +3 $0
menuentry "Ubuntu 13.10 Desktop AMD64" {
    set isofile="/ubuntu-13.10-desktop-amd64"
    insmod part_gpt
    loopback loop (hd0,2)$isofile
    linux (loop)/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=$isofile nomodeset
    initrd (loop)/casper/initrd.lz
}

e aqui estão os arquivos no diretório grub.d:

00_header  05_debian_theme  10_linux  20_linux_xen  20_memtest86+  30_os-prober  30_uefi-firmware  40_custom  41_custom  README
    
por Christopher Champion 22.03.2014 / 00:58

1 resposta

2

Christopher Champion disse:

Hey, I figured the issue out and I was wanting to let you know just for future reference just in case somebody else has the same issue.

It was something so simple that I don't know why I didn't do it to start with but all I had to do was :

  • Delete the 40_custom file : sudo rm /etc/grub.d/40_custom
  • Update the grub configuration : sudo update-grub
  • Then make the 40_custom file again by typing : sudo gedit /etc/grub.d/40_custom and write the script again.
  • Make it executable : sudo chmod +x 40_custom
  • then run sudo update-grub again
    
por MrVaykadji 08.04.2014 / 22:36