Deployment and Imaging Group

 View Only

LinuxPE Tool Packages 

Jun 10, 2015 03:24 PM

If you have a need for software that is not included in Linux PE this is a guide on how you can add it dynamacly when needed.

1 Build enviroment

To build packages you need to have a linux RHEL 5.5 where you can create the packages.

 

2 Create package structure

1.Download the development folder attached to this post as a zip file and unzip it on your build host.

unzip tools.zip

2.Create a package for linuxPE tools create the folder structure:

mkdir -p pkg_[pkg name]/bin



and if needed create the folders:

mkdir -p pkg_[pkg name]/etc
mkdir -p pkg_[pkg name]/dev
mkdir -p pkg_[pkg name]/root

3.Copy the bin file either from the system or compile your own and add it to the pkg_[pkg name]/bin folder.

4.Run the following command to include all needed libs:

./copyLibs.sh pkg_[pkg name]

5.Run the following command to build tgz files and iso:

./build.sh  



the tools.iso file is created in the same folder and the tgz files in iso_root

3 Install packages to LinuxPE

The package can be added to a LinuxPE in several ways.

3.1 Alt 1: Add it in the rootfs.gz follow the guide:

1.Copy rootfs.gz from to you Linux build environment.

C:\Program Files\Altiris\Altiris Agent\Agents\Deployment\SBS\Images\[LinuxPE]\x86PC\

2.Run the following commands:

mkdir rootfs_mount
gunzip rootfs.gz
mount -o loop rootfs rootfs_mount

3.Unpack the pkg_[pkg name].tgz in the root of the rootfs filesystem mounted in folder rootfs_mount.

tar -zxf pkg_[pkg name].tgz

4.Then run the following commands to create the new rootfs.gz

cd ..
umount rootfs_mount
fsck.ext2 -fpcv rootfs
gzip -9 rootfs

5.Then copy rootfs.gz on your altiris and all site servers to the folder

c:\Program Files\Altiris\Altiris Agent\Agents\Deployment\SBS\Images\[LinuxPE]\x86PC\

3.2 Alt 2: Add the tgz package files to nsserver and mount it in LinuxPE

Create a  folder on your ns server, copy all *.tgz files created in iso_root by the build script and share it as rootfs_pkg 

This is done by creating a script task containing the following UNIX script and replace the [User] and [password] with a user on your ns server uncomment the package lines that you want to install:

mkdir -p /mnt/rootfs_pkg 2>/dev/null
mount -t cifs //$ALTIRIS_PXE_IP/rootfs_pkg /mnt/rootfs_pkg -o username=[User],password=[password]

cd /
# pkg_dropbear contains: ssh server and client with scp support
#tar -zxf /mnt/rootfs_pkg/pkg_dropbear.tgz
# start the ssh server
#/etc/rc.dropbear start

#tar -zxf /mnt/rootfs_pkg/pkg_base64.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_strace.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_wget.tgz

#Diffrent dns clients
#tar -zxf /mnt/rootfs_pkg/pkg_dig.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_host.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_nslookup.tgz


#pkg_tools contains: dropbearconvert, dropbearkey, ftp, ftpd, ncat, nmap, nping, telnet
#tar -zxf /mnt/rootfs_pkg/pkg_tools.tgz


3.3 Alt 3: Use iso file and mount it in LinuxPE

This method can eather be done by burning the iso file created and put it in target server or by mounting it using ILOM, DRAC, vsphare or any other remote server management system depending on hardware.

mkdir -p /mnt/rootfs_pkg
mount /dev/[cddev] /mnt/rootfs_pkg

Installation of packages is done by creating a script task containing the following UNIX script and uncomment the package lines that you want to install or run the commands directly in LinuxPE:

cd /
# pkg_dropbear contains: ssh server and client with scp support
#tar -zxf /mnt/rootfs_pkg/pkg_dropbear.tgz
# start the ssh server
#/etc/rc.dropbear start

#tar -zxf /mnt/rootfs_pkg/pkg_base64.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_strace.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_wget.tgz

#Diffrent dns clients
#tar -zxf /mnt/rootfs_pkg/pkg_dig.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_host.tgz
#tar -zxf /mnt/rootfs_pkg/pkg_nslookup.tgz


#pkg_tools contains: dropbearconvert, dropbearkey, ftp, ftpd, ncat, nmap, nping, telnet
#tar -zxf /mnt/rootfs_pkg/pkg_tools.tgz

 

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
tools.zip   9.23 MB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Related Entries and Links

No Related Resource entered.