LinuxForum.Fans
Тема

В GRUB2 исчез пунктик загрузки

Автор: dezhurant 121 сообщений 19644 просмотров В конец обсуждения ↓
#313183

Спасибо всем, кто отозвался, переустановил систему... Благо, с помощью Live-DVD сохранил все данные, так что кроме предстоящего лёгкого геморроя с установкой "всегочегонадо" и обновлений особых проблем не ощутил. Почему-то решил, что так будет проще. Кстати, пунктика Windows в грубе опять таки нет. Правда, ещё рекомендациями из этой темы не пользовался, не успел.

#313527

По поводу "пунктика с Windows"... Интересно, но он иногда пропадает, восстанавливается после пересохранения настроек GRUB-а в Yast-e...

#313854

В загрузке не стало пункта с виндой вообще. "Советы" выполнил.

text
#  grub2-mkconfig -o /boot/grub2/grub.cfg
Генерируется grub.cfg …
Найдена тема: /boot/grub2/themes/openSUSE/theme.txt
Найден образ linux: /boot/vmlinuz-3.8.5-1-desktop
Найден образ initrd: /boot/initrd-3.8.5-1-desktop
Найден образ linux: /boot/vmlinuz-3.7.10-1.1-desktop
Найден образ initrd: /boot/initrd-3.7.10-1.1-desktop
  No volume groups found
завершено

Точнее, пунктик есть-Windows 7, но пишет-нет такого раздела.

#313863

Покажите:

text
# cat /boot/grub2/grub.cfg
# cat /boot/grub2/device.map
#313865
Показать
cat /boot/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
set default="0"

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_input console
terminal_output console
if [ x${boot_once} = xtrue ]; then
set timeout=0
elif sleep --interruptible 0 ; then
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'openSUSE' --class 'opensuse' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2' 38872a2f-5ad3-4f98-91f6-96b3f078e23d
else
search --no-floppy --fs-uuid --set=root 38872a2f-5ad3-4f98-91f6-96b3f078e23d
fi
echo 'Loading Linux 3.8.5-1-desktop ...'
linux /boot/vmlinuz-3.8.5-1-desktop root=UUID=38872a2f-5ad3-4f98-91f6-96b3f078e23d quiet splash=silent
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-3.8.5-1-desktop
}
submenu 'Advanced options for openSUSE' $menuentry_id_option 'gnulinux-advanced-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
menuentry 'openSUSE, with Linux 3.8.5-1-desktop' --class 'opensuse' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.5-1-desktop-advanced-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2' 38872a2f-5ad3-4f98-91f6-96b3f078e23d
else
search --no-floppy --fs-uuid --set=root 38872a2f-5ad3-4f98-91f6-96b3f078e23d
fi
echo 'Loading Linux 3.8.5-1-desktop ...'
linux /boot/vmlinuz-3.8.5-1-desktop root=UUID=38872a2f-5ad3-4f98-91f6-96b3f078e23d quiet splash=silent
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-3.8.5-1-desktop
}
menuentry 'openSUSE, with Linux 3.8.5-1-desktop (recovery mode)' --class 'opensuse' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.5-1-desktop-recovery-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2' 38872a2f-5ad3-4f98-91f6-96b3f078e23d
else
search --no-floppy --fs-uuid --set=root 38872a2f-5ad3-4f98-91f6-96b3f078e23d
fi
echo 'Loading Linux 3.8.5-1-desktop ...'
linux /boot/vmlinuz-3.8.5-1-desktop root=UUID=38872a2f-5ad3-4f98-91f6-96b3f078e23d
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-3.8.5-1-desktop
}
menuentry 'openSUSE, with Linux 3.7.10-1.1-desktop' --class 'opensuse' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.1-desktop-advanced-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2' 38872a2f-5ad3-4f98-91f6-96b3f078e23d
else
search --no-floppy --fs-uuid --set=root 38872a2f-5ad3-4f98-91f6-96b3f078e23d
fi
echo 'Loading Linux 3.7.10-1.1-desktop ...'
linux /boot/vmlinuz-3.7.10-1.1-desktop root=UUID=38872a2f-5ad3-4f98-91f6-96b3f078e23d quiet splash=silent
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-3.7.10-1.1-desktop
}
menuentry 'openSUSE, with Linux 3.7.10-1.1-desktop (recovery mode)' --class 'opensuse' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.1-desktop-recovery-38872a2f-5ad3-4f98-91f6-96b3f078e23d' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 --hint='hd0,msdos2' 38872a2f-5ad3-4f98-91f6-96b3f078e23d
else
search --no-floppy --fs-uuid --set=root 38872a2f-5ad3-4f98-91f6-96b3f078e23d
fi
echo 'Loading Linux 3.7.10-1.1-desktop ...'
linux /boot/vmlinuz-3.7.10-1.1-desktop root=UUID=38872a2f-5ad3-4f98-91f6-96b3f078e23d
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-3.7.10-1.1-desktop
}
}

### 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_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### 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 ${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 ###

### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
Показать
(hd1) /dev/disk/by-id/mmc-SD02G_0x7175e67e
(hd0) /dev/disk/by-id/ata-ST9320325AS_6VD7AG7T
#313869

verg,

Показать
#!/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.
# (1) Windows 7
menuentry "Windows 7" {
set root=(hd0,0)
chainloader +1
}
#313873

dezhurant,
А после:

text
# mkinitrd && grub2-mkconfig -o /boot/grub2/grub.cfg
#313875

Повторил всё заново.
# cat /boot/grub2/grub.cfg

Показать
.......
### 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.
# (1) Windows 7
menuentry "Windows 7" {
set root=(hd0,0)
chainloader +1
}### END /etc/grub.d/40_custom ###
.....

В результате нерабочий пункт Windows 7...
ЗЫ: Что-то небезболезненный переход на 12.3 у меня получается...

#313876

Вставьте после строки ### BEGIN /etc/grub.d/30_os-prober ### это:

text
menuentry "Windows 7" {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
chainloader +1
}
#313883

Интересно... Редактирую файл из-под рута, всё сохраняется, вновь открываю файл-вставленного нет... o_O Причём в ......./40_os-prober... сохранено нормально...

#313884
"dezhurant⇓" написал:
set root=(hd0,0)

В Grub2 диски нумеруются с 0,а разделы с 1
должно быть
set root=(hd0,1)

#313885
"dezhurant" написал:
}### END /etc/grub.d/40_custom ###

Из-за этой строки может нерабочий.
Приведите её к виду:

text
}
### END /etc/grub.d/40_custom ###
#313887
"Vlad60⇓" написал:
должно быть
set root=(hd0,1)

И почему тогда в прошлый раз прокатило? В GRUB2 исчез пунктик загрузки

Скорее и диски, и разделы нумеруются с "0".

#313892

verg,

"dezhurant⇓" написал:
verg, пишу из-под винды! Спасибо большое за терпение! Заработало. Только в GRUB-е теперь 2 виндовса стало (то ни одного не было...) Один Windows 7 loader, который запускается, и второй просто Windows 7, который не запускается.
"dezhurant⇓" написал:
Может, set root=(hd0,0) поменять? Без спросу лезть не хочу, дабы вообще не поломать... ah

Вот так было... Сейчас и Loader-a нету...

#313897

dezhurant написал:
Вот так было... Сейчас и Loader-a нету...
Вставьте в grub.conf те строчки, которые я выше привел. А вот это
text
# mkinitrd && grub2-mkconfig -o /boot/grub2/grub.cfg

пока не запускайте - сотрет.

#313901

urfin, Я вставлял уже, почему-то не сохраняет файл... Точнее-сохранить-да, без проблем, при повторном открытии файла нету.

"Vlad60⇓" написал:
должно быть
set root=(hd0,1)
сделал, без изменений...
#313903

"dezhurant⇓" написал:
urfin, Я вставлял уже, почему-то не сохраняет файл... Точнее-сохранить-да, без проблем, при повторном открытии файла нету.
Вставлять из-под рута, и не делать обновление grub.conf
#313910

Пишу из-под винды! urfin, да, конечно, я делал из-под рута, но делал и обновление grub.conf. Сейчас нормально, появился дополнительный пунктик Windows 7, который работает. Сделал set root=(hd0,1) и Вашу, urfin, "цитату"... :) Спасибо!

#313911
"urfin⇓" написал:
Вставьте после строки ### BEGIN /etc/grub.d/30_os-prober ### это:

Вроде это надо писать в
в /etc/grub.d/40_custom ?
У меня так сделано и ничего не исчезает-вот мой/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 chain
insmod ntfs
set root=(hd0,1)
chainloader +1
}
"verg⇓" написал:
Скорее и диски, и разделы нумеруются с "0".

info grub2

Показать
2 Naming convention
*******************

The device syntax used in GRUB is a wee bit different from what you may
have seen before in your operating system(s), and you need to know it so
that you can specify a drive/partition.

Look at the following examples and explanations:

(fd0)

First of all, GRUB requires that the device name be enclosed with
`(' and `)'. The `fd' part means that it is a floppy disk. The number
`0' is the drive number, which is counted from _zero_. This expression
means that GRUB will use the whole floppy disk.

(hd0,msdos2)

Here, `hd' means it is a hard disk drive. The first integer `0'
indicates the drive number, that is, the first hard disk, the string
`msdos' indicates the partition scheme, while the second integer, `2',
indicates the partition number (or the PC slice number in the BSD
terminology). The partition numbers are counted from _one_, not from
zero (as was the case in previous versions of GRUB).
This expression
means the second partition of the first hard disk drive. In this case,
GRUB uses one partition of the disk, instead of the whole disk.

(hd0,msdos5)

This specifies the first "extended partition" of the first hard disk
drive. Note that the partition numbers for extended partitions are
counted from `5', regardless of the actual number of primary partitions
on your hard disk.
Войдите или зарегистрируйтесь, чтобы ответить.