From e0374359f29d06b5a9677187ea7922d4d87957fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org>
Date: Tue, 27 Oct 2020 13:56:11 -0400
Subject: [PATCH] more cymru console experiments

---
 howto/new-machine-cymru.md | 80 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 79 insertions(+), 1 deletion(-)

diff --git a/howto/new-machine-cymru.md b/howto/new-machine-cymru.md
index 8e5a9eb6..f87e123f 100644
--- a/howto/new-machine-cymru.md
+++ b/howto/new-machine-cymru.md
@@ -5,8 +5,75 @@ them.
 
 # How-to
 
+## SSH RACDM access
+
+Note: this might already be enabled. Try to connect to the host over
+SSH before trying this.
+
+Note that this requires console access, see the [idrac consoles
+section below](#idrac-consoles) for more information.
+
+It is important to enable the SSH server in the iDRAC so we have a
+more reasonable serial console interface than the outdated Java-based
+virtual console. (The SSH server is probably also outdated, but at
+least copy-paste works without running an old Ubuntu virtual machine.)
+To enable the SSH server, head for the management web interface and
+then:
+
+ 1. in `iDRAC settings`, choose `Network`
+ 2. pick the `Services` tab in the top menu
+ 3. make sure the `Enabled` checkmark is ticked in the `SSH` section
+
+Then you can access the RACDM interface over SSH.
+
 ## iDRAC password reset
 
+WARNING: note that the password length is arbitrarily limited, and the
+limit is not constant across different iDRAC interfaces. Some have 20
+characters, some less (16 seems to work).
+
+### Through the RACDM SSH interface
+
+ 1. locate the root user:
+
+        racadm get -u root
+
+ 2. modify its password, changing `$INDEX` with the index value found
+    above, in the `cfgUserAdminIndex=$INDEX` field
+
+        racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i $INDEX newpassword
+
+An example session:
+
+    /admin1-> racadm getconfig -u root
+    # cfgUserAdminIndex=2
+    cfgUserAdminUserName=root
+    # cfgUserAdminPassword=******** (Write-Only)
+    cfgUserAdminEnable=1
+    cfgUserAdminPrivilege=0x000001ff
+    cfgUserAdminIpmiLanPrivilege=4
+    cfgUserAdminIpmiSerialPrivilege=4
+    cfgUserAdminSolEnable=1
+
+
+    RAC1168: The RACADM "getconfig" command will be deprecated in a
+    future version of iDRAC firmware. Run the RACADM 
+    "racadm get" command to retrieve the iDRAC configuration parameters.
+    For more information on the get command, run the RACADM command
+    "racadm help get".
+
+    /admin1-> racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 [REDACTED]
+    Object value modified successfully
+
+
+    RAC1169: The RACADM "config" command will be deprecated in a
+    future version of iDRAC firmware. Run the RACADM 
+    "racadm set" command to configure the iDRAC configuration parameters.
+    For more information on the set command, run the RACADM command
+    "racadm help set".
+
+### Through the web interface
+
 Before doing anything, the password should be reset in the
 iDRAC. Head for the management interface, then:
 
@@ -288,6 +355,15 @@ the menus:
 
  7. Choose the `Reset system (warm boot)` option in the `Power` menu
 
+If those menus are not familiar, you might have a different iDRAC
+version. Try those:
+
+ 1. Choose the `Map CD/DVD` from the `Virtual media` menu
+
+ 2. Choose the `Virtual CD/DVD/ISO` option in the `Next Boot` menu
+
+ 3. Choose the `Reset system (warm boot)` option in the `Power` menu
+
 The BIOS should find the ISO image and **download it from your
 computer** (or, rather, you'll upload it to the server) which will be
 slow as hell, yes.
@@ -328,7 +404,9 @@ is still necessary to load some programs: only a minimal squashfs is
 loaded. To load the entire image, use `toram` instead of `grml2ram`,
 but note this will transfer the *entire* ISO image to the remote
 server's core memory, which can take a long time depending on your
-local bandwidth.
+local bandwidth. On a 25/10mbps cable connexion, it took over 90
+minutes to sync the image which, clearly, is not as practical as
+loading the image on the fly.
 
 ### Boot timings
 
-- 
GitLab