0

I have a system with multiple kernels installed and would like one of the kernels to boot up without the GUI/Desktop environment. I assume this can be done in the grub-customizer tool by editing the boot script for that specific kernel. Here's the script from the specific kernel I wish to modify:

    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,$        else
      search --no-floppy --fs-uuid --set=root 0c2ea0ab-08e3-42b6-8752-4b1aaad7bc1d
    fi
    echo    'Loading Linux 4.8.15-rt10 ...'
    linux   /boot/vmlinuz-4.8.15-rt10 root=UUID=0c2ea0ab-08e3-42b6-8752-4b1aaad7bc1d ro  quiet splash 8250.nr_uart$ $vf_handoff
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-4.8.15-rt10

Should I change gfxmode $linux_gfx_mode? If so, to what? Thanks


I also followed the last answer for this question, adding 'text' to GRUB_CMDLINE_LINUX_DEFAULT and uncommenting GRUB_TERMINAL="console".


I've figured out the command systemctl set-default multi-user.target forces console at boot and systemctl set-default graphical.target reverts back to GUI at boot, however, I want to implement this using a specific boot option. Is this possible?

1 Answer 1

0

I am not totally sure, but would try an educated guess: In this line linux /boot/vmlinuz-4.8.15-rt10 root=UUID=0c2ea0ab-08e3-42b6-8752-4b1aaad7bc1d ro quiet splash 8250.nr_uart$ echo 'Loading initial ramdisk ...' enter 'text' behind 'ro'.

6
  • Just tried it, still starts a desktop session.
    – DrTarr
    Oct 24, 2017 at 17:30
  • I also tried 'ro quiet splash text' and removed '$vf_handoff', still same result.
    – DrTarr
    Oct 24, 2017 at 18:49
  • Problem is I don't know the grub-customizer tool. For testing you can edit the boot script by hitting "e" while grub2 shows the boot menu (you probably know that). Inserting "text" as I described works on my machine. Oct 24, 2017 at 19:15
  • Weird, using 'e' in grub and having only 'ro quiet splash text' still boots desktop. I wonder if maybe startx is in a startup file somewhere or something?
    – DrTarr
    Oct 24, 2017 at 19:24
  • 1
    Do you have Ubuntu 16.04? Supposedly 16.04 works differently and the graphical launch is handled by systemd, see my edits above.
    – DrTarr
    Oct 25, 2017 at 11:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .