
Originally Posted by
.09.
Hi
I have installed 10.04 LTS server and after that x-window-system-core, gnome-core and gdm. Now it boots to a gui in runlevel 2.
1. How can I set the default runlevel to 3?
and
2. boot into runlevel 3 without a gui?
Run levels are still emulated, but are kinda deprecated...
In order to boot without starting the display manager use the text kernel parameter.
Edit /etc/default/grub and add the text option to the GRUB_CMDLINE_LINUX_DEFAULT variable:
Code:
...
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
...
Remove the quiet option to make the boot process verbose.
Removing the splash option to disable the splash screen.
i.e.
Code:
...
GRUB_CMDLINE_LINUX_DEFAULT="text"
...
Then run:
to generate a new grub.cfg file.
Or you could create a new text mode grub entry, but that's a little bit trickier. 
- backup the /etc/grub.d/10_linux file:
Code:
sudo cp /etc/grub.d/10_linux{,-backup}
sudo chmod -x /etc/grub.d/10_linux-backup
- open it for editing:
Code:
gksu gedit /etc/grub.d/10_linux
- scroll down to the linux_entry function (line ~64), and edit it to look like this:
Code:
...
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if [ "${recovery}" = "text" ]; then
title="$(gettext_quoted "%s, with Linux %s (text mode)")"
elif ${recovery} ; then
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
else
title="$(gettext_quoted "%s, with Linux %s")"
fi
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
cat << EOF
...
- scroll down to the end of file and call the function with the text parameter:
Code:
...
linux_entry "${OS}" "${version}" "text" \
"text ${GRUB_CMDLINE_LINUX}"
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
quiet
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done
- generate a new grub.cfg file:
- check out the /boot/grub/grub.cfg file and see if the new menu entry is generated.
If something went wrong, restore the original settings:
Code:
sudo mv /etc/grub.d/10_linux{-backup,}
sudo chmod +x /etc/grub.d/10_linux
Bookmarks