[plug] Boot Sequence and dependant files.

Adam Davin bladebadger at westnet.com.au
Sun Nov 23 19:47:56 WST 2003


Good Evening All,

I have been playing with the idea of diskless clients for the last few weeks and have set up the main server and have figured out some of the problems that I was experiencing was due to me cutting too many files of the main root partition (lib* files etc.) At present I have basically copied the whole root system to a "client" directory and modified client specific files such as /etc/network/interfaces, fstab and a few others. I am slowly working my way through cutting out the stuff that is not needed, however I was thinking that I should be able to figure out what files I need through the boot scripts in /etc/rcS.d. The problem I am having is how to establish which /bin/*, /sbin/* files are used in the scripts and what files these rely on. 
Currently I have piped the contents of /bin and /sbin into a file (/tmp/executables.txt) and then using:
for file in /etc/rcS.d/* 
do
	grep --file=/tmp/executables.txt --with-filename --only-matching $file >> /tmp/output.txt
done
This gives me a basic look at all the lines which use executables from /bin and /sbin. the next bit is to try to work out which files this list depends on. 
I have tried using a loop to pipe the names of /bin/* to dpkg -s but this does not seem to yeild the expected results
If I try 
for file in /bin/*
do
	dpkg -s $file >> /tmp/dpkgoutput.txt
done
I get a blank file. 

For each of the files that dpkg does not have any information for, I get the 
"Package blah is not installed and no information is available"... 
printed to the console window. 

if I type dpkg -s mount >> /tmp/dpkgoutput.txt at the command prompt, it works fine. 

Any ideas would be great, am I going about this the hard way?

Thanks in advance

I am currently running a debian 3 system with parts of unstable. 

Regards

-- 

Adam Davin
_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list