ATT8231: Creating a Customized USB Thumb Drive for ZCM Imaging Methods for creating a customized bootable USB Thumb Drive
Full text
(2) Objectives. 2. •. Understanding ZCM 11 SP3 USB Imaging Support. •. Using the ZENUsbcreator Utility. •. Creating a Custom USB Thumb Drive for ZCM Imaging. © Novell, Inc. All rights reserved..
(3) Understanding ZCM 11 SP3 USB Imaging Support.
(4) Understanding ZCM 11 SP3 USB Imaging Support •. Previous versions of ZCM never officially supported booting the ZCM Imaging Distro from USB Thumb Drive –. Could be done but involved using Open Source unsupported code, such as: –. •. 4. Unetbootin, the Syslinux Project’s ISOLINUX. ZCM 11 SP3 offers a supported way to generate a bootable USB Thumb Drive for the ZCM Imaging Distro –. Any thumb drive supported by the SLES 11 SP3 kernel is supported. –. Requires that you only use a Novell supported utility to generate the bootable USB Thumb Drive. © Novell, Inc. All rights reserved..
(5) Understanding ZCM 11 SP3 USB Imaging Support (continued) •. Process to build a “default” version of the ZCM Imaging Distro on a USB Thumb Drive is very straightforward! –. Burn either the bootcd.iso or bootcd_tntfs.iso to a CD / DVD. –. Boot up a machine using that CD / DVD. –. Select “Manual Mode” to get to the bash prompt. –. Insert your USB Thumb Drive into the machine. –. Run ZENUsbcreator –. •. 5. Case is significant for the command name!. And that’s all it takes!. © Novell, Inc. All rights reserved..
(6) Understanding ZCM 11 SP3 USB Imaging Support (continued) •. ZENUsbcreator must be run from the CD-based ZCM Imaging Distro –. Burn bootcd.iso or bootcd_tntfs.iso to a CD / DVD. –. ISOs can be found -. –. –. On Linux Primary: /opt/novell/zenworks/preboot/bin/winutils. –. On Windows Primary: c:\Program Files (x86)\Novell\ZENworks\bin\preboot. Remember that: –. bootcd.iso contains only the Legacy NTFS File System Driver. –. You must use the bootcd_tntfs.iso if you want to use the Tuxera NTFS High Performance File System Driver on your USB Thumb Drive –. 6. Injecting the Tuxera Driver into the ZCM Imaging Distro using the ZCC creates bootcd_tntfs.iso. © Novell, Inc. All rights reserved..
(7) Using the ZENUsbcreator Utility.
(8) Using the ZENUsbcreator Utility. 8. •. Running ZENUsbcreator. •. Understanding ZENUsbcreator Processing. © Novell, Inc. All rights reserved..
(9) Using the ZENUsbcreator Utility Running ZENUsbcreator •. •. 9. Purpose: –. Create a USB Thumb Drive that can boot the ZCM Imaging Distro on a BIOS or UEFI-based machines. –. Remove all the existing partitions on a thumb drive. –. Upgrade a bootable USB drive. Can only be launched from CD / DVD –. ZENUsbcreator throws an error if its not launched while booted up from the CD / DVD. –. Located in the /bin directory on the CD / DVD. –. ZENUsbcreator is a wrapper program that calls a bash script named ZEN-usb-creator. © Novell, Inc. All rights reserved..
(10) Using the ZENUsbcreator Utility Running ZENUsbcreator •. Syntax: –. 10. ZENUsbcreator [--help]. © Novell, Inc. All rights reserved..
(11) Using the ZENUsbcreator Utility Running ZENUsbcreator •. 11. After choosing one of the previous four options, the available thumb drives to act upon are shown next:. © Novell, Inc. All rights reserved..
(12) Using the ZENUsbcreator Utility Understanding ZENUsbcreator Processing •. 12. After selecting the thumb drive, you’re given a final “sanity check” :. © Novell, Inc. All rights reserved..
(13) Using the ZENUsbcreator Utility Understanding ZENUsbcreator Processing •. 13. ZENUsbcreator will create a second partition on the USB Thumb Drive –. Its an NTFS partition. –. Could be used to store zmg image files on the thumb drive. © Novell, Inc. All rights reserved..
(14) Using the ZENUsbcreator Utility Understanding ZENUsbcreator Processing •. This is what happens behind the scenes: Call the ZEN-usb-creator script. Launch ZENUsbcreator. 1. Booted from CD?. YES. 4. Detect and Display USB Linux Device Names. NO Throw An Error. NO. Copy required files to the EFI FAT32 boot partition. YES Sanity Check: Format Drive?. Create the grub config file Display Success Message. 14. © Novell, Inc. All rights reserved.. Create a 160MB ext2 Partition. Create a NTFS partition on remainder of drive. Create a 160MB FAT32 Partition. Create a NTFS partition on remainder of drive. Get input from user on Linux Device to use EXIT ZEN-usb-creator. Initialize the GPT. UEFI. Get input from user on Operation to perform. BIOS. Formatting for BIOS or UEFI?. Initialize the MBR. Copy required files to ext2 boot partition. Create the grub config file. Install grub boot loader. 2. 3.
(15) Using the ZENUsbcreator Utility Understanding ZENUsbcreator Processing •. This is what happens behind the scenes: –. If the variable CDBOOT equals YEScd then the machine is booted up using the ZCM CD-based Imaging Distro. –. Copies contents of boot, addfiles, & dev directories from the CD to USB drive at root. The settings.txt file from CD is copied to USB drive.. –. –. 15. 1. 2. 3. Creates the menu.lst file under the boot/grub directory. This file does such things as specifying the Initial RAM Drive, root file system, and kernel name. 4. UEFI requires FAT32 support for the EFI System Partition. © Novell, Inc. All rights reserved..
(16) Creating a Custom USB Thumb Drive for ZCM Imaging.
(17) Creating a Custom USB Thumb Drive for ZCM Imaging. 17. •. Overview of the process. •. Customizing using the Addfiles Method. •. Customizing by Modifying the CD’s System Resource Files (initrd and root). © Novell, Inc. All rights reserved..
(18) Creating a Custom Thumb Drive for ZCM Imaging Overview •. Since ZENUsbcreator must be launched when booted from the CD-based version of the ZCM Imaging Distro: –. Changes made to bootcd.iso or bootcd_tntfs.iso get imparted to USB Thumb Drive when ZENUsbcreator is run from that iso –. –. 18. Important: So don’t mess with ZENUsbcreator or ZEN-usb-creator (the script) on the modified iso!. Methods you can employ to modify the CD-based ZCM Imaging Distro apply equally to USB-based distro –. Using the Addfiles Method is the easiest. –. Can also modify the CD’s System Resource Files (initrd & root). –. However – there is no code in ZENUsbcreator for dealing with a driverupdate file system –. driverupdate is a CRAMFS file system with a particular directory structure. –. driverupdate can be used to get modifications into the CD-based distro. © Novell, Inc. All rights reserved..
(19) Creating a Custom Thumb Drive for ZCM Imaging Overview of CD boot process you’ll modify for USB Thumb Drive creation. Control to: zenworks.s script What can be modified on CD for USB Thumb Drive 19. © Novell, Inc. All rights reserved.. ABCD EFGH IJKLM A. ASDF.
(20) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Addfiles •. Easiest method to modify bootcd.iso / bootcd_tntfs.iso: –. Uses the original contents of ISO then your custom content is placed into a special directory. Then you create a new iso.. –. “Special directory” is named: addfiles –. –. 20. Is an empty directory on the original iso files. During CD boot process: content of addfiles is added to the RAM drive. © Novell, Inc. All rights reserved..
(21) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Addfiles •. The “addfiles” method is the preferred method –. –. Great for getting the following in the Imaging Distro: –. Bash scripts. –. Binary executables. –. Implementing some types of changes to the settings.txt file. Not the method to use to add new content into the Imaging distro that must be available during the boot process when the kernel or the init process is in control –. 21. Example: new device drivers. © Novell, Inc. All rights reserved..
(22) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Addfiles (continued) •. See Section F.4.1 of the doc available on our web site at: https://www.novell.com/documentation/zenworks113/zen11_cm_preboot_imaging/data/bookinfo.html. 22. –. 1. Mount the desired boot CD iso to a /mnt/bootcd directory. –. 2. Created a working directory under root’s home called isolinux. –. 3.Copied all of what’s in /mnt/bootcd to the isolinux directory. –. 4. Modified the settings.txt file in the isolinux directory to set: –. the IP Address for the PROXYADDR variable. –. The value of the IMGCMD variable to the name of a custom script that you copied to the isolinux/addfiles/bin directory. –. If required change netsetup, HostIP, netmask, and gateway for static IP addressing. © Novell, Inc. All rights reserved..
(23) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Addfiles (continued) •. From Section F.4.1 of the zen11_cm_preboot_imaging.pdf:. 23. –. 5.Use chmod command to make sure settings.txt and your custom scripts are executable. –. 6. Use the mkisofs command to create a new iso file from the source tree in the isolinux directory. © Novell, Inc. All rights reserved..
(24) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. This method is the most time consuming. •. Needs to be used when the content you want to add must be available:. •. –. Right after the kernel mounts the initial RAM drive (initrd). –. When init is processing. –. When the zenworks.s script itself has control. Example use cases –. Typically used to add custom menu programs. –. Add LAN drivers –. –. Customize zenworks.s or the scripts it calls –. 24. Requires modifying the initrd file system. Requires modifying the root file system. © Novell, Inc. All rights reserved..
(25) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. From Section F.4.2 of zen11_cm_preboot_imaging.pdf:. •. Modifying the initrd file system:. 25. –. 1. Create a mount and a couple working directories (/work-iso and /work-initrd and /mod-initrd for instance). –. 2. Mount bootcd or bootcd_tntfs iso to the /work-iso mount point. –. 3. Copy /work-iso/boot/i386/loader/initrd to the /work-initrd directory. –. 4. Rename initrd in /work-initrd to initrd.gz. –. 5. gunzip initrd.gz. –. 6. Change directory to /mod-initrd. –. 7. cpio –idmuv < /work-initrd/initrd (/mod-initrd now contains the content of the original initrd file system.). © Novell, Inc. All rights reserved..
(26) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. 26. Modifying the initrd file system (continued): –. 8. Copy the content you want in the new initrd to the appropriate directories under the /mod-initrd directory (such as bin, usr, or var). –. 9. rm /work-initrd/initrd (Deletes the original initrd). –. 10. find . | cpio –o –H newc > /work-initrd/initrd (This pipeline creates the new initrd with your content and puts it in the /work-initrd directory.). –. 11. Change into the /work-initrd directory. –. 12. gzip –v9c initrd > initrd.gz (Creates a new archive of the initrd containing your changes.). –. 13. Rename initrd.gz to initrd.. © Novell, Inc. All rights reserved..
(27) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. 27. Modifying the initrd file system (continued): –. 14. Copy initrd from the /work-initrd directory into the /workiso/boot/i386/loader directory. –. 15. Use mkisofs to create a new iso file containing your modified initrd file system using the /work-iso directory as the source tree.. © Novell, Inc. All rights reserved..
(28) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. 28. Modifying the root file system: –. 1. Create a mount point (/work-iso) and a working directory under root’s home directory (/root/modroot for instance). –. 2. Mount bootcd or bootcd_tntfs iso to the /work-iso mount point. –. 3. Copy /work-iso/boot/i386/root to root’s home directory. –. 4. Change directory to root’s home directory (/root). –. 5. Rename root in root’s home directory (/root) to root.gz. –. 6. gunzip root.gz. –. 7. mount –o loop root mod-root (Now the modroot in root’s home directory has the original contents of root in extracted form.). © Novell, Inc. All rights reserved..
(29) Creating a Custom Thumb Drive for ZCM Imaging Customization Method: Modify System Resource Files •. 29. Modifying the root file system (continued): –. 8. Copy your content to the appropriate directories under the modroot directory. –. 9. umount modroot. –. 10. gzip –v9c root > root.gz. –. 11. Rename root.gz to root. –. 12. Copy root in root’s home directory to the /workiso/boot/i386/ directory. –. 13. Use the mkisofs command using the /work-iso directory as the source tree to create a new boot CD iso whose root file system contains your changes.. © Novell, Inc. All rights reserved..
(30) Exercises – Let’s Play!.
(31) Important VMware Controls •. Give “focus” to a VM by clicking in it –. When a VMware virtual machine has focus it owns the real keyboard and mouse of the Host machine –. •. Release “focus” from a VM by pressing Ctrl+Alt –. •. This allows you to switch focus to another VM or launch a program from the Host desktop. Use the VMware Toolbar to navigate between VM’s or use a particular VM –. Quick Switch button makes it easy to move from VM to VM. –. Full Screen button resizes VM to full screen –. 31. All keystrokes and cursor movements affect the virtual machine. Ctrl+Alt exits full screen mode. © Novell, Inc. All rights reserved..
(32) Exercise 1 – Task Overview. 32. Task. Notes. To familiarize yourself with the ZENUsbcreator utility.. Will create a bootable USB Thumb Drive that can boot up the ZCM Imaging Distro: • Will use the default bootcd_tntfs.iso file. Boot W7-64-WS2 VM up using bootcd_tntfs.iso. Will use ZENUsbcreator to create a bootable USB Thumb Drive for the ZCM Imaging Distro on the provided USB Thumb Drive.. Boot W7-64-WS2 VM using the Plop Boot Manager. This boot manager (plpbt.iso) will be attached to the VM’s Virtual CD and will then allow the VM to be booted from your thumb drive. © Novell, Inc. All rights reserved..
(33) Exercise 2 – Task Overview Task. Notes. Create a modified version of a ZCM Imaging USB Thumb Drive. Will modify bootcd_tntfs.iso file to create a new iso (usb-lab2.iso) used to run ZENUsbcreator. usb-lab2.iso will contain: •. •. The zusbc.s script. This script can perform several different types of imaging operations including restoring the “DA – NSI Standard Base Image” from the USB drive The parted, nano, hexedit, and unix2dos utilities that are not native to the ZCM Imaging Distro. Create new ISO file (usblab2.iso). Will modify the settings.txt file to automatically launch zusbc.s.. Boot WS-64-WS2 VM using new usb-lab2.iso file. After booting your modified CD-based version of the ZCM Imaging Distro you’ll run ZENUsbcreator to create a bootable thumb drive containing those modifications.. Boot WS-64-WS2 VM using the Plop Boot Manager. Testing new USB Thumb Drive modifications. Plop will allow you to boot up your VM using the thumb drive. Should see the menu displayed by zusbc.s. 33. © Novell, Inc. All rights reserved..
(34) Corporate Headquarters 1800 South, Novell Place Provo, Utah 84606. 34. © Novell, Inc. All rights reserved.. 801.861.7000 (Worldwide) 800.453.1267 (Toll-free). Join us on: www.novell.com.
(35) This document could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein. These changes may be incorporated in new editions of this document. Novell, Inc. may make improvements in or changes to the software described in this document at any time. Copyright © 2014 Novell, Inc. All rights reserved. All Novell marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States. All third-party trademarks are the property of their respective owners..
(36)
Related documents
You can use a Linux desktop or laptop system with RedHat 6.3 to create a bootable USB flash drive that is capable of installing Juniper Secure Analytics (JSA) software. Before
If your Thumb Drive is 20GB or more, you can copy the .GHO file (the Ghost image) and other drivers to the Thumb Drive.. Otherwise, leave the Ghost image on the computer’s D drive,
Paragon’s Recovery Media Builder, a simple alternative to Boot Media Builder, can help you prepare either Linux or WinPE-based bootable environment on a USB thumb drive or in an
You’ll be wiping this drive before use, so make sure you have saved any files on it onto another computer, USB drive or external hard drive FIRST !.. A clean, genuine copy of
Let's grab a copy of the Backtrack 4 Final ISO.. Now that we have the goods in hand, we can get to cooking. This tutorial is based on booting Backtrack 4 first. This means that
Active@ Boot Disk Creator helps you prepare a bootable CD, DVD or USB mass storage device that you may use to start a machine with a damaged hard drive and recover data,
government and to meet the needs of those who transport secret corporate data, an IronKey flash drive (aka/ ‘USB drive,’ or ‘thumb drive’) is the most secure portable data
When AI-HomeGuardNVR image is installed on to the virtual disk, you need to remove the USB drive (virtual disk) from the VM (figure 7.6), and then unplug the USB drive and boot the