# Yocto grub suppressed console output (quiet)

**URL:** <https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532>\
**Category:** Yocto Project\
**Tags:** intel, grub, uefi, dunfell\
**Created:** [January 25, 2022, 12:55pm UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532 "2022-01-25T12:55:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![B-Stefan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/b-stefan/32/1473_2.png) [@B-Stefan](https://hub.mender.io/u/B-Stefan)\
**Post date:** [January 25, 2022, 12:55pm UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532/1 "2022-01-25T12:55:41Z")

</div>

# Question

I’m using the grub-UEFI integration of mender that is based on: [GitHub - mendersoftware/grub-mender-grubenv](https://github.com/mendersoftware/grub-mender-grubenv).

I would like to add the grub `quiet ` option so that the grub console output will be suppressed or redirected to a serial port. Is there any hidden option to append the quiet option to the kernel boot options? I could not find anything in the bb files of the mender-meta layer.

The desired result is that the boot is without any log message on the screen.

# Board description

- Intel-x64-x68

# Prerequirements

### layer.conf

```auto

INHERIT += "mender-full"
PREFERRED_VERSION_mender-client = "3.1.0"
MENDER_STORAGE_DEVICE = "/dev/sda"
MENDER_DEVICE_TYPE="x86_64"

MENDER_FEATURES_DISABLE_append = " mender-uboot mender-image-sd mender-growfs-data"

IMAGE_ROOTFS_SIZE="1572864"
MENDER_BOOT_PART_SIZE_MB="2048"
MENDER_STORAGE_TOTAL_SIZE_MB = "6144"
MENDER_DATA_PART_SIZE_MB = "128"

```

---

<div class="post-metadata">

**Author:** ![leonardo-k](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/leonardo-k/32/1472_2.png) [@leonardo-k](https://hub.mender.io/u/leonardo-k)\
**Post date:** [January 27, 2022, 1:25pm UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532/2 "2022-01-27T13:25:32Z")

</div>

Hi , i don’t know if this can help but maybe you can use the [poky’s splash screen recipe](https://layers.openembedded.org/layerindex/recipe/587/)  
and change the image with a bbappend in your layer, so you will not see any log .  
And , if you want a completely black screen , just put a black image 😛

---

<div class="post-metadata">

**Author:** ![B-Stefan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/b-stefan/32/1473_2.png) [@B-Stefan](https://hub.mender.io/u/B-Stefan)\
**Post date:** [January 27, 2022, 6:09pm UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532/3 "2022-01-27T18:09:28Z")

</div>

I’ve already included that recipe, and it shows an image. Unfortunately, the welcome to GRUB message is way earlier in the boot order, so that splash will not be a solution.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [January 28, 2022, 7:22am UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532/4 "2022-01-28T07:22:17Z")

</div>

Hi @B-Stefan welcome to community.

I had same requirement some time ago and was hacking grub but there is no way to disable it (at least one I found) other then this patch:

```auto
From 9d78a003040c0a56d729f9844b1ce311b04e9287 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Wed, 8 May 2019 16:28:18 +0200
Subject: [PATCH] Disable welcome to grub messages + others

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 grub-core/kern/misc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index d1a54df..bfa5fe4 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -109,6 +109,8 @@ grub_strcpy (char *dest, const char *src)
 int
 grub_printf (const char *fmt, ...)
 {
+ return 0;
+
   va_list ap;
   int ret;

--
2.7.4

```

This disable all grub messages so you won’t see anything from grub at all. Hope it helps.

---

<div class="post-metadata">

**Author:** ![B-Stefan](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/b-stefan/32/1473_2.png) [@B-Stefan](https://hub.mender.io/u/B-Stefan)\
**Post date:** [February 3, 2022, 8:00pm UTC](https://hub.mender.io/t/yocto-grub-suppressed-console-output-quiet/4532/5 "2022-02-03T20:00:01Z")

</div>

Thanks for the input and the hint for the grub solution. I’m working on it and will let you know if it worked .

For the grub env you just can modify the boot args of grub

### File structure

**Be aware that for all yocto .bbappend files the location is crucial**

 ![Screenshot 2022-02-03 at 20.57.41](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/3/30b35750a95eee94d2cbdf61220f636b4bbbb88a.png)

### grub-mender-grubenv\_%.bbappend

```auto

FILESEXTRAPATHS_prepend_mender-client-install := "${THISDIR}/files:"
SRC_URI_append_mender-client-install = " file://03_qemu_console_grub.cfg;subdir=git"

```

### 03\_qemu\_console\_grub.cfg

```auto

set console_bootargs="fbcon=map:2 quiet video=LVDS-1:e video=LVDS-2:e video=VGA-1:d video=HDMI-1:d"

```
