Zmyrgel wrote:
I made it that I removed the initramfs-data-cpio.gz from the kernel and recompiled the kernel. Then I added the entries to use the initrd in the grub.conf and now I get nice mix:
Code: Select all
Failure to execute /init
Kernel Panic - Init not found
Ok, that message indicates the initramfs archive is not being loaded.
Another indication that the initramfs archive is not being loaded is fbsplash not working.
Things to check:
* init exists on build_initramfs/ and has executable permissions.
done
* Are you sure you created the initramfs correctly, as in, did you copy pasted the command to create and compress the cpio archive(initramfs image) ?
A "common" error is compressing the parent directory of build_initramfs, so, please post the output of this command:
Code: Select all
zcat /boot/initramfs-gentoo-crytp | cpio --list
* Are you sure that /boot/initramfs-gentoo-crypt exists on the /boot partition ?
You need to mount /boot before copying files to it, I know it sounds dumb, but still..
* Typos in grub.conf ?
* Remove "quiet" from your kernel parameters and read the kernel error messages, anything weird ?
There is nothing more to it, if it keeps failing you might want to try having the initramfs archive built into the kernel, this way you don't have to worry about it not being loaded via the bootloader, just make sure you follow the instructions.
For example you must place it in /usr/src/linux/usr and rename it to
initramfs_data.cpio.gz, then
touch the file and compile the kernel.
When it finishes compiling, check the kernel size it should be bigger than usual, in addition you can check if /usr/src/linux/usr/initramfs_data.cpio.gz was overwritted.
Then boot using the kernel and everything should work.
Zmyrgel wrote:
A side note, you could add in the wiki on how exactly add more partitions on the setup and what about LVM?
What do you mean ?
For example, when you create the mappings you just need to repeat the same process for other partitions, nothing special, but let me know which step you think it should be improved with examples and I'll try adding some.
About LVM, It can be done, I'll add a ToDo list on the article discussion page, LVM will be in it.
Somebody else will have to write instructions and init support for it, because I've never used it and don't plan to start anytime soon.
Zmyrgel wrote:
I tried to edit /etc/conf.d/cryptfs...
Code: Select all
# /etc/conf.d/cryptfs
# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup-luks/files/cryptfs.confd,v 1.3 2005/06/25 14:11:37 swegener Exp $
# Note regarding the syntax of this file. This file is *almost* bash,
# but each line is evaluated separately. Separate swaps/mounts can be
# specified. The init-script which reads this file assumes that a
# swap= or mount= line starts a new section, similar to lilo or grub
# configuration.
# Note when using gpg keys and /usr on a separate partition, you will
# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly.
# See http://bugs.gentoo.org/90482 for more information.
# Swap partitions. These should come first so that no keys make their
# way into unencrypted swap.
# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
# If no makefs is given then mkswap will be assumed
swap=crypt-swap
source='/dev/mapper/swap'
# Mounts
# If no options are given, they will default to: -c aes -h sha1
# No mkfs is run unless you specify a makefs option
# NOTE: if you are using cryptsetup-luks and want to use its features
# then you must add a type=luks line otherwise it will be treated like
# the original cryptsetup
# dm-crypt example
mount=crypt-home
source='/dev/mapper/home'
type=luks
#options='-d /root/keyfile'
#pre_mount='/sbin/mkreiserfs -f -f ${dev}'
#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'
# Loopback file example
#mount='home-crypt'
#source='/dev/loop0'
#options='-c serpent -s 256'
#loop_file='/mnt/crypt/home'
You've some errors on it.
The cryptfs comments examples are wrong, you don't set the source to the mapping name, you've to set it to the real device.
And you need to use options=' ', otherwise the cryptfs implementation scripts will assign you with some default options that are not needed for luks partitions.
This is explained in the guide, see the "Decrypting/Encrypting partitions at startup" section.
By the way, since I've not uploaded the files to my website yet, you should disable the applets check in the init script(user variables are right after the comments).
Zmyrgel wrote:
a lot of config options.
Looks good to me.
Regards