Updated June 11, 2003
Created June 11, 2003


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

One important thing, this method requires that you use the following form of the reboot command:
reboot -f
- or -
reboot -fi

For a working model if reboot in %pre then see ks-pre-sshd.html and see where "halt" and "reboot" were added. You probably don't need the rest of the support structure that is there to support sshd, but this is a starting point and you can start cutting away from there.

A few notes on halt/reboot if you wish to start cutting away the sshd suport stuff to make the updates smaller as well as general troubleshooting info for getting other binaries into a chroot environment, anaconda installer, etc, etc.:

File listings:
[root@box1 root]# ls -ltr /sbin/halt /sbin/reboot
-rwxr-xr-x    1 root     root        12645 Jul 18  2002 /sbin/halt
lrwxrwxrwx    1 root     root            4 Mar 26 16:49 /sbin/reboot -> halt
Libraries:
[root@box1 root]# ldd /sbin/halt
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root@box1 root]#
Who owns this executable:
[root@box1 root]# rpm -qf /sbin/halt
SysVinit-2.84-5
What other RPMs might be required to install/run this executable (not always needed):
[root@box1 root]# rpm -q --requires SysVinit
pam >= 0.66-5
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
libcrypt.so.1
libcrypt.so.1(GLIBC_2.0)
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.2)
[root@box1 root]#
If you get stuck there (which I think this way enough info) then your next troubleshooting step is "strace" which is easier than it sounds.

Other troubleshooting info:
Make use of a "chroot" environment to test out running your command. Set up a new directory, install bash in there, then start copying your binary you want to get working into there. Then chroot to that directory and test. (See http://www.cpqlinux.com/chroot.html for more details).
mkdir /tmp/chroot
mkdir /tmp/chroot/bin
mkdir /tmp/chroot/sbin
mkdir /tmp/chroot/lib
cp -a /bin/bash /tmp/chroot/bin
cp -a /bin/ls   /tmp/tar-chroot/bin
cp -a /lib/ld-linux.so.2       /tmp/tar-chroot/lib
cp -a /lib/ld-2.2.4.so         /tmp/tar-chroot/lib
cp -a /lib/libc.so.6           /tmp/tar-chroot/lib
cp -a /lib/libc-2.2.4.so       /tmp/tar-chroot/lib
cp -a /lib/libdl.so.2          /tmp/tar-chroot/lib
cp -a /lib/libdl-2.2.4.so      /tmp/tar-chroot/lib
cp -a /lib/libtermcap.so.2     /tmp/tar-chroot/lib
cp -a /lib/libtermcap.so.2.0.8 /tmp/tar-chroot/lib
cp -a /sbin/halt /tmp/chroot/sbin
cp -a /sbin/reboot /tmp/chroot/sbin
chroot /tmp/chroot
reboot -w
troubleshoot the rest from from here...

Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html