tech.gate.io blog

Sysadmin Weblog

Find:

Create a partition file in /tmp, with content like that:

3
EFI 500MB
HPUX 100%
HPDS 400MB

 
The first digit is the number of partitions you want to create, followed by the partition name and it's size. EFI has to be the primary partition on the boot disk, of course.

To get the partition information from an existing boot disk run:
diskinfo /dev/rdisk/disk*
For the partition names, run:
idisk -p /dev/rdisk/disk*

 

DISK=$1

idisk -wf /tmp/partitionfile /dev/rdisk/${DISK}

insf -eCdisk

mkboot -e -l /dev/rdisk/${DISK}

#efi_cp -d /dev/rdsk/${DISK}s1 /tmp/AUTO.lq /EFI/HPUX/AUTO

pvcreate -fB /dev/rdisk/${DISK}_p2

vgextend vg00 /dev/disk/${DISK}_p2

for i in lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8 lvol9 lvol10

do

lvextend -m 1 /dev/vg00/$i /dev/disk/${DISK}_p2

done

DISK=$1

echo $DISK

 
The "efi_cp" command line is commented out, so just uncomment and use it if you are using vPars and know what you are doing.

 

Tags: ignite

Golden images are compressed archives, intended for system cloning or creating a customized OS image.

Part 1: Capture Image

 
Connect to an HPUX machine, with Ignite installed.

copy the file to the system you want to create an image of:
scp /opt/ignite/data/scripts/make_sys_image HOST:/tmp

Connect to the target system and start the script:
/tmp/make_sys_image -s local

Image will be stored local in /var/tmp/
(make sure that enough storage is available!)

Copy the image to the Ignite server:

showmount -e $IgniteHostname
mkdir /mnt
mount $IgniteHostname:/var/opt/ignite/archives /mnt

Part2: Create Ignite config

 
/opt/ignite/data/examples
(here you can find examples for cfg files or copy existing cfg File from /var/opt/ignite/data/Rel_B.11.XX/)

Modify cfg file:

 
run:
/opt/ignite/lbin/archive_impact -t -g /var/opt/ignite/archives/Rel_B.11.31/image_name.gz

add output to cfg file, for example:

impacts = "/" 300Kb

impacts = "/SAVE" 5Kb

impacts = "/dev" 20Kb

impacts = "/etc" 154276Kb

impacts = "/home" 368Kb

impacts = "/opt" 5976376Kb

impacts = "/root_home" 155Kb

impacts = "/sbin" 221468Kb

impacts = "/stand" 216942Kb

impacts = "/usr" 3615213Kb

impacts = "/var" 1382310Kb

 
Now you are able to use this Golden Image for Installation on other systems! (nPar or Vpar)

 

We are using IBM Tivoli Directory Server 6.1, but this is a AIX related problem, and has nothing to do with the used ldap-server

Problem description:

when logging in to an AIX 6.1 system with a ldap-user that has previously changed his password on AIX 5.3 or earlier, you are prompted for a password change, no matter when you have changed it the last time

changing the password on AIX 6.1, and logging in back to AIX 5.3, you are prompted again for a password change

AIX 5.3 sets the shadowlastchange attribute for a ldap-user in days, and shadowmax in weeks
AIX 6.1 sets shadowlastchange in seconds

as you can see, these are no AIX-attributes

 
LDAP shadowlastchange = AIX lastupdate
lastupdate defined the number of days the password was last changed in unix time

LDAP shadowmax = AIX maxage
Maxage attribute defined the maximum number of weeks the password is valid.

 
this is defined in a map file, located in

/etc/security/ldap

 
to find out, which of the map files you are using, type:

>grep "^userattrmappath" /etc/security/ldap/ldap.cfg
userattrmappath:/etc/security/ldap/2307aixuser.map

 
2307aixuser.map is default
the mapping from ldap-attributes to AIX-attributes is defined in this file

 

in AIX 5.3 TL 09 APAR IZ19073 and AIX 6.1 TL 02 APAR IZ18996 a new feature was introduced, it is possible to set the unit of attributes in the map file

on AIX 6.1 we are on TL 03, so this feature must be there, but our 2307aixuser.map file does not show the correct values

here is a part of the configfile header:
wrong (our outdated):

