How does one recover from having used Grub Customizer?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

How does one recover from having used Grub Customizer?

Postby jimallyn » Wed Nov 22, 2017 5:36 am

When I first installed MInt on this machine, I installed Grub Customizer and made a few changes. Since then, I have learned (from others here on the forums) that it's not a good idea to use Grub Customizer, that it puts all kinds of extraneous junk in the Grub configuration files. Now I would like to add PLOP to my Grub menu, and following the instructions on the PLOP website doesn't seem to work for me. I'm assuming that's because of using Grub Customizer in the past. So, how do I undo all that Grub Customizer did? Should I uninstall/purge Grub, then reinstall and run grub-update?
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
Pierre
Level 15
Level 15
Posts: 5924
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: How does one recover from having used Grub Customizer?

Postby Pierre » Wed Nov 22, 2017 5:39 am

that's probably the best way forward, - - remove the customizer & re-run Grub.

of of my PCs still has that thing installed, and I've yet to decide, to remove / keep it.
:mrgreen:
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
Faust
Level 4
Level 4
Posts: 213
Joined: Thu Jul 14, 2016 3:40 am

Re: How does one recover from having used Grub Customizer?

Postby Faust » Wed Nov 22, 2017 6:46 am

jimallyn wrote: So, how do I undo all that Grub Customizer did? Should I uninstall/purge Grub, then reinstall and run grub-update?


When I need to recover from boo-boos , I don't bother with purge ..... I just install Grub ( over-the-top , as it were ) then update
The config file gets written again ... works like Fairy Dust , but probably not " best practice " :)

Like BleachBit , GRUB customizer has a bit of a bad rep around here ( or a mixed one , to say the least )

On one aspect there is no disagreement , they are both easily capable of borking your system !
and they do not forgive mistakes .
I use both , and I like them ( and yes , I can achieve the same things from command line )
but I never recommend them to GNU/Linux newcomers .

As always back-ups are essential .
In addition to system backups ( which all users should be doing regularly anyway ) it's wise to backup the GRUB config file
before any attempt at editing it .

I think it's worth spending a while looking at that file , and the back-up copy .....
it doesn't take long to see exactly what has changed after using GRUB customizer .
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

User avatar
chrisuk
Level 4
Level 4
Posts: 499
Joined: Thu Jun 12, 2008 6:16 am

Re: How does one recover from having used Grub Customizer?

Postby chrisuk » Wed Nov 22, 2017 7:30 am

Grub Customizer backs up the original config files when it's installed... have a look in /etc/grub.d/backup/ - especially have a read of RESTORE-INSTRUCTIONS there
Chris

Manjaro MATE - Antergos MATE - MX Linux - LMDE MATE

Cosmo.
Level 22
Level 22
Posts: 15610
Joined: Sat Dec 06, 2014 7:34 am

Re: How does one recover from having used Grub Customizer?

Postby Cosmo. » Wed Nov 22, 2017 7:35 am

Interesting topic. For me not of practical meaning, but with academic interest.

What I would do is the following (besides removing Grub Customizer obviously):

1. Have a Super Grub 2 Disc ready, so that you can get back into your system if everything breaks.

2. Make backups of the following objects, so that you can easily restore at least to the current state:
/etc/grub.d
/etc/default/grub.d
/etc/default/grub

3. As far as I remember from experiments I did several years ago the critical changes that GC does are in the first mentioned folder. Also following my remembrance GC creates a copy of the original files in a subfolder on this place. Copy those backups back to their original places (overwriting their older instances as set b GC).

4. run sudo update-grub

Note: This should work from theory; I never did this myself. A common word says, that the devil lives in the details, so preparation against surprises is strongly recommended, at least step #1, #2 and at best also #5.

5. If I would be in the situation, I would do an additional step in preparation:
Create a virtual machine (same version of Mint) in VirtualBox. Install there GC. Do the above described step #3 and see what happens.
If you create in VB after each step (installation of Mint, installation of GC) a restore point you can revert every step at 100 %. This allows you to experiment without much work and - important - with the least risk for your physical install. You can further more compare the file /etc/default/grub in the several states and see, if you have to do manual changes inside after the reverting steps.

