Changes made to Grub-Quiet

If you have anything on level 3, deal with it after you finish booting.

Well on linux 418 it is the acpi errors that have been on 414 for a year. As far as I know no one has a solution to stop these?

Just tried "grub-quiet-test" and can confirm it works with loglevel=3

1 Like

I've created a test-iso, which can be used to check if your system supports grub-quiet 2.03.0-13.

1 Like

OK, we have to be precise here. I got reports about a black screen of Grub with beta7. Then I tried to figure out if the fedora-grub might work for us. It seems with beta8 we have different issues than with beta7.

What I know from beta7 (grub-quiet 2.02.0-12):

  • on some cases you have a black screen, but you can blindly navigate
  • when set to legacy BIOS mode the menu shows
  • when set to first boot device from USB it seems to work
  • was booting from DVD tested yet?

Then we have beta8 with grub-quiet-fedora 2.03.60.f29-2:

  • it seems to boot fine in live-session mode
  • it can be installed in VB via UEFI mode
  • it seems to have issues with BIOS mode in VB

I'm currently reviewing all patches applied to normal grub-quiet and may try to come up with a new patch-set. I assume normal grub seems to work at all times.

I re-enabled/installed grub-quiet 2.03.0-16 on my M-A KDE system, and it works perfectly, but I do get the grub-menu shown. I followed the exact install method as stated at the top. Did something change?

~ >>> inxi -Fxz                                                                                                                                                                                                                   
System:    Host: lwlaptop Kernel: 4.19.0-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 
           Desktop: KDE Plasma 5.13.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Acer product: Aspire E5-771 v: N/A serial: <filter> 
           Mobo: Acer model: EA70_HB v: Type2 - A01 Board Version serial: <filter> UEFI: Insyde v: 1.05 
           date: 05/13/2014 
Battery:   ID-1: BAT1 charge: 32.3 Wh condition: 32.3/48.9 Wh (66%) model: AC14B8K status: Full 
CPU:       Topology: Dual Core model: Intel Core i3-4030U bits: 64 type: MT MCP arch: Haswell rev: 1 
           L2 cache: 3072 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 15205 
           Speed: 800 MHz min/max: 800/1900 MHz Core speeds (MHz): 1: 800 2: 801 3: 799 4: 800 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.org 1.20.1 driver: modesetting resolution: <xdpyinfo missing> 
           Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:     Device-1: Intel Haswell-ULT HD Audio driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           Device-2: Intel 8 Series HD Audio driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k4.19.0-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8168 v: 8.045.08-NAPI 
           port: 3000 bus ID: 04:00.0 
           IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter driver: ath9k v: kernel 
           port: 3000 bus ID: 05:00.0 
           IF: wlp5s0 state: down mac: <filter> 
Drives:    Local Storage: total: 465.76 GiB used: 49.59 GiB (10.6%) 
           ID-1: /dev/sda vendor: Seagate model: ST500LT012-1DG142 size: 465.76 GiB 
Partition: ID-1: / size: 44.04 GiB used: 10.18 GiB (23.1%) fs: ext4 dev: /dev/sda3 
           ID-2: /home size: 48.96 GiB used: 8.17 GiB (16.7%) fs: ext4 dev: /dev/sda4 
           ID-3: swap-1 size: 4.50 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 39.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 162 Uptime: 17m Memory: 3.78 GiB used: 1.26 GiB (33.3%) Init: systemd Compilers: 
           gcc: 8.2.1 Shell: zsh v: 5.6.2 inxi: 3.0.26

