P
P
Pavel Ryabov2018-11-07 00:50:36
linux
Pavel Ryabov, 2018-11-07 00:50:36

Changing the default item in the Linux installer?

Do not ask: "Why, fool?" too long to explain. When the machine starts up from a flash drive with a distro (in my case, parrot security os on Debian), a menu pops up with a choice of actions (boot into a live cd, such an installation, such an installation, etc.) and a timer (at the end of the time, a certain item if no key was pressed). I need this timer to be not on a live cd, as in almost all distros, but on a different point. Do not write about Klava, which I can use, I just need the timer to be in a different place. If this is at all possible to implement, then please let me know. Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-11-07
@jcmvbkbc

I need this timer to be not on a live cd, as in almost all distros, but on a different point.
If this is at all possible, please let me know.

Maybe. The bootloader configuration is located on the liveCD in the file /isolinux/live.cfg, you can see it like this:
$ mkdir cd
$ sudo mount -o loop Parrot-security-4.3_amd64.iso cd
mount: /dev/loop0 is write-protected, mounting read-only
$ head -n3 cd/isolinux/live.cfg
label ^live
        menu label ^Live Mode
        menu default

This menu default needs to be moved to another location.
How to do it? The easiest way is to edit iso with a hex editor. In a freshly downloaded 64-bit parrot security os iso, this line is located at 0x546e024, it is searched for with a simple grep:
$ hexdump -Cv Parrot-security-4.3_amd64.iso | grep -A3 'label ^live'
0546e000  6c 61 62 65 6c 20 5e 6c  69 76 65 0a 09 6d 65 6e  |label ^live..men|
0546e010  75 20 6c 61 62 65 6c 20  5e 4c 69 76 65 20 4d 6f  |u label ^Live Mo|
0546e020  64 65 0a 09 6d 65 6e 75  20 64 65 66 61 75 6c 74  |de..menu default|
0546e030  0a 09 6c 69 6e 75 78 20  2f 6c 69 76 65 2f 76 6d  |..linux /live/vm|

For example, I made the second item the default item:
0546e000  6c 61 62 65 6c 20 5e 6c  69 76 65 0a 09 6d 65 6e  |label ^live..men|
0546e010  75 20 6c 61 62 65 6c 20  5e 4c 69 76 65 20 4d 6f  |u label ^Live Mo|
0546e020  64 65 0a 09 6c 69 6e 75  78 20 2f 6c 69 76 65 2f  |de..linux /live/|
0546e030  76 6d 6c 69 6e 75 7a 0a  0a 69 6e 69 74 72 64 20  |vmlinuz..initrd |
0546e040  2f 6c 69 76 65 2f 69 6e  69 74 72 64 2e 69 6d 67  |/live/initrd.img|
0546e050  0a 0a 61 70 70 65 6e 64  20 62 6f 6f 74 3d 6c 69  |..append boot=li|
0546e060  76 65 20 68 6f 73 74 6e  61 6d 65 3d 70 61 72 72  |ve hostname=parr|
0546e070  6f 74 20 6c 6f 63 61 6c  65 73 3d 65 6e 5f 55 53  |ot locales=en_US|
0546e080  2e 55 54 46 2d 38 20 6b  65 79 62 6f 61 72 64 2d  |.UTF-8 keyboard-|
0546e090  6c 61 79 6f 75 74 73 3d  75 73 20 71 75 69 65 74  |layouts=us quiet|
0546e0a0  20 73 70 6c 61 73 68 20  61 70 70 61 72 6d 6f 72  | splash apparmor|
0546e0b0  3d 30 0a 09 0a 6c 61 62  65 6c 20 74 65 78 74 0a  |=0...label text.|
0546e0c0  0a 6d 65 6e 75 20 6c 61  62 65 6c 20 54 65 72 6d  |.menu label Term|
0546e0d0  69 6e 61 6c 20 6d 6f 64  65 0a 0a 6d 65 6e 75 20  |inal mode..menu |
0546e0e0  64 65 66 61 75 6c 74 0a  09 6c 69 6e 75 78 20 2f  |default..linux /|

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question