Extra Power
I recently set up a Dell PowerEdge R610 to use when i need some extra computational power. I recently completed a fresh install of Ubuntu 20.04 on my laptop, an upgrade from 16.04. This informed the decision to install Ubuntu 20.04 on the R610.
Bootable USB
The bootable USB has always been my preferred option of linux install and this install was no different. Creating the USB was straightforward using the Startup Disk Creator available in 20.04
Startup Disk Creator
Install
Initial Parameters
A lot of the settings will either self-detect (such as ethernet or drive settings) or are set to defaults that will be suitable for what I need in a server. The only parameters that needed much effort for configuration were my name (brice), the server name (obsidian3), a user name (########), and a password (********). After this there was some prompts for installation of some commonly used packages, which I ignored before proceeding with the installation.
Complications
I let the installation run, but it failed on several attempts during the partitioning part of the installation. I spent some time investigating the errors given and came across an early issues that occurred when subiquity encountered any drives that didn’t have an expected format. After attempting some of the suggested fixes such as; formatting drives, updating subiquity, and scanning for drive errors (badblocks takes a while, even for a 73Gb drive) amongst others, I could not figure out what was wrong.
It was at this point that I came across a line in the output log mentioning the LSI Megaraid controller. At this point things started to make more sense, the drive labels and configurations being the main things. I installed MegaCLI to investigate the RAID configuration, this was done with:
apt-get install megacliAn outline of MegaCLI can be found here. I found that the RAID configuration that was currently implemented did not match the drive information provided. I figured the easiest thing to would be to remove the current configuration and create a new one as I had no need for the information on the drives. I deleted the only virtual device (ID: 0):
megacli -CfgLdDel -L0 -a0A new virtual drive needs to be created:
megacli -CfgLdAdd -rX[32:0,32:1] -a0This caused some issues with the existing configurations. I cleared the foreign configurations with:
-CfgForeign -Clear -A0Attempting to create the virtual drive completed this time without any issue. After this the installation process completed without any issue.
Initial Configuration
SSH
SSH is a fairly easy way to access machines over a network and is installed as a way of communication with the server. I also installed sshpass, which allows for the connection over ssh in one line including the password. This is achieved with:
sshpass -p "PASSWORD” ssh -o StrictHostKeyChecking=no USER@ADDRESSThis is particularly useful for writing a shell script that includes logging in via ssh.
Wake On Lan
Wake On LAN is used to boot a machine via a Magic Packet sent over LAN and is available on any machine with a compatible NIC. This can be determined using ethtools which can be installed (if it isn’t already) using:
sudo apt install ethtool -yAfter this the NIC will need to be identified and in my case is eno2. Using this, the status of WOL in the NIC can be determined using:
sudo ethtoll <NIC>Where NIC is the NIC adapter. If the NIC supports WOL, the output will include; Wake-on: g. To enable WOL the following command is required:
sudo ethtool -s <NIC> wol gThe issue with this is that it needs to entered each time the machine boots. To get around this is to create a file at:
/etc/systemd/system/wol.serviceContaining:
[Unit]Description = Configure Wake On LAN [Service] Type = oneshot ExecStart = / sbin / ethtool -s INTERFACE wol g [Install]WantedBy = basic.targetOnce this file has been created, the following commands will need to be run in the terminal
sudo systemctl daemon-reloadsudo systemctl enable wol.servicesudo systemctl start wol.service
Wakeonlan is the package I chose to send the Magic Package, but there are many to choose from. Most will require an address and a MAC address to send the packet to. These can be determined using:
ifconfig -aThis gave me the IP address of the server, and:
arp -a IPADDRESSGives the corresponding MAC address for the server. Together, I was successfully able to send the Magic Packet and boot the server using:
wakeonlan -i IPADDRESS MACADDRESS