理论上,如果 Ubuntu 符合 UNIX 和 Linux 标准,那么在 /boot/grub/menu.lst 中 grub 的 'kernel' 命令中添加 '3' 应该就足够了,因为根据该标准,运行级别 '3' 意味着没有 'X11' .
不幸的是,Ubuntu 忽略了标准,这就是为什么您还需要更改 /etc/init/lightdm.conf 或 /etc/init/gdm.conf (或您使用的任何 DM)的原因。这就是我的“启动时”条件的样子:
start on ((filesystem
and runlevel [!06]
and runlevel [!03]
and started dbus
and plymouth-ready)
or runlevel PREVLEVEL=S)
Run Code Online (Sandbox Code Playgroud)
在 Grub 的 menu.lst 中,我还添加了一个菜单项,允许我启动到运行级别 3:
title Ubuntu 11.10 Server No UI, kernel 3.0.0-32-generic-pae
root (hd0,0)
kernel /vmlinuz-3.0.0-32-generic-pae root=UUID=your-root-disk-id 3 ro
initrd /initrd.img-3.0.0-32-generic-pae
quiet
title Ubuntu 11.10, kernel 3.0.0-32-generic-pae
root (hd0,0)
kernel /vmlinuz-3.0.0-32-generic-pae root=your-root-disk-id ro
initrd /initrd.img-3.0.0-32-generic-pae
quiet
Run Code Online (Sandbox Code Playgroud)
现在我可以选择使用 X11 引导至运行级别 5 或不使用 X11 引导至运行级别 3。
归档时间: |
|
查看次数: |
80369 次 |
最近记录: |