System information
Sharing and maintaining SLES 10 SP2 Linux under z/VM 47
Backing up and modifying /etc/init.d/boot script ...
Backing up and patching /etc/init.d/boot.rootfsck script ...
patching file /mnt/target/etc/init.d/boot.rootfsck
Backing up and copying modified /etc/fstab file ...
Copying /etc/fstab file
Backing up and modifying /etc/zipl.conf file ...
Running zipl in target environment ...
...
Copying source /etc/, /root/ and /srv/ to target /local/ ...
Making mountpoint for R/O RPM Database...
Manipulating /etc/init.d and /sbin on /mnt/target ...
Cleaning up ...
Setting device 0.0.21b0 offline
...
Exiting with rc 0!
The S10GOLD 21B6 disk is being linked read-only. This is the gold /var/ partition, which
contains the RPM database. The script mnt2rogld.sh alters /etc/init.d/boot.local to bind-
mount the /var/lib/rpm/ directory over the read-write version present on any read-only
clone. This is accomplished with the following command:
mount -n -o ro --bind /local/.var/lib/rpm /var/lib/rpm
Bind-mounting /var/lib/rpm/ on S10GOLD prevents read-only systems from falling out of line
with the gold RPM database. Otherwise, when an RPM is added to a gold disk, each
individual read-only clone would need to rebuild the database. The 21B6 disk is linked as the
0320 disk and mounted at /local/.var/. The RPM database is then bind-mounted from there
to /var/lib/rpm/.
You should now be able to logon to S10ROGLD and try the new system.
Testing the newly created system
Logon to S10ROGLD to test the newly created system. Boot Linux from 1B0. :
LOGON S10ROGLD
00: NIC 0600 is created; devices 0600-0602 defined
00: z/VM Version 5 Release 4.0, Service Level 0801 (64-bit),
Tip: If the script fails, you can immediately issue the command echo $? to get the return
code. That value should isolate the line in the script that is failing, because each exit from
the script has a unique exit value.
Also, if you run the script a second time after failing, you may get an error that a file system
is already mounted over /mnt/source/ or /mnt/target/. A helper script has been written
named offliner.sh. If the mnt2rogld.sh fails, run offliner.sh to clean up any remaining
linked disks.