Additional tip: Install in your main system a tool like meld or diffuse, which allow to do file comparisons far more secure and comfortable. These tools may come handy also in other circumstances.

User avatar
Faust
Level 4
Level 4
Posts: 213
Joined: Thu Jul 14, 2016 3:40 am

Re: How does one recover from having used Grub Customizer?

Postby Faust » Wed Nov 22, 2017 8:07 am

Cosmo. wrote:..... Have a Super Grub 2 Disc ready, so that you can get back into your system if everything breaks.....

Oh yes .
It's been living in my work tool-case for a long time now ..... and I never leave home without it 8)

And many thanks for the pointer to Meld !
Great stuff .... I've been after a good one of those doo-dads for a while .
I'm most grateful - :D
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

User avatar
Pjotr
Level 19
Level 19
Posts: 9004
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Pjotr » Thu Nov 23, 2017 5:58 pm

Cosmo. wrote:Interesting topic. For me not of practical meaning, but with academic interest.

Good to see you back! :)

On topic: it would perhaps be useful to have a clear, easy and tested tutorial for removing Grub Customizer and re-creating the clean original situation. I have a rough, untested idea which might work:

1. Purge Grub Customizer (sudo apt-get purge);

2. Remove *all* folders and files to which GC has made changes (obviously, it would have to be researched carefully which files and folders those are);

3. Launch Synaptic Package Manager, search for Grub, and mark all installed packages for re-installation. Then perform the re-installation of those Grub packages.

But as said: untested, don't try this at home. It's just an expectation of an approach that might, hopefully, work.
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How does one recover from having used Grub Customizer?

Postby jimallyn » Thu Nov 23, 2017 9:10 pm

Pjotr wrote:I have a rough, untested idea which might work: ...

That's approximately what I did, except I couldn't do step 2, as I have no idea what files GC modifies. There are still remnants of GC's work in there, but I have no idea where. There must be some command you can run to tell you what files have been changed? I could do another install on a bit of the free space in my hard drive, make a list of all files, install and run GC and make a few changes, then run the list files program again to see what has been changed. Hmmm, I have a computer here with a dead hard drive in it. Maybe I'll look through the junk box for another hard drive and do some experiments on that computer.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
chrisuk
Level 4
Level 4
Posts: 499
Joined: Thu Jun 12, 2008 6:16 am

Re: How does one recover from having used Grub Customizer?

Postby chrisuk » Fri Nov 24, 2017 2:58 am

Maybe have a read here for a description from the developer, rather than guesses from others ;)

The info of interest to you:

The /etc/grub.d/proxifiedScripts and /etc/grub.d/bin folders, and any *_proxy files are only created if a Grub 2 script has to be modified. If only changes normally made to /etc/default/grub are invoked by Grub Customizer, the following won't be necessary.

To restore the normal Grub 2 control of the boot menu:

Remove the /etc/grub.d/bin folder
Move the contents of /etc/grub.d/proxifiedScritps back to the /etc/grub.d folder.
Any files moved back need to be renamed to the original name.
linux back to 10_linux, os-prober back to 30_os-prober, etc.
Remove the /etc/grub.d/proxifiedScipts folder once it is empty.
Check the settings in /etc/default/grub and make any desired changes (default kernel, timeout, etc).
Run "sudo update-grub".
Chris

Manjaro MATE - Antergos MATE - MX Linux - LMDE MATE

User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How does one recover from having used Grub Customizer?

Postby jimallyn » Fri Nov 24, 2017 4:27 am

I think my problem is somewhat complicated by the fact that I have used Grub Customizer more than once. So I can't restore to the original, I could only restore to the previous revision. (I think.) There must be some way to get back to a start-from-scratch grub, as if I had never used GC. I guess I will go read that FAQ again and think on it for a while.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
Pjotr
Level 19
Level 19
Posts: 9004
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Pjotr » Fri Nov 24, 2017 6:08 am

