[Bug 1378658] [NEW] "no such device" error from grub2 search command
Ramakrishnan G
rameshg87.openstack at gmail.com
Wed Oct 8 07:00:45 UTC 2014
Public bug reported:
I created an using grub-mkimage with the format x86_64-efi including
some modules in it.
My embedded config looks like this:
search --file --set=root /vmlinuz
set prefix=($root)/EFI/BOOT/
grub-mkimage --format=x86_64-efi --output=bootx64.efi --config=grub-
embedded.cfg --compression=xz --prefix=/EFI/BOOT part_gpt part_msdos fat
ext2 hfs hfsplus iso9660 udf ufs1 ufs2 zfs chain linux boot appleldr
ahci configfile normal regexp minicmd reboot halt search search_fs_file
search_fs_uuid search_label gfxterm gfxmenu efi_gop efi_uga all_video
loadbios gzio echo true probe loadenv bitmap_scale font cat help ls png
jpeg tga test at_keyboard usb_keyboard
Then I created a 1MB vfat image named efiboot.img, moved this to EFI/BOOT/ directory within the vfat image.
Finally I created an ISO image using this efiboot.img in "-eltorito-alt-boot" option in mkisofs.
mkisofs -r -V "INSTALL_IMAGE" -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e isolinux/efiboot.img -no-emul-boot -o image.iso .
The built image boots on the system, but doesn't pickup the grub.cfg
present in EFI/BOOT directory. When I check the system, it hasn't even
found the root device using the search command.
When I do search manually, it shows "no such device" error, and doesn't
find the root device (it should have been cd0).
These steps fail on "Ubuntu 14.04 LTS", but works on "Ubuntu 13.10".
On Failing machine "Ubuntu 14.04 LTS", I have the following:
$ dpkg -l | grep -i grub
ii grub-common 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader (common files)
rc grub-efi-amd64 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
rc grub-pc 2.02~beta2-9 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader (common files for version 2)
$ grub-mkimage --version
grub-mkimage (GRUB) 2.02~beta2-9ubuntu1
On Working machine ""Ubuntu 13.10", I have the following:
$ sudo dpkg -l | grep -i grub
ii grub-common 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader (common files)
ii grub-efi 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (dummy package)
ii grub-efi-amd64 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
rc grub-pc 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader (common files for version 2)
$ grub-mkimage --version
grub-mkimage (GRUB) 2.00-19ubuntu2.1
$
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
--
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/1378658
Title:
"no such device" error from grub2 search command
Status in “grub2” package in Ubuntu:
New
Bug description:
I created an using grub-mkimage with the format x86_64-efi including
some modules in it.
My embedded config looks like this:
search --file --set=root /vmlinuz
set prefix=($root)/EFI/BOOT/
grub-mkimage --format=x86_64-efi --output=bootx64.efi --config=grub-
embedded.cfg --compression=xz --prefix=/EFI/BOOT part_gpt part_msdos
fat ext2 hfs hfsplus iso9660 udf ufs1 ufs2 zfs chain linux boot
appleldr ahci configfile normal regexp minicmd reboot halt search
search_fs_file search_fs_uuid search_label gfxterm gfxmenu efi_gop
efi_uga all_video loadbios gzio echo true probe loadenv bitmap_scale
font cat help ls png jpeg tga test at_keyboard usb_keyboard
Then I created a 1MB vfat image named efiboot.img, moved this to EFI/BOOT/ directory within the vfat image.
Finally I created an ISO image using this efiboot.img in "-eltorito-alt-boot" option in mkisofs.
mkisofs -r -V "INSTALL_IMAGE" -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e isolinux/efiboot.img -no-emul-boot -o image.iso .
The built image boots on the system, but doesn't pickup the grub.cfg
present in EFI/BOOT directory. When I check the system, it hasn't
even found the root device using the search command.
When I do search manually, it shows "no such device" error, and
doesn't find the root device (it should have been cd0).
These steps fail on "Ubuntu 14.04 LTS", but works on "Ubuntu 13.10".
On Failing machine "Ubuntu 14.04 LTS", I have the following:
$ dpkg -l | grep -i grub
ii grub-common 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader (common files)
rc grub-efi-amd64 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
rc grub-pc 2.02~beta2-9 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.02~beta2-9ubuntu1 amd64 GRand Unified Bootloader (common files for version 2)
$ grub-mkimage --version
grub-mkimage (GRUB) 2.02~beta2-9ubuntu1
On Working machine ""Ubuntu 13.10", I have the following:
$ sudo dpkg -l | grep -i grub
ii grub-common 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader (common files)
ii grub-efi 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (dummy package)
ii grub-efi-amd64 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
rc grub-pc 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.00-19ubuntu2.1 amd64 GRand Unified Bootloader (common files for version 2)
$ grub-mkimage --version
grub-mkimage (GRUB) 2.00-19ubuntu2.1
$
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1378658/+subscriptions
More information about the foundations-bugs
mailing list