Stupid d-i tricks


Contents:
Intro
Basics: things on the system, things off the system, adding software, installing additional udebs, installing additional debs, utilizing an existing root, running multiple commands
Tricks: cleaning a hard drive, testing a hard drive, S.M.A.R.T. testing a hard drive upgrading firmware, gather system data, running an install remotely, cloning a system
Other ideas

Introduction

Debian Installer is an amazing piece of software, very extensible, and hackable. In addition to it's normal uses, it gives you a pretty nice environment running in a ramdisk that is easy to boot from the network, CD/DVD, usb drive, etc. This environment is really handy in a few different scenarios

A lot of what d-i does is very useful in getting a ramdisk booted and setup properly, it sets up language settings, configures the network and proxy servers, etc. When booting d-i in normal "install" mode you can follow the menus up to the point where the disk partitioning starts, without causing any writes to disks in the machine. Once you are at this point you have a pretty nice environment setup and can then start using the shell for additional hacking.

While there are official proper ways to extend d-i with your own udebs and interfaces for adding menu entries, this page focuses on "hacks" that you can quickly do with any existing d-i. See the d-i wiki page for less hackish stuff.

Here are some cool things you can do.

Basics

Now we have a way to get files on and off the system, add additional programs, take advantage of the system root, and do multiple things at the same time.

Tricks

Other ideas

Here's some things I haven't tried/documented, but should work.

Thanks to Colin Watson and dann frazier for contributing comments and tricks.

Matt Taggart <matt@lackof.org>
Started 2008-01-29, last updated 2020-02-20