The latest update of grub-quiet has both HIDE_MENU (I don't remember the exact names of these options) in /etc/default/grub commented out. Maybe that's the reason?

2 Likes

Yes, I missed that. Enabled them and all is good again :slight_smile:

I'm really happy it finally worked out.

Instead of removing fsck from mkinitcpio.conf and rebuilding suggest to use following kernel boot parameter

fsck.mode=skip

If filesystem check is required use fsck.mode=force

I wonder why is fsck default on grub/system boot.
Is it proper/wise to disable it for aesthetics reasons?

1 Like

It is not disabled, it is substituted with systemd fsck services: https://wiki.archlinux.org/index.php/silent_boot#fsck
I did it manually when silent boot was just being tested, but I guess these corrections might be a part of recent updates, what do you think @philm?

1 Like

But that systemd method needs for root partition to initially be mounted as read-only if I'm not mistaken. And I'm not positive that default Manjaro mount options do that. I think it is mounted as rw from the beginning, but I'm only guessing.

Clarification on this part would be nice.

Yeah AFAIR grub mounts root read-write by default.
To add more info here is what I regularly see when checking logs:

$ journalctl -b |grep fsck
Oct 13 16:29:49 vladimir-xmnbp systemd[1]: Created slice system-systemd\x2dfsck.slice.
Oct 13 16:29:50 vladimir-xmnbp audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294
967295 msg='unit=systemd-fsck@dev-disk-by\x2duuid-CA55\x2dC29C comm="systemd" exe="/usr/lib
/systemd/systemd" hostname=? addr=? terminal=? res=success'
Oct 13 22:02:09 vladimir-xmnbp dolphin[17661]: MEGASYNCOVERLAYPLUGIN: getOverlays &lt;/etc/sys
temd/system/systemd-fsck-root.service&gt;: 9
Oct 13 22:02:09 vladimir-xmnbp dolphin[17661]: MEGASYNCOVERLAYPLUGIN: getOverlays &lt;/etc/sys
temd/system/systemd-fsck@.service&gt;: 9

When checking services status, systemd-fsck-root.service is loaded, but inactive, and has no related journal entries. systemd-fsck@.service is unloaded, inactive, also no entries related to it in the journal.

1 Like

Receiving this message now after last update, it refers to GRUB.

Oct 14 11:30:09 xmg systemd[2384]: Starting Mark boot as successful...
Oct 14 11:30:09 xmg grub-set-bootflag[6638]: Error opening //boot/grub/grubenv for writing: Permission denied
Oct 14 11:30:09 xmg systemd[2384]: grub-boot-success.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 11:30:09 xmg systemd[2384]: grub-boot-success.service: Failed with result 'exit-code'.
Oct 14 11:30:09 xmg systemd[2384]: Failed to start Mark boot as successful.

OK, let's break down the magic.

How to hide the grub menu

At least the following needs to be set:

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=1

For fastboot you can set even GRUB_TIMEOUT to zero.

How to make grub totally silent

Well you need grub-quiet installed, or at least this patch applied. It removes any strings like Welcome to GRUB! Add loglevel=3 vga=current rd.systemd.show_status=auto rd.udev.log-priority=3 vt.global_cursor_default=0 to GRUB_CMDLINE_LINUX in /etc/default/grub if you still see some messages.

What are the advantages of grub-quiet package?

Since we want to see the menu when the bootup failed or need other ways to see the menu we have added additional scripts.

/etc/grub.d/01_menu_auto_hide

It shows if the last boot-up was OK. If so we will set the following:

GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=1

This gives you one second to press a button for showing the menu. If fastboot is enabled this will be set:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=0

It will avoid the countdown code keypress check.

You can set this also via:

  • sudo grub-editenv - unset menu_auto_hide to disable autohiding of the menu
  • sudo grub-editenv - set menu_auto_hide=1 to enable autohide of the menu
  • sudo grub-editenv - set menu_auto_hide=2 to enable autohide of the menu even when you have another OS installed
  • sudo grub-set-bootflag menu_show_once to show the menu for 60s once
  • sudo grub-set-bootflag boot_success to mark the current bootup as successful

/usr/lib/systemd/user/grub-boot-success.service

This service triggered by the timerscript will mark the bootup as successful after running for two minutes.


Please test grub-quiet 2.03.0-18 release and report any issues with it. See also the history of the development.


Seems I still miss the last piece to trigger grub-set-bootflag boot_success after we have the DE loaded ... This needs to be executed to mark a succesful boot. Then the menu will be hidden on next boot.

2 Likes

Hans de Goede

grub-set-bootflag was written to be suid root and we install it
as such.

If you look at it you will see that it is only a single file and
does not use any other grub code, only libc calls, this is by design
for easy auditability. It only accepts 1 commandline argument and
compares that against a fixed list of known valid keywords.

TL;DR: it should be safe to make it suid root

So executing sudo chmod +s /usr/bin/grub-set-bootflag should fix the permission issue. Will however check if it may also run as system user service ...

I think I've fixed it now with revision 19. Here a short recap. If grub-set-bootflag is installed with suid-root privileges everybody can execute that program. Now I've installed it for the system user.

How to check?

First install latest grub-quiet package and reboot. When back in our graphical session, please check your current grub environment values:

$ cat /boot/grub/grubenv
# GRUB Environment Block
saved_entry=gnulinux-advanced-e9da7593-2d25-46af-b1d7-7844ecea56d0>gnulinux-4.19rc7.1014.g3a27203-1-MANJARO x64-advanced-e9da7593-2d25-46af-b1d7-7844ecea56d0
menu_auto_hide=1
boot_success=0
boot_indeterminate=0

Then check if the grub-boot-success timer is active:

$ systemctl ensystemctl list-timers --all
NEXT                          LEFT                LAST                          PASSED             UNIT                      >
Sun 2018-10-14 15:09:52 CEST  1min 4s left        n/a                           n/a                grub-boot-success.timer   >
Sun 2018-10-14 15:22:36 CEST  13min left          n/a                           n/a                systemd-tmpfiles-clean.tim>
Mon 2018-10-15 00:00:00 CEST  8h left             Sun 2018-10-14 00:00:44 CEST  15h ago            logrotate.timer           >
Mon 2018-10-15 00:00:00 CEST  8h left             Sun 2018-10-14 00:00:44 CEST  15h ago            man-db.timer              >
Mon 2018-10-15 00:00:00 CEST  8h left             Sun 2018-10-14 00:00:44 CEST  15h ago            shadow.timer              >
Mon 2018-10-15 00:00:00 CEST  8h left             Sun 2018-10-14 00:00:44 CEST  15h ago            updatedb.timer            >
Thu 2018-10-18 21:27:20 CEST  4 days left         Thu 2018-10-11 18:21:42 CEST  2 days ago         pamac-mirrorlist.timer    >
Sat 2018-11-03 15:00:00 CET   2 weeks 6 days left Sat 2018-10-06 18:29:14 CEST  1 weeks 0 days ago pamac-cleancache.timer    >

8 timers listed.

After 2 minutes passed, please check your grub environment values again:

$ cat /boot/grub/grubenv
# GRUB Environment Block
saved_entry=gnulinux-advanced-e9da7593-2d25-46af-b1d7-7844ecea56d0>gnulinux-4.19rc7.1014.g3a27203-1-MANJARO x64-advanced-e9da7593-2d25-46af-b1d7-7844ecea56d0
menu_auto_hide=1
boot_success=1
boot_indeterminate=0

You should see boot_success=1.

Minor mistake, this should be systemctl list-timers --all instead, I think.

Anyway, it seems to work:

Resumen
File: /boot/grub/grubenv
───────┼────────────────────────────────────────────────────────────────────────
   1   │ # GRUB Environment Block
   2   │ saved_entry=gnulinux-simple-1144ab8c-85dc-4fe9-a484-f71db069028b
   3   │ boot_success=1
   4   │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ #######################################################################
       │ ###################################################################

Although I ignore the difference between "gnulinux-advanced" and "gnulinux-simple" in the output.

With the latest update of grub-quiet the shift key doesn't work now, with time set at 0.
The 60 second command still works.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by