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

Re: boot problem after updating dropbear [solved -- MANUAL initrd works required]


Okay, it turns out that the only files that were missing were ones that
I had in the /etc/initramfs-tools/root/ directory.

The only files in the faulty initrd image were from the
/etc/initramfs-tools/root/.ssh/ directory, so missing .profile and other
required files.

I modified the initrd to include those missing files and everything is
functional again.

 - extract initrd
 - add files
 - rebuild initrd

 - replace /boot/initrd file with my new one.

So, it seems that "update-initramfs -u -k all" only missed those extra
custom files placed in the /etc/initramfs-tools/root/ directory.

There was not anything particularly special in the .profile, except for
the useful aliases -- however, those aliases /may/ have helped the /init
script find required binaries to boot properly.

I cannot seem to find any reason why those files were included properly
before, but not now (without manual intervention).

Here's the .profile fwiw:

# cat initrd-wrk--20160926b/root/.profile
# ~/.profile: executed by Bourne-compatible login shells.

alias l='ls -alrt'

# dropbear aliases
alias db1='/sbin/cryptsetup luksOpen /dev/md0 md0_crypt'
alias db2='/sbin/cryptsetup luksOpen /dev/md1 md1_crypt'
alias db3='/sbin/cryptsetup luksOpen /dev/md2 md2_crypt'
alias db4='/sbin/cryptsetup status            md0_crypt'
alias db5='/sbin/cryptsetup status            md1_crypt'
alias db6='/sbin/cryptsetup status            md2_crypt'
alias db7='ps|grep askpass;echo kill -9 $(pidof askpass)'

# mdadm aliases
alias mdadm='/sbin/mdadm'
alias mdstat='cat /proc/mdstat'
alias md0='mdadm -D /dev/md0'
alias md1='mdadm -D /dev/md1'
alias md2='mdadm -D /dev/md2'

# /sbin/ binary aliases
for binary in badblocks blkid fdisk hdparm lvm parted
	alias $binary="/sbin/$binary"

# /usr/bin/ binary aliases
for binary in nohup pv screen tee vim who
	alias $binary="/usr/bin/$binary"


if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc

#mesg n

Kind Regards

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: