grml-rescueboot
grml-rescueboot copied to clipboard
Various enhancements
Hello everyone, I recently discovered this project. It is similar to a home-rolled framework I have been using for some time which provides equivalent functionality. I'd like to get rid of the maintenance burden, and switch to using a widely-available project instead. There are a few enhancements I'd like to contribute, however, to provide some functionality I've relied on.
All of the below can be seen in my tree here.
-
Use isoinfo(1) (from the genisoimage package), if available, to try extracting some sort of useful title string from the ISO file;
-
Add a
GRUB_SUBMENU
option to/etc/default/grml-rescueboot
to place the generated GRUB boot entries into their own submenu (with a customizable title), if desired; -
Allow per-ISO configuration files to customize the generated boot entries, if desired;
-
Generate an ID for each menu entry (resolves #8), in this implementation just the ISO file basename;
-
Export the GRUB device which holds the ISO image, not just the filesystem path. This eliminates the need for a file search later, and is useful when booting some Linux distros (such as Arch Linux) that expect to be given a device name/label in addition to a file path for a loopback-mounted ISO;
-
Perform cleanup after the
configfile /boot/grub/loopback.cfg
call: delete the GRUB loopback entry, and unset the variables (as they may otherwise affect other boot entries later); -
Message tweaks to reduce the implication that grml-rescueboot can only be used with Grml live boot ISOs;
-
New utility program:
rescueboot
, which allows a user to interactively select one of the grml-rescueboot entries, and performs agrub-reboot
+reboot
to boot the system into that ISO (one time only) without needing to interact with GRUB. (One of my use cases is remotely rebooting a running system into a live-boot ISO that runs from RAM and provides SSH access, to allow remote re-installation of the OS.)
That's everything for now. Before I start submitting pull requests, there are a couple questions I'd like to ask:
-
What kind of PR structure would you like? One commit with everything, or spread out across multiple commits? (And delineated how?)
-
The per-ISO config file feature is going to need more documentation. Would it work to have a dedicated section for it in the
README
, or would breaking it out into a separateREADME.iso-cfg
(?) file be preferable?
Any initial review of the changes would also be appreciated, of course.
Hi @iskunk!
This sounds very interesting, haven't had any time yet to look closer into your tree, but some initial feedback from my side:
What kind of PR structure would you like? One commit with everything, or spread out across multiple commits? (And delineated how?)
One commit per main feature tends to be great, so in case of e.g. problems it's usually easier to track down issues (bisecting, reviewing code, reverting stuff,...). Also telling according stories and details in the commit message then tends to be easier, instead of having one single commit with tons of details, if they aren't directly related. So looking at your list of proposed/implemented changes, I'd say combine whatever makes sense in combination. :) Hope I managed to verbalize my basic idea and preferences? :)
The per-ISO config file feature is going to need more documentation. Would it work to have a dedicated section for it in the README, or would breaking it out into a separate README.iso-cfg (?) file be preferable?
I think adding it to the existing debian/README
is perfectly fine, especially since it should really be visible as much as possible! (We should also consider adding a main README.md
or alike in the main directory so visiting https://github.com/grml/grml-rescueboot is more approachable :))
BTW, https://bugs.debian.org/750072 (#750072: grml-rescueboot: Genericize package
) is open since quite some time, maybe we can also use this as opportunity to look into it, just wanted to make sure you're also aware of it.
Your suggestions sound great, very much looking forward to it! :hugs:
Hope I managed to verbalize my basic idea and preferences? :)
So not all in one commit, but if you're flexible with how the commits are organized, I can try putting together a sequence that makes sense.
I think adding it to the existing
debian/README
is perfectly fine, especially since it should really be visible as much as possible!
Okay, I'll expand that paragraph into a section.
(We should also consider adding a main
README.md
or alike in the main directory so visiting https://github.com/grml/grml-rescueboot is more approachable :))
I can put something in for this as well. (It would basically just be a project description and a "see the full README here" kind of thing, as I imagine it.)
BTW, https://bugs.debian.org/750072 (
#750072: grml-rescueboot: Genericize package
) is open since quite some time, maybe we can also use this as opportunity to look into it, just wanted to make sure you're also aware of it.
Hmm, interesting. So nine years ago, loopback.cfg
was already considered a de facto standard. Unfortunate that Ryan's repo hasn't seen any activity since then.
Can I assume that you remain interested in a merge, and perhaps a rename of the project? Ryan continues to be active on here, so we can pull him in for his input once we know which way to go.
Your suggestions sound great, very much looking forward to it! hugs
Happy to get this work in where it can do the most good :-)
All right, I've reviewed @rfinnie's grub-loopback-iso tree. It's a modified grml-rescueboot rather than a rewrite; here are the salient differences:
-
Rename the
42_grml
script to42_loopback_iso
; -
Look for ISO files in
/boot/isos/
(but also look in/boot/grml/
for compatibility); -
Read config from
/etc/default/grub-loopback-isos
(but also read/etc/default/grml-rescueboot
for compatibility); -
Allow
ISO_LOCATION
to specify a list of directories, not just one; -
Minor tweaks to messages, variable names, and comments, all to the end of genericization.
The only thing I would do differently is use non-pluralized names /boot/iso/
and /etc/default/grub-loopback-iso
, as that is more the Unix style (e.g. we don't have a /usr/share/docs/
directory).
Does all that sound good for me to put into PRs?