Editor's Note: This is a neat trick. For Linux newbies, it works by selecting the last "disk" device, which, if you've just inserted the USB, will be that one.
First, the quick and dirty directions that you can use on any ZENworks Imaging CD. These are helpful when you have not customized the imaging CD.
- Connect a USB HD to the computer
- Boot the computer with the standard ZCM Imaging Boot CD
- Run the following command to create the directory to use for mounting the USB HD:
- Run the following command to mount the USB HD:
mount /dev/$(ls /dev | grep -E 'sd..' | tail -1) /mnt/usbhd
This command is nice for the linux newbie because it automatically picks out the right device to mount. You don't have to worry about things like: is it sdb1, sdc1, or ...?
To take this a step further, we cracked open the init.rd and added the /mnt/usbhd directory and set the following script to run automatically. We added the script via the add files method.
echo "Mounting usb hard drive"
usb=$(ls /dev | grep -E "sd.." | tail -1)
mount /dev/$usb /mnt/usbhd
echo "drive is mounted and ready for use"
The best part of the script is its ability to simplify and demystify what can be a hard to grok process of mounting the correct device. I know as a linux newbie it was tricky to know which device to mount and when. I hope to enable our staff to use Novell ZCM toolset to its fullest potential and I hope this may help you too.
I want to add a special thanks to Marlene. She built the script above off of my idea of a process outlined with the quick and dirty steps.
P.S. This assumes you have formatted the external USB hard drive with EXT2, EXT3, or reiserfs.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.