Я прочитал несколько предыдущих вопросов и не нашел решения. Когда я запускаю команду update-grub
, она дает мне такой вывод:
root@Agustin-Ubuntu:/home/agustin# update-grub
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.5.0-45-generic
Found initrd image: /boot/initrd.img-3.5.0-45-generic
Found linux image: /boot/vmlinuz-3.5.0-43-generic
Found initrd image: /boot/initrd.img-3.5.0-43-generic
Found linux image: /boot/vmlinuz-3.5.0-40-generic
Found initrd image: /boot/initrd.img-3.5.0-40-generic
Found linux image: /boot/vmlinuz-3.5.0-39-generic
Found initrd image: /boot/initrd.img-3.5.0-39-generic
Found linux image: /boot/vmlinuz-3.5.0-37-generic
Found initrd image: /boot/initrd.img-3.5.0-37-generic
Found linux image: /boot/vmlinuz-3.5.0-36-generic
Found initrd image: /boot/initrd.img-3.5.0-36-generic
Found linux image: /boot/vmlinuz-3.5.0-34-generic
Found initrd image: /boot/initrd.img-3.5.0-34-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found Windows 8 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-3.5.0-45-generic
Found initrd image: /boot/initrd.img-3.5.0-45-generic
Found linux image: /boot/vmlinuz-3.5.0-43-generic
Found initrd image: /boot/initrd.img-3.5.0-43-generic
Found linux image: /boot/vmlinuz-3.5.0-40-generic
Found initrd image: /boot/initrd.img-3.5.0-40-generic
Found linux image: /boot/vmlinuz-3.5.0-39-generic
Found initrd image: /boot/initrd.img-3.5.0-39-generic
Found linux image: /boot/vmlinuz-3.5.0-37-generic
Found initrd image: /boot/initrd.img-3.5.0-37-generic
Found linux image: /boot/vmlinuz-3.5.0-36-generic
Found initrd image: /boot/initrd.img-3.5.0-36-generic
Found linux image: /boot/vmlinuz-3.5.0-34-generic
Found initrd image: /boot/initrd.img-3.5.0-34-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found linux image: /boot/vmlinuz-3.5.0-45-generic
Found initrd image: /boot/initrd.img-3.5.0-45-generic
Found linux image: /boot/vmlinuz-3.5.0-43-generic
Found initrd image: /boot/initrd.img-3.5.0-43-generic
Found linux image: /boot/vmlinuz-3.5.0-40-generic
Found initrd image: /boot/initrd.img-3.5.0-40-generic
Found linux image: /boot/vmlinuz-3.5.0-39-generic
Found initrd image: /boot/initrd.img-3.5.0-39-generic
Found linux image: /boot/vmlinuz-3.5.0-37-generic
Found initrd image: /boot/initrd.img-3.5.0-37-generic
Found linux image: /boot/vmlinuz-3.5.0-36-generic
Found initrd image: /boot/initrd.img-3.5.0-36-generic
Found linux image: /boot/vmlinuz-3.5.0-34-generic
Found initrd image: /boot/initrd.img-3.5.0-34-generic
Found linux image: /boot/vmlinuz-3.5.0-23-generic
Found initrd image: /boot/initrd.img-3.5.0-23-generic
Found Windows 8 (loader) on /dev/sda1
error: syntax error.
error: Incorrect command.
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 165
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
Проблема здесь в том, что Grub Customizer не обновляется после обновления до версии 3.5.0-45-generic, поэтому все записи в меню перепутаны, и я не могу получить их в нужном мне порядке, потому что Grub Customizer не имеет никакого эффекта, он отображает правильные новые записи, но не изменяет меню при загрузке.
Это мой /etc/default/grub
файл:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT="1"
#GRUB_HIDDEN_TIMEOUT="0" GRUB_HIDDEN_TIMEOUT_QUIET="true" GRUB_TIMEOUT="10" GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null ||
echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_SAVEDEFAULT="false"
Я только что проверил свой /etc/default/grub
, и он выглядит так же, как в вашем pastebin, но я также получаю это предупреждение после установки по умолчанию Ubuntu 14.04 Trusty Thar.
Так что это не поможет мне. Результат все тот же. И я обнаружил, что там уже есть большая дискуссия на панели запуска. Просто посмотрите здесь:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1258597
Но комментарий #10
на эта ссылка показывает хитрость, как разобраться. Файл /etc/default/grub
необходимо отредактировать во второй строке и в третьей строке, как показано в комментарии № 10 к вышеуказанной ссылке панели запуска:
sudo gedit /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=countdown
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"
GRUB_CMDLINE_LINUX=""
Затем выполните:
sudo update-grub
Это все улаживает ...
Я сохранил оригинальный файл / etc / default / grub в моей папке для таких ситуаций. Откройте терминал и выполните
sudo cp /etc/default/grub ~/default-grub.bad
sudo wget "http://pastebin.com/raw.php?i=g3TMZgTP" -o /etc/default/grub
sudo update-grub
Смотрите файл в необработанном формате здесь
Дополнительные предложения:
У вас есть куча ядер установлена. Попробуйте удалить старые. Вы можете использовать такую программу, как Ubuntu-Tweak или Synaptic.
У меня была похожая проблема, которую я решил, просто удалив меню, которое было в Grub Customizer. После удаления этого меню Grub Customizer снова начал сохранять без проблем.
Вы испортили свой файл / etc / default / grub, разместив несколько команд в одной строке, которая закомментирована, но разбила последнюю пополам на следующей строке, которая не является комментарием. "echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash" "является частью предыдущей команды и должно находиться в той же строке.
Grub Customizer добавляет или редактирует файлы в /etc/default/grub.d
, поэтому файл, который вам нужно исправить, находится в этом каталоге, поэтому с вашим / etc все в порядке. / default / grub
файл.
Кроме того, ошибка требует проверки строки 165, а файл, который необходимо проверить, - это /boot/grub/grub.cfg.new
.
Итак, перейдите в файл /boot/grub/grub.cfg.new
и прокрутите вниз до строки номер 165. Здесь синтаксическая ошибка. В начале каждого раздела кода есть строка, которая начинается с ### BEGIN
, за которой следует имя файла конфигурации. Это файл, содержащий ошибку, которую необходимо исправить.
См. этот подробный пример пользователя @donquixote .