LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   partial boot, mount invalid argument, lvm on luks (http://www.linuxquestions.org/questions/slackware-14/partial-boot-mount-invalid-argument-lvm-on-luks-946311/)

BashTin 05-22-2012 09:52 AM

partial boot, mount invalid argument, lvm on luks
 
Ok guys rescue me again! Had a hd failiure and it turned out that lilo and the boot initrd.gz was on the drive that failed.

On the remaining drive is all my work (the one that failed was the backup) but could not boot it so used the install disk to mount all the partiions, cryptsetup luksOpen, vgscan --mknodes, vgchange -ay and then mount (I have an unencrypted boot partition on this drive too). Then I chroot into the mounted system and made a new initrd.gz with the command

Code:

mkinitrd -c -k 2.6.37.6-smp -m ext2 -f ext2 -r /dev/slack13-group/root -C /dev/sda2 -L
sda1 is the unencrypted boot partition.
The boot partition is ext2.
The root parition is reiserfs.

So not sure if my mkinitrd command is correct. Do I need resierfs in there somewhere?

Then did the usual edits to lilo.conf and issue lilo command to install in mbr.

But it will not boot. I get
Code:

/boot/initrd.gz: Loading kernel modules from initrd image.
Unlocking LUKS encrypted device /dev/sda2 as luks mapped device 'lukssda2'.
Enter passphrase for /dev/sda2:
    5 logical volume(s) in volume group "slack13-group" now active.
mount: mounting /dev/slack13-group/root on /mnt failed: Invalid arguement
ERROR: No /sbin/init found on rootdev (or not mounted) Trouble ahead.
You can try to fix it. Type exit when things are done.

So what did I miss or do wrong?

Any help as always very much appreciated, BashTin.

PS: lilo.conf looks like
Code:

boot = /dev/sda
image = /boot/vmlinuz-generic-smp-2.6.37.6-smp
initrd = /boot/initrd.gz
root = /dev/slack13-group/root
label = Slack-Crypt
read-only


BCarey 05-22-2012 10:29 AM

There is a very useful script called mkinitrd_command_generator.sh which in recent versions of slack can be found in /usr/share/mkinitrd. If you don't have it in your version of slack you can download and use the script from 13.37.

The -f flag should specify the filesystem of the root partition, not the boot partition, so in your case it should be reiserfs, not ext2.You will also need to add reiserfs to the list of modules (-m). There is a good chance you need some other modules as well, so you should run the command generator.

Brian

BashTin 05-22-2012 06:20 PM

Thanks BCarey,

yes, was using the wrong fs in the mkinitrd command. Everything back now... cheers.

BashTin


All times are GMT -5. The time now is 01:50 AM.