[Bug 1961085] [NEW] grub-install prints misleading error message
Oliver
1961085 at bugs.launchpad.net
Wed Feb 16 15:33:13 UTC 2022
Public bug reported:
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
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Tags: access error grub-install grub2 message misleading permissions root write
--
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:
New
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