You are not logged in.
Pages: 1
Hello, last week I had to repair a broken ubuntu os, and while I ++really++ dislike ubuntu, there was something I found interesting: the recovery menu. It's a menu you have in recovery mode to allow you to perform some maintenance if needed.
Of course, you can do everything that is proposed in the menu directly in command prompt, but it's more user friendly.
Based on this idea, I decided to write something similar for our Q4os installations ^^
I ended up with two main scripts: one that can be run at emergency target and another at rescue target:
"Emergency target" is, let's say, a minimal root shell mode, whithout base services. This mode allows you to perform operations like fsck the root partition for example; and other let's say "low level" operations because very few processes are launched at this stage (that's why it's the 'emergency' target, it have more chances to work even if the system is partially damaged).
If the emergency mode don't boot properly, then you will have no choice but to use an external device to boot an os live in order to do repairs...
"Rescue target" is a more "advanced" runlevel, with base services, which allow internet connection and usb storage mounting for example.So it can be usefull to backup some things on an external storage in case of problem, you can even install packages with apt or access the web with the w3m terminal browser. Of course this mode is more "sensible" to damages, so there may be cases where only the emergency mode will work.
I attached screenshots of the menus so you can have an idea of what it looks like. There are way more entries & tools than in the ubuntu one by the way ^^
The aim of all this is to be able to repair things more easily if, for example, the desktop cannot start or you can't log with your account; so you can track the errors and correct them, or manage users from the root account.
To install these grub entries & related scripts, simply download the attached script, set it executable :
sudo chmod +x setup_recov.sh
and launch it in root:
sudo ./setup_recov.sh
The script will take care of installing the recovery menus, and allow you to add 'Clonezilla live' entry too (and will download the iso if needed). It will try to install some packages (w3m, inxi, ncdu, mc etc...) which are needed for all the menu functions to be available (and are very usefull at my opinion, not only for these recovery menus). You can optionnaly setup a password too for the menus as it will give you full root access without asking for password by default, which can be ok if you're the single user of a computer, but not at all if it's a shared computer. (this can be done in grub config too, but it's a bit tricky/risky, that's why I added this feature).
Don't hesitate to tell me if it's usefull for you // tell me if you have ideas to improve it
Last edited by seb3773 (2024-06-20 16:49)
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
Wow, that looks really cool. Do the scripts work on both UEFI and legacy Bios systems the same way ?
Offline
Yes, it should (tested it on x64 EFI installs; and it works too in VirtualBox which sould be legacy bios based, as I haven't ticked the "EFI" option).
It should not depends on EFI or legacy by the way, because it only use the appropriates systemd targets, with just a little 'hack' to launch the menu instead of a simple root shell when the corresponding recovery menu entry is selected.
The main use of these recovery menus is to help to repair things if, for example, the desktop cannot start or you can't log with your account (or other specific cases)... I think I will add a submenu entry to easily manage users too
Last edited by seb3773 (2024-06-11 18:14)
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
I added some more informations in the first post
Please note too that if you test it in virtualbox, there are great chances you won't be able to access internet in rescue mode, because of the way virtualbox is "providing" network access to the guest OS I think... Need to do more tests. But it works in a "real" system, you can access internet, even configure a new connection profile with nmtui.
Last edited by seb3773 (2024-06-11 18:51)
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
Please note too that if you test it in virtualbox, there are great chances you won't be able to access internet in rescue mode, because of the way virtualbox is "providing" network access to the guest OS I think... Need to do more tests. But it works in a "real" system, you can access internet, even configure a new connection profile with nmtui.
Silly me, it was because I didn't started dbus service before launching NetworkManager, it should be ok now. Users management added to the options too
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
Pretty cool! Thank you!
Calm down, it's only ones and zeroes
Offline
Agreed. Haven't tested yet but love the idea. Thanks
Offline
Pretty cool! Thank you!
Agreed. Haven't tested yet but love the idea. Thanks
Thank you ! Scripts updated:
- now there's a script to manage services too, and I improved a bit the user management script.
- added an option to send inxi report & linys audit to pastebin (if internet is connected) in rescue mode, and it displays the url & a qrcode (for easy grabbing of the url ^^)
Don't hesitate to tell me if you think about something else that can be usefull in these recovery scripts !
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
Script updated: -ram tester script with comprehensive display of physical adresses ranges.
My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ... for trinity users --> https://github.com/seb3773/q4osXpack
Offline
Pages: 1