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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1961085

Title:
  grub-install prints misleading error message

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1961085/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to