LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 05-04-2012, 11:23 PM   #1
unassailable
LQ Newbie
 
Registered: May 2012
Posts: 20

Rep: Reputation: Disabled
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:
Code:
root sda3 (mapper/roo2)
boot sda1
swap sda2
kernel - includes devtmpfs
my initramfs dir:
Code:
├── 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:
Code:
#!/bin/sh

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
fi

echo "Failed to switch root, shell time..."
exec sh
my grub.conf
Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# 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
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

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

# vim:ft=conf:
 
Old 05-10-2012, 09:57 AM   #2
unassailable
LQ Newbie
 
Registered: May 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Solved

Rookie mistake...

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


Reply


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 09:58 AM
[SOLVED] Gentoo, LUKS, LVM - kernel panic - not syncing /init not found mechman422 Linux - Kernel 1 10-23-2010 01:15 AM
ugh...gentoo wont boot and stops at initramfs :( asilentmurmur Gentoo 1 10-31-2009 08:34 AM
gentoo luks encrypted root partition - lots of trouble (with initramfs) Meson Gentoo 10 10-15-2009 04:15 PM


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

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