How to Update the Linux.2 Resource File
Novell Cool Solutions: Feature
By Kenn White
|
Digg This -
Slashdot This
Posted: 6 Jan 2003 |
This HOW TO document explains the process you may use to make updates to the ZENworks Imaging PXE "linux.2" resource file without installing a full Linux workstation.
You will be able to add/replace files in the linux.2 resource files with only these tools.
- PC with a fat partition. NTFS partitions are not supported using this method.
- ZENworks Imaging boot cd. This must be from a 3.2 release or newer. Release 3 is not supported.
- The linux.2 file from the pxe Imaging server.
- Script resource_update-1.0.tgz file
Setup Instructions
On the PC that will be used to perform this update, create a directory, preferably in the root directory, that will contain the work files. We will assume the directory will be named "C:\resourceUpdate". This directory must be on fat primary partition (non-ntfs).
Create directory structure and copy files
- Copy the resourceUpdate-xxx.tgz you received from Novell into this directory.
- Copy the linux.2 file from the sys:\tftp directory into this directory.
- Create a sub-directory named "update" (c:\resourceUpdate\update) that will contain a directory structure of the files you want to add/replace in the linux.2.
- In the "update" directory, create appropriate directories containing the files to update.
For example, if I want to add the e1000.o network driver, the directory structure would look like this (assuming Linux kernel version 2.4.18):
c:\resourceUpdate\update\lib\modules\2.4.18\kernel\drivers\net\e1000.o
When you have the directory structure setup and files in the desired directories, you are ready to perform the update.
Boot into ZENworks Linux
Boot this PC into "manual" mode using a ZENworks Imaging Boot CD. This will leave you at the bash prompt.
Mount the fat partition
You will now need to "mount" the fat partition where your directory structure that you prepared above are located. Normally, this is device /dev/hda1 (or /dev/sda1 for scsi drives). A tool to help you determine if this is so would be to run the following command:
img dg
This will display the partitions on your PC. You should be able to see the FAT(32) partition and determine the device name.
Use this command to mount the partition, substituting the proper device name:
mount /dev/hda1 /mnt/harddisk
If the mount was successful, you are now ready for the next step. If not, you will need to determine the problem and fix it so you can properly mount the partition. Possibly, you have a wrong device name.
Change to the mounted partition
You can now change the current directory to the mounted partition and the directory you prepared above. Assuming you used the directory name suggested, the command would be:
cd /mnt/harddisk/resourceUpdate
You should now make sure your current directory is set correctly by displaying a directory list. Enter this command:
ls -al
If you are in the proper directory, you should see a list of the files that you placed in the directory.
Update linux.2
You are now ready to perform the update with the files you prepared. Type the following commands:
tar zxvf resourceUpdate-xxx.tgz
./updateLinux2.s
These commands will extract the script files then execute the udpate script.
If these commands did not display any errors, you should be ready to remove the boot cd, reboot and copy the updated linux.2 back to the server for testing.
What does the script do
The updateLinux2.s script files does the following for you.
- Loads the loop device driver required by the process
- Copies linux.2 to linux.gz and runs gzip to unzip the file
- Mounts the linux file (unzipped linux.2) to the linux2 mount point
- Copies files from the update directory to the linux2 directory (mounted linux file)
- Unmounts the linux file
- Gzips the linux file back up, recreating the linux.2 file
Additions
Andrew Hill
Adding the e1000 nic driver to the linux.2 file for PXE with ZfD 4. This has been tested successfully on Dell Optiplex GX260 workstations.
Download linux_2.tgz
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com


