You are not logged in.

#1 2012-03-08 00:18:37

dodo3773
Member
Registered: 2011-03-17
Posts: 801

[SOLVED] Booting from inittab no arch shutdown text

So I decided to ditch slim and boot from inittab. It is working but when I shut down I do not see the shutting down daemons etc.. I see text that looks like X shutting down thats it. Here are my relevant files (the ones I think are relevant (how I am booting into X)):

/etc/inittab

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)	Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:3:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/mingetty --autologin dodo3773 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1

# End of file

.zprofile

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
  exec startx
  # Could use xinit instead of startx
  #exec xinit -- /usr/bin/X -nolisten tcp vt7
fi

I am not really sure what to do to get that nice arch shutdown info back.

Last edited by dodo3773 (2012-03-08 00:54:17)

Offline

#2 2012-03-08 00:26:59

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Booting from inittab no arch shutdown text

You can either switch manually to TTY7 as you shutdown, or include -novtswitch in your start X line, like so:

exec xinit -- :0 -novtswitch &>/dev/null &

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2012-03-08 00:30:31

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: [SOLVED] Booting from inittab no arch shutdown text

What would one need to do anything of the sort? I've been using the same method for a year now without issue.

(tty1 autologin using xinit -nolisten tcp ~.xinitrc (from [ba,z]shrc), X starts on tty4 as I only have 3 ttys using /sbin/shutdown.)


Offtopic( Autologin has been merged into agetty, no need for mingetty in that respect. )

c1:2345:respawn:/sbin/agetty -a dodo3773 -8 -s 38400 tty1 linux

Last edited by Earnestly (2012-03-08 00:37:49)

Offline

#4 2012-03-08 00:36:29

aking9
Member
Registered: 2009-03-30
Posts: 65

Re: [SOLVED] Booting from inittab no arch shutdown text

cheers jasonwryan, that's one of the things way down on my list of 'things to fix', you just told me how big_smile

Offline

#5 2012-03-08 00:53:57

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [SOLVED] Booting from inittab no arch shutdown text

jasonwryan wrote:

You can either switch manually to TTY7 as you shutdown, or include -novtswitch in your start X line, like so:

exec xinit -- :0 -novtswitch &>/dev/null &

Thanks. That did it.

Offline

#6 2012-03-08 00:56:32

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [SOLVED] Booting from inittab no arch shutdown text

Kaustic wrote:

What would one need to do anything of the sort? I've been using the same method for a year now without issue.

(tty1 autologin using xinit -nolisten tcp ~.xinitrc (from [ba,z]shrc), X starts on tty4 as I only have 3 ttys using /sbin/shutdown.)


Offtopic( Autologin has been merged into agetty, no need for mingetty in that respect. )

c1:2345:respawn:/sbin/agetty -a dodo3773 -8 -s 38400 tty1 linux

When I read the wiki it said something about not being able to log out of a tty when using agetty that is why I used mingetty. Maybe I misread or misunderstood it but that is why I did it that way.

Offline

#7 2012-03-08 01:01:46

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: [SOLVED] Booting from inittab no arch shutdown text

You can't logout using autologin with either mingetty or agetty, you'll simply be logged straight back in. (At least, that's how it worked on my system)

Offline

#8 2012-03-08 01:05:10

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [SOLVED] Booting from inittab no arch shutdown text

Kaustic wrote:

You can't logout using autologin with either mingetty or agetty, you'll simply be logged straight back in. (At least, that's how it worked on my system)


Yeah I'm not sure. I got the info from here https://wiki.archlinux.org/index.php/Au … al_console

Offline

#9 2012-03-08 12:16:50

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: [SOLVED] Booting from inittab no arch shutdown text

Yup, both methods will automatically log you back in unless you use wait in /etc/inittab. The Wiki reflects this accurately tongue

Last edited by Earnestly (2012-03-08 12:17:44)

Offline

#10 2012-03-08 18:11:01

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: [SOLVED] Booting from inittab no arch shutdown text

Kaustic wrote:

Yup, both methods will automatically log you back in unless you use wait in /etc/inittab. The Wiki reflects this accurately tongue


Can't believe I missed that. Thanks.

Offline

#11 2012-03-08 19:26:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] Booting from inittab no arch shutdown text

By the way, the default (from /etc/inittab) is:

## Only one of the following two lines can be uncommented!
# Boot to console
id:3:initdefault:
# Boot to X11
#id:5:initdefault:
...

Personally, I have this file backed up somewhere and I've stripped out the comments and brought it down to its most basic form, because I know I'm not ever, EVER going to use a login manager:

id:3:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

c1:2345:respawn:/sbin/agetty --noclear -n -l /usr/local/sbin/autologin -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

TTY7 always seemed too far away for me. I have a black keyboard and sometimes at night I have to cop a feel on my keyboard for F7. I don't wanna do that... F4 is so much more closer.

Cheers.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB