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

Lenovo W530 - Stuck at "Loading initial ramdisk" after installation (Arch Linux)

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
Lenovo W530 - Stuck at "Loading initial ramdisk" after installation (Arch Linux)

Hello all, I recently picked up the newly released Lenovo Thinkpad W530 and it is a great system. I'm having some trouble getting Arch Linux running and I'm not finding too much help on the Arch forums, nor have I seen others having similar issues.

System specs:
Processor - Intel Core i7-3720QM
System graphics - NVIDIA Quadro K1000M
Total memory - 32 GB RAM
Solid State Drive - 128gb Crucial mSATA m4 (/boot and / are here)
Hard drive - 500GB 5400rpm

For my recent reinstall, I've used the newest ISO download, which uses the scripts instead of the AIF. At the moment, the 500gb drive is untouched, so I'm only installing to the mSATA SSD that I added. When I install Arch without LUKS drive encryption, everything works perfectly fine. Following the exact same steps, except for adding LUKS encryption (and required modules/hooks) on the RAW drive (see here for clarification!), the system gets stuck. I've verified that my hooks are in the proper order (encrypt, lvm2, filesystems) and I've regenerated the ramdisk using mkinitcpio. When the system gets to the message "Loading initial ramdisk", there is hard drive activity indicating that it is loading files from the hard drive, but it stops shortly after and never continues. Putting GRUB2 in debug mode doesn't really give much information, except that this is the last thing it shows before it restarts (??) the laptop.

What I find interesting is that the command "hwdetect --modules" returns nothing. I know this should return a lot more than that. Here are relevant configuration files, as well.

Code:
[root@archiso /]# hwdetect --modules
MODULES=()
Code:
/etc/rc.conf

#
# /etc/rc.conf - configuration file for initscripts
#
# Most of rc.conf has been replaced by various other configuration
# files. See archlinux(7) for details.
#
# For more details on rc.conf see rc.conf(5).
#

DAEMONS=(syslog-ng network crond)

# Storage
#
# USEDMRAID="no"
USELVM="yes"

# Network
#
# interface=
# address=
# netmask=
# gateway=
Code:
/boot/grub/grub.cfg

#
# 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
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-5eaf1c9a-4e24-4a08-8967-8e60d718df67' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd1,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  C5A7-F02D
    else
      search --no-floppy --fs-uuid --set=root C5A7-F02D
    fi
    echo    'Loading Linux core repo kernel ...'
    linux    /vmlinuz-linux root=/dev/mapper/lisp-root cryptdevice=/dev/sdb2:lisp ro  quiet
    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-5eaf1c9a-4e24-4a08-8967-8e60d718df67' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd1,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  C5A7-F02D
    else
      search --no-floppy --fs-uuid --set=root C5A7-F02D
    fi
    echo    'Loading Linux core repo kernel ...'
    linux    /vmlinuz-linux root=/dev/mapper/lisp-root cryptdevice=/dev/sdb2:lisp ro  quiet
    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 ###
Code:
/etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="ext3 ext4 dm-crypt dm_mod"

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
# Some users may wish to include modprobe.conf for custom module options
# like so:
#    FILES="/etc/modprobe.d/modprobe.conf"
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect pata scsi sata filesystems"
#
##   This is identical to the above, except the old ide subsystem is
##   used for IDE devices instead of the new pata subsystem.
#    HOOKS="base udev autodetect ide scsi sata filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev pata scsi sata usb filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev pata mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev usb lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect pata scsi sata encrypt lvm2 filesystems usbinput fsck"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""
I'm mainly stuck because there is no error message, which is the incredibly frustrating part. Errors are searchable and precise, whereas "stuck at loading initial ramdisk" brings up useless and unrelated results. :(
 
Last edited:
I had the same problem with Fedora and I just ended up reinstalling the system.
 
Welcome to the forums, Neo565! I've reinstalled multiple times. The issue only arises when I encrypt the hard drive.
 
Most things I have read say not to encrypt /boot.

