Announcement

Collapse
No announcement yet.

How to boot into console instead of kdm?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to boot into console instead of kdm?

    Hi all sorry if this is a long post.

    I need to modify a Kubuntu 8.10 machine so that user has the option of booting into a console instead of kdm. The user wants to see this option in the GRUB start screen.

    I referred to manpages for grub, init, etc and scoured google for help. there is a lot out there, but most refer to Debian's inittab scheme not the new upstart method.

    I finally came up with a solution... that does not work :-)
    Having experience only with BSD style inits, I added the following lines to grub's menu.lst, thinking that it would boot up to level 3 which is multi-user console mode:

    title Ubuntu 8.10 kernel 2.6.27-11 (console multi-user mode)
    kernel /boot/vmlinuz-2.6.27-11-generic root=<long uid number> ro 3
    initrd /boot/initrc.img-2.6.27-11-generic

    Well it works. All bootup text gets displayed on tty1 (instead of the kdm login window
    showing up), and when bootup is finished the login prompt is displayed on tty1.
    But then after a few seconds the user is automatically switched to tty7 where the usual kdm login screen is presented. So this means that kdm is also run on level 3.

    I then found out that kdm is run for EVERY level except 0,1,6.
    I read about update-rc.d and it *seems* that the only option is to remove kdm from
    all levels. It is an all-or-nothing option - either bootup to kdm or not, cannot have a choice.

    I must have misunderstood something along the way.

    The manpage for update-rc.d says to do the following to disable a service:
    update-rc.d -f foobar remove
    update-rc.d foobar stop 20 2 3 4 5 .

    But I don't want to remove kdm, I just want to have it *NOT* run in level 3!
    It can keep running on other levels.

    The user would prefer not to have to wait for kdm to stop loading then have to switch
    to console 1 (with alt-ctrl-F1).

    Has anyone done what I'm trying to do?
    Any help would be great - it is such a trivial need that brings great frustration!

    Thanks.

    #2
    Re: How to boot into console instead of kdm?

    The run levels can be used in a similar way than other distributions, the run levels just run the same services by default on *buntus.

    You can manage the run levels with update-rc.d, but I strongly recommend using sysv-rc-conf (install package sysv-rc-conf). It's a ncurses interface to run level services, and it's much easier to work with (and keep track of what you're doing)

    Code:
    sudo sysv-rc-conf
    To start it in "simple" mode (where you can choose services to be run by run level)

    Code:
    sudo sysv-rc-conf -p
    To start it in "advanced" mode (where you can also choose the order to start/stop services)

    Comment


      #3
      Re: How to boot into console instead of kdm?

      Originally posted by kubicle
      The run levels can be used in a similar way than other distributions, the run levels just run the same services by default on *buntus.

      You can manage the run levels with update-rc.d, but I strongly recommend using sysv-rc-conf (install package sysv-rc-conf). It's a ncurses interface to run level services, and it's much easier to work with (and keep track of what you're doing)

      Code:
      sudo sysv-rc-conf
      To start it in "simple" mode (where you can choose services to be run by run level)

      Code:
      sudo sysv-rc-conf -p
      To start it in "advanced" mode (where you can also choose the order to start/stop services)
      Thanks for the tips - I didn't know about 'sysv-rc-conf'.
      I 'll give it a try and report back :-)

      Comment


        #4
        Re: How to boot into console instead of kdm?

        OK I finally got around to working on my friend's laptop and installed 'sysv-rc-conf'
        This is a good tool - it allowed me to install some custom bootup scripts for him.

        Regarding the problem of booting up to multi-user console mode, this is what I have found out:
        As long as kdm is enabled in run-level 2 one will always bootup to kdm, that is
        levels 3,4,5 seem to be ignored.
        The only way to boot to a console login rather then a kdm login is to disable kdm
        in run-level 2.

        So it is really an either/or setup.

        Now is this the way 'init' is configured in Ubuntu or is this a problem with grub?

        I did a global search of '/etc' for any call to kdm and I can't see any other way kdm is started
        except via the rc.d levels. What is going on? This seems to be very un-UNIX like!

        Still looking for any insight into this...

        Thanks.

        Comment


          #5
          Re: How to boot into console instead of kdm?

          Originally posted by Goldfinger
          Now is this the way 'init' is configured in Ubuntu or is this a problem with grub?
          *buntus use upstart, which is almost, but not completely unlike init. Upstart seems to boot into runlevel 2 even if you specify a different runlevel (the old init way) in grub. You can change runlevels with telinit normally after the boot.

          If you wish to teach upstart how to handle run levels from grub, this howto should work:
          http://caulfield.info/emmet/2008/03/...el-to-ubu.html

          Comment

          Working...
          X