В системе имеется 3 жестких диска:
fdisk -l:
Показать
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa73545b0
Device Boot Start End Blocks Id System
/dev/sda1 1 34 273073+ 82 Linux swap / Solaris
/dev/sda2 35 9729 77875087+ fd Linux raid autodetect
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090
Device Boot Start End Blocks Id System
/dev/sdb1 * 7013 38913 256244751 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 1 13 102973+ 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sdb3 13 46 262899 82 Linux swap / Solaris
Partition 3 does not end on cylinder boundary.
/dev/sdb4 46 7012 55957955+ 5 Extended
Partition 4 does not end on cylinder boundary.
/dev/sdb5 46 4170 33121840+ 83 Linux
/dev/sdb6 4170 7012 22835893+ 83 Linux
Partition table entries are not in disk order
Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0ff20ff1
Device Boot Start End Blocks Id System
/dev/sdc1 1 31 248945+ 5 Extended
/dev/sdc2 32 9726 77875087+ fd Linux raid autodetect
/dev/sdc3 9727 15271 44540212+ 83 Linux
/dev/sdc4 15272 17883 20980890 7 HPFS/NTFS
/dev/sdc5 1 31 248944+ 82 Linux swap / Solaris
Ставим linux mint 11 (или любую другую систему с загрузчикам grub2, например alt linux 6) в раздел /dev/sdb5 (точка монтирования /), /dev/sdb2 монтируем, как /boot. Загрузчику говорим ставится в /dev/sdb. Установка проходит нормально, загрузчик устанавливается в /dev/sdb, а дальше пошла уличная магия smile.
Загрузчик не грузит не то, что образ ядра - не видно даже таблицы с выбором вариантов загрузки. Вместо нее висит надпись - GRUB loading Welcome to GRUB и мигающий курсор. На нажатие клавиш не реагирует, только Ctrl+Alt+Del (перезагрузка). Лезем в инет искать решение ошибки, и натыкаемся на доброго человека, который предлагает выключить графический режим загрузки самого GRUB2, раскомментировав параметр GRUB_TERMINAL=console в файле /etc/default/grub и выполнив после этого команду update-grub. Чрутимся, выполняем вышеперечисленные команды - ура, меню с выбором вариантов загрузки появляется в консольном режиме. (Кстати, никто не знает, как включить консольный режим в GRUB2 при отсутствии файла /etc/default/grub? Например, в alt linux 6 такой файл просто отсутствует). Однако при выборе любого из пунктов, загрузка не начинается, только мигающий курсор. Ладно, грузимся заново, попадаем в консоль GRUB2 (клавишей C), вводим ls и видим ответ - (hd0). Загружаем LiveDVD, монтируем разделы, чрутимся и видим, что файла device.map нет; ладно, какие проблемы, создаем - grub-mkdevicemap. Он действительно появляется в /boot/grub/device.map. Радостные перезагружаемся, но при выборе любой загрузочной записи опять мигающий курсор и по команде grub>ls снова (hd0)! Дальше логические рассуждения - что не так? заканчиваются и я отправляюсь спать, так и не поняв, куда же делись 2 других диска?
Конфиги:
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
set have_grubenv=true
load_env
fi
set default="0"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 11, 2.6.38-8-generic (/dev/sdb2)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root c8181ee1-0f3d-4401-b172-a178668b8cb5
linux /vmlinuz-2.6.38-8-generic root=UUID=f323ffdb-9b14-41a5-aa4c-c8cf49f4bdb5 ro quiet splash vt.handoff=7
initrd /initrd.img-2.6.38-8-generic
}
menuentry 'Linux Mint 11, 2.6.38-8-generic (/dev/sdb2) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root c8181ee1-0f3d-4401-b172-a178668b8cb5
echo 'Loading Linux 2.6.38-8-generic ...'
linux /vmlinuz-2.6.38-8-generic root=UUID=f323ffdb-9b14-41a5-aa4c-c8cf49f4bdb5 ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root c8181ee1-0f3d-4401-b172-a178668b8cb5
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root c8181ee1-0f3d-4401-b172-a178668b8cb5
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional RU (on /dev/sdc4)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd2,msdos4)'
search --no-floppy --fs-uuid --set=root 0648592048591033
drivemap -s (hd0) ${root}
chainloader +1
}
### 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
device.map:
Показать
(hd0) /dev/disk/by-id/ata-WDC_WD800JB-00JJC0_WD-WCAM9N944886
(hd1) /dev/disk/by-id/ata-SAMSUNG_HD321KJ_S0MQJDSP619690
(hd2) /dev/disk/by-id/ata-SAMSUNG_SP2004C_S07GJ1GLC02631
/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=0
#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"
Содержимое каталога /boot:
Показать
total 25831
-rw------- 1 root root 2107662 Apr 11 2011 System.map-2.6.38-8-generic
-rw-r--r-- 1 root root 735445 Apr 11 2011 abi-2.6.38-8-generic
drwxr-xr-x 3 root root 1024 Apr 28 2011 boot
-rw-r--r-- 1 root root 137319 Apr 11 2011 config-2.6.38-8-generic
drwxr-xr-x 3 root root 5120 Nov 16 23:42 grub
-rw-r--r-- 1 root root 18489548 Nov 16 19:04 initrd.img-2.6.38-8-generic
drwxr-xr-x 2 root root 12288 Nov 16 18:52 lost+found
-rw-r--r-- 1 root root 160988 Oct 22 2010 memtest86+.bin
-rw-r--r-- 1 root root 163168 Oct 22 2010 memtest86+_multiboot.bin
-rw------- 1 root root 1216 Apr 11 2011 vmcoreinfo-2.6.38-8-generic
-rw-r--r-- 1 root root 4521296 Aug 27 21:38 vmlinuz-2.6.38-8-generic