initrd access /dev/fd0 - help, please - Slackware

This is a discussion on initrd access /dev/fd0 - help, please - Slackware ; GOAL: During boot, I wish to use a key file to unlock /dev/md0 where the key is the entire 2880 sectors of a (v)FAT formatted floppy diskette. SCENARIO: First, this works after the system boots, so my issue is making ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: initrd access /dev/fd0 - help, please

  1. initrd access /dev/fd0 - help, please

    GOAL:
    During boot, I wish to use a key file to unlock /dev/md0 where the key
    is the entire 2880 sectors of a (v)FAT formatted floppy diskette.

    SCENARIO:
    First, this works after the system boots, so my issue is making it
    work during the boot using mkinitrd and the Slackware v12.1 generic
    kernel 2.6.24.5-smp.

    I have followed the README_CRYPT.TXT on a 4 drive RAID5 array. Each
    of the 4 drives has two partitions and sda1 is mounted as /boot.
    sd[b-d]1 are swap partitions. sd[a-d]2 comprises /dev/md0 and md0 is
    encrypted using a floppy diskette as the key file.

    The floppy diskette was prepared thus:
    dd if=/dev/urandom of=/dev/fd0
    dd if=/dev/random of=/dev/fd0 count=300
    (/dev/random is EXCRUCIATINGLY slow, so only the first 49 or so
    sectors on the diskette are truly random.)

    That floppy was used to run
    cryptsetup -s 256 luksFormat /dev/md0 /dev/fd0
    cryptsetup luksOpen /dev/md0 md0 --key-file /dev/fd0
    cryptsetup luksAddKey /dev/md0 --key-file /dev/fd0

    The additional key allows me to type in a passphrase. I wish to
    delete that second key ASAP.

    The md0 device has 2 Logical Volumes as /dev/VolGrp/root and
    /dev/VolGrp/var. Slackware was installed on /dev/VolGrp/root.

    I am able to boot if I type a passphrase, but that is not sufficiently
    secure. The random "junk" on the diskette plus the fact that there is
    no file on the diskette IS sufficiently secure .

    PROBLEM:
    Although I hacked the init file in /boot/initrd-tree to append
    "--key-file /dev/fd0" in the appropriate lines of that script, the
    floppy drive never "lights up", so I know the drive is not being
    accessed during the boot. Adding modules fat and vfat does not help.

    REQUEST:
    Can someone please tell me how to configure an initrd.gz such that
    /dev/fd0 can be accessed during the boot?

    Thanks for any assistance!
    --
    buck

  2. Re: initrd access /dev/fd0 - help, please

    buck wrote:

    > PROBLEM:
    > Although I hacked the init file in /boot/initrd-tree to append
    > "--key-file /dev/fd0" in the appropriate lines of that script, the
    > floppy drive never "lights up", so I know the drive is not being
    > accessed during the boot. Adding modules fat and vfat does not help.
    >
    > REQUEST:
    > Can someone please tell me how to configure an initrd.gz such that
    > /dev/fd0 can be accessed during the boot?


    Is there an /dev/fd0 device entry on your initrd imagae?
    (My /boot/initrd-tree/dev does not contain an entry for fd0.)


    Regards,

    Kees.

    --
    Kees Theunissen.

  3. Re: initrd access /dev/fd0 - help, please

    On Mon, 16 Jun 2008 23:23:40 +0200, Kees Theunissen
    wrote:

    >buck wrote:
    >
    >> PROBLEM:
    >> Although I hacked the init file in /boot/initrd-tree to append
    >> "--key-file /dev/fd0" in the appropriate lines of that script, the
    >> floppy drive never "lights up", so I know the drive is not being
    >> accessed during the boot. Adding modules fat and vfat does not help.
    >>
    >> REQUEST:
    >> Can someone please tell me how to configure an initrd.gz such that
    >> /dev/fd0 can be accessed during the boot?

    >
    >Is there an /dev/fd0 device entry on your initrd imagae?
    >(My /boot/initrd-tree/dev does not contain an entry for fd0.)
    >
    >
    >Regards,
    >
    >Kees.


    I think you have just nailed this for me. My tree also does not
    contain fd0 in the /dev directory.

    Thank you very much.
    --
    buck

+ Reply to Thread