linux - GRUB2 booting: efidisk read error & prefix is not set
2014-04
everyone!
I have a booting USB stick with some iso-image, based on Arch Linux. It loads through efi and then comes to Grub 1.99, where I can choose the iso images. I can load them without any problems, but before I see the menu of the Grub some error messages appear:
error: "prefix" is not set
error: efidisk read error
USB stick is formatted in FAT32 and has a partition table msdos.
Here is my /boot/grub/grub.cfg
insmod video
insmod font
insmod jpeginsmod gfxterm
set prefix=/boot/grub/grub.cfg
loadfont /boot/grub/unicode.pf2
set gfxmode=auto
terminal_output gfxtermbackground_image /boot/grub/background.jpg
set default=0set timeout=10
set menu_color_normal=white/black set menu_color_highlight=black/light-gray
menuentry "image.iso" {
set isofile="/images/image.iso" loopback loop $isofile set root=(loop) linux /isolinux/vmlinuz isofile=$isofile splash quiet initrd /isolinux/initrd }
These settings works without any problems. At least, I can see my background image and the styles has been changed.
I also checked from the Grub shell the parameters
root=hd2,msdos1 //means that I have a correct path, otherwise actually it doesn't boot.
I tried different versions of this prefix // /boot/grub/ // /boot/grub/grub.cfg // /efi/boot/
I would be glad to hear what can be the problem:)
p.s. Was reading also that can be sth with GPT partition table, but in this case it doesn't boot with my computer.
Thanks for helping.
Here is what happened:
- Don't have enough space on my Windows partition
- Delete the stock "recovery" partition to make space
- Enlarge the Win partition
- Software messes up the Windows boot
- Go under Ubuntu to fix the problem
- Try to fix the Win7 MBR with
ms-sys -7
- Upgrade to Natty at the same time
- Flush the old GRUB, in the process, put a new one
grub-mkconfig
doesn't detect Windows- Make up a Windows booting entry
- Try booting Windows
- Receive error "Invalid partition table"
Now I don't have any OS CD/DVD (Windows, Linux), so I have to work with what I have.
Here is my Boot Info Script
My Windows partition is on /dev/sda1
, but probably messed up in some way, and my GRUB script says this:
menuentry "Windows 7 (loader)"{
set root=(hd0,1)
chainloader +1
boot
}
How do I make Windows 7 boot again?
Go download one of the Windows 7 ISO images and burn it to DVD.
Then you need to boot to the recovery console, and use the BCDEdit Command:
http://technet.microsoft.com/en-us/library/cc709667(WS.10).aspx
http://support.microsoft.com/kb/919529 (not specifically your problem, but tells about how to fix boot problems)
What happened is when you deleted the partition, you threw off the boot information stored in the BCD store (same function as the old boot.ini)
"Invalid partition table" has nothing to do with the BCD store. It's an error from MBR bootstrap code that indicates that the MBR partition table information has undefined status bytes for one or more primary partitions. It's actually quite hard to get and still have something that everything else considers to be a valid partition table, as here.
Looking at the information you supplied, it becomes apparent that for some reason you have MBR bootstrap code in the VBR of your first primary partition. Naturally, that MBR code cannot find an embedded partition table. (It just finds some scrambled data from the real VBR that you overwrote.) You probably overwrote the VBR with that ms-sys
command.
It's fixboot
in the Windows recovery environment that you should be looking at, not fixmbr
. Of course, you've just deleted your recovery environment. …