I just did a test, on my test machine (Linux Mint 18.3 Cinnamon) which hasn't been polluted by Grub Customizer:

1. First I backupped the existing Grub folders and files:

Code: Select all

sudo cp -v -R /etc/grub.d /etc/grub.d2

Code: Select all

sudo cp -v -R /etc/default/grub.d /etc/default/grub.d2

Code: Select all

sudo cp -v -R /etc/default/grub /etc/default/grub2


2. Then I deleted the Grub folders and files:

Code: Select all

sudo rm -v -R /etc/grub.d

Code: Select all

sudo rm -v -R /etc/default/grub.d

Code: Select all

sudo rm -v -R /etc/default/grub


3. Then I launched Synaptic, and let it search for "grub". In order to view the installed Grub packages on top, I clicked the "S" button. See the screenshot below (click on it to enlarge it):
Image

4. Then I marked each individual package for re-installation and applied that re-installation.

5. Then I checked in my file manager: all deleted Grub folders and files had been re-created automatically, and their contents seemed normal.

6. Then I rebooted. Reboot was completely normal.

It would seem, that my rough idea might work indeed on a system that has been tainted by Grub Customizer.
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How does one recover from having used Grub Customizer?

Postby jimallyn » Sat Nov 25, 2017 5:07 am

I did approximately what you suggested, Pjotr. But I still had some GC stuff in /boot/grub, and something else, I think. So, I looked around and decided what else I needed to do, did it and rebooted. Oops! It doesn't show the grub menu anymore, just boots straight to Mint using the 3.13 kernel. And when the desktop comes up, it looks like 640X480 resolution, and after a short period of time it freezes and I have to go to a virtual terminal to shutdown. I did take some notes, so I might be able to undo what I did. But while I was thinking about that, I decided to boot to the SuperGrub2 disc, and I was able to boot Mint up with the 4.4 kernel from there. And that's what I'm using at this moment. I'll probably just use it like this for a few days and decide what to do next. I have been thinking about moving from 17.3 Cinnamon to 18.2 XFCE anyway, so maybe now would be a good time to do that.

I was trying to figure out how to add PLOP to the grub menu for my brother, whose computer won't boot from USB. So I figured I'd work it out on my computer, then tell him how to do it. Another case of "no good deed goes unpunished!" It's a pretty safe bet that I won't be using Grub Customizer again any time soon.

I did some reading on what GC does and how it does it, and it seems to me they made it overly complicated, what with the proxy files and such.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
Moem
Level 11
Level 11
Posts: 3991
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Moem » Sat Nov 25, 2017 5:15 am

polluted

tainted

And then some people say that computer hobbyists are all rational, not emotional... :wink:
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How does one recover from having used Grub Customizer?

Postby jimallyn » Sat Nov 25, 2017 5:34 am

Moem wrote:And then some people say that computer hobbyists are all rational, not emotional... :wink:

Clearly you don't fully understand the situation here. Considering the troubles I am having, and what I have read about how Grub Customizer works, I think that words like "polluted" and "tainted" are quite appropriate.
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
Pjotr
Level 19
Level 19
Posts: 9004
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Pjotr » Sat Nov 25, 2017 5:54 am

Moem wrote:
polluted

tainted

And then some people say that computer hobbyists are all rational, not emotional... :wink:

As jimallyn says. Furthermore, I fail to see what this off-topic comment contributes to solving the problem of the OP.

Back on topic: I've tried to test my idea on my test rig (Linux Mint 18.3 Cinnamon), and it was a complete trainwreck. After installing Grub Customizer and applying some changes with it, my system became totally unbootable. :shock:

So I wasn't even able to start testing my idea. I was only able to make my system bootable again, by booting from the DVD, manually removing all the GC files I could find and re-installing Grub to the MBR.

Needless to say, this experience hasn't exactly changed my already low estimate of GC for the better.
Last edited by Pjotr on Sat Nov 25, 2017 6:35 am, edited 2 times in total.
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
Moem
Level 11
Level 11
Posts: 3991
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Moem » Sat Nov 25, 2017 5:58 am

