Chicago Endpoint Management User Group

 View Only

Linux for Imaging: Not Using the eXpress Share to Host the Image 

Nov 07, 2008 11:00 AM

When imaging using Linux there are times when you want to deploy an image from another location other than the eXpress share, doing this can get pretty messy or downright impossible. The main issue is that you cannot just simply go to the Distribute Disk Image task and just browse for the image that you want to deploy if it is not on the eXpress share.

Solution

One solution that I have seen is to use a script that calls RDeployT to deploy an image directly from the share that is outside of the eXpress share then deal with the sysprep.inf injection handled in subsequent scripts. There is no need to recreate the wheel.

The best way I have found to use another shares outside of the eXpress share is done in 3 parts. The first is to setup the share so that the account that accesses the eXpress share also has access to your other share. Second, create the share mount in the Linux automation OS. The last step is to point the disk image file in the Distribute Disk Image task to the explicit location and make sure that Disable Image Path Validation is checked.

Solution Steps

1. Prepare the Share

Make sure that the account that is used to mount the eXpress share has at least read access to the other share that contains the images you would like to deploy.

2. Prepare Linux Boot Disk

Below are the steps to edit the Linux boot disk, but the mount point setup is the same for the PXE booting.

  1. Open the Boot Disk Creator
  2. Right click on your Linux boot disk and select Edit Configuration
  3. Click Next 6 times until you reach the Linux Network Mount Points screen
  4. Select the line below the DS mount point and click Edit
  5. Type in the location of the share and what you want to mount is as
    Example: If I wanted to mount a share called images on a server called OtherServer as otherimages I would enter //OtherServer/images /mnt/otherimages (Note: There is a space between the share (//OtherServer/images) and the name that you give it when it mounts (/mnt/otherimages), which we use in the next section)

3. Setting Up the Distribute Disk Image Job

This is where the other two steps come together so you can deploy the image from a different server.

  1. Create a new Distribute Disk Image task
  2. In Name type /mnt/otherimages/someimage.img (Note: /mnt/otherimages is what you set the mount point to be called in step 2)
  3. Check the box next to Disable Image Path Validation. If you do not check that box then DS will fail the task right away
  4. Select Linux for your pre-boot environment
  5. Click Finish

If you have any questions please feel free to e-mail me or leave a comment

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
jpg file
6153.jpg   3 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Mar 06, 2009 10:16 AM

In DS 6.9 a lot of new environment variables were introduced for all of the pre-boot environments.

Here's a dump of Altiris variable (with sample values) from my Linux environment (but they are also present in DOS/WinPE):

ALTIRIS_BDC=BDC6.9.9023.318
ALTIRIS_BOOTDEVICE=PXE
ALTIRIS_BOOTDISK=
ALTIRIS_BOOTTYPE=AUTOMATION
ALTIRIS_DS_SERVER=JLT-ATRS1
ALTIRIS_DS_SHARE=eXpress
ALTIRIS_PREBOOT=LINUX
ALTIRIS_PREBOOT_ID=LINUX_X86
ALTIRIS_PREBOOT_NAME=Linux
ALTIRIS_PREBOOT_NAME2=Linux
ALTIRIS_PREBOOT_SUBSUBTYPE=LINUX
ALTIRIS_PREBOOT_SUBTYPE=LINUX
ALTIRIS_PREBOOT_UID=LINUX_X86
ALTIRIS_PROCESSOR=x86
ALTIRIS_PXE_BOOTPATH='MenuOption130\X86PC'
ALTIRIS_PXE_CLIENTMAC=000C29E847FC
ALTIRIS_PXE_ID=130
ALTIRIS_PXE_INTERFACE=eth0
ALTIRIS_PXE_IP=169.254.29.5
ALTIRIS_PXE_OID=130
ALTIRIS_PXE_RID=130
ALTIRIS_PXE_SERVER=JLT-ATRS1
ALTIRIS_SHARE=/mnt/ds
ALTIRIS_UNC=//JLT-ATRS1/eXpress
ALTIRIS_VER=DS6.9

I've highlighted the 2 variables that would allow you to map to your local PXE Server (which in 99% of the time is also your local package server / image store).

Mar 03, 2009 03:27 PM

 

I’m running a pre script the details of which are shown next

imagebrowser image

