grub2 работа над ошибками

emerge =sys-boot/grub-9999 -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "=sys-boot/grub-9999" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-boot/grub-9999 (masked by: missing keyword)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

Для начала размаскировываем

 cat /etc/portage/package.keywords
# sys-boot/grub
=sys-boot/grub-9999 **

cat /etc/portage/package.unmask
# sys-boot/grub
sys-boot/grub

Собирается с такими флагами

emerge =sys-boot/grub-9999 -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] app-admin/eselect-ruby-20081227  2 kB
[ebuild  N    ] dev-lang/ruby-1.8.7_p160  USE="berkdb gdbm ipv6 socks5 ssl threads -debug -doc -emacs -examples -rubytests -tk -xemacs" 4,041 kB
[ebuild     U ] sys-boot/grub-9999 [0.97-r9] USE="-custom-cflags -multislot% -static (-ncurses%*) (-netboot%)" 0 kB

Total: 3 packages (1 upgrade, 2 new), Size of downloads: 4,043 kB

Установка банальна

#mount /dev/sda1 /boot/

#grub-mkconfig -o '/boot/grub/grub.cfg'
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.30-rc8
Found linux image: /boot/vmlinuz-2.6.30-rc8.old
Found linux image: /boot/vmlinuz-2.6.29.4
Found linux image: /boot/vmlinuz-2.6.29.3
Found linux image: /boot/vmlinuz-2.6.29.3.old
done

# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)   /dev/sda
# grub-setup /dev/sda

Если я правильно понял то на этом все. Основные конфигурационные файлы.

> cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Gentoo GNU/Linux, linux 2.6.30-rc8" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-rc8 root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, linux 2.6.30-rc8 (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-rc8 root=/dev/sda2 ro single
}
menuentry "Gentoo GNU/Linux, linux 2.6.30-rc8.old" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-rc8.old root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, linux 2.6.30-rc8.old (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-rc8.old root=/dev/sda2 ro single
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.4" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.4 root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.4 (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.4 root=/dev/sda2 ro single
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.3" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.3 root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.3 (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.3 root=/dev/sda2 ro single
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.3.old" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.3.old root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, linux 2.6.29.3.old (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.29.3.old root=/dev/sda2 ro single
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###

Сгенерировался автоматически из найденных ядер

# ls /boot | grep vmlinuz
vmlinuz@
vmlinuz-2.6.29.3
vmlinuz-2.6.29.3.old
vmlinuz-2.6.29.4
vmlinuz-2.6.30-rc8
vmlinuz-2.6.30-rc8.old
vmlinuz.old@

При этом стандартный конфиг sys-boot/grub-0.97-r9 выглядит так:

# cat /boot/grub/grub.conf

# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 3
splashimage=(hd0,0)/grub/black.xpm.gz

title gentoo [ new ]
root (hd0,1)
kernel (hd0,0)/vmlinuz root=/dev/sda2 vga=0x0361 console=tty1 quiet
savedefault
boot

title gentoo [ old ]
root (hd0,1)
kernel (hd0,0)/vmlinuz.old root=/dev/sda2 vga=0x0361 splash=silent,theme:natural_gentoo console=tty1 quiet
initrd (hd0,0)/natural_gentoo
savedefault
boot


# cat /boot/grub/device.map
(hd0)   /dev/sda

Процесс загрузки.
Видно сгенерированное меню. Затем небольшой выхлоп ядра. Что происходит потом проще увидеть. Ждал достаточно долго но система не загружается.
Причина как оказалось в настройке фреймбуффера в ядре. Он у меня был на vga, vesa.



> uname -a
Linux localhost.localdomain 2.6.30-rc8 #1 SMP Mon Jun 8 09:48:47 EEST 2009 x86_64 Intel(R) Pentium(R) Dual CPU T3200 @ 2.00GHz GenuineIntel GNU/Linux


> cat /usr/src/linux/.config | grep FB
# CONFIG_IFB is not set
CONFIG_FB=y
# CONFIG_FB_DDC is not set
CONFIG_FB_BOOT_VESA_SUPPORT=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
CONFIG_FB_VGA16=y
CONFIG_FB_UVESA=y
CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set

В общем значит так вышеописанную проблему, по совету бывалых, решил таким образом. Во первых пересобрал ядро на uvesafb с такими параметрами

> cat /usr/src/linux/.config | grep FB
# CONFIG_IFB is not set
CONFIG_FB=y
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_UVESA=y
# CONFIG_FB_VESA is not set
# CONFIG_FB_EFI is not set
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set

Далее надо было поправить конфиг. В окончательном виде он у меня выглядит так

> cat /boot/grub/grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
set timeout=5

insmod gfxterm
terminal_output gfxterm

### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo-r1" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo-r1 root=/dev/sda2 ro video=uvesafb:1280x800-32,mtrr:3,ywrap raid=noautodetect boot_delay=0 
}
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo-r1 (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo-r1 root=/dev/sda2 ro single video=uvesafb:1280x800-32,mtrr:3,ywrap raid=noautodetect boot_delay=0
}
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo root=/dev/sda2 ro video=uvesafb:1280x800-32,mtrr:3,ywrap raid=noautodetect boot_delay=0 
}
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo root=/dev/sda2 ro single video=uvesafb:1280x800-32,mtrr:3,ywrap raid=noautodetect boot_delay=0
}
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo.old" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo.old root=/dev/sda2 ro
}
menuentry "Gentoo GNU/Linux, Linux 2.6.30-gentoo.old (recovery mode)" {
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set f7284bc7-d772-4557-9613-5f19298408ce
    linux   /vmlinuz-2.6.30-gentoo.old root=/dev/sda2 ro single 
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###

Ну и пока собственно все. Заработало отлично. С темами и прочим украшательством пока не игрался. Устраивает и так как есть. Да где именно прописать “video=uvesafb:1280x800-32,mtrr:3,ywrap raid=noautodetect boot_delay=0 ” чтобы оно добавлялось параметрами по умолчанию пока тоже не понял.

Comments