Search This Blog

Showing posts with label HP. Show all posts
Showing posts with label HP. Show all posts

Friday, June 24, 2022

EliteBook ambientlight sensor

Map keycode e033 (or any other key you choose) to the following command that toggles the sensor on or off:

echo $((1 - $(cat /sys/devices/platform/hp-wmi/als))) | sudo tee -a /sys/devices/platform/hp-wmi/als

Thursday, March 03, 2016

Boot parameters for SCO6 on HP Gen8 servers (officially unsupported)

Install an extra P400 controller and connect the drives cage to it. Do not disable the on-board i400!
Install an extra E1000 dual NIC, as the onboard BCMs are not recognized by the kernel.

In BIOS, switch the sata controller to ahci and boot.

The following parameters allow you to boot and install OSR6 on Gen8:
 USE_XAPIC=Y ACPI=Y MULTICORE=N ENABLE_4GB_MEM=N

After the installation is done ( see sco-sysv-on-hp-server-install-notes ), only USE_XAPIC=Y have to be added to /etc/default/boot.

Monday, November 02, 2015

Install HPSUM on an rpm base distro


mount /dev/cdrom /mnt
cp /mnt/compaq/psp/linux /tmp/
cd /tmp/linux
./hpsum

- check for the prerequisite, usually you need expect, kernel-headers, rpm-build, gcc, libnl, redhat-rpm-config, openipmi and net-snmp  either form the redhat installation dvd (rpm -Uvh package), or you can use "yum install package" if you have yum repositories configured.
- you need to manually install hp-snmp-agents package from the hp dvd, it is not installed by hpsum (I presume it's a glitch). hp-snmp-agents needs hp-health (you find them both in the /tmp/linux directory that you just copied from the dvd)
- re-run ./hpsum untill you have no conflicts/unresolved dependecies!
- after installation and reboot run /sbin/hpsnmpconfig - you have to provide only the readonly (public) and the read/write (private) comunity for snmp.
- if everything seems ok, edit /opt/hp/hp-snmp-agents/cma.conf lin 22: trapemail . at the end of the line replace root with your email address - REMEMBER: you need a functional sendmail in order to be able to send emails!

HP Important Note:   The server needs to have 'sudo' installed in order to start or stop the snmp daemon and to send test traps.   'sudo' grants controlled root access to groups or users.   If installed after hp-snmp-agents please run a '/sbin/hpsnmpconfig'. In case of VMware ESX 3.x series, please run '/etc/init.d/hpasm reconfigure' after installation of hpasm.   These buttons will NOT work if 'sudo' is configured to only run when the user is logged into a 'real' tty.   To be able to perform the operations of start, stop, restart of the snmpd daemon, the user must comment out the line 'Defaults requiretty' in the /etc/sudoers file.   See man sudoers for details about the 'requiretty' flag.   If present, this flag will need to be removed from the '/etc/sudoers' configuration file.   The 'send trap' button also requires a tool snmptrap to be present on the system.   This tool is often bundled with the snmp stack (Suse) or in a package called 'net-snmp-util' (Red Hat).



Monday, July 06, 2015

Using Intel AMT’s embedded VNC server

Intel Chipsets with vPro/Intel AMT, paired with a Core i5/i7 or Xeon with integrated graphics, have a feature called Remote KVM.

To activate it, press Ctrl-P at the BIOS - this brings you to the MEBx menu, set a password (minimum 8 characters, mixed case, numbers and special characters are enforced - try to avoid #@$% - use star or exclamation), configure the network settings (DHCP, or static - it can even match the OS’s IP address!), enable Remote KVM and disable User Opt-In.

in order to set it up, download the Intel AMT SDK from http://software.intel.com/en-us/articles/download-the-latest-intel-amt-software-development-kit-sdk/ extract the ZIP and open ./Windows/Intel_AMT/Bin/KVM/KVMControlApplication.exe. (I had to install .net 2.0 in my wine in order to be able to run it.)
There, you can enable KVM by clicking "Edit Machine Settings" as seen in the following screenshot:


KVM Status can either be set to
-“redirection ports” (meaning it will only be accessible to clients that specifically support Intel AMT, such as RealVNC Viewer Plus or Intel’s KVM Console, the former of which costs $100, the later constantly overlays a RealVNC logo on the screen), or to
-“default port” (meaning it will be accessible on TCP port 5900 with any VNC client), or to
-“all ports” (which is the combination of both).
If you enable VNC access, you will also need to set an RFB Password. Warning, the password gets truncated at 8 characters but     at the same time has the security requirements identical to the general AMT password (Capital, small letter, number and special-character - WARNING: underscore is not special char, @$%&| are NOT allowed, choose star or exclamation to play safe).
If you disabled User Opt-In in the MEBx menu, you can disable it here as well.

Now you can use almost any VNC client you like (KRDC, Real, Ultra, and Tight VNC works fine, while TigerVNC seems to be unable to auth, and Apple Remote Desktop appears to cause the VNC server to freeze - it's Apple crap, what do you expect?).

Two things worth mentioning:
1: the initial BIOS splash screen is not visible during a KVM connection (not even on a directly-attached screen), so to get to the BIOS, you needed to blindly hit the F10.
2: it is not possible to enter the MEBx menu during a KVM connection (probably for security reasons), if you hit the corresponding CTRL+P key, it immediately exits and continues normal boot; if you establish a KVM connection while already in MEBx, you get disconnected immediately.

 If you’re building a home server, you should definitely consider getting system with Intel vPro/AMT 6.0 or later, you get ILO-like remote management capabilities for free.

Oh yeah, http://your_machine:16992 gives you access to logs, power control, network setup, users, exactly the same way ILO does!


And of course the OS has no idea something is running below him, there is no CPU load, on the host netstat shows no other connections except my ssh:
 tcp        0      0 192.168.aaa.xxx:22          192.168.aaa.yyy:49506       ESTABLISHED 2314/sshd

while from my workstation we can see a second connection to the VNC port 5900:
tcp        0      0 192.168.aaa.yyy:49506       192.168.aaa.xxx:22          ESTABLISHED 13362/ssh   
tcp        0      0 192.168.aaa.yyy:43311       192.168.aaa.xxx:5900        ESTABLISHED 29457/krdc


 Note the black blinking monitors in the upper-right corner - that screams "AMT":

Monday, June 01, 2015

Error 512 - rear chassis fan not detected on a Small Form Factor

as per hp site:
"Although the HP Compaq 8200 Elite Small Form Factor PC has no rear chassis fan installed, this error message may arise when the front panel cable assembly was damaged after a system repair attempt.
In a HP Compaq 8200 Elite Small Form Factor PC, Pin10 on the front panel cable connector is used to tell the system BIOS, that the chassis is a Desktop model, not Microtower model. This is necessary because the system board is also used in HP Compaq 8200 Elite Microtower PC, which has a rear chassis fan installed. Pin10 is not connected there.
If the cable on Pin10 of the connector in a HP Compaq 8200 Elite Small Form Factor PC was damaged accidently and therefore has no connection to the system board, the BIOS assumes that it is a Microtower model and therefore checks for a rear chassis fan."

There is a problem with the front panel connector:

Let's remove it and look, the pin 10 is not connected while pin 5 (usually unused) it is:

We just need to remove the plug from pin 5 and move it to pin10:

Finally the ground is moved from pin 5 to pin 10:

Wednesday, April 08, 2015

HP ILO Linux - reset password

(hpsum must be already installed)
Reset Administrator password to “newpass”:

vi reset-password.xml

<ribcl VERSION="2.0">
<login USER_LOGIN="Administrator" PASSWORD="something_without_importance">
  <user_INFO MODE="write">
   <mod_USER USER_LOGIN="Administrator">
    <password value="newpass"/>
   </mod_USER>
  </user_INFO>
</login>
</ribcl>

hponcfg -f reset-password.xml -l log.txt ; cat log.txt


Add user "admin" with password "nosecurity":

vi  adduser.xml

<ribcl version="2.0">
<login user_login="Administrator" password="blah_blah_it_doesnt_matter">
<user_info mode="write">
<add_USER
USER_NAME="admin"
USER_LOGIN="admin"
PASSWORD="nosecurity">
<reset_SERVER_PRIV   value = "Y" />
<admin_PRIV   value = "Y" />
</add_USER>
</user_info>
</login>
</ribcl>

hponcfg -f adduser.xml -l log.txt ; cat log.txt


Friday, January 02, 2015

Resize an LVM partition on a HP Proliant server

1. Install HP Proliant support pack 

2. If you've installed the PSP before and it is already running on your server, you can skip this step, otherwise start HP Array Configuration Utility Online for Linux. 
cd /opt/compaq/cpqacuxe/bld
./cpqacuxe -R
note: after finishing online configuration utility, you might want to stop it by running
./cpqacuxe -stop

3. Expand array and logical drive
Go to https://localhost:2381 and click on array configuration utility link.
Click on expand array - it will take some time to finish (like 8hrs). After the expansion is finished, a new button called 'expand logical drive' will appear, clicking on it will finish expanding the array.

4. Make Linux kernel recognize the new size of your hardware raid5
Reboot Linux server, run  'partprobe' or 'sfdisk -R /dev/cciss/c0d0' followed by  'fdisk -l /dev/cciss/c0d0' multiple times, 'till it shows the new size.
You might have to reboot multiple times if the new size does not appear at fdisk -l.

5. Enlarge partition with fdisk - DANGEROUS, please have a full backup first!
fdisk /dev/cciss/c0d0  (you might consider using fdisk -u /dev/cciss/c0d0 - it will display the size in sectors instead of cyclinders)
"p" - take note where the /dev/cciss/c0d0p2 (your extended partition) starts!
press "d" then "2" to remove the c0d0p2 partition - yes you wil DELETE the partition, don't reboot, don't move, dont even breathe on top of that server!!!
press "n" for new, then "p" primary partition to use the full space
Make sure the old and new partition starts at the same cylinder or sector position, otherwise, all your data will be destroyed!!!
press "t" to change partition type to LVM
"w" to write
"q" to quit
now you will need to reboot again!

6. Resize physical volume size, logical volume size and perform file system online increase:

After reboot, check again the new size:
[root@log ~]# fdisk -l /dev/cciss/c0d0
Disk /dev/cciss/c0d0: 1799.7 GB, 1799797127168 bytes
255 heads, 63 sectors/track, 218812 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          13      104391   83  Linux
/dev/cciss/c0d0p2              14      218813  1757509959+  8e  Linux LVM

Let's see ho many free phisical blocks we have:
[root@log ~]#vgdisplay -v | grep "Free PE"
    Finding all volume groups
    Finding volume group "VolGroup00"
  Total PE / Free PE    54337 / 17879

Now let's resize the phisical volume:
[root@log ~]# pvresize /dev/cciss/c0d0p2
  Physical volume "/dev/cciss/c0d0p2" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized
 
  note: we used vgdisplay -v to check the number of free PE, let's say it's 17879.

Now let's extend the lvm: 
[root@log ~]# lvextend -l +17879 /dev/VolGroup00/LogVol02
  Extending logical volume LogVol02 to 1.60 TB
  Logical volume LogVol02 successfully resized

And finally we will resize the filesystem:
[root@log ~]# resize2fs /dev/VolGroup00/LogVol02
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol02 is mounted on /data; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol02 to 430276608 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol02 is now 430276608 blocks long.

Ofc, steps 4 to 6 can be replaced with running offline gparted from a CD...