In essence I am copying a modified server.lst file as well as the getsrv.exe file from the default express share into a newly created “tools” directory. The getsrv.exe then determines the subnet, compares this against the server.lst file, extracts the appropriate server name and runs this against the bat file. The last net use cmd make the appropriate local share available.

imagebrowser image

The details concerning the image source. Note the disable path validation. It will complain when you enter this because in essence the G: drive does not exist, but just override it and it will be fine.

imagebrowser image

The details of the server.lst file. Note it’s placement and that the deployment server folder is shared to the default express donation.

A sample of a modified server.lst file

Dec 21, 2008 09:49 PM

At my last job we had a few low bandwidth remote locations and mapping all of the remote image stores with asmbmount wasn't a viable option. I wound up utilizing the token for the agent's IP address to figure out which subnet the client was in, then map the appropriate share based on the results of that. This made future expansion easy because I'd only have to edit the imaging script instead of recompile the PXE image.

Nov 12, 2008 08:12 AM

TheDude is right, part of creating the PXE image is adding mapped locations. There is no need to modify files after creating the image. For users with multiple sites it is actually nice to make a script to map the drives for you. So if a user is at a different site, they can use the same job to image a computer (pulling the image) because you do not want to image a hard drive over the WAN. I don't know how most users an tell the difference between their sites, but just make a job with conditions that will seperate your sites and run a script per site for imaging. The script should like the following:
mkdir -p "/mnt/images"
asmbmount -b -d DOMAIN -f /Deploypw.pwl //ImageSRV/images /mnt/images

DOMAIN is obviously your domain.
DeployPW.pwl is actually the first 8 charactures of the username you are using when creating the PXE image to map the express share. TheDude is most likely using username SysAltiris (just a guess from his mount.local file) instead of sysaltir.
Last ImageSRV is the server housing your image share.

Nov 11, 2008 01:08 PM

Why edit the "rc.local" file by hand when the wizard will do it for you?
When you perform the steps in Step 2 of this guide, the wizard will add two new lines to the "mounts.local" file for mounting the new share. It will first make the the directory under "/mnt" and then will run "asmbmount" program. It actually does exactly what you're doing by hand. As an example, this is what my "mounts.local" file looks like
#!/bin/sh
# Mount an SMB (Windows) share
# mkdir /mnt/smb
# asmbmount [-d domain] -f pwlfile //server/share /mnt/smb
# Mount an NFS mount
# mkdir /mnt/nfs
# mount -t nfs server:/directory /mnt/nfs -o nolock
# Mount a ramdisk -- / is on /dev/ram0
# mkdir /mnt/tmp
# mke2fs /dev/ram1
# mount /dev/ram1 /mnt/tmp
# Mount a cdrom -- / is on /dev/cdrom
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom
mkdir -p "/mnt/ds"
asmbmount -b -d ADILSTU -f /sysaltir.pwl //Altiris-DS/eXpress /mnt/ds
mkdir -p "/mnt/nas"
asmbmount -b -d ADILSTU -f /sysaltir.pwl //nas1/public /mnt/nas

Also, I think you meant to say "Alt" instead of "Ctrl" when switching between the two different terminals.

Nov 08, 2008 10:34 AM

We have several main image repositories. We map these in our Linux PXE boot files, then never worry about them again. In the imaging job, you just disable the path box underneath the path to the image, using a typical Linux path like /mnt/images/imagename.img
To do this, add the directory and path in the rc.local file (under /etc) before the last line and after the mounts.local line. You can see this by choosing to edit your boot image.
Actual additions would look something like these 2 lines:
mkdir /mnt/images
asmbmount -b -d workgroup -f ./Administ.pwl //ipaddress/sharename /mnt/images
This always works in our environment. After modifying the rc.local say yes to save and rebuild the boot image.
We do this for many mount points and that way, if we need to go look for something while it's still booted to Linux PXE, we can use Control F2 to look at another screen while it's imaging, then back to Control F1 to see the imaging job progress. It's great!
This extra screen also allows you to do a showdisk to see if the partitions are like you expect them to be, while imaging. That would be /mnt/ds/techsup/Linux/showdisk or /mnt/ds/techsup/Linux/x64/showdisk for 64 bit boxes.

Related Entries and Links

No Related Resource entered.