📜 ⬆️ ⬇️

The joke about how I turned GRUB2.0 into BURG or you can drive moonshine even from a stool

This is really a joke. I spread for the sake of laughter. :)
... I sincerely ask you to laugh at me if it helps you ... (God rest his soul to Pot, although the devil knows which one he would choose)

Introduction some, or something

Some time ago, I looked at BURG for a long time. In the boot menu, I had an Orthodox “console” GRUB 1.99 with a pcx (if not lying) plane in the background. But as soon as I saw the smooth, multi-pixel graphic menu of BURG, I immediately wanted it. That's all over: for that particular Linux distribution, which I used then, there was no build, and the attempt to compile from the sources dropped several times due to more and more unresolved dependencies. I felt sad and lazy.

But GRUB 2.0 came out very soon. Joy was full of pants, because there, too, there was already a beautiful menu of “pictures”, without any attachments in the form of BURG. Like a mountain goat, I jumped around to put on a new thing and “embroider it in front of the mirror”, betraying the ideas of brutal console machos watching movies from it, from my own (yes, sir, it was a matter of ...). But then suddenly a chagrin awaited me. For some reason, from the very beginning, I took a liking to the horizontal menus! Here is how on those pictures from the Internet, where in a row there were some ubunt, makos and wind. A new brilliant hornbeam offered only vertical, albeit in all colors and shades.

There was some sort of session there, there was not much time. Then I began to try to make crutches. He did this way and that, trying to do only with perversion with the settings. But it was not there, and at some point I still downloaded the grub2.0 sources. I didn’t have a frank desire to rush in and out of place like that from a place of a newly released hornbeam, the source code of which for me at that time was a forest of average density.
')
The process itself

What can make a giant of student thought in conditions of limited time and naked laziness? I modified one symbol in the grub2.0 source, which led to the desired result.

1. Initially, a giant of student thought built several pictures of this kind:
Hidden text
image
image
image
image


2. Trying to arrange them in a vertical menu, unaccompanied by text. But the menu had a limitation: at least three icons are shown simultaneously, the rest can be “scrolled”.

3. Then he went to /home/Downloads/grub-2.00/grub-core/gfxmenu and opened the file gui_list.c there . In this file was the function list_get_minimal_size , in which the ninth line contained the variable int num_items = 3;
Well...
In which the number 3 has been replaced by 1.


4. Profit!

image

PS There will be time - I still want to climb in more detail ... :)

Source: https://habr.com/ru/post/220475/


All Articles