proceed manually as follows
ls -ldF lala/dev/pts/ # exists ls -ldF lala/dev/shm/ # exists vi lala/etc/fstab # new file #/dev/xvda1 / ext4 defaults 1 1 /dev/xvda1 / reiser4 defaults 1 1 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 # KVM /dev/vda1 / ext4 defaults 1 1 # swap #/dev/xvda2 swap swap defaults 0 0 #/dev/vda2 swap swap defaults 0 0
only root can log in
echo non-root login has been disabled > lala/etc/nologin # new file
fix the locale – requires glibc package
chroot lala/ bash -ic "perl -e exit" chroot lala/ bash -c "perl -e exit" chroot lala/ perl -e exit ls -lF lala/usr/share/locale/ ls -lF lala/usr/lib64/locale/ ls -lF lala/var/log/packages/glibc-* chroot lala/ locale -av vi lala/etc/bashrc # new file export PATH=$PATH:/etc/rc.d export MAKEFLAGS=-j$((`grep ^processor /proc/cpuinfo | tail -1 | awk '{print $NF}'` + 1)) export LANG=en_US.UTF-8 export LANGUAGE=en_US:en export LC_ALL=en_US.UTF-8 alias ll='ls -alhF' alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' echo source \$HOME/.bashrc > lala/root/.bash_profile ln -s ../etc/bashrc lala/root/.bashrc
more options
#export LANGUAGE="en_US:en" #export LC_ALL="C.UTF-8" #export LC_COLLATE="C.UTF-8" #export LANG="C.UTF-8"
update CA certificates
chroot lala/ which c_rehash chroot lala/ bash -ic "update-ca-certificates"
disabling useless shit from rc.d – tag ADD
ls -lF lala/etc/rc.d/rc.cpufreq chmod -x lala/etc/rc.d/rc.cpufreq # lala/etc/rc.d/rc.loop
do not disable those
ls -lF lala/etc/rc.d/rc.modules lala/etc/rc.d/rc.modules.local #chmod -x lala/etc/rc.d/rc.modules #chmod -x lala/etc/rc.d/rc.modules.local
disabling useless shit from rc.d – tag REC
ls -lF \ lala/etc/rc.d/rc.bluetooth \ lala/etc/rc.d/rc.cgmanager \ lala/etc/rc.d/rc.cgproxy \ lala/etc/rc.d/rc.inetd chmod -x lala/etc/rc.d/rc.bluetooth chmod -x lala/etc/rc.d/rc.cgmanager chmod -x lala/etc/rc.d/rc.cgproxy chmod -x lala/etc/rc.d/rc.inetd ls -lF \ lala/etc/rc.d/rc.consolekit \ lala/etc/rc.d/rc.mcelog #chmod -x lala/etc/rc.d/rc.consolekit #chmod -x lala/etc/rc.d/rc.mcelog
checking overall enabled scripts
ls -lF lala/etc/rc.d/ ls -lF lala/etc/rc.d/rc.udev # already executable
fix the timezone
ls -lF lala/etc/localtime-copied-from rm -f lala/etc/localtime-copied-from ln -s ../usr/share/zoneinfo/Europe/Moscow lala/etc/localtime # new file ln -s ../usr/share/zoneinfo/Europe/Paris lala/etc/localtime # new file
avoid a boot time error on powersave
#cp -pi lala/etc/rc.d/rc.M lala/etc/rc.d/rc.M.dist #chmod -x lala/etc/rc.d/rc.M.dist #vi lala/etc/rc.d/rc.M #/bin/setterm -blank 15 -powersave powerdown -powerdown 60 chmod -x lala/etc/rc.d/rc.setterm
fix the XEN or KVM guest userland serial console
ls -lF lala/etc/termcap # needed ls -lF lala/sbin/agetty # needed
XEN serial line
cp -pi lala/etc/inittab lala/etc/inittab.dist vi lala/etc/inittab s1:12345:respawn:/sbin/agetty --noclear --local-line hvc0 115200 linux # 115200,38400,9600 echo hvc0 >> lala/etc/securetty
COM1 serial line
cp -pi lala/etc/inittab lala/etc/inittab.dist vi lala/etc/inittab s1:12345:respawn:/sbin/agetty --noclear --local-line ttyS0 115200,38400,9600 xterm echo ttyS0 >> lala/etc/securetty