Thicket data repository for the EEG
1{
2 "id": "https://www.tunbury.org/2025/04/11/dell-r640-ubuntu",
3 "title": "Dell R640 Ubuntu Installation",
4 "link": "https://www.tunbury.org/2025/04/11/dell-r640-ubuntu/",
5 "updated": "2025-04-11T00:00:00",
6 "published": "2025-04-11T00:00:00",
7 "summary": "I could have scripted this via Ansible, but there would always be a manual element, such as configuring the H740P controller and booting from the network to get to the point where you can SSH to the machine. Therefore, I decided to just document the steps required.",
8 "content": "<p>I could have scripted this via Ansible, but there would always be a manual element, such as configuring the H740P controller and booting from the network to get to the point where you can SSH to the machine. Therefore, I decided to just document the steps required.</p>\n\n<p>After powering the system on, press F2 to open setup and follow this path through the menu</p>\n\n<div><div><pre><code>Device Configuration > Integrated RAID Controller H740P > Configure > Clear Configuration\n</code></pre></div></div>\n\n<p>then</p>\n\n<div><div><pre><code>View Server Profile > Controller Management > Advanced Controller Management > Manage Controller Mode\n</code></pre></div></div>\n\n<p>Choose <code>Switch to Enhanced HBA Controller Mode</code>, then Confirm and reset the system.</p>\n\n<p>Boot to the Ubuntu installer. I used <code>netboot.xyz</code> running in a Docker container.</p>\n\n<p>I will use a software RAID set configured by <code>mdadm</code> for the Ubuntu root drive. In this configuration, the EFI partition needs special attention as EFI does not understand software RAID. GRUB can be configured to create and update multiple copies of the EFI partition. For consistency, I will create an EFI partition on all the drives.</p>\n\n<p>These commands will create the following partitions:</p>\n\n<div><div><pre><code><span>for </span>a <span>in </span>sd<span>{</span>a..j<span>}</span> <span>;</span> <span>do </span>sgdisk <span>-n1</span>:1M:+512M <span>-t1</span>:EF00 /dev/<span>$a</span> <span>;</span> <span>done\nfor </span>a <span>in </span>sd<span>{</span>a..j<span>}</span> <span>;</span> <span>do </span>sgdisk <span>-n2</span>:0:+16G <span>-t2</span>:FD00 /dev/<span>$a</span> <span>;</span> <span>done\nfor </span>a <span>in </span>sd<span>{</span>a..j<span>}</span> <span>;</span> <span>do </span>sgdisk <span>-n3</span>:0:0 <span>-t3</span>:BF00 /dev/<span>$a</span> <span>;</span> <span>done</span>\n</code></pre></div></div>\n\n<p>Next, format the EFI drives with a DOS filesystem and create the RAID device:</p>\n\n<div><div><pre><code><span>for </span>a <span>in </span>sd<span>{</span>a..j<span>}</span> <span>;</span> <span>do </span>mkdosfs <span>-F</span> 32 <span>-s</span> 1 <span>-n</span> EFI /dev/<span>${</span><span>a</span><span>}</span>1 <span>;</span> <span>done\n</span>mdadm <span>--create</span> /dev/md0 <span>--metadata</span><span>=</span>1.2 <span>--level</span><span>=</span>raid5 <span>--raid-devices</span><span>=</span>10 /dev/sd[a-j]2\n</code></pre></div></div>\n\n<p>Check the partition tables with <code>sgdisk -p /dev/sda</code>, and the soft RAID setup with <code>cat /proc/mdstat</code>.</p>\n\n<p>Install Ubuntu via the setup program selecting the software RAID as the root volume and the first drive as the boot drive.</p>\n\n<p>After the system reboots, delete the current EFI entries from <code>/etc/fstab</code>:</p>\n\n<div><div><pre><code>umount /boot/efi\n<span>sed</span> <span>-i</span> <span>'/\\/efi/d'</span> /etc/fstab\n</code></pre></div></div>\n\n<p>Then add the entries for <code>/dev/sda1</code> and <code>/dev/sdb1</code>.</p>\n\n<div><div><pre><code><span>echo</span> /dev/disk/by-uuid/<span>$(</span>blkid <span>-s</span> UUID <span>-o</span> value /dev/sda1<span>)</span> /boot/efi vfat defaults 0 0 <span>>></span> /etc/fstab\n<span>mkdir</span> <span>-p</span> /boot/efi-alt\n<span>echo</span> /dev/disk/by-uuid/<span>$(</span>blkid <span>-s</span> UUID <span>-o</span> value /dev/sdb1<span>)</span> /boot/efi-alt vfat defaults 0 0 <span>>></span> /etc/fstab\nsystemctl daemon-reload\nmount <span>-a</span>\n</code></pre></div></div>\n\n<p>Run <code>dpkg-reconfigure grub-efi-amd64</code> to configure GRUB. Accept all of the defaults and select <code>/dev/sda1</code> and <code>/dev/sdb1</code> as the boot drives. Reboot the system.</p>\n\n<p>After the reboot, install the ZFS utils.</p>\n\n<div><div><pre><code>apt <span>install </span>zfsutils-linux\n</code></pre></div></div>\n\n<p>Create a ZFS <em>tank</em> using the <em>by-id</em> values.</p>\n\n<div><div><pre><code>zpool create <span>\\</span>\n <span>-o</span> <span>ashift</span><span>=</span>12 <span>\\</span>\n <span>-o</span> <span>autotrim</span><span>=</span>on <span>\\</span>\n <span>-O</span> <span>acltype</span><span>=</span>posixacl <span>-O</span> <span>xattr</span><span>=</span>sa <span>-O</span> <span>dnodesize</span><span>=</span>auto <span>\\</span>\n <span>-O</span> <span>normalization</span><span>=</span>formD <span>\\</span>\n <span>-O</span> <span>relatime</span><span>=</span>on <span>\\</span>\n tank raidz /dev/disk/by-id/wwn-<span>*</span><span>-part3</span>\n</code></pre></div></div>\n\n<p>Check it is available:</p>\n\n<div><div><pre><code><span># zfs list</span>\nNAME USED AVAIL REFER MOUNTPOINT\ntank 789K 61.8T 171K /tank\n</code></pre></div></div>",
9 "content_type": "html",
10 "author": {
11 "name": "Mark Elvers",
12 "email": "mark.elvers@tunbury.org",
13 "uri": null
14 },
15 "categories": [
16 "Dell,R640",
17 "tunbury.org"
18 ],
19 "source": "https://www.tunbury.org/atom.xml"
20}