You are not logged in.

#1 2012-08-14 23:28:56

arcane42
Member
Registered: 2012-08-14
Posts: 5

Infinite boot loop after installing arch

I trying to learn how to install the new arch 2012 disk and have tried several times and always ran into the same problem. I am guessing I did not configure grub correctly.

Here is what I did:

loadkeys us
cfdisk
cryptsetup -c serpent-xts-plain -y -s 512 luksFormat /dev/sda2
cryptsetup luksOpen /dev/sda2 root
mkfs -t ext4 /dev/mapper/root
mkfs -t ext4 /dev/sda1
mount /dev/mapper/root /mnt/
mount /dev/sda1 /mnt/boot/
dhclient
vi /etc/pacman.d/mirrorlist
pacstrap /mnt base base-devel
pacstrap /mnt grub-efi-x86_64
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt
vi /etc/hostname
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
vi /etc/locale.conf
vi /etc/locale.genf
locale-gen
vi /etc/mkinicpio.conf
mkinicpio -p linux
mkdir /boot/efi
modprobe efivars
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
mkdir -p /boot/grub/locale/en\@quot/LL_MESSAGES/grub.mo /boot/grub/locale/en.mo
passwd root
exit
reboot

Additonal Info:
sda1 is 500mb
sda2 is ~500gb
I added encrypt to hooks line in mkinicpio.conf

When I ran the grub-install it complained that I did not run modprobe efivars, but it said it installed successfully. I looked through the forums and they mention to run grub-mkconfig -o /boot/grub/grub.cfg right after running grub-install. Would that be grub-mkconfig -o /boot/efi/grub.cfg in my case? Is there other things I am missing?

Last edited by arcane42 (2012-08-14 23:31:38)

Offline

#2 2012-08-14 23:57:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,564
Website

Re: Infinite boot loop after installing arch

I'm not really clear on what the problem or symptoms are.  Your post references one warning message, but no description of a problem beyond the title ... but I don't know what an "infinite boot loop" is.

Perhaps it's just me being dense, but I suspect a clearer description of the problem/symptoms would be helpful.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-08-15 00:51:03

arcane42
Member
Registered: 2012-08-14
Posts: 5

Re: Infinite boot loop after installing arch

I attempted to install arch linux on a brand new HP Probook 4530 (I installed backtrack on the computer first before installing arch linux). After installing arch linux, I rebooted the computer and the HP logo came up (the bios splash screen) and then  I see a black screen for about 1 second before I see the HP logo again and then I see the black screen and then HP logo etc. I don't even see the grub screen when it does this. I doubt it is hardware since I installed backtrack on the laptop before hand. Which means the problem is somewhere in the installation. I just need help locating the problem or point me in the right direction.

Offline

#4 2012-08-15 02:42:55

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

Re: Infinite boot loop after installing arch

It didn't install successfully. You don't see grub because you didn't actually install it. You need to modprobe efivars for it to work. I don't know why but it always reports success no matter how badly it has failed to install. (Personally, I consider this a bug.)

grub-mkconfig -o /boot/grub/grub.cfg

is correct even for EFI assuming that you are going with the default set up. But this won't do you any good unless you install it successfully first.

One way to fix this is to boot (in EFI mode - that's crucial). Then modprobe efivars. Then set up the chroot and chroot. Then install grub to disk. For details see the wiki pages on grub2 and EFI.  Note that you need to modprobe before chrooting in case the kernel in your install doesn't match the kernel you're booting.

Any live linux environment will do so long as it boots in EFI mode e.g. you can use Ubuntu, say, instead of Arch.

EDIT: I see that you did "modprobe efivars"? If so, I'm guessing you weren't booted in EFI mode. If you are using a CD, I think it should work with Arch. If you are using a USB key, whether it will work depends on how you prepared the media. If you just used dd, it won't boot in EFI mode. In that case, either prepare another USB key or grab any live linux which will boot in EFI mode and use that. (Ubuntu works - use unetbootin to prepare the usb key; archboot should also work...)

Last edited by cfr (2012-08-15 02:49:07)


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

#5 2012-08-15 04:05:44

arcane42
Member
Registered: 2012-08-14
Posts: 5

Re: Infinite boot loop after installing arch

cfr wrote:

Note that you need to modprobe before chrooting in case the kernel in your install doesn't match the kernel you're booting.

You may have found my grave error. In my notes above I ran modprobe after I had already chrooted. I would not never had found that. I am going to give this another try.

Offline

#6 2012-08-15 23:25:24

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

Re: Infinite boot loop after installing arch

After you modprobe efivars, if you do

ls /sys/firmware/efi/vars/

you should get a long directory listing. If you get nothing or if the directory doesn't exist, the module hasn't loaded and the grub-install command won't work (even though it will claim it has). It's these variables it needs in order to do the install to disk. If that doesn't happen right, as far as your machine is concerned on boot, grub really doesn't exist.


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