[svlug] Fdisk and Luks partition
Marco Walther
marco at sonic.net
Tue Nov 27 23:01:55 PST 2012
On 11/27/2012 10:36 PM, Robert Freiberger wrote:
> I'm studying for the RHCSA exam and having a hard time fully
> understanding how to setup a Linux Unified Key Setup partition to
> mount at boot time.
>
> While I can mount the LUKS partition manually, I seem to have a
> problem adjusting the FSCK settings on /etc/fstab. Typically I add the
> information using the UUID of the disk, the mount point, ext4,
> defaults, 1, 2. But upon boot, I see the following error.
>
> "fsck.ext4: Bad magic number in super-block while trying to open
> /dev/sde1 /dev/sde1:
> The superblock could not be read or does not describe a correct ext2
> filesystem. "
Did you try to use /dev/mapper/luk2 instead of the UUID? It looks like
you (the boot time fsck) are trying to interpret /dev/sde1 as ext4
directly?! That will not work. You have to use the device provided by
the `encryption framework' instead of the `physical partition'.
I have no experience with this, just from reading up on it;-) So take
everything with a grain of paprika;-)
A ref is @ http://fedoraproject.org/wiki/Implementing_LUKS_Disk_Encryption
Have fun;-)
-- Marco
>
> I can enter the system and remount the / filesystem, change the
> setting in /etc/fstab to boot the system correctly. But I'm not 100%
> on what is causing the issue. Is the fact that the filesystems are
> being mounted in the wrong order the reason for the failure? If I
> change the fsck value from 2 to 0, this boots the system correctly,
> but doesn't fix the issue as the file system is now unchecked.
>
> I assume that the problem is / filesystem needs to be mounted first,
> then it can start the encryption module for LUKS, enabling the reading
> of the file containing the passphrase.
>
> Maybe I'm over thinking this?
>
> Here's the /etc/fstab file. The partition in question is the /kuk2 mount.
>
> 1.
> # /etc/fstab
> 2.
> # Created by anaconda on Sat Oct 20 09:54:31 2012
> 3.
> #
> 4.
> # Accessible filesystems, by reference, are maintained under
> '/dev/disk'
> 5.
> # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for
> more info
> 6.
> #
> 7.
> UUID=83a523b1-71b5-4e59-926e-126086d47a9b /
> ext4 defaults 1 1
> 8.
> UUID=332e4077-dcfb-4da6-ad63-bf669c5f7042 /boot
> ext4 defaults 1 2
> 9.
> UUID=e2c66d36-f298-40f2-bd63-78eb2e25f72d swap
> swap defaults 0 0
>10.
> tmpfs /dev/shm tmpfs defaults
> 0 0
>11.
> devpts /dev/pts devpts
> gid=5,mode=620 0 0
>12.
> sysfs /sys sysfs defaults
> 0 0
>13.
> proc /proc proc defaults
> 0 0
>14.
> /dev/vg1/lv100 /lv100mnt ext4 defaults
> 1 3
>15.
> /dev/mapper/sdd1luks /sdd1luks ext4 defaults
> 1 2
>16.
> UUID=efd3526d-d776-410d-90b8-fa4016c44220 /luk2 ext4 defaults
> 1 2
>17.
> /dev/sdd3 /share3 ext4 defaults
> 1 4
>18.
> /dev/sdd4 swap swap defaults
> 0 0
>
>
> Thanks,
> Robert
>
>
>
> --
> Robert Freiberger
> 510-936-1210
>
>
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.svlug.org/archives/svlug/attachments/20121127/8937bdb0/attachment.htm
More information about the svlug
mailing list