Various partition mounts

This post was written by eli on January 12, 2010
Posted Under: Linux

This is yet another bunch of things I wanted written down, in case I need them one day. No certain order here.

The root mount

Grub gives the following kernel parameter:

root=/dev/mapper/vg_short-lv_root

Meaning, that the kernel has the LVM module in place when starting off (I suppose it’s kicked off in the initrd stage)

Boot image

Open a boot image (note that this works like tar -x):

zcat /boot/initramfs-2.6.31.9-174.fc12.x86_64.img | cpio -i

Opening an encrypted partition

[root@short ~]# cryptsetup luksOpen /dev/mapper/vg_short-mysecret mysecret
Enter passphrase for /dev/mapper/vg_short-mysecret:
Key slot 0 unlocked.
[root@short ~]# mount /dev/mapper/mysecret /secret

Note that the second argument, mysecret is the name of the device generated under /dev/mapper. Also note that umounting /secret doesn’t close the partition. In addition to unmounting, there’s also need for another cryptsetup command:

[root@short ~]# umount /secret/
[root@short ~]# cryptsetup luksClose /dev/mapper/mysecret

Add a Comment

required, use real name
required, will not be published
optional, your blog address