Re: reconstitute /boot on stretch
On Thu, Oct 12, 2017 at 09:06:40PM -0400, Harry Putnam wrote:
> I managed to delete /boot and all contents, on a `stretch' system.
> Of course it will not boot now. So maybe work from a live cd or
> install media...
Did you reboot? If not then you should be able to fix this
relatively easily. If you did then you can use Debian install
media in rescue mode to get a shell.
> How can I go about reconstituting the /boot directory and contents
> that match my install?
I'm assuming that restoring from backup is not an option otherwise
you wouldn't be posting here. After your crisis is over you'll want
to look into improving your backup regime.
If you're running from a rescue or live environment, first get into
a chroot in your actual system.
Then reinstall your kernel and bootloader.
# apt-get --reinstall install linux-image-amd64
# apt-get --reinstall install grub-pc
You haven't deleted your grub configuration (/etc/default/grub) so
assuming you didn't have a hand-crafted /boot/grub/grub.cfg then
reinstalling should re-configure it.
> Not sure how to create the initrd, Sysmap, grub directory and so
initramfs should get re-created after kernel reinstall. Sysmap comes
with the kernel, and we already covered grub.
So, try the commands and see what happens. There might be some
additional forcing you need to do but it soul;d be relatively simple.