Originally posted by netsina
I make a 'little' linux through copying files from RHEL4.
When I copy the full /lib directory ,it can boot and login
But on excuting restart or shutdown, it shows some messages and then halts.
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: no more processes left in this runlevel
Maybe it needs some more files, but for the limit of disk space, I want to know the exact file it needs. anyone can tell me?
This is the normal output when exiting from one runlevel and going into another. It sounds like you have a problem with APM/ACPI which is preventing Linux from issuing the poweroff or reboot instructions.
It should be safe to manually poweroff or reboot your machine at this point, but if you want to fix this then I'd start by checking that power management is enabled in your BIOS. You may even have to recompile your kernel and change the power management options in the kernel.
The second question:
When I copy part of the /lib directory and the full /lib/security directory,the problem above still exists,and a more problem happens at login.
login(pam_unix): check pass: user unknown
login(pam_unix):authentication failure: logname=LOGIN uid=0 euid=0 tty=tty1 ruser= rhost=
login: FAILED LOGIN 1 FROM (null) FOR root. Authentication failure
which lib does it need except for /lib/security?
I'm going to hope that you're copying these with the -d option, otherwise symlinks will be copied as complete files, making the disk space used be much larger for the copy than the original.
/lib/security is a directory, not a library. /lib/security/pam_filter is probably going to be needed. You'll definitely need /etc/passwd and probably /etc/shadow as a minimum.
You should find errors, such as the inability to load a given module, in various files in /var/log/
The third question:
Which files decide the ls command to list colorful files?
This isn't set in a configuration file; it's a command-line argument.
You can set this up as an alias by adding this line to your login script, usually ~/.bash_rc:
alias ls='/bin/ls --color=tty'