I'm pretty sure you can bind mount /proc, /sys, /dev, /run, chroot and
then update-initramfs to regen.
Thanks Tim. You make it sound so simple.
I searched for "chroot to mounted disk to update initramfs" and found
several detailed descriptions of the process.
https://forums.debian.net/viewtopic.php?t=143279
Thank you so much. I will give it a shot today and report back.
Thank you again Tim. It worked.
I found an excellent overall guide in the debian wiki that could be
applied to fix any number of issues with a dead system:
https://wiki.debian.org/RescueLive
Here are the exact steps I took, just in case it can help anyone else
with problems similar to ours.
1. Download, make, then boot into live CD or USB flash & drop into shell. >
2. Get root access with live CD just so I don't have to preface every
command below with sudo.
sudo su -
3. Use fdisk to examine HDs and determine main fs partition(s) on the
RAID to be repaired, then mount it/them...Replace "sdax" below with
the main (and boot if separate) RAID partitions. In my case we did not
have a separate boot partition, so I only had to mount one device.
/sbin/fdisk -l
mount /dev/sdax /mnt
4. Confirm we see all the appropriate directories
ls /mnt/
5. Bind mounts of key file system dirs
for name in proc sys dev ; do mount --bind /$name /mnt/$name; done
6. mount /etc/resolve.conf and /dev/pts
mount --bind /dev/pts /mnt/dev/pts
mount --bind /etc/resolv.conf /mnt/etc/resolv.conf
7. chroot into mounted system
chroot /mnt/ /bin/bash
8. I had to temporarily disable our apt proxy since the server can't
see the proxy from our office where we are doing this repair.
mv /etc/apt/apt.conf.d/99proxy /etc/apt/apt.conf.d/99proxy.bak
9. Install initramfs-tools and initramfs-tools-core which automatically
removed tiny-initramfs-tools which caused all this in the first place.
apt install initramfs-tools initramfs-tools-core
10. Rgen initramfs and update grub
update-initramfs -uv; update-grub
11. Put the apt proxy back
mv /etc/apt/apt.conf.d/99proxy.bak /etc/apt/apt.conf.d/99proxy
10. exit out of chroot, unmount everything, do a clean shutdown
exit
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/etc/resolv.conf
umount /mnt/proc
umount /mnt/sys
umount /mnt/boot ???
umount /mnt
shutdown -r now
11. remove the LIVE flash then power up to confirm a good boot
with the repaired RAID
Andy