Turning a 2013 Dell E6540 into a Dedicated TV Media Controller

Published: (January 11, 2026 at 04:31 PM EST)
4 min read
Source: Dev.to

Source: Dev.to

📦 Hardware

DeviceDetails
LaptopDell Latitude E6540 (i7, 8 GB RAM)
KeyboardLogitech K400 Plus (wireless – perfect for couch browsing)
USB driveAny ≥ 8 GB

🎯 Goal

Create a custom Ubuntu 24.04 live USB that:

  • Boots straight into Chrome
  • Has no setup wizards, login screens, or other prompts
  • Is truly “plug‑and‑play” for a TV‑connected media controller

1️⃣ Ubuntu 24.04’s Layered squashfs

Ubuntu 24.04 no longer ships a single filesystem.squashfs.
Instead it uses a layered layout:

casper/
├── minimal.squashfs           # Base layer
├── minimal.standard.squashfs # Standard additions
└── minimal.standard.live.squashfs # Live‑environment customisations

❌ What I tried

Merging all three layers into one filesystem.squashfs.

🚫 What happened

Boot failure: “File system layers are missing”

✅ The fix

Leave the three layers intact.
Only modify the specific layer that contains the files you need to change.
Casper expects the layered structure.

Reference: Ubuntu Casper Manual

2️⃣ Removing the GNOME Initial‑Setup Wizard

The problem

The GNOME initial‑setup wizard kept appearing on boot.

What I tried

Searching + removing files only in the top layer (minimal.standard.live.squashfs).

What happened

The wizard still showed up – the binary wasn’t in that layer.

✅ The fix – search all layers

for layer in minimal minimal.standard minimal.standard.live; do
  FOUND=$(unsquashfs -l "$CASPER_DIR/${layer}.squashfs" 2>/dev/null |
          grep -E "gnome-initial-setup" || true)
  if [ -n "$FOUND" ]; then
    echo "Found in ${layer}.squashfs!"
  fi
done

Lesson: gnome-initial-setup lives in minimal.squashfs (the base layer).

3️⃣ The “Welcome to Ubuntu” Wizard That Wasn’t gnome‑initial‑setup

The problem

After removing gnome-initial-setup, a different welcome wizard still appeared.

What I tried

  • Deleting more gnome‑initial‑setup files
  • Masking systemd services
  • Creating “done” flag files

What happened

The wizard persisted, with a different icon and behaviour.

✅ The fix – it’s a snap called ubuntu-desktop-bootstrap

unsquashfs -l layer.squashfs | \
  grep -E "ubuntu-desktop-bootstrap|desktop-bootstrap"

Lesson: Don’t assume the culprit; check the actual desktop shortcut or process name.

4️⃣ Enabling Auto‑Login

The problem

The system landed on the GDM login screen instead of auto‑logging in.

✅ The fix – edit GDM config inside the squashfs

mkdir -p "$SQUASH_DIR/etc/gdm3"
cat > "$SQUASH_DIR/etc/gdm3/custom.conf"

⚠️ --no-sandbox reduces security, but it’s required for a live‑USB setup.

6️⃣ PulseAudio vs. PipeWire (pactl missing)

The problem

A script failed with pactl: command not found on Ubuntu 24.04 live.

Why

Ubuntu 24.04 uses PipeWire by default; the minimal live environment often omits pactl.

✅ The fix – guard the call

if command -v pactl &>/dev/null; then
  HDMI_SINK=$(pactl list short sinks | grep -i hdmi | head -1 | awk '{print $2}')
  [ -n "$HDMI_SINK" ] && pactl set-default-sink "$HDMI_SINK"
else
  echo "Warning: pactl not available"
fi

7️⃣ Faster ISO Writes on macOS

The problem

Writing a 6 GB ISO with dd took 1085 s (~18 min).

✅ The fix – use the raw device (/dev/rdisk)

# Slow (≈18 min)
sudo dd if=ubuntu.iso of=/dev/disk4 bs=4m

