You are not logged in.

#1 2013-12-10 23:59:38

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

[SOLVED] Reinstall GRUB

Hey guys,

I had to reinstall windows on my dual boot system and in the process lost GRUB and therefore access to my arch install. I tried just using my live cd to chroot into my old arch install and reinstall GRUB from there, but it didn't work, my computer still just boots into windows. I'm using two hard drives with arch installed on one and windows 8.1 on the other. Arch is on my /dev/sda drive.

I'm just not really sure what to do to get GRUB back.

Thanks

Last edited by joethesupercow (2013-12-12 03:00:51)

Offline

#2 2013-12-11 00:26:13

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 388

Re: [SOLVED] Reinstall GRUB

use super grub disk : http://www.supergrubdisk.org/

Offline

#3 2013-12-11 00:42:47

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

Re: [SOLVED] Reinstall GRUB

Thanks for the tip, but I didn't really have any luck with that tool. Seems pretty under-documented and poorly supported. Plus I'd love to learn how to repair it manually. That's the arch way, right?

Offline

#4 2013-12-11 00:45:55

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [SOLVED] Reinstall GRUB

Adjustment in the bios?  UEFI?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-12-11 00:51:38

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

Re: [SOLVED] Reinstall GRUB

^^^ I'm not really sure what this means. My computer uses UEFI if that's what you're asking

Offline

#6 2013-12-11 00:54:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [SOLVED] Reinstall GRUB

There is a boot priority the bios will use.  You are likely pointing to the win partition not the grub partition.  Go in there and change it.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2013-12-11 01:07:28

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Reinstall GRUB

But the system is using UEFI so the issue is what's in the EFI boot menu. Everything should be on the same EFI partition, right?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2013-12-11 01:13:48

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

Re: [SOLVED] Reinstall GRUB

Going into the UEFI and having it point to the correct drive first got me grub back. The only entry there though is for the Windows 8 loader hmm. How do I get the entry for arch back? arch-chroot back into the system and then do... something?

Thanks a lot

Offline

#9 2013-12-11 01:21:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [SOLVED] Reinstall GRUB

Drop to the Efi shell and add an entry for the arch partition,  the wiki will help you.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2013-12-11 01:35:30

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Reinstall GRUB

Or chroot in the live environment and use efibootmgr to add an entry for grub. You could also reinstall grub using grub-install since this should automatically set up the entry for you. The wiki will help with this method, too.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2013-12-11 05:04:22

harshsahil48
Member
Registered: 2013-12-10
Posts: 65

Re: [SOLVED] Reinstall GRUB

Hi.

Use a boot repair disk: http://sourceforge.net/projects/boot-repair-cd/
It has worked wonderfully for me in the past. Download and burn into a DVD. Then boot from it.


Refrences: http://ubuntuforums.org/showthread.php?t=1831869
It works for arch.

However I'm fairly new and I do not know weather this is the best solution.


Never forget~Never forgive

Offline

#12 2013-12-12 01:34:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Reinstall GRUB

This is almost certainly a Very Bad Idea and may well break things further. Certainly it will confuse things further.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2013-12-12 02:06:29

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

Re: [SOLVED] Reinstall GRUB

Hey guys,

I'm realizing now that I have a far weaker understanding of UEFI than I thought. I know that when I'm booting the computer if I go into the setup menu (BIOS?) I have a full graphical environment that I can use a mouse in and everything. However, I read that I could check C:\Windows\Panther\setupact.log on my windows install to find which Windows is booting under. I have a line in that code that says "Code:Callback_BootEnvironmentDetect: Detected boot environment: BIOS" making me think I'm booting under BIOS hmm. So what do I need to do for arch? Boot under BIOS or use UEFI? Is that even a question that makes sense?

Mostly I just want to know how to get back to my arch install.

Last edited by joethesupercow (2013-12-12 02:07:05)

Offline

#14 2013-12-12 02:55:53

joethesupercow
Member
Registered: 2013-07-29
Posts: 15

Re: [SOLVED] Reinstall GRUB

alright, so I solved my original problem. I'm still curious to hear more about uefi though.

To solve the problem I booted using a live cd, and then issued the following commands:

sudo mkdir /mnt/temp /mnt/temp/boot
sudo mount /dev/sda2 /mnt/temp # /dev/sda2 is my root partition
sudo mount /dev/sda1 /mnt/temp/boot # /dev/sda1 is my boot partition
arch-chroot /mnt/temp
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-install /dev/sda

Then a just a restart. My grub menu entries are back.

Offline

#15 2013-12-12 03:16:40

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] Reinstall GRUB

https://wiki.archlinux.org/index.php/UEFI

Glad you got it working. Maybe you are booting in legacy mode? Or have both enabled? These are settings in your UEFI/BIOS setup screens.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB