this post was submitted on 27 Sep 2024
6 points (100.0% liked)

Debian operating system

2749 readers
1 users here now

Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian provides more than a pure OS: it comes with over 59000 packages, precompiled software bundled up in a nice format for easy installation on your machine.

founded 4 years ago
MODERATORS
 

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?

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 2 months ago (1 children)

Yes I recognise this post was more typing than a few decades of system rescuing but it's also more relaxing because my laptop already works and a one character typo won't be as much of a hassle here. It'd make an unpleasant chore more pleasant if there were a simple alias for this, which I occasionally speculate on proposing but ehhh I don't need it so often.

So it appears this time I'm motivated enough to make a post here. But not quite motivated enough to:

  • figure out how to wedge something to do this into the filesystem on my rescue ISO (because I'll either lose that USB or need to remember to repeat it for the next Debian stable release which might come out before I need this again

I'm thinking on a longer time scale)

  • learn how to formally engage with the Debian community (which seems lovely and welcoming but also extremely bureaucratic for sensible reasons and like I'll have a pretty long road ahead of me to get a patch together and properly formatted and somehow applicable to all architectures and documented/internationalised and a lot of other steps I'm insufficiently motivated to undertake but perhaps eventually once I have a critical mass of contributions in mind that it feels worthwhile to dive in).
[–] frizop 1 points 2 months ago (1 children)

so, deb boot strap, or debbootstrap is involved in many of these tasks you're talking about, or the docs cover the specific mount commands needed to be used in conjuection with debbootstrap, I found docs for it here: https://wiki.debian.org/Debootstrap

Hope this helps

[–] [email protected] 1 points 1 month ago

My understanding of debbootstrap is that it's for installing a minimal system, which is very much not what I want to do when rescuing an existing system as it'd probably overwrite things I'd like to keep. And the mount commands in the docs there to bind virtual filesystems before a chroot are similar to the sorts of things I'm hoping to find a memorable shortcut for yes. However, I already know what I want to bind mount, just looking for a more convenient way to go about it in a panic. Thanks for the suggestion.