Have you successfully encrypted /boot before?
 
/boot is not encrypted and I don't wish to try it due to complexity.
 
For clarification, here are the partitions on the system:

/dev/sda1 (Stock 500gb Windows drive, NTFS)
/dev/sdb1 (/boot and EFI partition, FAT32)
/dev/sdb2 (/ with LUKS encryption)

Inside the LUKS encryption, there are two volume groups: "swap" and "root". I hope the naming scheme makes it obvious what each is. "Root" is formatted as EXT4.
 
I've never used Arch, I've always used Gentoo for this but I thought I'd try to offer some help. The only thing I see from looking at the Arch wiki from what you have is when you tell grub that the encrypted volume is cryptdevice=/dev/sdb2:lisp but then have entered root=/dev/mapper/lisp-root when I believe it would be mounted under root=/dev/mapper/lisp.

*edit: After reading a little further, it looks like you named your Volume Group lisp and then have lisp-root and lisp-swap as your two logical volumes. So under cryptdevice=/ you'd want to call cryptdevice=/dev/sdb2:lisp-root and once the initramfs has unlocked /dev/mapper/lisp-root it will read from the configuration file in /etc/crypttab and use your settings in there to create your /dev/mapper/lisp-swap volume.

Sorry if this ends up being no help but I thought I'd try. Good luck!
 
Last edited:
I've actually tried a bunch of combinations like that, but I will try that one this weekend.
 
Working on it now, and that did not help. Still stuck and frustrated.
 
Did a full reinstall and I'm still stuck at the same spot. I verified I'm following the install guides exactly, including the dm-crypt and lvm ones. I only have the SSD installed.
 
Hey man I just installed Arch inside a VM following the wiki (did not do UEFI partition or grub config though so if that ends up the problem then again I will be no help) but the first attempt got me similar results to what you were describing, black screen after the Loading initial ramdisk echo but then it dropped me to a rescue shell instead of nothing. I got it to work by changing two things:

1.) Under your hooks I changed lvm2 set before encrypt instead of after.

2.) Trying to mimic your volume naming scheme in the grub.cfg had to be changed to

Code:
cryptdevice=/dev/lisp/root:root root=/dev/mapper/root

Besides that I followed almost verbatim the section titled LVM and dm-crypt manually (short version) other than used mkfs.ext4 && mkfs.ext2 instead of mkreisferfs.

If I have your partition setup correctly under /dev/lisp you have root and swap. And under /dev/mapper you would have lisp-root, lisp-swap and root.

But if it ends up being something with the EFI setup this will be no good anyway. Trying to help :shrug:
 
Thanks for your time and help thus far, I really do appreciate it. I've literally received zero help at the Arch forums. I'm trying a full reinstall again right now.
 
While waiting for the packages to download, I opened a shell to my old Lenovo and checked out the configuration:

MODULES=""
HOOKS="base udev autodetect pata scsi sata keymap encrypt lvm2 filesystems usbinput fsck"

kernel /vmlinuz-linux root=/dev/mapper/lenovo-root cryptdevice=/dev/sda2:crypt

I find it interesting that this system has no special configuration and works without problem. This seems to be pointing to some other issue, such as hardware incompatibility.
 
Yah I don't know when it really makes a difference with Grub or not, on my Gentoo setup I have my initramfs hand coded and compressed in the kernel to call cryptsetup and all my grub.conf is

Code:
kernel /boot/kernel root=/dev/sda2

Thats with grub and not grub2 though. Gentoo says your suppose to use the cryptdevice command but it's never given me issues so I haven't worried about it. I do remember though having difficulties with not compressing the initramfs into the kernel and just passing it at boot. Could try that, except downside is you have to recompile the kernel anytime you want to edit your initramfs.

I just went and removed the root=/dev/sda2 line out of my grub.conf and it boots fine without that too.
 
I've tried everything you've suggested (plus a few different combinations), including your last post. Still not working.
 
