The ASUS Eee does not use the standard SVR4 boot procedure by default. All the /etc/rc.d directories exist as does /etc/inittab but they are all ignored because the default boot stanza in grub does not run init. Instead it runs something called fastinit which boots really fast (of course) but which completely ignores the standard files and boots into a single user system (the user is called 'user'; how imaginitive); no other users are allowed – the login screen allows only input of a password, the user ID is assumed.
This so-called Easy-Mode is a perfectly acceptable unix environment which, with a bit of tailoring, should satisfy pretty much everybody. However there are no virtual terminals which can, at times, be a pain.
It *is* possible to boot the system with the standard init instead of fastinit. If you do this, you will get a standard multi-user environment which runs all the /etc/rcN.d scripts and which sets up all the virtual terminals as defined in /etc/inittab.
It does have some drawbacks (see below) but with a bit of fiddling these can all be overcome, though not always in the most elegant of ways…
Note that this discussion involves some quite advanced concepts. If you are uncertain what some of the instructions mean, it is probably best not to experiment. Be warned that even the smallest syntactical mistake in the files discussed in this article may make your system unbootable. Be very, very careful and ALWAYS make backup copies so that you can revert to the original files if anything goes wrong.
To set this up:
In /etc/X11/xorg.conf comment out the line that says:
Option "DontVTSwitch" "true"
(Note that in standard Easy-Mode this will give you a virtual terminal on Alt-Ctrl-F3 with the GUI on Alt-Ctrl-F2. However if you log out of the virtual terminal, the getty does not respawn. Bugger!)
Go into RESCUE MODE and mount /dev/sda1 on /mnt-system then:
cd /mnt-system/etc/rc2.d mv S99kdm K99kdm
This will prevent X from starting when you boot using init into run level 2 (Debian's standard multi-user run level). Something about standard kdm is missing or badly misconfigured. You DO get a display managed login, but the X session is messed up and it fails to start.
Still in RESCUE MODE, set up /mnt-system/boot/grub/menu.lst with a new stanza that passes the parameter:
to the kernel. When the system boots from this stanza, it will follow the standard SystemV init procedure.
To boot using this mode, press F9 during the boot sequence and choose your new stanza from the GRUB menu.
When you boot into this mode, all standard multiuser commands are available. Therefore you can add new users etc. without let or hindrance…
This is the minimum you have to do to get the mode working, but it is less than satisfactory because:
You might want to edit /etc/issue to reflect this fact…
There doesn't seem to be anything you can do about the read only access to /dev/sda1, but it does no harm.
See below for a discusion of how to fix the other things.
Note that the following fixes should be performed in normal mode, NOT in the rescue environment unless explicitly stated otherwise.
The network fails to start because the network card driver doesn't get identified and loaded into the kernel. To fix this, add:
to /etc/modules. Easy-Mode cheats and loads this driver directly in its start up script.
If you DO want an X session, put an executable script into /etc/init.d which looks like this (I called mine kdmStart). You will also need to create a symlink in /etc/rc2.d. Here's the script:
#!/bin/sh # # alan 6/1/08 # # start the gui in SVR4 mode # # linked to /etc/rc2.d/S99kdmStart # kdm
When you boot, this will give you a display managed login and your normal X session will start.
Note that if you log in as “user” you will still get the Easy-Mode login if you have a .AsusLauncher directory in /home/user and/or you don't have automatic login turned on. One way around this is to create a user foo whose UID is the same as the UID of user. Make all the significant files in /home/foo (including hidden files and directories) symbolic links to the corresponding files in /home/user, omitting .AsusLauncher of course. You probably want to make a local /home/foo/.icewm as well because some things (like InstantShutdown) won't work in this mode, though you can get around this problem by writing a shell script that identifies the environment it is running in and calls either InstantShutdown or init, depending on what it finds. Then modify .icewm/toolbar2 (and possibly .icewm/menu) to call this script instead of calling InstantShutdown directly. If you do this, you won't need a separate /home/foo/.icewm – it can be a symbolic link, like all the other things.
Another possibility is to modify /usr/bin/startsimple.sh so that AsusLauncher doesn't start in this mode. Just test PID number 1 and only start AsusLauncher if PID 1 is fastinit. Replace the line that says:
PID1=`ps -p 1 -o comm=` [ $PID1 = fastinit ] && /opt/xandros/bin/AsusLauncher &
You can then log in directly as 'user' or (if you find the name aesthetically unpleasing) create a user foo with a numerically identical UID to user and with a home directory /home/user. Then log in as foo. Note that if you do this and subsequently start AsusLauncher by hand you will have to “log in” again when AsusLauncher starts. Making the user foo's home directory something other than /home/user will prevent this from happening if you find it annoying.
note pts0: if you have removed unionfs don't forget chmod 1777 /tmp. If you are not doing it session will always fail with error “open: permission denied” in ~/.xsession-errors
Something is telling the kernel to load a module that it doesn't like (there are error messages during the boot about something called libdevwrapper). This seems to break some udev functionality and the device files that the SD card needs are not created. If you want to use the SD card, you must create the device files by hand. Sound also requires some device files that udev seems not to know how to configure. Both problems are solved the same way so just keep reading this document…
Sound seems to fail because the drivers get loaded too late (or haven't finished initialiseing, or something; goodness knows what). Anyway if you keep an eye on the boot messages you will see that:
fails. After the system is up, just run the command again (as root) and sound should be fine. One way of making this happen automatically is to put the command into /etc/rc.local. If you do this, make sure to use the RESCUE MODE version of the file.
Note that everyone who needs to use the sound system must be a member of the audio group.
Sound recording needs a bit more work to get it going. Again I think it is a udev failure – anyway, whatever it is, the device files that it needs are not being created. I wrote a shell script that creates all the necessary device files (both those for the SD card and for the sound recorder). I called it makenode.sh. I created it in /etc/init.d and linked it into /etc/rcS.d. it is quite safe to do this in Easy Mode. By the time it is run the unionfs has been created (and it doesn't exist in the “real” /etc/init.d) and so it will be picked up by the boot procedure. Here's the script:
#!/bin/sh # # alan 6/1/08 # # udev doesn't work properly in SVR4 mode because # the driver the kernel loads seems incompatible # with the mode. # # It *will* find and mount USB devices but # something in the rules (I don't know what) won't # create the appropriate SDcard device files. # # linked to /etc/rcS.d/S33makenode.sh # # Create SDcard devices by hand # [ ! -b /dev/sdb ] && /bin/mknod /dev/sdb b 8 16 [ ! -b /dev/sdb1 ] && /bin/mknod /dev/sdb1 b 8 17 [ ! -b /dev/sdb2 ] && /bin/mknod /dev/sdb2 b 8 18 # # Create the device files that the sound recorder needs # [ ! -d /dev/sound ] && /bin/mkdir /dev/sound [ ! -c /dev/sound/dsp ] && /bin/mknod /dev/sound/dsp c 14 3 /bin/chgrp audio /dev/sound/dsp [ ! -L /dev/dsp ] && /bin/ln -s /dev/sound/dsp /dev/dsp
Once you have logged in, you will find that the minimixer doesn't start in the tool bar (goodness knows why). A (slightly better) alternative is:
Just run it from the command line (or replace the minimixer line in /usr/bin/startsimple.sh with kmix) and it puts a speaker symbol in the toolbar. This mixer not only allows you to adjust the volume, it also allows you to switch between the internal and external microphone, something that minimixer doesn't seem to do.