debian

Can we have an alias for bind mounts on the rescue image? Or maybe we do?

I know it's my fault for believing what my neglected laptop told me about its battery but I went ahead an did a kernel update anyway and wound up needing to repair my system.

After a quick search I wound up on https://wiki.debian.org/GrubEFIReinstallOnLUKS per usual.

The biggest hassle of this is having to type out the longish for loop to bind the various vfs to the chroot environment. It was bad enough when it was proc/sys/dev but it's worse these days:

for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do sudo mount -B $i /mnt$i; done

I realise there are various things that'd automate that if I connected the rescue image to the internet and added a package but that's also hassles as I've really just booted it with the express purpose of reinstalling grub.

But maybe there is already some form of shortcut for this in the system that I've missed? Or some existing ticket/effort to enact one I could +1?

6
3
Comments 3