You could try hard coding the cryptsetup call, its less than ideal but it may give you some insight how far things are getting in the boot order if it fails at your custom hook. I was able to get this to work in a VM (but then again I guess if it does end up being your hardware this is pretty futile :D) with this:

My custom hook I just named test.

First I removed the encrypt hook after lvm2 and replaced it w/ test.

Then using the instructions here
https://wiki.archlinux.org/index.php/Mkinitcpio

I made

Code:
/usr/lib/init/cpio/install/test

#!/bin/bash

build() {
       add_module dm-crypt
       add_module dm-mod
       add_all_modules '/crypt'
       add_binary  /usr/sbin/cryptsetup
       add_runscript /usr/lib/initcpio/hooks/test
}

Code:
/usr/lib/initcpio/hooks/test

run_hook() {
       modprobe dm-mod
       modprobe -a dm-crypt
       echo "This is a test."
       cryptsetup -T 5 luksOpen /dev/mapper/lisp-root root
       export root="/dev/mapper/root"
}

Then just rebuilt it w/ the mkinitcpio -p linux cmd.

I am in completely uncharted waters here though as I've never used mkinitcpio before this but at least if you hard coded it you'd know then if your getting this far in the boot order.

Hopefully you haven't gotten to frustrated cause I'm quite curious what the problem will end up having been and hope you figure this out.
 
Added the test module and recompiled through mkinitcpio (I did see it listed when it compiled). It did not trigger the echo command.

HOOKS="base udev autodetect pata scsi sata test lvm2 encrypt filesystems usbinput fsck"

So, it seems it isn't getting as far as I thought it was.

EDIT: Compiled with nothing but "base" and "test", no echo.
 
You should see it build with the other hooks. I'd rename it to something obnoxious like IAMRIGHTHERE so that way you see it when they build and you don't risk the chance missing it. Another thing is you can add to the install script (assuming you change the name):

/usr/lib/initcpio/install/IAMRIGHTHERE
Code:
#!/bin/bash

build() {
      add_module dm-crypt
      add_module dm-mod
      add_all_modules '/crypt'
      add_binary /usr/sbin/cryptsetup
      add_runscript /usr/lib/initcpio/hooks/test/IAMRIGHTHERE
}

help() {
      cat <<HELPEOF
I am visible to mkinitcpio.
HELPEOF
}

then run
Code:
mkinitcpio -H IAMRIGHTHERE

and you should see it output
Code:
==> Help for hook 'IAMRIGHTHERE':

I am visible to mkinitcpio.

==> This hook as has runtime scripts:
   -> pre-mount hook

Then just change the name in

/usr/lib/initcpio/hooks/IAMRIGHTHERE instead of test (or whatever you want to call it I just find it helps to use caps since it angers Linux cmdline users and makes it more noticeable for me during debugging).

and then last in the /etc/mkinitcpio.conf add it, but encrypt needs to be removed since the encrypt module calls cryptsetup too. I also I haven't tested to confirm, but according to and buried somewhere in the Arch wiki lvm2 has to come before encrypt or the IAMRIGHTHERE module since the logical volumes need to be accounted for in /dev/mapper.

I also should note that I do not have the extensions built into VirtualBox at the moment and am typing out the code rather than just copying and pasting from it's console so the possibility of a typo does exist and I would double check things.
 
Mkinitcpio does compile it in, unless I don't understand what you mean. When I do "mkinitcpio -p linux", it shows me all the hooks that it is creating, and "test" is listed. Even if I had two entries for encrypt, that shouldn't cause an issue, right? It will just see it is open and ignore it. I'm not even getting to a screen asking for a password, so I don't believe that is important. Remember that I compiled with "base" and "test", which did not change how it booted.
 
You are right. Even if it doesn't ignore it there should still be something outputted to you. I believe you to know more about linux stuff than I, but just so I can compare how we have things configured when you boot into the install disk with your current partition configuration and run

vgscan
vgchange -ay

what does ls /dev/mapper show as output?

That is to bad if it is something with your hardware. I'm sorry I couldn't be more help.
 
Back