12 October 2025

Changing Proxmox Boot Devices

I wanted to use the Intel SSDs as the boot devices in my replacement server. This meant I needed to migrate back to the 2.5" HDDs.


Prep Work

Ensure that autoexpand is off

  • zpool get autoexpand rpool

NAME   PROPERTY    VALUE   SOURCE

rpool  autoexpand  off     default


Adding the 2.5" HDDs

For all the below examples /dev/sda is one of the existing boot drives and /dev/sde and /dev/sdf are the new drives.


Install the hard drives

  • Power-off the system first if you don't have hot swap


Copy the partition tables

  • sfdisk -d /dev/sda | grep -v last-lba > ssd_part_table
  • sed -e '/^label-id:/d' -e 's/,\s*uuid=[-0-9A-F]*//g' ssd_part_table | sfdisk /dev/sde
  • sed -e '/^label-id:/d' -e 's/,\s*uuid=[-0-9A-F]*//g' ssd_part_table | sfdisk /dev/sdf


Copy the BIOS data

  • dd if=/dev/sda1 of=/dev/sde1
  • dd if=/dev/sda1 of=/dev/sdf1


Copy the Boot

  • proxmox-boot-tool format /dev/sde2
  • proxmox-boot-tool format /dev/sdf2
  • proxmox-boot-tool init /dev/sde2
  • proxmox-boot-tool init /dev/sdf2


Add to the ZFS pool

  • zpool attach rpool ata-INTEL_SSDSC2BX800G4_XXXXXX-part3 /dev/disk/by-id/scsi-XXXXX1-part3
  • zpool attach rpool ata-INTEL_SSDSC2BX800G4_XXXXXX-part3 /dev/disk/by-id/scsi-XXXXX2-part3


Hardware Changes

  • turn off the server
  • remove the drives
  • ensure server still boots


Remove old drives from zpool

  • zpool status rpool
  • zpool detach rpool <new id>
  • zpool detach rpool <new id>


Remove old drives from boot

  • proxmox-boot-tool status
  • proxmox-bool-tool clean
  • proxmox-boot-tool status



Lenovo TS140 Hardware Upgrades

I decided to use my old server (Lenovo TS140) to replace my present one (Dell R730XD), There were two factors in my decision (1) it was more stable (2) it consumed less power at ~50W vs ~99W. However, before I could do that I wanted to make two key upgrades: (1) more than 4 cores/4 threads and (2) faster than gigabit networking.


Hardware Options

Processor:

  • E3-1225 v3 (Current Processor)
    • Links: Intel / Tech Power Up
    • 4 core 4 thread
    • Base: 3.2 GHz
    • Max Turbo: 3.6 GHz
    • IGP: Intel HD P4600
    • TDP: 84W
    • Single/Multi: 2014/5322
  • E3-1245 v3
    • Links: Intel / Tech Power Up
    • 4 core 8 thread
    • Base: 3.4 GHz
    • Mz Turbo: 3.8 GHz
    • IGP: Intel HD P4600
    • TDP: 84W
    • Single/Multi: 2150/7044
  • E3-1275 v3
    • Links: Intel / Tech Power Up
    • 4 core 8 thread
    • Base: 3.5 GHz
    • Max Turbo: 3.9 GHz
    • IGP: Intel HD P4600
    • TDP: 84W (listed as 95W at places)
    • Single/Multi: 2198/7203


NIC:
  • Used Intel X710-DA2
    • roughly $30 from eBay
    • 10 Gbps SFP+
    • Requires a PCIe x8 slot
  • Realtek RTL8125B NIC
    • roughly $17-20 from Amazon
    • 2.5 Gbps
    • Requires a PCIe x1 slot (PCIe 2.0 x1 provides up to 5 Gbps of bandwidth)


Decision

I went with the E3-1275 v3 as it was roughly the same price as the E3-1245 v3 and was slightly faster.

I chose the Realtek RTL8125B from GiGaPlus as it would keep the x16 slot free in my TS140 for future expandability. I also only had a single free SFP+ port on my switch,


Appendix

Sources


04 October 2025

Clean-Up filenames created by Handbrake

 I wanted a script to help me rename files that Handbrake creates.


Issues

There are mainly 2 issues that I come across:

  • Spaces that I want to replace with underscores
  • Remove Unprintable characters
    • I determined that these were ASCII characters 001-037 (in octal)
    • ls -b directory_with_octal_chars_in_filename


Solution

Script (rename.sh)

#!/usr/bin/bash
directory=${1}
if [ -z ${directory} ] ; then
  echo "Requires a path"
  exit 1
fi

# replace spaces with underscore
find ${directory} -type f -name "* *" |
while read file; do
  mv "${file}" "${file// /_}"
done

# remove unprintable ASCII chars
find ${directory} -type f -name "*"[$'\001'-$'\037']"*" |
while read file; do
  new_file=$(echo "$file" | sed -e 's/[\o001-\o037]//g')
  mv "$file" "$new_file"
done


Permissions

chmod +x rename.sh


Usage

./rename.sh Directory_To_Rename_Files_In


Appendix

Sources