• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Arch Linux - stuck at "Loading Initial ramdisk"

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Automata

Destroyer of Empires and Use
Joined
May 15, 2006
I'm doing some upgrades on my laptop and decided I'd take another attempt at getting UEFI, GPT, and encryption running with Arch Linux. I've tried this in the past and even their own forums were completely useless. No one has been able to help and I can't find information online, so I'm hoping you awesome folks can help out.

I just did a clean install on a new solid state drive with no other disks in the system. I'm using a freshly downloaded ISO burned to a CD, as I've had issues with flash drive installs in the past. They seem to have fixed the UEFI portion of the live disk, as I can now see EFI variables in my operating system, which makes this a lot easier. But, I'm still having the same problem. Even after a full install and following their (messy, horrendously bad, and nearly impossible to follow) wiki for dm-crypt, lvm, and GRUB2, I'm in the exact same spot I was last time.

The drive is formatted as such:
Code:
/dev/sda
  sda1 - EFI (/boot as VFAT)
  sda2 - luks open as "lisp" - LVM pv
    LispMain - LVM vg
      root - LVM lv (/ as EXT4)
      swap - LVM lv (swap)

Root FS:
/dev/mapper/LispMain-root
grub.conf:
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
insmod efi_gop
insmod efi_uga
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-349c822c-b87e-4626-a855-0bc16f3c8ff0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  4192-2100
        else
          search --no-floppy --fs-uuid --set=root 4192-2100
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /vmlinuz-linux root=/dev/mapper/LispMain-root ro cryptdevice=f6b5ee33-f0a0-4ae5-b12e-7a5b93f8b39d:lisp
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-linux.img
}
menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-349c822c-b87e-4626-a855-0bc16f3c8ff0' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  4192-2100
        else
          search --no-floppy --fs-uuid --set=root 4192-2100
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /vmlinuz-linux root=/dev/mapper/LispMain-root ro cryptdevice=f6b5ee33-f0a0-4ae5-b12e-7a5b93f8b39d:lisp
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
GRUB is getting "stuck" immediately after the "initrd /initramfs-linux.img" command. There is a blip of hard drive activity, then nothing until I restart or shut down. No error messages, nothing. Not even if I run it from the GRUB command line. I can find very little information about this problem online and few others have the same situation as me. And the ones that did posted in my original thread on the Arch forums, which never got a resolution, and is now locked.

I've tried installing GRUB with explicitly defined modules (fat, efi_gop, efi_uga), screwing around with mkinitcpio, and a host of other things I probably can't remember.

I could always fall back to MBR/non-UEFI, but I'd rather use something created this millennium and this problem has frustrated me for quite some time, so I'd rather just get this working. The only idea I have left at this point is to separate the EFI and /boot partitions. My only reasoning is that GRUB is having a problem booting/loading off of a vfat partition.

Any help is appreciated. I can get more configuration files if required.
 
Still working on this tonight. None of the debug output from GRUB seems like an error. I'm going to start a reinstall with separate EFI and boot partitions. I'd like to get this working tonight as I have an advisor meeting tomorrow and I normally bring this with me.
 
I wish I could experiment with you but I dont have any EFI stuff... best wishes though!
 
Full reinstall with different partitions and trying a few things that I haven't done before ends me up in the same spot. I'm going with my gut reaction of "this is a Thinkpad thing" because my previous thread on the Arch BBS responses only from Lenovo owners, specifically with the T/W 520/530 line.

I'm going to stop wasting my time and do a non-GPT install again. If I didn't have an appointment tomorrow, I'd have more time to mess around with this.

Thanks for taking the time to respond, Stratus. On the upside, I can do an Arch install almost literally blind and I can now remember that LVM goes pv -> vg -> lv.
 
According to zsh, I was using /bin/bash for 7:51 for the full install as msdos instead of GPT. Works fine.

:shrug:
 
It sure is frustrating when you feel like your working on a stubborn problem alone... i know how that feels!

damn technology not doing what we want it to
 
It sure is frustrating when you feel like your working on a stubborn problem alone... i know how that feels!

damn technology not doing what we want it to

I quietly lurk your & Thiddy's problem solving threads, as I'm more of a user than a sysadmin.

I enjoy reading as you two hone your skills, if i had taken a different path in life 30 years ago, I could probably be of some help. ;)
 
Try this.

I haven't tested it yet, it seems I have no Arch ISO on my server and Transmission is acting funny today. Will report asap. I will not use a actual system but an EFI VM via VMware Workstation 9 on Linux.
 
I appreciate the link. I didn't think of using another bootloader/method, but the laptop is running without UEFI/GPT and I'd rather not reinstall at this point.

Either way, I'm still interested if you hit the same issues I did and if that fixes it.
 
I have not set up any encrypted partitions yet (might encrypt the laptop for kicks and giggles though), but I've had previous problems with GRUB2 and EFI on both my desktop and my laptop.

rEFInd was better, and gummiboot is even better.

Right now, I am trying to run this UEFI+LUKS+LVM set-up on a VM. So far, it is looking good. If it works properly I will create another vmdk and try to follow Arch's GRUB guide.

EDIT: With some fixes, jasonwryan's guide works perfectly here on an EFI Workstation 9 VM. Tomorrow, I will test the wiki, but just looking at it, it seems to be a little bit deprecated, for example, /etc/rc.conf is no more, it was dropped when systemd was adopted.
 
Last edited:
If you did the same setup as I had in the first post, then I think it is an issue with the laptop or something really obvious that I missed.
 
I did not do the same set-up, I used the github gist tutorial I linked before.

Tomorrow (23.47 here in Spain) I will test your method to check if it's your laptop or something that you missed.
 
Found the problem!

tl;dr:
Code:
        linux   /vmlinuz-linux root=/dev/mapper/LispMain-root ro cryptdevice=f6b5ee33-f0a0-4ae5-b12e-7a5b93f8b39d:lisp

should be
Code:
        linux   /vmlinuz-linux root=/dev/mapper/LispMain-root ro cryptdevice=[COLOR="Red"][B]/dev/disk/by-uuid/[/B][/COLOR]f6b5ee33-f0a0-4ae5-b12e-7a5b93f8b39d:lisp

mkinitcpio.conf
grub.cfg


-- Just for reference in case someone faces the same problem and gets here via Google. --

I installed Arch Linux with GRUB on a EFI Workstation 9 VM, with LUKS and LVM. I used the latest installation media, 2013.05.01 (at the time of writing).

Then, I curl-pastebin'd your grub.cfg, and I used your grub.cfg, adapting it to my environment, that being UUIDs and LVM device names that had to be replaced. Your boot.cfg did not boot. I was dropped to the shell or got no output at all, excluding the kernel lines regarding drive cache, which I ignored.

After checking the verbose output using the verbose kernel flag, the reason for this seemed to be that it could not find the root device.

I checked with gummiboot to discard any VMware EFI-related or kernel problems. Gummiboot booted perfectly.

I decided to generate my own grub.cfg file using grub-mkconfig. I used all the default settings, excluding a /etc/default/grub line to enable crypt boot:

Code:
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:root"

I vimdiff'd both the new one and yours and the differences seemed negligible at first. I fed it to GRUB and rebooted, and to my surprise, I was greeted with a line asking for my device password, and after that Arch properly booted.

The biggest difference between both files seemed to be how they addressed the root device. One used UUIDs and the other a device node. The UUID one failed to boot while the device node one booted perfectly. I could reproduce this as many times as I wanted too, as I created another grub.cfg file with both lines for debugging purposes.

After this, I used Google-fu magic to investigate how cryptdevice works, and it does not accept bare UUID strings or UUID= strings. It requires a device node string to work properly. This I tested by using yet more lines with UUID= and UUID strings. None booted. It seems it requires a device node. To use UUID, you must use the /dev/disk/by-uuid/ symlink. This one worked perfectly!

Thus, the solution to your problem. You must use the /dev/disk/by-uuid symlink when refering to the root device as a UUID string for the cryptdevice kernel argument.
 
Last edited:
Actually, that line was a mistake when I copied it and I didn't notice. I just forgot the /dev/disk/by-uuid portion. I tried adding that in during boot and I also tried changing that entry to /dev/sda2 before creating this thread, which did not fix the issue.
 
I just followed the Arch wiki articles and pieced it together. There is no "guide" I followed because one doesn't exist.
 
Sorry thid, but I can't reproduce it. Installed it on my main rig (using another HDD) and it is working with both GRUB and Gummi. I will try to reproduce it on my laptop (I have to reinstall Arch anyway, it's been two months since I've ran a -Suyy and it's quite broken).

Did you get any kernel messages whatsoever?
 
Absolutely nothing. All I see is "Loading initial ramdisk" and it just sits there forever.
 
Absolutely nothing. All I see is "Loading initial ramdisk" and it just sits there forever.

IIRC that is a GRUB message, not a kernel one. Just wondering, did you mount the ESP to /boot or to /boot/efi? (the former being the recommended one). Maybe GRUB is trying to look for a file that is not there?

Anyway, I just finished re-installing Arch on my laptop. Followed Jason's guide, adapting it for the new installation media and filling the gaps using the Arch Wiki.

It is working properly right now with UEFI+LUKS. No dice.

I used Gummi though, didn't use GRUB. Maybe next time you try this you could use Gummi?

Off-topic: I installed Gnome 3 for some reason. I will try to use it for a couple of weeks, to give it a try before I grab my openbox dotfiles and nuke Gnome. Wish me luck.
 
Back