PLD i (U)EFI

Łukasz Maśko masko w ipipan.waw.pl
Pon, 25 Wrz 2017, 23:32:53 CEST


Dnia poniedziałek, 25 września 2017 14:20:05 stacho pisze:
> To czekam. :)
> Tak podejrzewam że to z grubem "coś" trzeba pokombinować.

Żeby było jasne - nie jestem specjalistą od Grub'a, ale udało mi się uzyskać 
stabilniej działającą konfigurację ;-)

$ cat /etc/fstab | grep efi
/dev/sda2       /boot/efi               vfat    defaults                0 0

poldek:/all-avail> ls -I grub*
grub2-2.02-2.x86_64
grub2-mkfont-2.02-2.x86_64
grub2-platform-efi-2.02-2.x86_64

(to mkfont pewnie do niczego nie potrzebne, ale mam a jakiegoś powodu - chyba 
próbowałem kiedyś uruchomić graficzne menu, ale machnąłem na to ręką)

No i konfiguracja grub'a w załączniku (ciekawe, czy przejdzie przez listę 
serwer) - plik /boot/grub/grub.cfg. Jak widać, wygenerowałem go automatycznie 
a potem ręcznie coś tam modyfikowałem.

No i nawet działa.
-- 
Łukasz Maśko                                                            _o)
Lukasz.Masko(at)ipipan.waw.pl                                           /\\
Registered Linux User #61028                                           _\_V
Ubuntu: staroafrykańskie słowo oznaczające "Nie umiem zainstalować Debiana"
-------------- następna część ---------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /lib/grub.d and settings from /etc/sysconfig/grub
#

### BEGIN /lib/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

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
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=pl_PL
  insmod gettext
fi
terminal_output gfxterm
insmod part_gpt 
insmod ext2
set root='hd0,gpt6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e6e08a9a-8085-4051-b0ab-2770c10383ae
else
  search --no-floppy --fs-uuid --set=root e6e08a9a-8085-4051-b0ab-2770c10383ae
fi
insmod gfxmenu
loadfont ($root)/lib/grub/themes/starfield/dejavu_10.pf2
loadfont ($root)/lib/grub/themes/starfield/dejavu_12.pf2
loadfont ($root)/lib/grub/themes/starfield/dejavu_14.pf2
loadfont ($root)/lib/grub/themes/starfield/dejavu_16.pf2
loadfont ($root)/lib/grub/themes/starfield/dejavu_bold_14.pf2
insmod png
#set theme=($root)/lib/grub/themes/starfield/theme.txt
#export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=15
fi
### END /lib/grub.d/00_header ###

### BEGIN /lib/grub.d/10_linux ###
menuentry 'PLD Linux 3.0 (Th) with the new linux kernel' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-new-advanced-e6e08a9a-8085-4051-b0ab-2770c10383ae' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
#	insmod ext2
	set root='hd0,gpt6'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e6e08a9a-8085-4051-b0ab-2770c10383ae
	else
	  search --no-floppy --fs-uuid --set=root e6e08a9a-8085-4051-b0ab-2770c10383ae
	fi
	echo	'Loading new Linux ...'
	linux	/boot/vmlinuz root=UUID=e6e08a9a-8085-4051-b0ab-2770c10383ae ro panic=300 quiet intel_iommu=igfx_off
#	linux   /boot/vmlinuz root=UUID=e6e08a9a-8085-4051-b0ab-2770c10383ae ro panic=300 quiet intel_iommu=pt
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd
}

menuentry 'PLD Linux 3.0 (Th) with the new linux kernel debug' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-new-advanced-e6e08a9a-8085-4051-b0ab-2770c10383ae' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
#       insmod ext2
        set root='hd0,gpt6'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e6e08a9a-8085-4051-b0ab-2770c10383ae
        else
          search --no-floppy --fs-uuid --set=root e6e08a9a-8085-4051-b0ab-2770c10383ae
        fi
        echo    'Loading new Linux ...'
        linux   /boot/vmlinuz root=UUID=e6e08a9a-8085-4051-b0ab-2770c10383ae ro panic=300 quiet intel_iommu=igfx_off drm.debug=0x1e log_buf_len=1M
#       linux   /boot/vmlinuz root=UUID=e6e08a9a-8085-4051-b0ab-2770c10383ae ro panic=300 quiet intel_iommu=pt
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd
}

menuentry 'PLD Linux 3.0 (Th) with the old linux kernel' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-old-advanced-e6e08a9a-8085-4051-b0ab-2770c10383ae' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
#	insmod ext2
	set root='hd0,gpt6'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6  e6e08a9a-8085-4051-b0ab-2770c10383ae
	else
	  search --no-floppy --fs-uuid --set=root e6e08a9a-8085-4051-b0ab-2770c10383ae
	fi
	echo	'Loading old Linux ...'
	linux	/boot/vmlinuz.old root=UUID=e6e08a9a-8085-4051-b0ab-2770c10383ae ro panic=300 quiet intel_iommu=igfx_off
	echo	'Loadinf initial ramdisk ...'
	initrd	/boot/initrd.old
}

### END /lib/grub.d/10_linux ###

### BEGIN /lib/grub.d/20_linux_xen ###

### END /lib/grub.d/20_linux_xen ###

### BEGIN /lib/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-D8AA-7EAB' {
	insmod part_gpt 
	insmod fat
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  D8AA-7EAB
	else
	  search --no-floppy --fs-uuid --set=root D8AA-7EAB
	fi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

### END /lib/grub.d/30_os-prober ###

### BEGIN /lib/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 /lib/grub.d/41_custom ###


Więcej informacji o liście pld-users-pl