You are not logged in.

#1 2013-11-30 15:27:44

aenda
Member
Registered: 2013-11-30
Posts: 7

EFI System Partition deleted - can only boot from Live CD

(Warning, long rambling post ahead).
Hello all.
I am having to retype this post because the arch linux forums randomly logged me out in the middle. Thanks! Anyways, I apologize for my testiness, but this situation is making me rather stressed.

I have a Toshiba Satellite Laptop which has a UEFI setup (apparently GPT with protective MBR; I will be honest and admit I have no idea what this (and a lot of other terms here) mean). First, let me link to this BootInfo summary: paste.ubuntu.com/6499195 which should explain my partition setup. I had Windows 8, Linux Mint, and Linux From Scratch in a triple boot with dedicated /home (sda8) and /boot (sda6) partitions. There are also several partitions which seem to be recovery oriented, namely sda1,3,5, and 9. sda2 was my efi system partition. Sda4 was windows.

I was installing arch linux over my Linux Mint partition, formatting it, and somehow understood that I should also format my /dev/sda2 partition. I didn't really fully understand the instructions, I suppose, even though in hindsight they are fairly obvious. Anyways, my computer obviously did not boot to the hard drive afterwards because I just deleted the EFI system partition. I decided to go back and reinstall Linux Mint over the same partitions and now got a grub prompt, which I could use to boot into LFS and Linux Mint. All of the Windows Boot files were on that EFI partition, so I am unable to boot. I made a Windows recovery USB, but it does not boot, rather just hanging on the Toshiba splash screen.

Looking through my old grub.cfg, I see that booting to my recovery partition was done through an efi file on, yes, /dev/sda2 once more. So Windows reinstall seems to be out. I decided to run boot-repair, all defaults except I chose separate efi partition on /dev/sda2. It somehow broke everything and brought me back to square one. My setup was basically exactly like this guy's: http://askubuntu.com/questions/335019/u … stallation . I really am at a loss for what to do. I suppose I could ask the person on askubuntu for a clone of his EFI partition and copy it to my hard drive, and then sort out all my grub issues I made for myself trying to fix this? I really hope you guys can help me. Thank you so much for reading this.

Edit: Looking through the bootinfo summary, you can ignore all references to /dev/sdb and syslinux, that is from my Live USB.

Last edited by aenda (2013-11-30 17:54:27)

Offline

#2 2013-11-30 17:01:05

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: EFI System Partition deleted - can only boot from Live CD

Oh boy, maybe splitting your essay to paragraphs could help a bit smile I'm not an EFI expert, so I probably won't be able to help. I think getting that guy's partition won't help as your system configuration (I mean disk "geometry" or how one should call it) differs from his. I believe you can semi-fix this situation by playing with grub. Here is some interesting reading:

https://wiki.archlinux.org/index.php/GRUB
https://wiki.archlinux.org/index.php/GRUB_EFI_Examples

Also, there are other interesting links in the top right corner of those arch wiki articles, maybe you will be able to find what you are looking for somewhere there. Good luck smile


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#3 2013-11-30 18:09:06

aenda
Member
Registered: 2013-11-30
Posts: 7

Re: EFI System Partition deleted - can only boot from Live CD

Thanks for your reply. Well, I tried the method detailed here: https://wiki.archlinux.org/index.php/Gr … ded_method .
Here are the commands I used (as root) from my usb:

mkdir /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot
mount /dev/sda2 /mnt/boot/efi
grub-install --target=x86_64-efi --efi-directory=/mnt/boot/efi --bootloader-id=grub --recheck --debug

Output:
grub-probe: error: failed to get canonical path of /cow.
source_dir doesn't exist. Please specify --target or --directory

Do you have any idea what this means? Quick googling didn't reveal anything about /cow (it seems to be a Ubuntu/Mint specific thing).
Just the simplest
grub-install /dev/sda
gave
grub-probe: error: failed to get canonical path of /cow.
Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.

Why could this be?
Edit: one more quick question. Why should another person's partition not work with me? In the end, all I would do would be to copy and paste the efi files. Are efi files system specific?

Last edited by aenda (2013-11-30 18:37:22)

Offline

#4 2013-11-30 19:18:14

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: EFI System Partition deleted - can only boot from Live CD

