vinceliuice / grub2-themes

Modern Design theme for Grub2
GNU General Public License v3.0
3.29k stars 236 forks source link

[REQUEST] ChromeOS Icon #191

Closed yuriuseu closed 1 year ago

yuriuseu commented 1 year ago

I'm using the whitesur theme with brunch and it looks good. Just wondering what it looks like with a ChromeOS icon. Would love to see a plain white and colored icon if possible.

Here's the preview (camera quality is bad, but it looks good in actual):

IMG_20230116_191131

The background image used is this:

chromeos

vinceliuice commented 1 year ago

I need your grub.cfg file

vinceliuice commented 1 year ago

I need to know chromeos class name in grub.cfg file

yuriuseu commented 1 year ago

@vinceliuice Default grub boot files are available in the brunch repository itself (I'm currently using the latest stable r107 branch).

All I did is mount the EFI partition of my current setup and install whitesur under themes directory and set the default theme from theme.cfg:

grub_theme=whitesur

#loadfont /efi/boot/themes/$grub_theme/UbuntuMonoBold28.pf2
set theme=/efi/boot/themes/$grub_theme/theme.txt
export theme

set gfxmode=auto,1024x768
set gfxpayload=text
terminal_output gfxterm

Here's a reference of the actual grub.cfg you're looking for (I did not modify this):

set timeout=2
regexp --set disk "(^.+)(,gpt)" $root
source /efi/boot/theme.cfg
source /efi/boot/settings.cfg

menuentry "ChromeOS" --class "brunch" {
    if [ -z $verbose ] -o [ $verbose -eq 0 ]; then
        linux ($disk,7)$kernel boot=local noresume noswap loglevel=7 cros_secure cros_debug options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
            console= vt.global_cursor_default=0 brunch_bootsplash=$brunch_bootsplash quiet
    else
        linux ($disk,7)$kernel boot=local noresume noswap loglevel=7 cros_secure cros_debug options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params
    fi
    initrd ($disk,7)/lib/firmware/amd-ucode.img ($disk,7)/lib/firmware/intel-ucode.img ($disk,7)/initramfs.img
}

menuentry "ChromeOS (settings)" --class "brunch-settings" {
    linux ($disk,7)/kernel boot=local noresume noswap loglevel=7 cros_secure cros_debug options= chromeos_bootsplash= edit_brunch_config=1
    initrd ($disk,7)/lib/firmware/amd-ucode.img ($disk,7)/lib/firmware/intel-ucode.img ($disk,7)/initramfs.img
}
yuriuseu commented 1 year ago

Class name is just brunch (which boots the actual OS) and brunch-settings (which launches the Brunch Configuration Menu to set the default kernel, kernel parameters, boot splash themes, etc.. and reboots the device).

It is safe to use brunch (and/or chromeos as a substitute) class name I guess, since brunch is just the loader to ChromeOS (ChromeOS itself obfuscates its own boot configuration stuff, e.g is ChromeOS Flex doesn't show GRUB menu option by default, i.e it doesn't have class names like the one with brunch).


EDIT:

Check out the default ChromeOS Flex grub.cfg file (I've copied this file from the installation I did using the latest reven (ChromeOS Flex) recovery). ``` defaultA=2 defaultB=3 gptpriority $grubdisk 2 prioA gptpriority $grubdisk 4 prioB if [ $prioA -lt $prioB ]; then set default=$defaultB else set default=$defaultA fi set timeout=0 # NOTE: These magic grub variables are a Chrome OS hack. They are not portable. menuentry "local image A" { linux /syslinux/vmlinuz.A init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console= kvm-intel.vmentry_l1d_flush=always i915.modeset=1 cros_efi root=PARTUUID=FC0EC951-D1DF-E348-9578-4B087F44ECFA } menuentry "local image B" { linux /syslinux/vmlinuz.B init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console= kvm-intel.vmentry_l1d_flush=always i915.modeset=1 cros_efi root=PARTUUID=3633ADB0-332F-424F-B505-EA514720F2CC } menuentry "verified image A" { linux /syslinux/vmlinuz.A init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console= kvm-intel.vmentry_l1d_flush=always dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 i915.modeset=1 cros_efi root=/dev/dm-0 dm="1 vroot none ro 1,0 4710400 verity payload=PARTUUID=FC0EC951-D1DF-E348-9578-4B087F44ECFA hashtree=PARTUUID=FC0EC951-D1DF-E348-9578-4B087F44ECFA hashstart=4710400 alg=sha256 root_hexdigest=8c137797632992fa257a17e964c1bb3b46e4a0946364e316f64738ccedd50aee salt=290f9652a6396f8c109ccdaf01a4e7c031238cbcd23232641f591234b0db18f3" } menuentry "verified image B" { linux /syslinux/vmlinuz.B init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console= kvm-intel.vmentry_l1d_flush=always dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 i915.modeset=1 cros_efi root=/dev/dm-0 dm="1 vroot none ro 1,0 4710400 verity payload=PARTUUID=3633ADB0-332F-424F-B505-EA514720F2CC hashtree=PARTUUID=3633ADB0-332F-424F-B505-EA514720F2CC hashstart=4710400 alg=sha256 root_hexdigest=8c137797632992fa257a17e964c1bb3b46e4a0946364e316f64738ccedd50aee salt=290f9652a6396f8c109ccdaf01a4e7c031238cbcd23232641f591234b0db18f3" } # FIXME: usb doesn't support verified boot for now menuentry "Alternate USB Boot" { linux (hd0,3)/boot/vmlinuz init=/sbin/init boot=local rootwait ro noresume noswap loglevel=7 noinitrd console= kvm-intel.vmentry_l1d_flush=always root=PARTUUID=B854E9D8-5819-0444-9199-4A9F23D74E7C i915.modeset=1 cros_efi } ```
vinceliuice commented 1 year ago

Ok, I'll add those icons