ISOs may be loaded from an HTTP server using Virtual Media with the iLO command-line interface.
Example:
Note: use IPs when specifying an HTTP server.$ ssh -l ilo-admin 10.215.14.5 User:ilo-admin logged-in to ilo.(10.215.14.5) iLO Advanced 1.82 pass1 at 15:53:34 Aug 22 2005 Server Name: ilo Server Power: On >hpiLO-> vm cdrom insert http://10.251.20.20/RHEL4.6-i386-ES.iso
Note: the "NO_BOOT" means that the system will not boot off the "connected" image. And the "Image URL" option is not shown with ILO version 1.>hpiLO-> vm cdrom get VM Applet = Disconnected Boot Option = NO_BOOT Write Protect = Yes Image Inserted = Connected Image URL = http://10.251.20.20/RHEL4.6-i386-ES.iso
Note: The next boot will be from the connected image. You can also use "vm cdrom set connect" to permanently connect the ISO image. If you want to get rid of the ISO image, use "vm cdrom eject".>hpiLO-> vm cdrom set boot_once
Now, the server will reboot and boot off the ISO image. If you ever run into a situation where it won't boot of the ISO image, but simply skips over booting from the CDROM, then make sure to check if any physical cables are connected to the server, for example, KVM cables or USB keyboards. If this is the case, the server will not boot of any virtual media. Unplug those cables and reboot again, to make the server boot of the ISO image.>hpiLO-> power reset
You can grow your ext3 filesystems while online: The functionality has been included in resize2fs so to resize a logical volume, start by extending the volume:
# lvextend -L +2G /dev/systemvg/homelvAnd the resize the filesystem:
# resize2fs /dev/systemvg/homelvBy omitting the size argument, resize2fs defaults to using the available space in the partition/lv.
Topics: Installation, Red Hat / Linux↑
Linux Kickstart using a configuration file on a USB thumbdrive
In case you're wondering "How do I load a kickstart configuration file on my USB thumbdrive, while installing Linux?", we can tell you, it is really simple. You only have to know the syntax to do this.
First, make sure that both the Linux DVD and the USB thumdrive are connected to the system, either directly, or through virtual media. Then, to install linux, type:
# linux ks=hd:sdc:/ks.cfg(Replace "ks.cfg" with the actual Kickstart configuration file name)
More information can be found here:
- https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-kickstart2-startinginstall.html
- http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-kickstart2-startinginstall.html
- http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/ch-kickstart2.html
Red hat Linux provides following tools to make changes to Network configuration such as add new card, assign IP address, change DNS server, etcetera:
- GUI tool (X windows required) - system-config-network
- Command line text based GUI tool (No X windows required) - system-config-network-tui
- Edit configuration files directly, stored in /etc/sysconfig/network-scripts directory
Editing the configuration files stored in /etc/sysconfig/network-scripts:
First change directory to /etc/sysconfig/network-scripts/:
# cd /etc/sysconfig/network-scripts/You need to edit / create files as follows:
- /etc/sysconfig/network-scripts/ifcfg-eth0 : First Ethernet card configuration file
- /etc/sysconfig/network-scripts/ifcfg-eth1 : Second Ethernet card configuration file
# vi ifcfg-eth0Append/modify as follows:
Save and close the file. Define the default gateway (router IP) and hostname in /etc/sysconfig/network file:# Intel Corporation 82573E Gigabit Ethernet Controller (Copper) DEVICE=eth0 BOOTPROTO=static DHCPCLASS= HWADDR=00:30:48:56:A6:2E IPADDR=10.251.17.204 NETMASK=255.255.255.0 ONBOOT=yes
Save and close the file. Restart networking:# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=host.domain.com GATEWAY=10.251.17.1
# /etc/init.d/network restartMake sure you have correct DNS server defined in /etc/resolv.conf file. Try to ping the gateway, and other hosts on your network. Also check if you can resolv host names:
# nslookup host.domain.comAnd verify if the NTP servers are correct in /etc/ntp.conf, and if you can connect to the time server, by running the ntpdate command against one of the NTP servers:
# ntpdate 10.20.30.40This should synchronize system time with time server 10.20.30.40.
Topics: Red Hat / Linux↑
Dmidecode
Should you ever need hardware information from your Linux server, then a very useful command is dmidecode. it is a tool for dumping a computer's DMI table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.
For example:
# dmidecode | awk 'BEGIN {RS = "\n\n"} /System Information/'
Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: HP
Product Name: ProLiant DL360 G5
Version: Not Specified
Serial Number: MX8Q835AYV
UUID: 34353379-3232-4D85-5183-333843155695
Wake-up Type: Power Switch
SKU Number: 457922-001
Family: ProLiant
When you have a lot of Putty screens, or if you frequently login to a host through a jump server, it's very easy to set the title of the Putty window, for exmaple to the hostname of the server you're currently logged into. This way, you'll easily recognize each telnet screen, and avoid entering -possibly destructive- commands in the wrong window:
echo "\033]0;`hostname`\007"For example, you can add this line to /etc/profile, and have the hostname of the PuTTY title set automatically.
How do you install the Linux Web Based System Manager (websm) client from an HMC version 3.3.6, if your only access to the system is through ssh? The following procedure can be used:
First, get the Linux websm software of the HMC to the Linux system:
# ssh -l hscroot hmc ls -als /usr/websm/pc_client/*Install the java2 runtime environment:
# cd /tmp
# scp hscroot@labhmc1:/usr/websm/pc_client/*linux* .
# rpm -ihv *rpmInstall websm:
# ./wsmlinuxclient.exe -silentInstall some additional software required:
# yum install libXp compat-libstdc*Run websm:
# /opt/websm/bin/wsm
How to copy a filesystem from one server to another:
Make sure you can execute a remote shell on the target host (by adding an entry of the source host in the /.rhosts file). Login to the source system as root and enter:
# (cd LOCAL_MOUNTPOINT && tar cpvBf - . ) | rsh REMOTEHOST 'cd REMOTE_MOUNTPOINT && tar xpvBf -'For ssh, use the following command:
# tar -cf - myfiles | ssh user@host "umask 000 ; cat | tar -xpf -"You might also have run into the problem that, when FTP'ing CD software on a Windows PC to a remote AIX system, files with lowercase names suddenly change to uppercase file names. This is how to copy the complete contents of a CD on a Red Hat Linux system to a remote AIX system as a tar file:
- Login as root on the Linux system.
- Mount the CD-ROM:
# mount /mnt/cdrom # cd /mnt/cdrom
- Tar the contents:
# tar -cvf - . | ssh userid@hostname "cd /path/to/where/you/want/it/on/the/target/system ; cat > filename.tar"
- Unmount the CD-ROM:
# cd / # umount /mnt/cdrom
Topics: AIX, Red Hat / Linux↑
Line numbers in VI
To display line numbers in VI: Press ESC, then type
:set numberTo remove the line numbers again, type
:set nonumber
To manage Linux server, running on HP blades, you need to be able to access the ILO. Without it, you won't be able to remotely access the console or to reboot the server. If your ILO is on a separate network and your only access is through SSH, it can be difficult to access the ILO, since the web-based GUI is only supported in Microsoft Internet Explorer. By means of SSH tunneling however, it is possible to access the ILO.
First, you need to have a UNIX box which is capable of accessing the ILO directly through SSH (in our example called "jumpserver"). Also, you'll need to have the ILO's IP address.
On your Linux client in a system console (let's assume, this client is called "desktop"), create the SSH tunnel and forward the correct ports needed for ILO access, by running as user root:
# ssh -g -L 23:10.250.21.38:23 -L 443:10.250.21.38:443 -L 17988:10.250.21.38:17988 -L 3389:10.250.21.38:3389 jumpserver -NThis will create the SSH tunnel, open up ports 23, 443, 17988 and 3389 through host "jumpserver" to IP address 10.250.21.38. Of course, adjust the name of the jumpserver and the IP address of the ILO to your configuration.
Now open up an Internet Explorer on a Windows PC (which is capable of accessing the Linux client "desktop"), and point your browser to https://desktop. You should see the login screen of the ILO.
When you're done working on the ILO, simply type CTRL-C in the system console on "desktop".
Likewise, you can do something similar to this, if you don't have a Linux client (like "desktop" in the example above) to work with, by using PuTTY on a Windows PC. In this case, configure PuTTY to set up a SSH tunnel to the "jumpserver" and forward the same ports. Then open up Internet Explorer, and point your browser to https://localhost, which should then open up the ILO login screen.


