Re: [LAU] Curious about the reasons for not using GRUB [Re: Meltdown – Spectre]

From: Ralf Mardorf <ralf.mardorf@email-addr-hidden-dsl.net>
Date: Sat Jan 13 2018 - 15:54:07 EET

On Sat, 13 Jan 2018 14:14:58 +0200, Besnik Bleta wrote:
>Hello,
>
>On Sat, 13 Jan 2018 12:54:06 +0100
>Ralf Mardorf <ralf.mardorf@alice-dsl.net> wrote:
>
>> [4]
>> Sorry, I'm not using GRUB.
>
>
>If you’ve got a minute, mind listing the reasons for not foing so?
>Or pointing me to any resource of the similar spirit?
>Just curious.

Hi,

I noticed that you replied off-list, but since I don't want to answer
the same off-list question again and again (I've done this already
several times), I'll reply to the mailing list.

syslinux.cfg is nicer to edit than grub.cfg. While it's possible to get
a similar clean grub.cfg as a regular syslinux.cfg already is by
default, I still prefer syslinux.cfg over grub.cfg. I never used the
grub auto-thingies, such as the configs for the config or os-prober,
since they are just a PITA. The reason for this is that the
auto-thingies do not provide I want to get and they run during upgrades,
when there's no need to perform those time consuming tasks. Btw. I
dislike distros that enforce by package dependencies to install grub,
even if another distro already provides the bootloader, so I divert
some of this crap:

[rocketmouse@archlinux ~]$ cat /mnt/moonstudio/usr/src/dpkg-divert-grub.sh
#!/bin/bash

divert () {
cat<<EOF
#!/bin/dash
name=\$(echo \$(basename \$0) | sed -e 's/[0-9]\+ *//')
printf "\n \033[7m\$(basename \$0) was renamed \$name.real\033[0m\n\n"
exit
EOF
}

case $1 in

  --add)
    for s in grub-mkconfig update-grub
    do
      s=/usr/sbin/$s
      dpkg-divert --add --rename --divert $s.real $s && divert > $s
      chmod a+x $s
    done;;

  --remove)
    for s in grub-mkconfig update-grub
    do
      s=/usr/sbin/$s
      rm $s && dpkg-divert --rename --remove $s
    done;;

  --list)
    dpkg-divert --list | grep "local diversion of"
    ls -hlv /usr/sbin/grub-mkconfig* /usr/sbin/update-grub*|grep -v "gf"
    ;;
  *)
    cat $0;

  esac

exit

IMO syslinux has got just one disadvantage compared with grub.
Grub doesn't require chainloading. To avoid chainloading when using
syslinux my workaround is to move all kernels of different installs on
one partition and to bind /boot.

