Bug#489544: installation-reports
Package: installation-reports
Boot method: CD
Image version: debian-40r3-i386-netinst.iso
Date: 2008 June 6
Machine: IBM Thinkpad T42
Processor: Pentium M 1.8 GHz
Memory: 1.5 GB
Partitions: installed on an unpartitioned 4 GB USB flash drive
Output of lspci -knn (or lspci -nn): (irrelevant)
Base System Installation Checklist: (all OK except as noted below)
Comments/Problems:
This computer supports booting from USB, so I decided to install debian
on a USB Flash drive. I wanted an encrypted root partition.
PROBLEM 1. I first tried the "automatic" encrypted LVM setup. It
insisted upon making a swap partition, and I was unable to delete that
partition. Of course I don't want a swap partition on a flash based
drive. I ultimately had to back up several steps and do a manual setup.
PROBLEM 2. Before I started the install, I used dd if=/dev/urandom
of=/dev/sda to write random data to the drive, which makes cracking an
encrypted partition/drive much more difficult. However, the debian
installer insisted on writing (zeros?) to the to-be-encrypted partition
before formatting. This was very time consuming, wasteful/redundant,
and perhaps a security liability as well. In fact, the installer did
this several times due to problem 1 ;)
I should be able to skip that writing since I already did it myself.
PROBLEM 3. System would not boot!! .....
It brought up the grub menu just fine, and began loading the kernel and
initramfs. The problem occured when it tried to configure lvm
(/usr/share/initramfs-tools/scripts/local-top/lvm) -- the kernel had
not yet detected the presence of the USB Flash drive! Thus the call to
activate_vg "$ROOT" was doomed to failure, since udev had not yet
discovered the root device. A few seconds after the failure messages,
udev discovered the device -- udev had "settled" before running
local-top, but the USB event came later.
In order to solve this problem, I added a script
to /etc/initramfs-tools/scripts/init-premount that waits for the device
to appear in the /dev tree:
echo -n "Waiting for /dev/sda5 to appear"
while ! [ -b /dev/sda5 ]; do echo -n .; sleep 1s; done
It took me several days to figure out what the problem was, how to fix
it, and how to use initramfs to roll the initrd, but now it works!
Although my script could probably be more robust.
IMO, the debian-installer should always set up the init system to wait
for the $ROOT (and $resume?) partitions to be visible in the /dev tree
before proceeding with the local-top scripts.
~David.
Reply to: