Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #172804

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

From Andrew McGlashan <andrew.mcglashan@affinityvision.com.au>
Newsgroups linux.debian.user
Subject Re: boot problem after updating dropbear [solved -- MANUAL initrd works required]
Date 2016-09-26 17:00 +0200
Message-ID <slFxT-567-3@gated-at.bofh.it> (permalink)
References <slpW9-3TP-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,

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
do
	alias $binary="/sbin/$binary"
done


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

alias|sort

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

#mesg n


Kind Regards
AndrewM


Back to linux.debian.user | Previous | Next | Find similar | Unroll thread


Thread

Re: boot problem after updating dropbear [solved -- MANUAL initrd  works required] Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> - 2016-09-26 17:00 +0200

csiph-web