linux <путь к ядру> root=/dev/sdc2initrd <путь>boot
su -grub-mkconfig -o /boot/grub/grub.cfg
Код: [Выделить]su -grub-mkconfig -o /boot/grub/grub.cfg
# grub-mkconfig -o /boot/grub/grub.cfgGenerating grub.cfg ...Found theme: /boot/grub/themes/slinux/theme.txtFound background image: grub.jpgFound linux image: /boot/vmlinuz-std-defskipping symlink: /boot/vmlinuz-std-defFound linux image: /boot/vmlinuzFound initrd image: /boot/initrd.imgFound linux image: /boot/vmlinuz-3.0.36-std-def-alt0.M60P.1Found initrd image: /boot/initrd-3.0.36-std-def-alt0.M60P.1.imgFound linux image: /boot/vmlinuz-3.0.20-std-def-alt0.M60P.1Found initrd image: /boot/initrd-3.0.20-std-def-alt0.M60P.1.img No volume groups foundFound memtest image: /boot/memtest-4.20.bindone
# ls -l /boot
ПокажитеКод: [Выделить]# ls -l /boot
итого 14500-rw-r--r-- 1 root root 135843 Фев 8 20:04 config-3.0.20-std-def-alt0.M60P.1-rw-r--r-- 1 root root 135936 Июн 26 23:53 config-3.0.36-std-def-alt0.M60P.1drwxr-xr-x 4 root root 12288 Июл 21 21:41 grub-rw------- 1 root root 3491370 Июн 21 01:18 initrd-3.0.20-std-def-alt0.M60P.1.img-rw------- 1 root root 3012383 Июл 18 01:46 initrd-3.0.36-std-def-alt0.M60P.1.imglrwxrwxrwx 1 root root 37 Июл 17 23:53 initrd.img -> initrd-3.0.36-std-def-alt0.M60P.1.imglrwxrwxrwx 1 root root 37 Июл 17 23:53 initrd-std-def.img -> initrd-3.0.36-std-def-alt0.M60P.1.img-rw-r--r-- 1 root root 164504 Янв 25 2011 memtest-4.20.bindrwxr-xr-x 3 root root 4096 Июн 21 15:26 splash-rw-r--r-- 1 root root 1497654 Фев 8 20:17 System.map-3.0.20-std-def-alt0.M60P.1-rw-r--r-- 1 root root 1498945 Июн 27 00:03 System.map-3.0.36-std-def-alt0.M60P.1lrwxrwxrwx 1 root root 34 Июл 17 23:53 vmlinuz -> vmlinuz-3.0.36-std-def-alt0.M60P.1-r--r--r-- 1 root root 2440208 Июн 21 01:17 vmlinuz-3.0.20-std-def-alt0.M60P.1-rw-r--r-- 1 root root 2436768 Июн 27 00:03 vmlinuz-3.0.36-std-def-alt0.M60P.1lrwxrwxrwx 1 root root 34 Июл 17 23:53 vmlinuz-std-def -> vmlinuz-3.0.36-std-def-alt0.M60P.1
# make-initrd# grub-mkconfig -o /boot/grub/grub.cfg
Хм...Так попробуйте:Код: [Выделить]# make-initrd# grub-mkconfig -o /boot/grub/grub.cfgИ вывод покажите.
[root@linux ~]# make-initrdConfig file: /etc/initrd.mkGenerating module dependencies on host ...Guessed modules: ata_generic crc-t10dif ext4 libata pata_acpi pata_via scsi_mod sd_mod Guessed features: add-modules cleanup compress Creating initrd image ...Adding plymouth support ...Adding modules ...Generating module dependencies in image ...Packed modules: agpgart ali-agp amd64-agp amd-k7-agp ata_generic ati-agp crc16 crc-t10dif efficeon-agp ext4 intel-agp intel-gtt jbd2 libata mbcache nvidia-agp pata_acpi pata_via scsi_mod sd_mod sis-agp sworks-agp via-agp Packing image to archive ...Compressing image ...Installing image ...Removing work directory ...Image is saved as /boot/initrd-3.0.36-std-def-alt0.M60P.1.img[root@linux ~]# grub-mkconfig -o /boot/grub/grub.cfgGenerating grub.cfg ...Found theme: /boot/grub/themes/slinux/theme.txtFound background image: grub.jpgFound linux image: /boot/vmlinuz-std-defskipping symlink: /boot/vmlinuz-std-defFound linux image: /boot/vmlinuzFound initrd image: /boot/initrd.imgFound linux image: /boot/vmlinuz-3.0.36-std-def-alt0.M60P.1Found initrd image: /boot/initrd-3.0.36-std-def-alt0.M60P.1.imgFound linux image: /boot/vmlinuz-3.0.20-std-def-alt0.M60P.1Found initrd image: /boot/initrd-3.0.20-std-def-alt0.M60P.1.img No volume groups foundFound memtest image: /boot/memtest-4.20.bindone
# grub-install /dev/sda
Ну и так ещё:Код: [Выделить]# grub-install /dev/sda(если у вас sda)
# grub-install /dev/sdcInstallation finished. No error reported.
Неужели он не установлен?! Bash-like же стартует.
# sed -n '/^[a-zA-Z_]/ p' /etc/sysconfig/grub2
# cat /boot/grub/themes/slinux/theme.txt
По незнанию обновил ядро через "su" вместо "su -" теперь grub2 отказывается показывать меню выбора с последующей загрузкой выделенного пункта.
Я вот сейчас проверил без "-" запустить обвление ядра и ничего не выходит, ошибка — команда не найдена.Как вы все-таки обнолялись ? ? ?
$ sed -n '/^[a-zA-Z_]/ p' /etc/sysconfig/grub2GRUB_AUTOUPDATE_CFG=trueGRUB_AUTOUPDATE_CFGNAME=/boot/grub/grub.cfgGRUB_VMLINUZ_SYMLINKS=defaultGRUB_VMLINUZ_FAILSAFE=defaultGRUB_CMDLINE_LINUX_DEFAULT='resume=/dev/disk/by-uuid/455059ba-fbc9-45e2-b744-d717aa2be545 panic=30 splash vga=0x314'GRUB_CMDLINE_LINUX='failsafe vga=normal'GRUB_TERMINAL_OUTPUT='gfxterm'GRUB_GFXMODE='800x600'GRUB_DEFAULT='saved'GRUB_SAVEDEFAULT=trueGRUB_WALLPAPER=/usr/share/plymouth/themes/slinux/grub.jpgGRUB_COLOR_NORMAL=dark-gray/whiteGRUB_COLOR_HIGHLIGHT=black/whiteGRUB_THEME=/boot/grub/themes/slinux/theme.txtGRUB_AUTOUPDATE_DEVICE='/dev/sdc 'GRUB_AUTOUPDATE_FORCE='no'
$ sudo cat /boot/grub/themes/slinux/theme.txt[sudo] password for sivak:# Debian Lenny theme for GRUB2## Copyright © 2010 Jo Shields## Permission is hereby granted, free of charge, to any person obtaining a copy# of this software and associated documentation files (the "Software"), to deal# in the Software without restriction, including without limitation the rights# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell# copies of the Software, and to permit persons to whom the Software is# furnished to do so, subject to the following conditions:# # The above copyright notice and this permission notice shall be included in# all copies or substantial portions of the Software.# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN# THE SOFTWARE.#general settingsmessage-font: "DejaVu Sans Bold 14"title-text: ""message-color: "#000"message-bg-color: "#fff"desktop-image: "boot.png"terminal-font: "DejaVu Sans Regular 12"#help bar at the bottom+ label { top = 100%-25 left = 0 width = 100% height = 20 text = "To boot the selected operating system using default settings, press return. For additional settings, press E" align = "center" font = "DejaVu Sans Regular 10" color = "#000"}#menu+ boot_menu { left = 30% width = 40% top = 32% height = 40% item_font = "DejaVu Sans Regular 14" selected_item_font = "DejaVu Sans Bold 16" icon_height = 24 icon_width = 24 item_height = 26 item_padding = 0 item_icon_space = 0 item_spacing = 1 scrollbar = true scrollbar_width = 20 scrollbar_thumb = "scrollbar_slider_*.png" scrollbar_frame = "scrollbar_border_*.png" item_color = "#676769" selected_item_color = "#4f88c7"}+ circular_progress{ id = "__timeout__" left = 52% top = 13% width = 36 height =36 num_ticks = 12 ticks_disappear = false start_angle = -60 center_bitmap = "zero.png" tick_bitmap = "tick.png"}
$ sudo cat /boot/grub/grub.cfg## DO NOT EDIT THIS FILE## It is automatically generated by grub-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_envfiset default="${saved_entry}"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=truefifunction savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi}function load_video { insmod vbe insmod vga insmod video_bochs insmod video_cirrus}insmod part_msdosinsmod ext2set root='(/dev/sdc,msdos2)'search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296if loadfont /boot/grub/unifont.pf2 ; then set gfxmode=800x600 load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 set locale_dir=($root)/boot/grub/locale set lang=ru_RU insmod gettextfiterminal_output gfxterminsmod part_msdosinsmod ext2set root='(/dev/sdc,msdos2)'search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296insmod gfxmenuloadfont ($root)/boot/grub/themes/slinux/f/dejavu_sans_10.pf2loadfont ($root)/boot/grub/themes/slinux/f/dejavu_sans_12.pf2loadfont ($root)/boot/grub/themes/slinux/f/dejavu_sans_bold_14.pf2loadfont ($root)/boot/grub/themes/slinux/f/droid_sans_12.pf2loadfont ($root)/boot/grub/themes/slinux/f/droid_sans_bold_14.pf2loadfont ($root)/boot/grub/themes/slinux/f/vera_sans_10.pf2loadfont ($root)/boot/grub/themes/slinux/f/vera_sans_12.pf2loadfont ($root)/boot/grub/themes/slinux/f/vera_sans_bold_14.pf2insmod pngset theme=($root)/boot/grub/themes/slinux/theme.txtset timeout=5### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/05_altlinux_theme ###insmod part_msdosinsmod ext2set root='(/dev/sdc,msdos2)'search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296insmod jpegif background_image /usr/share/plymouth/themes/slinux/grub.jpg ; then set color_normal=dark-gray/white set color_highlight=black/whiteelse set menu_color_normal=white/black set menu_color_highlight=black/light-grayfi### END /etc/grub.d/05_altlinux_theme ###### BEGIN /etc/grub.d/10_linux ###menuentry "Simply Linux 6.0.1" --class gnu-linux --class gnu --class os { savedefault load_video insmod gzio insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 echo 'Loading Linux vmlinuz ...' linux /boot/vmlinuz root=UUID=3ef6af9e-91ed-4307-a4d1-f72fd73d9296 ro resume=/dev/disk/by-uuid/455059ba-fbc9-45e2-b744-d717aa2be545 panic=30 splash vga=0x314 echo 'Loading initial ramdisk ...' initrd /boot/initrd.img}menuentry "Simply Linux 6.0.1 (failsafe mode)" --class gnu-linux --class gnu --class os { savedefault load_video insmod gzio insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 echo 'Loading Linux vmlinuz ...' linux /boot/vmlinuz root=UUID=3ef6af9e-91ed-4307-a4d1-f72fd73d9296 ro failsafe vga=normal echo 'Loading initial ramdisk ...' initrd /boot/initrd.img}menuentry "Simply Linux 6.0.1, 3.0.36-std-def-alt0.M60P.1" --class gnu-linux --class gnu --class os { savedefault load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 echo 'Loading Linux 3.0.36-std-def-alt0.M60P.1 ...' linux /boot/vmlinuz-3.0.36-std-def-alt0.M60P.1 root=UUID=3ef6af9e-91ed-4307-a4d1-f72fd73d9296 ro resume=/dev/disk/by-uuid/455059ba-fbc9-45e2-b744-d717aa2be545 panic=30 splash vga=0x314 echo 'Loading initial ramdisk ...' initrd /boot/initrd-3.0.36-std-def-alt0.M60P.1.img}menuentry "Simply Linux 6.0.1, 3.0.20-std-def-alt0.M60P.1" --class gnu-linux --class gnu --class os { savedefault load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 echo 'Loading Linux 3.0.20-std-def-alt0.M60P.1 ...' linux /boot/vmlinuz-3.0.20-std-def-alt0.M60P.1 root=UUID=3ef6af9e-91ed-4307-a4d1-f72fd73d9296 ro resume=/dev/disk/by-uuid/455059ba-fbc9-45e2-b744-d717aa2be545 panic=30 splash vga=0x314 echo 'Loading initial ramdisk ...' initrd /boot/initrd-3.0.20-std-def-alt0.M60P.1.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/30_os-prober ###### END /etc/grub.d/30_os-prober ###### BEGIN /etc/grub.d/39_memtest ###menuentry "Memtest86+-4.20" { insmod part_msdos insmod ext2 set root='(/dev/sdc,msdos2)' search --no-floppy --fs-uuid --set=root 3ef6af9e-91ed-4307-a4d1-f72fd73d9296 linux16 /boot/memtest-4.20.bin}### END /etc/grub.d/39_memtest ###### 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 ###
# fdisk -l
> GRUB_AUTOUPDATE_DEVICE='/dev/sdc 'Сколько дисков в системе?Вывод:Код: [Выделить]# fdisk -l
$ sudo fdisk -l[sudo] password for sivak:Disk /dev/sdb: 320.1 GB, 320072933376 bytes255 heads, 63 sectors/track, 38913 cylinders, всего 625142448 секторовUnits = секторы of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xd6767223Устр-во Загр Начало Конец Блоки Id Система/dev/sdb1 2048 625142447 312570200 83 LinuxDisk /dev/sda: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylinders, всего 976773168 секторовUnits = секторы of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0005c27dУстр-во Загр Начало Конец Блоки Id Система/dev/sda1 2048 976771071 488384512 83 LinuxDisk /dev/sdc: 120.1 GB, 120060444672 bytes255 heads, 63 sectors/track, 14596 cylinders, всего 234493056 секторовUnits = секторы of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000d5c42Устр-во Загр Начало Конец Блоки Id Система/dev/sdc1 2048 3952639 1975296 82 Linux своп / Solaris/dev/sdc2 * 3952640 234491903 115269632 83 Linux