1

I just installed Ubuntu 12.04 on one of 4 machines and am configuring it. When the machine is used in "production" mode it will be headless and will need to boot into single user mode automatically (and start an application). It will need partitions mounted, networking, ssh, etc. I want to test booting into single user mode now so as to get it right before installing/upgrading other machines to 12.04.

2
  • you really want boot the machine in single user mode (run level 1) or at run level 3 (all services up, just command line without X server). And to startup an application you always can use upstart script or something like that. A link who could explain better the run levels: linfo.org/runlevel_def.html.
    – Pipe
    Feb 7, 2013 at 10:43
  • @pipe Right but the link does not describe Ubuntu 12.04 boot modes. Feb 7, 2013 at 19:25

1 Answer 1

1

I don't know how I missed this when I searched the question but the answer was provided by Mr. Gruber: How to autologin (without entering username and password)(in text mode)

As sudo ,edit the file /etc/default/grub and change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"  

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Save and then enter the command

sudo update-grub

GRUB is now configured to boot to text mode

As sudo edit the file /etc/init/tty1.conf an dchange the line:

exec /sbin/getty -8 38400 tty1  

to

exec /sbin/getty -8 38400 tty1 -a user-name

Where "user-name" is the user who will be automatically logged in.

It appears to work correctly for me.

To get to a GUI envirnment enter startx. Be sure to do this as a "regular" user as using sudo the file .Xauthority will have root as the owner and will cause an endless sequence of requesting passwords ...

Mr. Gruber mentions using tty6 in tty1.conf, I think you must not edit the whatever TTY is in that line unless you have a rescue disk/usb-stick available!

I'll work on the auto start of a script later ...

You must log in to answer this question.

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