Format:                                                                                                  
# AIX_ATTR   AIX_ATTR_TYPE   LDAP_ATTR   LDAP_VALUE                                                        
#                                                                                                          
# AIX_ATTR:     AIX attribute name                                                                         
# AIX_ATTR_TYPE AIX attribute type - SEC_CHAR, SEC_INT, SEC_LIST, SEC_BOOL                                 
# LDAP_ATTR     LDAP attribute name                                                                        
# LDAP_VALUE    LDAP attribute type - "s" for single-valued attribues                                      
#               or "m" for multi-valued attributes.

 
correct File, with the LDAP_UNIT column:
(on the bottom of this blog entry, you'll find the complete file as attachment)

# Format:                                                                                                   
# AIX_ATTR   AIX_ATTR_TYPE   LDAP_ATTR   LDAP_VALUE  LDAP_UNIT                                              
#                                                                                                           
# AIX_ATTR:     AIX attribute name                                                                          
# AIX_ATTR_TYPE AIX attribute type - SEC_CHAR, SEC_INT, SEC_LIST, SEC_BOOL                                  
# LDAP_ATTR     LDAP attribute name                                                                         
# LDAP_VALUE    LDAP attribute type - "s" for single-valued attribues                                       
#               or "m" for multi-valued attributes.                                                         
# LDAP_UNIT        LDAP unit for certain attributes. Valid values are:                                      
#                                                                                                           
#                seconds, minutes, hours, days, weeks, months, and years                                    
#                for maxage, minage, maxexpires, and pwdwarntime.                                           
#                                                                                                           
#                bytes, 512bblocks, kilobytes, megabytes, and gigabytes                                     
#                for cpu, cpu_hard, fsize, fsize_hard, rss, rss_hard,                                       
#                stack, stack_hard.                                                                         
#                                                                                                           
#                na for all other attributes or if no unit mapping                                          
#                required.                                                                                  
#                                                                                                           
#                For example, maxage on AIX is in weeks. If your                                            
#                corresponding LDAP attribute uses other unit, e.g.,                                        
#                seconds, you will need to set the unit to seconds, so                                      
#                the mapping line becomes:                                                                  
#                                                                                                           
#                maxage  SEC_INT  shadowMax  s   seconds                                                    
#

 
so we had the right OS-level, but the wrong configfile?

AIX-Support sent us the correct configfile, set

lastupdate        SEC_INT                shadowlastchange        s        days

 
restart the ldap-client:

/usr/sbin/restart-secldapclntd

 
should work now

but don't forget, you need the right maintenance-level or fixes applied to use this feature!

 
2307aixuser.map (10.45 Kb)

I run a FreeBSD system on a VMWare machine, first for testing issue and now productive. But I start with just 8GB and ran out of space.
So i decided to enlarge the disk space. Luckily the partition was the last on the slice so I was able to use growfs

Fist of all you need the "physical" space, so in the VM-client right click your virtual machine an choose properties. In Hardware tab select the hard disk and add as much space as you want, it have to be available at least.

Now boot your BSD -System to the single user mode.

Power on → F1 → 4

 
Thats how the Disk look like in the beginning:

_____________________________________
|___________HDD______________________|
|MBR|______Slice 1__________|
    |_a_|___b___|__d__|__e__|
    |_/_|       |_/var|_/FS1|

 

To change disk layout you have to set the geom.debugflags to 16

sysctl kern.geom.debugflags=16

 
Now have a look at the “disk”

fdisk -s

 
Now you have to grow the “disk”, but fist we'll test the outcome
This will grow the slice to the entry disk

fdisk -It

 
If this looks fine, leave the -t option away

fdisk -I

reboot to singleusermode

Now you increased the slice:

_________________________________
|___________HDD__________________|
|MBR|______Slice 1_______________|
    |_a_|___b___|__d__|__e__|
    |_/_|       |_/var|_/FS1|

 
Okay now the label have to be pumped up

mount /usr
sysctl kern.geom.debugflags=16
sysinstall

 
Now Choose Postconfigs → Labels → delete label /dev/da0s1f and create a new one with more disk space and enter the old mount point. You will receive an error message that the swap device is busy and the FS couldn't be mounted but just reboot

Now you increased the partition:

_________________________________
|___________HDD__________________|
|MBR|______Slice 1_______________|
    |_a_|___b___|__d__|__e_______|
    |_/_|       |_/var|_/FS1|

 

Now we got a bigger Partition on the disk just the File system need to be pumped up

growfs -y -s 31455270 /dev/da0s1e

-s is the absolute size of the volume, you can get this from the sysinstall in the fdisk entry

And here you did the final step, you successfully increased the filesystem

_________________________________
|___________HDD__________________|
|MBR|______Slice 1_______________|
    |_a_|___b___|__d__|__e_______|
    |_/_|       |_/var|_/FS1_____|

 
now just run

fsck

and fix the superblock if needed

I run a WinXP/Sp3 host system and ran the same system in a VirtualBoxR 2.2. Every time i started my virtual box a annoying message box popped up that i should update to Virtual Box 3. Today I got time and did this. Luckily I really got time.I wanted to add the VM to my domain, for testing issue.

Installing was fine but the network of my host system didn't work! So I reinstalled it, but this didn't work too.If the error message “Virtualbox Host-Only Network has limited or no connectivity.” is shown there a some ways to solve it

First:
Deactivate the „Virtual Box Host-Only Network“ device

Second:

  • Restart windows if you started the Virtualbox software. (There is anything running in the Background which prevent a clean install)
  • Now run the repair function of the install (Right click → run as... → Repair)
  • Now Restart again.
  • Should work now

 
Third:

  • Open The network setting of „Virtual Box Host-Only Network“ (Start → Control panel → Network)
  • Right click properties → Internetprotocoll TCP/IT
  • Enter Network setting manuell

 
and at least: …just ignore it!

 
Now open the Virtual Box console and open the Settings of the machine
Activate the Adapter1
Adaptertyp: Pcnet PCI II(AM79C970A)
Connected to: Networkbridge
Name: choose your physical Network card

I was a little bit confused that I have to Choose Networkbridge, but VirtualBox handels it.
Now Start the VM and you should be able to verify you domain password at on of the Domain Controllers

If you check ipconfig -all you'll see that you get a IP from the DNS-Addressepool.

First Page Page: 4/7 Last Page
1 2 3 4 5 6 7

Feeds List