[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: strange booting behavior



ok, i have more data.  i am still going crazy trying to get it to boot.

first, what does "cryptopts=source=" in the error message?  what
does "-r" mean?

  Check cryptopts=source= bootarg:cat/proc/command line or
  missing modules, device:cat/proc/modules ls/dev
  -r ALERT!  /dev/disk/by-uuid/[the partition's correct uuid] does not exist
  dropping to a shell!

please note that the partition DOES exist, and it opens
perfectly with cryptsetup luksOpen.

however, all mounting fails, including mounting /dev/sda1
(/boot, ext2, unencrypted) and mounting
/dev/mapper/toshiba-root.  mount thinks that they don't
exist when they do.

i can mount all of these things perfectly when i boot from
my working drive and try to mount.

i ran break=premount and then sh -x local-top/cryptroot, but
i don't know what i am doing.  it spewed out [ ! -e
/dev/disk/by-uuid/... ] (i.e. the test for existence failed
even though it DOES exist) and then delay of 0.1s in a loop.
i was not able to stop it with ^C or ^Z.

thanks.


On 5/20/15, Arno Schuring <aelschuring@hotmail.com> wrote:
> Hi,
>
>
>> On 5/19/15, Arno Schuring <aelschuring@hotmail.com> wrote:
>> >
>> > Note that you can add break=premount to the kernel cmdline
>> > to force an initramfs shell, then use sh -x /scripts/$phase/$script
>> > to manually step through the initramfs procedure.
>> >
>> > You can use "grep maybe_break /usr/share/initramfs-tools/init" to
>> > check the valid break= values, and their order.
>>
>> stepping sounds like a great way to debug, but i'm out of my depth.  i
>> don't know what premount is (is that a phase?  a script?  something
>> else?), or what initrd does (all i know is it's a ramdisk and has a
>> fake root fs for some reason).  i will of course be happy to try this,
>> but i won't know what scripts to run, in what order, or what the
>> results will mean.
>>
>
> premount is just one of the breakpoints in the initramfs where you can
> break out and get a shell. The init procedure is completely shell-based,
> you may try reading /init lines 208-238 to get a feel for it. Basically,
> every phase is represented as a directory in /scripts, and the order in
> which the scripts are run is determined by a /scripts/$phase/ORDER file
> in each directory.
>
> /scripts/local-top/cryptroot is probably the most interesting script for
> you to run, and I don't think it has many dependencies since you're
> not using lvm. But ORDER is itself a shell script as well :)
>
> Beyond that, I don't think I can be of much help. I only know about this
> because I'm using a custom unlock procedure for my rootfs. I can't tell
> you about the design of the initramfs, nor do I know if what I'm
> advising here is the easiest way.
>
>>
>> > Also, can you verify that /conf/conf.d/cryptroot exists
>> > in the initramfs and contains the correct line?
>>
>> instead of rebooting to determine this and trying to transcribe it, is
>> it ok to extract the initrd as it is on disk?  i did so and got this:
>> "target=toshiba-root,source=UUID="...",key=none,rootdev" (where "..."
>> is the correct uuid according to blkid for /dev/sda3, which is the
>> partition on which encrypted root resides).
>>
>> does that seem correct?
>
> yes, that should be correct.
>
>>
>> >> in fact, in the initrd busybox shell, i can do cryptsetup
>> >> luksOpen /dev/sda3 toshiba-root.  i do not know how or where
>> >> to mount it, however.  mounting it on / not work.
>> >
>> > You need to mount it (readonly) on /root. Then exit the initramfs shell
>> > and the boot should continue normally.
>>
>> on /root, as in the superuser's home dir for dot files etc.?
>
> Yes. There is no home dir in the initramfs. It's a bit counterintuitive,
> but
> it does make sense to mount the real root filesystem on /root. It's just a
> shame that 'root' has more than one meaning.
>
>
> Regards,
> Arno
>
>  		 	   		


-- 
I rarely can send email, and cannot be counted on to read email, but
please feel free to reply.


Reply to: