Difference between revisions of "Make GRUB menu & boot-up/down fonts bigger"

Marked this version for translation
(Updated style)
(Marked this version for translation)
Line 1: Line 1:
<languages/>
<languages/>
__TOC__
__TOC__
{{BoxWarning|<translate>Warning</translate>|<translate>
{{BoxWarning|<translate><!--T:1--> Warning</translate>|<translate>
<!--T:2-->
This page is outdated. If you have checked or updated this page and found the content to be suitable, please remove this notice. 2020-12-06</translate>}}
This page is outdated. If you have checked or updated this page and found the content to be suitable, please remove this notice. 2020-12-06</translate>}}
{{BoxInfo|1=<translate>Note</translate>|
{{BoxInfo|1=<translate><!--T:3--> Note</translate>|
2=<translate>
2=<translate>
<!--T:4-->
12-Feb-17 : We used to have to, but now we no longer need to, add consolefonts to the end of the HOOKS= line in our mkinitcpio.conf file.
12-Feb-17 : We used to have to, but now we no longer need to, add consolefonts to the end of the HOOKS= line in our mkinitcpio.conf file.


<!--T:5-->
As the collection of all the X.Org Server protocol headers formerly
As the collection of all the X.Org Server protocol headers formerly
distributed as separate, standalone packages have been rolled up into
distributed as separate, standalone packages have been rolled up into
Line 13: Line 16:
consolefonts from the end of the HOOKS= line.
consolefonts from the end of the HOOKS= line.


<!--T:6-->
If you don't make this suggested edit, it won't cause you any problems,
If you don't make this suggested edit, it won't cause you any problems,
besides seeing an error message saying (roughly) that consolefonts can't
besides seeing an error message saying (roughly) that consolefonts can't
Line 19: Line 23:


{{SectionTemplate|
{{SectionTemplate|
1=<translate>Introduction</translate>|
1=<translate><!--T:7--> Introduction</translate>|
2=<translate>If you use a high DPI resolution '''&''' you want to more easily read your display during the boot process (both up & down), '''&''' you '''don't''' have an extremely fast booting system (use SSD & the like), then this page will show you how to make both the GRUB menu fonts larger & how to change the console font used in the display of the boot up/down processes. This is all primarily for those users that place some value in being able to see/read the boot up/down displays, when they are live. The how-to endeavors to cater to both SystemD & OpenRC users.</translate>
2=<translate><!--T:8--> If you use a high DPI resolution '''&''' you want to more easily read your display during the boot process (both up & down), '''&''' you '''don't''' have an extremely fast booting system (use SSD & the like), then this page will show you how to make both the GRUB menu fonts larger & how to change the console font used in the display of the boot up/down processes. This is all primarily for those users that place some value in being able to see/read the boot up/down displays, when they are live. The how-to endeavors to cater to both SystemD & OpenRC users.</translate>
}}
}}


{{SectionTemplate|
{{SectionTemplate|
1=<translate>What are we going to do here</translate>|
1=<translate><!--T:9--> What are we going to do here</translate>|
2=<translate>This how-to is really a two in one, as the first part is about enlarging the font used by the GRUB menu & the early phase of the boot process up until the GPU driver loads.
2=<translate><!--T:10-->
This how-to is really a two in one, as the first part is about enlarging the font used by the GRUB menu & the early phase of the boot process up until the GPU driver loads.


<!--T:11-->
The second part is about first identifying the GPU module to load, & then using the Kernel Mode Setting (KMS) ability of the Linux kernel to instruct it to load modules extremely early in the boot process. Which is what we will do with the GPU module via the /etc/mkinitcpio.conf file. Then finishing off that process by rebuilding the initial ramdisk image.
The second part is about first identifying the GPU module to load, & then using the Kernel Mode Setting (KMS) ability of the Linux kernel to instruct it to load modules extremely early in the boot process. Which is what we will do with the GPU module via the /etc/mkinitcpio.conf file. Then finishing off that process by rebuilding the initial ramdisk image.


<!--T:12-->
After that we need to find where the consolefonts directory is & if need be clone the /usr/share/kbd/consolefonts directory to /usr/share/consolefonts. After that we need to choose a font, though I'll endeavor to make that as quick & painless as possible. Then we need to tell the /etc/conf.d/consolefont file what that font is, save & reboot to a new situation where we are able to actually read the text as it goes by. That's the plan.</translate>
After that we need to find where the consolefonts directory is & if need be clone the /usr/share/kbd/consolefonts directory to /usr/share/consolefonts. After that we need to choose a font, though I'll endeavor to make that as quick & painless as possible. Then we need to tell the /etc/conf.d/consolefont file what that font is, save & reboot to a new situation where we are able to actually read the text as it goes by. That's the plan.</translate>
}}
}}


{{SectionTemplate|
{{SectionTemplate|
1=<translate>Give GRUB & the boot process up to the GPU module load a larger font</translate>|
1=<translate><!--T:13--> Give GRUB & the boot process up to the GPU module load a larger font</translate>|
2=<translate>
2=<translate>
<!--T:14-->
This one requires you to choose a font that you like (mono fonts are easiest to read), I chose DejaVuSansMono20 & here is the command line that creates this font in a GRUB compatible format, in the size that you have chosen & places it in the newly created /boot/grub/fonts directory (its a long command & it is ALL on one line):
This one requires you to choose a font that you like (mono fonts are easiest to read), I chose DejaVuSansMono20 & here is the command line that creates this font in a GRUB compatible format, in the size that you have chosen & places it in the newly created /boot/grub/fonts directory (its a long command & it is ALL on one line):


  sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono20.pf2 \ --size=20 /usr/share/fonts/TTF/dejavu/DejaVuSansMono.ttf
  <!--T:15-->
sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono20.pf2 \ --size=20 /usr/share/fonts/TTF/dejavu/DejaVuSansMono.ttf


<!--T:16-->
Then we need to open the /etc/default/grub file in our text editor as root (use sudo) & add the following line (or lines if your like me & have a bad memory):
Then we need to open the /etc/default/grub file in our text editor as root (use sudo) & add the following line (or lines if your like me & have a bad memory):


  ##==========================_HANDY_==========================================
  <!--T:17-->
##==========================_HANDY_==========================================
  # More readable font on high dpi screen, generated with the following
  # More readable font on high dpi screen, generated with the following
  # 2 lines on ONE line, terminal command (ignore the error messages it works!:
  # 2 lines on ONE line, terminal command (ignore the error messages it works!:
Line 50: Line 61:
  GRUB_FONT=/boot/grub/fonts/DejaVuSansMono18.pf2
  GRUB_FONT=/boot/grub/fonts/DejaVuSansMono18.pf2


<!--T:18-->
Save the edited file & then enter the following at the Terminal prompt:
Save the edited file & then enter the following at the Terminal prompt:


  sudo update-grub
  <!--T:19-->
sudo update-grub




<!--T:20-->
Having done that, if you reboot the GRUB menu will be bigger & so will a shortish portion of the boot process, up until the GPU driver kernel module is loaded, where you'll go back to the default console font.
Having done that, if you reboot the GRUB menu will be bigger & so will a shortish portion of the boot process, up until the GPU driver kernel module is loaded, where you'll go back to the default console font.
</translate>
</translate>
Line 60: Line 74:


{{SectionTemplate|
{{SectionTemplate|
1=<translate>Use KMS to load the GPU kernel module early in the boot process</translate>|
1=<translate><!--T:21--> Use KMS to load the GPU kernel module early in the boot process</translate>|
2=<translate>
2=<translate>
<!--T:22-->
Use sudo & load /etc/mkinitcpio.conf into your text editor & find the '''MODULES=""''' line very near the top of file. Here you will have to put your GPU module name, the three choices that I can show you here are:
Use sudo & load /etc/mkinitcpio.conf into your text editor & find the '''MODULES=""''' line very near the top of file. Here you will have to put your GPU module name, the three choices that I can show you here are:


<!--T:23-->
'''Intel on-board''' (at least all of the intel CPU's that carry a GPU/CPU):
'''Intel on-board''' (at least all of the intel CPU's that carry a GPU/CPU):


  MODULES="i915"
  <!--T:24-->
MODULES="i915"


<!--T:25-->
'''AMD/ATi''':
'''AMD/ATi''':


  MODULES="radeon/amdgpu"
  <!--T:26-->
MODULES="radeon/amdgpu"


<!--T:27-->
'''nVidia''':
'''nVidia''':


  MODULES="nouveau"
  <!--T:28-->
MODULES="nouveau"


<!--T:29-->
If your MODULES= line has any other modules on it already, just add your new one with a space separating it from the previous one.
If your MODULES= line has any other modules on it already, just add your new one with a space separating it from the previous one.


<!--T:30-->
You can save & close the file.
You can save & close the file.


<!--T:31-->
For our next trick, we have to identify which kernel branch you are using. Most people will be using an older; more recent; or the most recent, version of the "normally" supported kernel. Such shows itself in the /boot directory like so:
For our next trick, we have to identify which kernel branch you are using. Most people will be using an older; more recent; or the most recent, version of the "normally" supported kernel. Such shows itself in the /boot directory like so:


  initramfs-linux-fallback.img
  <!--T:32-->
initramfs-linux-fallback.img
  initramfs-linux.img
  initramfs-linux.img
  vmlinuz-linux
  vmlinuz-linux


<!--T:33-->
& would therefore use the following command to rebuild their Init Ramdisk Image:
& would therefore use the following command to rebuild their Init Ramdisk Image:


  sudo mkinitcpio -p linux
  <!--T:34-->
sudo mkinitcpio -p linux


<!--T:35-->
For those that are using the/a Linux Long Term Support kernel then their identifying /boot files will look like this:
For those that are using the/a Linux Long Term Support kernel then their identifying /boot files will look like this:


  initramfs-linux-lts-fallback.img
  <!--T:36-->
initramfs-linux-lts-fallback.img
  initramfs-linux-lts.img
  initramfs-linux-lts.img
  vmlinuz-linux-lts
  vmlinuz-linux-lts


<!--T:37-->
& would therefore use the following command to rebuild their linux-lts Init Ramdisk Image:
& would therefore use the following command to rebuild their linux-lts Init Ramdisk Image:


  sudo mkinitcpio -p linux-lts
  <!--T:38-->
sudo mkinitcpio -p linux-lts


<!--T:39-->
For those using more exotic kernels, you already know how to modify the above command to suit.
For those using more exotic kernels, you already know how to modify the above command to suit.


<!--T:40-->
For Manjaro users that are using multiple kernels, you are going to need to edit multiple mkinitcpio.conf files that are named to suit each of your kernels. I don't have to bother with that on Artix (Arch/OpenRC), for better & worse. Again, your /boot directory will tell you what to do (as shown in the differences in the examples above).
For Manjaro users that are using multiple kernels, you are going to need to edit multiple mkinitcpio.conf files that are named to suit each of your kernels. I don't have to bother with that on Artix (Arch/OpenRC), for better & worse. Again, your /boot directory will tell you what to do (as shown in the differences in the examples above).
</translate>
</translate>
Line 107: Line 140:


{{SectionTemplate|
{{SectionTemplate|
1=<translate>Use the /usr/share/consolefonts directory to enlarge your boot up/down font</translate>|
1=<translate><!--T:41--> Use the /usr/share/consolefonts directory to enlarge your boot up/down font</translate>|
2=
2=
{{note|<translate>I look forward to cleaning up this section.</translate>}}
{{note|<translate><!--T:42--> I look forward to cleaning up this section.</translate>}}
<translate>On Artix, I had to copy the /usr/share/kbd/consolefonts/ directory into /usr/share/consolefonts . Whether I could have used the /usr/share/kbd/consolefonts directory in place or not I don't know (I didn't try). The /etc/conf.d/consolefont file uses the /usr/share/consolefonts path, so I made one.
<translate><!--T:43-->
On Artix, I had to copy the /usr/share/kbd/consolefonts/ directory into /usr/share/consolefonts . Whether I could have used the /usr/share/kbd/consolefonts directory in place or not I don't know (I didn't try). The /etc/conf.d/consolefont file uses the /usr/share/consolefonts path, so I made one.


<!--T:44-->
So the first thing that you have to do (before I find out from someone in the Manjaro forum where the consolefonts directory exists) is see whether you have to clone the directory from /usr/share/kbd/ to /usr/share/ or not. After that is sorted, then you need to choose a font. You won't like doing that. Here is a link to an old page (far fewer suitable fonts & its still too many): [https://alexandre.deverteuil.net/pages/consolefonts/]
So the first thing that you have to do (before I find out from someone in the Manjaro forum where the consolefonts directory exists) is see whether you have to clone the directory from /usr/share/kbd/ to /usr/share/ or not. After that is sorted, then you need to choose a font. You won't like doing that. Here is a link to an old page (far fewer suitable fonts & its still too many): [https://alexandre.deverteuil.net/pages/consolefonts/]


<!--T:45-->
Take my advice & use '''ter-132b''' this is a font that is large enough for my 15" 1440p display. I expect that it would be great on a 24" 1080p display. If it is too big, you can use a smaller number as will be easily seen in your consolefonts directory.
Take my advice & use '''ter-132b''' this is a font that is large enough for my 15" 1440p display. I expect that it would be great on a 24" 1080p display. If it is too big, you can use a smaller number as will be easily seen in your consolefonts directory.


<!--T:46-->
To tell the kernel to use the chosen custom console font you will need to open the /etc/conf.d/consolefont file & comment out (use the '''#''' at the start of the line) any line that says:
To tell the kernel to use the chosen custom console font you will need to open the /etc/conf.d/consolefont file & comment out (use the '''#''' at the start of the line) any line that says:


  consolefont=
  <!--T:47-->
consolefont=


<!--T:48-->
Then add your own line. This is what I did:
Then add your own line. This is what I did:


  consolefont="ter-132b"
  <!--T:49-->
consolefont="ter-132b"


<!--T:50-->
You need to make no other edits to this file, so close it.
You need to make no other edits to this file, so close it.


<!--T:51-->
Now from what I can make out on the ArchWiki font page: [https://wiki.archlinux.org/index.php/Fonts#Console_fonts] The above how-to should work on SystemD, as is. I will check on the Manjaro forum & if & where needed modify this page (there shouldn't be much in it as both systemd & openrc use the same kernel).
Now from what I can make out on the ArchWiki font page: [https://wiki.archlinux.org/index.php/Fonts#Console_fonts] The above how-to should work on SystemD, as is. I will check on the Manjaro forum & if & where needed modify this page (there shouldn't be much in it as both systemd & openrc use the same kernel).


<!--T:52-->
For Artix (Arch/OpenRC) users, you would need to just once use the following command:
For Artix (Arch/OpenRC) users, you would need to just once use the following command:


  sudo rc-update add consolefont boot
  <!--T:53-->
sudo rc-update add consolefont boot


<!--T:54-->
Hopefully I haven't forgotten anything, as this is has been a multi-step process & I lost power & a good deal of the wiki page some time ago & had to do it twice! ;)
Hopefully I haven't forgotten anything, as this is has been a multi-step process & I lost power & a good deal of the wiki page some time ago & had to do it twice! ;)


  This page is still a work in progress & will be polished up as soon
  <!--T:55-->
This page is still a work in progress & will be polished up as soon
  as I'm given the info' that I need via the Manjaro forum. ;)</translate>
  as I'm given the info' that I need via the Manjaro forum. ;)</translate>
}}
}}