[Bug 1961085] Re: grub-install prints misleading error message
Julian Andres Klode
1961085 at bugs.launchpad.net
Wed Feb 16 15:49:24 UTC 2022
It seems that grub_disk_open() returns GRUB_ERR_UNKNOWN_DEVICE when it
receives EACCESS. I suggest working with upstream to address this issue
if this interests you, as I don't think fixing this is a priority for
us, since users normally do not run grub-install themselves.
** Changed in: grub2 (Ubuntu)
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1961085
Title:
grub-install prints misleading error message
Status in grub2 package in Ubuntu:
Triaged
Bug description:
When i try to install grub on an usb stick without root permissions
with the following command line, i get a misleading error message:
[code]
~$ grub-install --recheck --boot-directory=/media/ubuntu-mate/usbstick/boot/ /dev/sda
Installing for i386-pc platform.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: error: disk `hostdisk//dev/sda1' not found.
[/code]
This error message is misleading. The disk does exist. The command works without errors, when i put a sudo in front of it.
The error message should be something like:
"You need to be root to have write access"
There should be a check if grub2 does have write access and if it
doesn't, the error message should tell the user, that he doesn't have
permissions and should change to root or use sudo.
This was tested on Ubuntu 21.10
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1961085/+subscriptions
More information about the foundations-bugs
mailing list