[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60805] 'grub-install -v' can report an unusable grub-mkimage comma
From: |
Corey Hickey |
Subject: |
[bug #60805] 'grub-install -v' can report an unusable grub-mkimage command |
Date: |
Sun, 20 Jun 2021 15:49:51 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0 |
URL:
<https://savannah.gnu.org/bugs/?60805>
Summary: 'grub-install -v' can report an unusable
grub-mkimage command
Project: GNU GRUB
Submitted by: bugfood
Submitted on: Sun 20 Jun 2021 07:49:49 PM UTC
Category: User Interface
Severity: Major
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release:
Release: Git master
Discussion Lock: Any
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Note: I am reporting this based on the Debian package version 2.04-19, but the
relevant code appears present in upstream git.
If I run a verbose-grub-install, that reports a grub-mkimage command:
$ sudo grub-install -v /dev/sda 2>&1 | grep grub-mkimage
grub-install: info: grub-mkimage --directory '/usr/lib/grub/i386-pc' --prefix
'(mduuid/90aa34c17bd7b3502690763c289ebaf1)/boot/grub' --output
'/boot/grub/i386-pc/core.img' --dtb '' --sbat '' --format 'i386-pc'
--compression 'auto' 'ext2' 'part_msdos' 'part_msdos' 'diskfilter' 'mdraid1x'
'biosdisk'
...yet that command cannot be run:
$ sudo grub-mkimage --directory '/usr/lib/grub/i386-pc' --prefix
'(mduuid/90aa34c17bd7b3502690763c289ebaf1)/boot/grub' --output
'/boot/grub/i386-pc/core.img' --dtb '' --sbat '' --format 'i386-pc'
--compression 'auto' 'ext2' 'part_msdos' 'part_msdos' 'diskfilter' 'mdraid1x'
'biosdisk'
grub-mkimage: error: cannot open `': No such file or directory.
The problem is the "--dtb ''" and "--sbat ''" parts. When grub-install runs,
it calls grub_install_generate_image() directly and passes NULL pointers for
those options, yet when grub-mkimage is run from the command line, those
options are pointers to empty strings. grub_install_generate_image() checks
for NULL pointers, but not for empty strings.
I do not know the best solution; either grub-install should omit those options
when they are unset or grub-mkimage should accept them and consider empty
strings to mean "disabled".
Thanks,
Corey
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60805>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #60805] 'grub-install -v' can report an unusable grub-mkimage command,
Corey Hickey <=