# Fast (≈2 min) – raw device bypasses macOS buffer cache
RAW_DEVICE=$(echo "/dev/disk4" | sed 's|/dev/disk|/dev/rdisk|')
sudo dd if=ubuntu.iso of=$RAW_DEVICE bs=4m status=progress

Result: ~10× speed‑up.

8️⃣ Preserving the EFI Partition for UEFI Boot

The problem

Custom ISO wouldn’t boot on UEFI systems.

✅ The fix – extract & reuse the original EFI partition

# 1️⃣ Get EFI partition info from the original ISO
EFI_INFO=$(xorriso -indev "$ISO_IN" -report_el_torito as_mkisofs 2>&1 |
           grep -A1 "append_partition 2")
INTERVAL=$(echo "$EFI_INFO" | grep -oP '\d+d-\d+d' | head -1)

# 2️⃣ Parse start/end sectors
START_SECTOR=$(echo "$INTERVAL" | cut -d'-' -f1 | tr -d 'd')
END_SECTOR=$(echo "$INTERVAL" | cut -d'-' -f2 | tr -d 'd')
COUNT=$((END_SECTOR - START_SECTOR + 1))

# 3️⃣ Extract the EFI image
dd if="$ISO_IN" of="$EFI_IMG" bs=512 skip="$START_SECTOR" count="$COUNT"

Then embed $EFI_IMG back into the custom ISO.

9️⃣ End‑to‑End Automation (Docker‑based)

I wrapped everything in a Docker container that:

  1. Downloads the Ubuntu 24.04 desktop ISO
  2. Extracts & modifies the layered squashfs
  3. Removes all welcome wizards (gnome‑initial‑setup, gnome‑tour, ubuntu‑desktop‑bootstrap)
  4. Configures auto‑login
  5. Pre‑installs wallpapers, Chrome policies, dark mode, etc.
  6. Re‑builds a hybrid (BIOS + UEFI) bootable ISO
  7. Writes the ISO to USB with a single command
./make.sh   # cleans, builds, and writes to USB

📦 How to Use It

If you have a Dell E6540 (or similar older laptop) and want a dedicated TV/media controller:

RequirementDetails
Sourcegithub.com/tv6540/cubic2
DependenciesDocker, macOS or Linux, USB drive (≥ 8 GB)
OptionalLogitech K400 Plus (recommended)

Steps

git clone https://github.com/tv6540/cubic2
cd cubic2
./make.sh

The script will:

  1. Prompt for sudo (kept alive during the build)
  2. Show a USB‑device picker and ask for confirmation before erasing
  3. Download the Ubuntu ISO (cached for future builds)
  4. Build the custom ISO inside Docker
  5. Write the ISO to the selected USB drive

Boot the USB, and the built‑in setup script runs automatically to:

  • Configure the display (HDMI, TV)
  • Install Chrome with the --no-sandbox flag
  • Enable auto‑login

You’re then ready to stream.

📚 Key Take‑aways

TopicLesson
Layered squashfsDon’t merge layers; modify the needed one in place.
File listingunsquashfs -l lists files without extracting – fast for hunting.
Welcome wizardsubuntu-desktop-bootstrapgnome-initial-setup. Check actual process names.
Chrome on live USBNeeds --no-sandbox (overlayfs breaks the sandbox).
macOS ISO writesUse /dev/rdisk for ~10× faster writes.
UEFI bootPreserve the original EFI partition when rebuilding the ISO.

Enjoy a plug‑and‑play Ubuntu live USB that boots straight into Chrome on your Dell E6540! 🎉

USB Writes

  • Get all prompts upfront – nobody wants to wait 20 min then type “yes”.

The Logitech K400 Plus is perfect for this setup:

  • Wireless with tiny USB receiver
  • Built‑in trackpad
  • Media keys
  • Long battery life
  • Compact for couch use

Built with mass frustration, mass trial‑and‑error, and mass caffeine.

Back to Blog

Related posts

Read more »

Hello, Newbie Here.

Hi! I'm falling back into the realm of S.T.E.M. I enjoy learning about energy systems, science, technology, engineering, and math as well. One of the projects I...