/usr/lib/grub/下没有i386-pc, 有x86_xxx

转载:

https://askubuntu.com/questions/784990/grub-2-install-error-grub-install-error-usr-lib-grub-i386-pc-modinfo-sh-does

问题:

I am trying to install grub2 from a live CD of lubuntu 16.04, I am following this tutorial, after I mounted the /dev/sda1 in the mnt folder using this commands

sudo mount /dev/sda1 /mnt
sudo mount /dev/sda1 /mnt/boot
sudo mount --bind /dev /mnt/dev

Then changing the root directory :

    sudo chroot /mnt

But when try installing grub using sudo grub-install /dev/sda I get this error :

sudo: unable to resolve host ubuntu
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist.   Please specify --target or --directory.

I tried turning off the uefi mode from bios but I think that my bios version doesn't even support it because it is from 2005

=========================================================================​​​​​

解答:

Dont know if you solved your problem, thus this is 1y ago.

I ran into a same situation recently in Ubuntu 18.04, that chroot to another directory and run grub-install:

$ chroot /media/cdrom0 grub-install

Throws error:

grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

Finally solved this error by installing grub-pc:

$ sudo apt-get install grub-pc

After this, items under /usr/lib/grub changed from:

grub-mkconfig_lib  x86_64-efi  x86_64-efi_signed

To:

grub-mkconfig_lib  i386-pc  x86_64-efi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值