LINUX.ORG.RU

Не могу поставить Grub2 на efi раздел

 , , ,


0

1

Добрый вечер!

Впервые в жизни пытаюсь вкорячить загрузчик grub на машину с GPT разделом и вендой по соседству.

Проблема в том что запуск команды grub-install --efi-directory=/boot/efi зависает на вызове efibootmgr. Полный лог: https://pastebin.com/3riBn3Q6 (пришлось сократить)

Лэптоп Lenovo ideapad320-15IAP, Live версия Debian stretch(официальный образ без проприетарных прошивок) и бустрапнутый же stretch в chroot.

Самое интересное нашлось в выводе dmesg:

[  134.563874] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
[  182.869821] device-mapper: uevent: version 1.0.3
[  182.870169] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[  210.596126] invalid opcode: 0000 [#1] SMP
[  210.597531] Modules linked in: dm_mod ext4 jbd2 crc32c_generic fscrypto ecb mbcache rfcomm fuse bnep intel_rapl btusb x86_pkg_temp_thermal amdkfd intel_powerclamp btrtl btbcm btintel coretemp bluetooth joydev kvm amdgpu hid_rmi uvcvideo i2c_designware_platform i2c_designware_core videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 iwlwifi videobuf2_core videodev crc16 media cfg80211 snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_sst_match snd_soc_core snd_hda_codec_hdmi snd_hda_codec_generic snd_compress snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm ttm snd_timer snd irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel mei_me intel_rapl_perf mei efi_pstore sg pcspkr serio_raw efivars idma64 ideapad_laptop evdev sparse_keymap intel_lpss_pci rfkill
[  210.603009]  intel_lpss soundcore battery mfd_core ac tpm_crb shpchp efivarfs ip_tables x_tables autofs4 squashfs loop overlay nls_ascii nls_cp437 vfat fat sd_mod uas usb_storage crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd ahci libahci xhci_pci libata i915 xhci_hcd i2c_i801 i2c_algo_bit i2c_smbus usbcore drm_kms_helper usb_common r8169 mii scsi_mod drm wmi button i2c_hid hid video
[  210.609080] CPU: 2 PID: 1611 Comm: efibootmgr Not tainted 4.9.0-9-amd64 #1 Debian 4.9.168-1
[  210.610657] Hardware name: LENOVO 80XR/LNVNB161216, BIOS 5RCN20WW 05/22/2017
[  210.612292] task: ffff8cdf427a4000 task.stack: ffff98ec418e0000
[  210.613906] RIP: 0010:[<0000000000000007>]  [<0000000000000007>] 0x7
[  210.615516] RSP: 0018:ffff98ec418e3b00  EFLAGS: 00010002
[  210.617067] RAX: 0000000066d4b190 RBX: 0000000000000002 RCX: 0000000000000004
[  210.618662] RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000002
[  210.620243] RBP: ffff98ec418e3be0 R08: ffff98ec418e3b50 R09: ffff98ec418e3c40
[  210.622513] R10: 0000000000000000 R11: 000000000000005e R12: 0000000000000000
[  210.624283] R13: 0000000000083fb0 R14: ffff98ec418e3c40 R15: ffff98ec418e3c48
[  210.625848] FS:  00007fec38074b40(0000) GS:ffff8cdf7fd00000(0000) knlGS:0000000000000000
[  210.627592] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  210.629326] CR2: 000056229eee6000 CR3: 00000002771fa000 CR4: 0000000000340670
[  210.631040] Stack:
[  210.632752]  0000000000000002 fffffffefb052d3b 0000000000000001 4bd993022bb45100
[  210.634482]  ffff8cdf71a23060 0000000000000000 0000000000000001 fffffffefb052d7a
[  210.636287]  ffff8cdf2ab05240 ffff8cdf7192d800 ffff98ec418e3dd0 ffff8cdf6c8b10c0
[  210.638034] Call Trace:
[  210.639843]  [<ffffffff83c26242>] ? __d_alloc+0x122/0x1d0
[  210.641612]  [<ffffffff83a73058>] ? efi_call+0x58/0x90
[  210.643453]  [<ffffffff83ee4052>] ? virt_efi_query_variable_info.part.3+0x72/0x100
[  210.645244]  [<ffffffff83a7165d>] ? efi_query_variable_store+0xad/0x1d0
[  210.647117]  [<ffffffff83ee1b60>] ? __efivar_entry_iter+0x110/0x110
[  210.648915]  [<ffffffff83ee1395>] ? efivar_entry_set+0xd5/0x180
[  210.650656]  [<ffffffff83ee1bfb>] ? validate_load_option+0x9b/0xf0
[  210.652524]  [<ffffffffc069eba2>] ? efivar_create+0x152/0x230 [efivars]
[  210.654282]  [<ffffffff83c8d967>] ? kernfs_fop_write+0x107/0x180
[  210.656184]  [<ffffffff83c0bae0>] ? vfs_write+0xb0/0x190
[  210.657822]  [<ffffffff83c0cf22>] ? SyS_write+0x52/0xc0
[  210.659556]  [<ffffffff83a03b7d>] ? do_syscall_64+0x8d/0xf0
[  210.661180]  [<ffffffff8401a84e>] ? entry_SYSCALL_64_after_swapgs+0x58/0xc6
[  210.662815] Code:  Bad RIP value.
[  210.664526] RIP  [<0000000000000007>] 0x7
[  210.666122]  RSP <ffff98ec418e3b00>
[  210.674690] ---[ end trace bf7d52c07a4c443c ]---
[  216.070881] ------------[ cut here ]------------
[  216.070900] WARNING: CPU: 2 PID: 1551 at /build/linux-l3XgYv/linux-4.9.168/arch/x86/kernel/fpu/core.c:47 kernel_fpu_disable+0x3a/0x40
[  216.070904] Modules linked in: dm_mod ext4 jbd2 crc32c_generic fscrypto ecb mbcache rfcomm fuse bnep intel_rapl btusb x86_pkg_temp_thermal amdkfd intel_powerclamp btrtl btbcm btintel coretemp bluetooth joydev kvm amdgpu hid_rmi uvcvideo i2c_designware_platform i2c_designware_core videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 iwlwifi videobuf2_core videodev crc16 media cfg80211 snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_sst_match snd_soc_core snd_hda_codec_hdmi snd_hda_codec_generic snd_compress snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm ttm snd_timer snd irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel mei_me intel_rapl_perf mei efi_pstore sg pcspkr serio_raw efivars idma64 ideapad_laptop evdev sparse_keymap intel_lpss_pci rfkill
[  216.070994]  intel_lpss soundcore battery mfd_core ac tpm_crb shpchp efivarfs ip_tables x_tables autofs4 squashfs loop overlay nls_ascii nls_cp437 vfat fat sd_mod uas usb_storage crc32c_intel aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd ahci libahci xhci_pci libata i915 xhci_hcd i2c_i801 i2c_algo_bit i2c_smbus usbcore drm_kms_helper usb_common r8169 mii scsi_mod drm wmi button i2c_hid hid video
[  216.071059] CPU: 2 PID: 1551 Comm: jbd2/sda4-8 Tainted: G      D         4.9.0-9-amd64 #1 Debian 4.9.168-1
[  216.071062] Hardware name: LENOVO 80XR/LNVNB161216, BIOS 5RCN20WW 05/22/2017
[  216.071066]  0000000000000000 ffffffff83d35284 0000000000000000 0000000000000000
[  216.071073]  ffffffff83a7a5eb ffff8cdf39caf1c0 ffff98ec41377e00 ffff8cdf30084000
[  216.071080]  ffff8cdf6e3c0800 ffff8cdf30084000 ffff98ec41377e00 ffffffff83a3155a
[  216.071086] Call Trace:
[  216.071095]  [<ffffffff83d35284>] ? dump_stack+0x5c/0x78
[  216.071100]  [<ffffffff83a7a5eb>] ? __warn+0xcb/0xf0
[  216.071105]  [<ffffffff83a3155a>] ? kernel_fpu_disable+0x3a/0x40
[  216.071110]  [<ffffffff83a315a4>] ? __kernel_fpu_begin+0x44/0x100
[  216.071119]  [<ffffffffc023b2d9>] ? crc32c_pcl_intel_update+0x79/0xa0 [crc32c_intel]
[  216.071124]  [<ffffffff83cf25e7>] ? crypto_shash_update+0x47/0x130
[  216.071138]  [<ffffffffc0baac12>] ? jbd2_journal_commit_transaction+0xb82/0x17c0 [jbd2]
[  216.071144]  [<ffffffff8401a964>] ? __switch_to_asm+0x34/0x70
[  216.071155]  [<ffffffffc0bafc72>] ? kjournald2+0xc2/0x260 [jbd2]
[  216.071161]  [<ffffffff83abd5e0>] ? prepare_to_wait_event+0xf0/0xf0
[  216.071172]  [<ffffffffc0bafbb0>] ? commit_timeout+0x10/0x10 [jbd2]
[  216.071178]  [<ffffffff83a9a869>] ? kthread+0xd9/0xf0
[  216.071182]  [<ffffffff8401a964>] ? __switch_to_asm+0x34/0x70
[  216.071187]  [<ffffffff83a9a790>] ? kthread_park+0x60/0x60
[  216.071191]  [<ffffffff8401a9f7>] ? ret_from_fork+0x57/0x70
[  216.071195] ---[ end trace bf7d52c07a4c443d ]---

Есть у кого-нибудь мысли, что с этим делать? Пока есть мысли попробовать неофициальный образ debian с проприетарными прошивками, или какой-то дистрибутив посвежее.

Попробуй без chroot просто выполнить

efibootmgr -c -d /dev/sda -p 1 -w -L debian -l \EFI\debian\grubx64.efi

либо попробуй внутри chroot выполнить efibootmgr, если выполняется и показывает порядок загрузки, то команда выше врядли поможет

r0ck3r ★★★★★ ()
Последнее исправление: r0ck3r (всего исправлений: 1)

В начале отключи секуребут. А вообще, у Леново с ефи и секуребут и поддержкой Линукс всегда проблемы, не стоило брать Леново.

anonymous ()
Ответ на: комментарий от Dimez

Обновил биос, пробовал неофициальный образ с проприетарными прошивками, и даже ubuntu 19.04: все то же самое, только в последней появился текст ошибки:

grub-install: info: executing efibootmgr -c -d /dev/sda -p 1 -w -L debian -l \EFI\debian\grubx64.efi.
Could not prepare Boot variable: No such file or directory
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.

Думаю ну нафиг эти efivars, попробую ка я загрузчик дефолтным сделать.

shooter93 ()
Последнее исправление: shooter93 (всего исправлений: 1)
Ответ на: комментарий от r0ck3r

Попробовал, получил вот такое:

ubuntu@ubuntu:~$ sudo efibootmgr -c -d /dev/sda -p 1 -w -L debian -l \EFI\debian\grubx64.efi
Skipping unreadable variable "Boot0000": Interrupted system call
Skipping unreadable variable "Boot0001": Interrupted system call
Skipping unreadable variable "Boot0002": Interrupted system call
Skipping unreadable variable "Boot0003": Interrupted system call
Skipping unreadable variable "Boot0004": Interrupted system call
Skipping unreadable variable "Boot0005": Interrupted system call
Skipping unreadable variable "Boot0006": Interrupted system call
Skipping unreadable variable "Boot0007": Interrupted system call
Skipping unreadable variable "Boot2001": Interrupted system call
Skipping unreadable variable "Boot2002": Interrupted system call
Skipping unreadable variable "Boot2003": Interrupted system call
Could not prepare Boot variable: Interrupted system call

[  760.175266] efi: EFI Runtime Services are disabled!
[  760.177363] efi: EFI Runtime Services are disabled!

Думаю дальше

shooter93 ()