jimallyn wrote: I think that words like "polluted" and "tainted" are quite appropriate.

I'm not saying they're inaccurate. I'm just saying that they strike me as being pretty emotional in nature.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
Pjotr
Level 19
Level 19
Posts: 9004
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: How does one recover from having used Grub Customizer?

Postby Pjotr » Sat Nov 25, 2017 6:03 am

Moem wrote:I'm not saying they're inaccurate. I'm just saying that they strike me as being pretty emotional in nature.

Back on topic please? We're trying to solve a technical problem here.
Tip: 10 things to do after installing Linux Mint 18.3 Sylvia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
Faust
Level 4
Level 4
Posts: 213
Joined: Thu Jul 14, 2016 3:40 am

Re: How does one recover from having used Grub Customizer?

Postby Faust » Sat Nov 25, 2017 9:21 am

@pjotr I was writing this when you replied the other day , but I'll post it now anyway -

pjotr wrote:Remove *all* folders and files to which GC has made changes

*all* ..... Yes , that's the big unknown as I see it .

@chrisuk - that list looks pretty comprehensive .... are you satisfied that no other files are involved ?

It appears to me that we need some reliable baselines here , to make any sort of progress on this .
So , on a system that has never been "tainted " by Grub Customizer , what files are created by Grub alone ?
and what do those files contain ?

This would be an interesting little project :-

Create a fresh install of the chosen Mint OS version ( in a VM or on a USB )
Install Grub Customizer and note which files are " touched " or created ( search by date/time created , or modified )
Run Grub Customizer and dick around with some settings ; save and exit .
Then run that same file search again .
It should be easy to pick up all of the changes using one of the various file comparison tools ( or not ? )

If you can see a flaw in this plan , then please say so
.... it's possible that different Mint versions handle this issue in different ways , but I seriously doubt it .

I'll try to get this done over the weekend , but don't anybody hold their breath :)
The weather decides everything !
:P
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

User avatar
Minterator
Level 5
Level 5
Posts: 564
Joined: Thu Jan 10, 2013 8:29 am

Re: How does one recover from having used Grub Customizer?

Postby Minterator » Sat Nov 25, 2017 11:35 am

jimallyn wrote:I did approximately what you suggested, Pjotr. But I still had some GC stuff in /boot/grub, and something else, I think. So, I looked around and decided what else I needed to do, did it and rebooted. Oops! It doesn't show the grub menu anymore, just boots straight to Mint using the 3.13 kernel. And when the desktop comes up, it looks like 640X480 resolution, and after a short period of time it freezes and I have to go to a virtual terminal to shutdown. I did take some notes, so I might be able to undo what I did. But while I was thinking about that, I decided to boot to the SuperGrub2 disc, and I was able to boot Mint up with the 4.4 kernel from there. And that's what I'm using at this moment. I'll probably just use it like this for a few days and decide what to do next. I have been thinking about moving from 17.3 Cinnamon to 18.2 XFCE anyway, so maybe now would be a good time to do that.

I was trying to figure out how to add PLOP to the grub menu for my brother, whose computer won't boot from USB. So I figured I'd work it out on my computer, then tell him how to do it. Another case of "no good deed goes unpunished!" It's a pretty safe bet that I won't be using Grub Customizer again any time soon.

I did some reading on what GC does and how it does it, and it seems to me they made it overly complicated, what with the proxy files and such.



I've used grub-customizer countless times without any problem, what makes you think it is causing a problem? Did you use the "Edit" feature? If you have more than one bootable partition you should use the "Change Environment" command.
Mint 17.3 MATE, kernel 4.11.12

User avatar
jimallyn
Level 16
Level 16
Posts: 6945
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How does one recover from having used Grub Customizer?

Postby jimallyn » Sat Nov 25, 2017 5:51 pm

Minterator wrote:what makes you think it is causing a problem?

Go back and read the rest of this thread. When you are done with that, then search the forums for 'grub customizer.'
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan


Return to “Installation & Boot”