Your problem is fundamentally a Windows problem, and the solution will be fundamentally a Windows solution. Specifically, you need to restore the Windows boot loader files to the ESP. In theory, you can do this in at least three ways:

  • Boot a Windows recovery disc in EFI mode and run its tools to restore Windows to bootability. I don't have precise instructions for doing this, though, so I can't be more specific about what to do. Note that this will probably leave the computer booting straight to Windows; you'll need to use "bcdedit" (in Windows), "bcfg" (in an EFI shell), or "efibootmgr" (in a Linux emergency disc) to restore GRUB (or some other boot manager) as the default.

  • Restore your Windows boot loader files from a backup. Most people lack such a backup, but if you've got one, you can copy the files from the backup to the ESP. You'll also need to either add a Windows entry to your grub.cfg file or use another boot manager to select which OS to boot.

  • Manually extract the Windows boot files from their source packages and put them on the ESP. Under Windows 7, you'd extract the 1/Windows/Boot/EFI/ directory, and most importantly the bootmgfw.efi file, from the SOURCES/install.wim file on the Windows installation disc. This file is in Windows Imaging Format, which you can extract with 7zip (such as the 7z command under Linux). You'd then rename the 1/Windows/Boot/EFI directory to EFI/Microsoft/Boot on the ESP. I'm not 100% sure that this will work as-is, though. Certainly you need an EFI/Microsoft/Boot/bootmgfw.efi file, but I'm not sure how many of its support files it really needs or how (or if) the files on the ESP might need to be modified to boot Windows on your computer.

There might be variants on these; for instance, you might be able to copy the EFI/Microsoft directory from another computer's ESP to yours. This could be considered a type of restore from a backup; but if those files need to be customized for your particular computer, this process might not be 100% successful without additional steps, which I don't know about.

If you continue to have problems, you might do better to ask on a Windows forum, because it's Windows expertise that you need to solve the problem.

Offline

#5 2013-11-30 20:25:39

aenda
Member
Registered: 2013-11-30
Posts: 7

Re: EFI System Partition deleted - can only boot from Live CD

I will do as you suggested, and start another thread. Thank you for your suggestions, you guys have been really helpful!

Offline

#6 2013-11-30 20:41:02

mrinx
Member
From: Richmond, VA
Registered: 2013-08-01
Posts: 87
Website

Re: EFI System Partition deleted - can only boot from Live CD

Oh, you edited your first post, nice, it looks much better smile You asked me why I thought it wouldn't work for you to use some other guy's image. I'm not sure, I was probably wrong, I'm not an expert in this area, so I thought that those efi files are system specific, because I thought they refered to specific partition to load the system. As I said, I could be wrong. Don't always believe what others say, they can be wrong smile


English isn't my first language.
Is Arch Linux user called archer? Where are our bows and arrows?

Offline

#7 2013-11-30 23:24:19

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: EFI System Partition deleted - can only boot from Live CD

mrinx wrote:

You asked me why I thought it wouldn't work for you to use some other guy's image. I'm not sure, I was probably wrong, I'm not an expert in this area, so I thought that those efi files are system specific, because I thought they refered to specific partition to load the system. As I said, I could be wrong. Don't always believe what others say, they can be wrong smile

Files whose names end in ".efi" are simply EFI program (or driver) files -- they're the equivalent of DOS or Windows .com or .exe files. As such, they aren't likely to be customized for specific computers; doing so would require rebuilding the binary from object code files and inserting some system-specific detail. This could be done, but I don't know of anything that does this, except maybe GRUB 2 -- it's possible that it's built up with a pointer to the location of its grub.cfg file in its binary, and that file may optionally reside off of the ESP.

That said, there can be system-specific files on an ESP. These are likely to be configuration files, which might refer to specific partitions by GUID values, names, or whatnot. In the Linux world, an example might be a grub.cfg file for GRUB 2 or a refind.conf file for rEFInd. I don't happen to know offhand whether Microsoft puts any customized configuration files on the ESP. If so, those files would need to be updated when moving a Windows boot loader from one computer to another.

Offline

#8 2013-12-01 09:43:30

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: EFI System Partition deleted - can only boot from Live CD

aenda wrote:

Thanks for your reply. Well, I tried the method detailed here: https://wiki.archlinux.org/index.php/Gr … ded_method .
Here are the commands I used (as root) from my usb:

mkdir /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot
mount /dev/sda2 /mnt/boot/efi
grub-install --target=x86_64-efi --efi-directory=/mnt/boot/efi --bootloader-id=grub --recheck --debug

@aenda: The last command should be

grub-install --target=x86_64-efi --efi-directory=/mnt/boot/efi --bootloader-id=grub --boot-directory=/mnt/boot --recheck --debug

But I urge you to install grub from [testing] and try https://wiki.archlinux.org/index.php/GR … Standalone as that is much easier to maintain.

Last edited by the.ridikulus.rat (2013-12-01 09:44:04)

Offline

Board footer

Powered by FluxBB