All of lore.kernel.org
 help / color / mirror / Atom feed
From: Selim Levy <sjtlevy@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] configuration files
Date: Mon, 22 Feb 2010 01:59:57 -0500	[thread overview]
Message-ID: <6294c32a1002212259q8641692g6355b4418177897a@mail.gmail.com> (raw)
In-Reply-To: <20100221205328.GA19030@resivo.wgnet.de>

[-- Attachment #1: Type: text/plain, Size: 3729 bytes --]

That help was invaluable.  Thanks a ton.



On 21 February 2010 15:53, Jonas Meurer <jonas@freesources.org> wrote:

> hey selim,
>
> On 21/02/2010 Selim Levy wrote:
> > On 21 February 2010 12:10, Bryan Kadzban <bryan.kadzban@gmail.com>
> wrote:
> > > Doesn't Debian's initramfs bring up udev and let you use the
> > > /dev/disk/by-*/ symlinks in crypttab?  That's a *LOT* better way to
> find
> > > this drive (in your case, by-id might work, and by-uuid will almost
> > > definitely work, assuming a new-enough udev that can find the UUID of a
> > > LUKS volume).  Maybe poke around in /dev/disk when you're at the
> busybox
> > > prompt, and see what you can find.
> > > (If it doesn't bring up udev and let you use those symlinks, then ...
> > > why not?  :-P  Not a question for you obviously, but more for the
> Debian
> > > maintainers.)
> > >
> > > Anyway, then you don't care which sd* name is given to this device,
> > > since you're using an explicitly-guaranteed-stable name for it.
> > >
> >
> > Hmmmm.... that's really interesting.  I played around at the busybox
> prompt
> > and took down all the info in the /dev/disk/by-* directories (which do
> get
> > created).  I redirected output of 'ls -alF' commands from those
> directories
> > to file and have the info available to me.
> >
> > So here's what I've now confirmed:
> > When I boot into my main/internal hd, /dev/sda, sdb and sdc are the
> > following: internal hd, cardreader, external hd (respectively).
> > When I boot into my rescue/external system, they are the following:
> internal
> > hd, external hd, cardreader.
> >
> > How do I go about using the /dev/disk/by-* devices with dm-crypt?  Does
> it
> > only require modifying, as before, /etc/fstab and /proc/cmdline?  Or is
> > there something else I should play around with?
>
> yon can use "UUID=..." instead of the device path both in /etc/fstab and
> in /etc/crypttab. for example:
>
> /etc/fstab:
> UUID=9385bada-5c09-a303-ee31-4fd23452af29 / ext3 errors=remount-ro 0 1
>
> /etc/crypttab:
> sdb3_crypt UUID=35bc3457-127a-4344-80bf-6cdfff232339 none luks
>
> /proc/cmdline:
> BOOT_IMAGE=/vmlinuz-2.6.26-1-amd64 root=/dev/mapper/rescue-rooto ro
>
> you need to substitute the UUID in /etc/fstab with the UUID of
> /dev/mapper/rescue-rooto, and the UUID in /etc/crypttab with the one of
> /dev/sdb3.
>

This yielded interesting results.

So I got the necessary UUIDs and placed them into fstab and crypttab and
then updated my initramfs.  (I also made the change to cmdline, but I'm now
convinced that the problem isn't there.)  This time I only got the error
once (and not twice as before):

# chroot /mnt/RootRescue/ /usr/sbin/update-initramfs -u
update-initramfs: Generating /boot/initrd.img-2.6.26-2-amd64
cryptsetup: WARNING: invalid line in /etc/crypttab -

This made me think that there were initially 2 errors in the crypttab file
(and not just 2 error outputs) and that I had fixed one by being explict
about the UUID in the file:

# cat crypttab
sdb3_crypt UUID=dd1bf80b-904f-4a9f-97a3-39fd13fec034 none luks

I figure something's strange with the "sdb3_crypt" designation and grepped
around for it.  (As per the manpage, I'll call this the "target".)  I found
it /etc/lvm/cache/.cache and deleted the file.  (It'll either be re-created
or I'll restore my backup of it.)  And re-updated initramfs.  No change.
I've looked around in /etc and /proc and a few other places for "sdb3_crypt"
but am coming up empty.

Who makes use of the target?  I know that it gets used by cryptsetup to
populate my /dev/mapper/*, but when still in busybox, the 'mapper/'s haven't
been created yet.  Is it referred to/by in any other location?

I really appreciate the on-going assistance.

Cheers,
Selim

[-- Attachment #2: Type: text/html, Size: 4569 bytes --]

  reply	other threads:[~2010-02-22  6:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18  0:25 [dm-crypt] configuration files Selim Levy
2010-02-20  8:55 ` Jonas Meurer
2010-02-21  4:42   ` Selim Levy
2010-02-21 11:27     ` Jonas Meurer
2010-02-21 19:46       ` Selim Levy
2010-02-21 20:40         ` Selim Levy
2010-02-21 17:10     ` Bryan Kadzban
2010-02-21 20:18       ` Selim Levy
2010-02-21 20:53         ` Jonas Meurer
2010-02-22  6:59           ` Selim Levy [this message]
2010-02-22 11:13             ` Jonas Meurer
2010-02-22 21:40               ` Selim Levy
2010-02-22 23:12                 ` Jonas Meurer
2010-03-05 19:36                   ` Selim Levy
2010-03-08 11:52                     ` Jonas Meurer
2010-03-08 21:35                       ` Selim Levy
2010-03-08 22:27                         ` Selim Levy
2010-03-08 22:37                         ` Jonas Meurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6294c32a1002212259q8641692g6355b4418177897a@mail.gmail.com \
    --to=sjtlevy@gmail.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.