[rocketmouse@archlinux ~]$ ls -hAld /boot/ /.boot/*/boot/
drwxr-xr-x 3 root root 4.0K Jan 12 02:43 /boot/
drwxr-xr-x 3 root root 4.0K Feb 17 2017 /.boot/suse11.2/boot/
drwxr-xr-x 3 root root 4.0K Jan 11 09:42 /.boot/ubuntu_moonstudio/boot/
drwxr-xr-x 3 root root 4.0K Aug 27 2013 /.boot/ubuntu_q/boot/
[rocketmouse@archlinux ~]$ grep bind /mnt/moonstudio/etc/fstab
/mnt/archlinux/.boot/ubuntu_moonstudio/boot /boot none bind 0 0

Another possible pitfall might be dual-head usage on demand. I don't
know if grub is able to handle this, at least syslinux isn't.

If an LCD should be connected by HDMI and a CRT by VGA, but the CRT
should be turned off, than syslinux doesn't show the menu on the LCD
display, while the BIOS is still shown on the LCD display. If I don't
want to use the dual-head set-up, I need to disconnect the CRT, too see
the syslinux menu. I never tested if grub could manage this better than
syslinux.

This is my current syslinux.cfg:

[rocketmouse@archlinux ~]$ cat /boot/syslinux/syslinux.cfg
# http://syslinux.zytor.com/wiki/index.php/Doc/menu

PROMPT 0
TIMEOUT 600
UI menu.c32
MENU HIDDEN
MENU CLEAR
MENU COLOR screen 0;30;40
MENU COLOR border 0;30;40
MENU COLOR title 1;37;44
MENU COLOR unsel 0;37;40
MENU COLOR hotkey 1;37;40
MENU COLOR hotsel 7;37;40
MENU COLOR sel 7;37;40
MENU COLOR disabled 1;37;40
MENU COLOR scrollbar 0;30;40
MENU COLOR tabmsg 0;30;40
MENU COLOR cmdmark 0;31;40
MENU COLOR cmdline 0;37;40
MENU COLOR timeout_msg 0;37;40
MENU COLOR timeout 1;37;40

# Used hotkeys: ^8 ^A ^C ^e ^H ^M ^n ^P ^Q ^R ^t ^V
DEFAULT Rt

MENU TITLE HAL 9000
LABEL Toolbox
    MENU LABEL Toolbox
    MENU DISABLE
MENU SEPARATOR

LABEL Hardware
    MENU LABEL ^Hardware Detection
    COM32 hdt.c32

LABEL Memtest
    MENU LABEL Memtest^86+
    LINUX /.boot/ubuntu_moonstudio/boot/memtest86+.bin

LABEL Reset
    MENU LABEL R^eset
    COM32 reboot.c32

MENU SEPARATOR
MENU SEPARATOR
LABEL Arch Menu
    MENU LABEL Arch Linux
    MENU DISABLE
MENU SEPARATOR

LABEL Threadirqs
    MENU LABEL Arch Linux ^threadirqs
    LINUX ../vmlinuz-linux
    APPEND root=LABEL=archlinux ro threadirqs
    INITRD ../initramfs-linux.img

LABEL Pussytoes
    MENU LABEL Arch Linux Rt ^Pussytoes
    LINUX ../vmlinuz-linux-rt-pussytoes
    APPEND root=LABEL=archlinux ro
    INITRD ../initramfs-linux-rt-pussytoes.img

LABEL Cornflower
    MENU LABEL Arch Linux Rt ^Cornflower
    LINUX ../vmlinuz-linux-rt-cornflower
    APPEND root=LABEL=archlinux ro
    INITRD ../initramfs-linux-rt-cornflower.img

LABEL Rt
    MENU LABEL Arch Linux ^Rt
    LINUX ../vmlinuz-linux-rt
    APPEND root=LABEL=archlinux ro
    INITRD ../initramfs-linux-rt.img

LABEL Arch
    MENU LABEL ^Arch Linux
    LINUX ../vmlinuz-linux
    APPEND root=LABEL=archlinux ro
    INITRD ../initramfs-linux.img

MENU SEPARATOR
MENU SEPARATOR
LABEL Other Menu
    MENU LABEL Other Linux
    MENU DISABLE
MENU SEPARATOR

LABEL Moonstudio
    MENU LABEL Ubuntu X ^Moon Studio lowlatency
    LINUX /.boot/ubuntu_moonstudio/boot/vmlinuz-lowlatency
    APPEND root=LABEL=moonstudio ro
    INITRD /.boot/ubuntu_moonstudio/boot/initrd.img-lowlatency

LABEL Nokaiser
    MENU LABEL Ubuntu X Moon Studio lowlatency ^nokaiser
    LINUX /.boot/ubuntu_moonstudio/boot/vmlinuz-lowlatency
    APPEND root=LABEL=moonstudio ro nokaiser
    INITRD /.boot/ubuntu_moonstudio/boot/initrd.img-lowlatency

LABEL Light
    MENU LABEL Ubuntu ^Q LightScribe Rt
    LINUX /.boot/ubuntu_q/boot/vmlinuz-3.6.5-rt14
    APPEND root=LABEL=q ro nomodeset
    INITRD /.boot/ubuntu_q/boot/initrd.img-3.6.5-rt14

LABEL Suse
    MENU LABEL ^Vintage SUSE 11.2 Rt
    LINUX /.boot/suse11.2/boot/vmlinuz-2.6.31.6-rt19
    APPEND root=LABEL=suse11.2
    INITRD /.boot/suse11.2/boot/initrd-2.6.31.6-rt19

Regards,
Ralf
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Jan 13 16:15:02 2018

This archive was generated by hypermail 2.1.8 : Sat Jan 13 2018 - 16:15:02 EET