How to add a menu entry in Grub to start Ubuntu in command line
<p>I have a desktop that I sometimes only use remotely through SSH. In these cases, having a graphical interface is useless so it could be great to start the system in text mode.</p>

<p>I'm using Ubuntu and I wanted to add a menu entry in Grub to do what I want (start in text mode, but not everytime). To do that, I added this to the file <code>/etc/grub.d/40_custom</code>:</p>

<pre><code>menuentry 'Ubuntu (text mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-86845fc2-c8a4-4323-a936-497ae09f288c' {
    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='hd1,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  86845fc2-c8a4-4323-a936-497ae09f288c
    else
      search --no-floppy --fs-uuid --set=root 86845fc2-c8a4-4323-a936-497ae09f288c
    fi
    linux   /boot/vmlinuz-3.19.0-59-generic root=UUID=86845fc2-c8a4-4323-a936-497ae09f288c ro  text
    initrd  /boot/initrd.img-3.19.0-59-generic
}
</code></pre>

<p>and then ran <code>sudo update-grub</code>.</p>

<p>The problem is that it simply doesn't work: when I use this new line, Ubuntu starts as usual, with the graphical interface and GDM asking to enter my password.</p>

<p>Any idea?</p>