Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Gentoo This forum is for the discussion of Gentoo Linux.


  Search this Thread
Old 05-05-2012, 12:23 AM   #1
Registered: May 2012
Distribution: gentoo, debian, qubes, openELEC
Posts: 38

Rep: Reputation: 2
Gentoo 3.3.4 with LUKS, initramfs Issues

Trying to get a new install running, have accomplished this before but for some reason the initramfs is giving me issues this time.

I am receiving a kernel panic indicating the system cannot find the init file.

The weird thing is it never prompts me for my password to decrypt the device. This leads me to believe that the issue is in my initramfs file itself.

I have tried both compressing my initramfs into a gzipped cpio and embedding it into the kernel, with neither working.

It has been a long day of troubleshooting this and any outside insight would be appreciated, thank you in advance.

my setup:
root sda3 (mapper/roo2)
boot sda1
swap sda2
kernel - includes devtmpfs
my initramfs dir:
├── bin
│** └── busybox
├── dev
│** ├── console
│** ├── null
│** ├── random
│** ├── sda1
│** ├── sda2
│** ├── sda3
│** ├── tty
│** └── urandom
├── etc
├── init
├── lib
├── mnt
│** └── roo2
├── proc
├── root
├── sbin
│** └── cryptsetup
├── sys

10 directories, 11 files
my initramfs:

rescue_shell() {
	echo "Crap! Rescue Shell Time..."
	exec sh

echo "Mounting proc sysfs and dev"
mount -t proc none /proc || rescue_shell
mount -t sysfs none /sys || rescue_shell
mount -t devtmpfs none /dev || rescue_shell

echo "Installing BusyBox"
busybox --install -s

echo "starting CryptSetup"
cryptsetup -T 5 luksOpen /dev/sda3 roo2 || echo "cryptsetup issues" ; rescue_shell

echo "Mounting root"
mount -o ro /dev/mapper/roo2 /mnt/roo2 || echo "mount roo2 issues" ; rescue_shell

echo "Unmounting proc sysfs and dev"
umount /proc || echo "umount /proc issues" ; rescue_shell
umount /sys || echo "umount /sys issues" ; rescue_shell
umount /dev || echo "umount /dev issues" ; rescue_shell

echo "Switching init"
if [[ -x "/mnt/roo2/sbin/init" ]] ; then
	exec /sbin/switch_root /mnt/root /sbin/init

echo "Failed to switch root, shell time..."
exec sh
my grub.conf
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 30

title Cryp2 3.3.4
root (hd0,0)
kernel /kernel-3.3.4-cryp2

# vim:ft=conf:
Old 05-10-2012, 10:57 AM   #2
Registered: May 2012
Distribution: gentoo, debian, qubes, openELEC
Posts: 38

Original Poster
Rep: Reputation: 2

Rookie mistake...

After going through the steps again, I noticed busybox was not emerged with the static option. After re-emerging everything works now.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Initramfs with decrypting a luks root partition questions dman777 Linux - Software 3 05-18-2011 10:58 AM
[SOLVED] Gentoo, LUKS, LVM - kernel panic - not syncing /init not found mechman422 Linux - Kernel 1 10-23-2010 02:15 AM
ugh...gentoo wont boot and stops at initramfs :( asilentmurmur Gentoo 1 10-31-2009 09:34 AM
gentoo luks encrypted root partition - lots of trouble (with initramfs) Meson Gentoo 10 10-15-2009 05:15 PM > Forums > Linux Forums > Linux - Distributions > Gentoo

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration