[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#511447: installation-reports: USB-stick install: reboot after install fails due to incorrect root device

Package: installation-reports
Severity: important

-- Package-specific info:

Boot method: USB stick
Image version: Lenny RC1 amd64 netinst (http://cdimage.debian.org/cdimage/lenny_di_rc1/amd64/iso-cd/debian-testing-amd64-netinst.iso)
Date: <Date and time of the install>

Machine: Athlon X2 5200+ desktop
Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot:           [O]
Detect network card:    [O]
Configure network:      [O]
Detect CD:              [O]
Load installer modules: [O]
Detect hard drives:     [O]
Partition hard drives:  [O]
Install base system:    [O]
Clock/timezone setup:   [O]
User/password setup:    [O]
Install tasks:          [O]
Install boot loader:    [E]
Overall install:        [E]


Up to the rebooting stage the install went wonderfully (my respect to
the developers).  However, rebooting into the installed system failed,
as the initrd incorrectly identified the root device.  As it turned out, the
root device specified on Lilo's kernel command line (root=fd02 in my
case) was incorrect.  The initrd /init script interprets this argument
as a hex value (0xfd02), translating it into major and minor device
numbers according to the formula MAJOR = ARG / 256, MINOR = ARG % 256.
It then uses mknod to create /dev/root using these major/minor values
(253,2 in my case).

However, the _real_ root device (/dev/mapper/lenny-root_crypt in my
case) has a major/minor of 254,2, which is one major number higher than
the value specified.  So to bump the major number up by one I simply
added 256 to fd02, which gave me fe02, wrote this down on a scrap of
paper together with the contents of /proc/cmdline, and rebooted.  At the
Lilo prompt I manually entered the kernel command line copied from
/proc/cmdline, adjusting the value of 'root' to 'fe02', and bootup went
perfectly from there on.  After logging in to my new system I ran lilo,
which fixed the problem permanently.

My question is this: Why is the installer using Lilo (which I thought
had gone out with the dinosaurs)?  Using Grub, specifying the root
device in symbolic form (i.e. /dev/mapper/lenny-root_crypt) on the
kernel command line in grub/menu.lst and making some small changes to
the initrd /init script would simplify things enormously and make for a
trouble-free reboot after installing.

Another question: Isn't it time to make USB-stick install the default
method and providing ready-made USB-stick images to the users?  It's
_so_ much more convenient than fussing with CDs (which are in addition
inherently unreliable -- and not every computer has a CD drive).

What follows is the script I used to make the install USB stick:
(Thank you to http://d-i.pascal.at/)
--------------------------------- CODE -----------------------------------------
mkdosfs /dev/sdd1
syslinux /dev/sdd1
mkdir -p /mnt/tmp
mount /dev/sdd1 /mnt/tmp
cd /mnt/tmp
curl -O http://ftp.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/vmlinuz
curl -O http://ftp.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/initrd.gz
echo -e "default vmlinuz\nappend initrd=initrd.gz ramdisk_size=10240 root=/dev/rd/0 devfs=mount,dall rw DEBCONF_PRIORITY=medium" > syslinux.cfg
curl -L -o netinst.iso http://cdimage.debian.org/cdimage/lenny_di_rc1/amd64/iso-cd/debian-testing-amd64-netinst.iso
ls -l
umount /mnt/tmp
install-mbr /dev/sdd

------------------------------- END CODE ---------------------------------------

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Reply to: