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

Bug#511447: marked as done (installation-reports: USB-stick install: reboot after install fails due to incorrect root device)



Your message dated Thu, 15 Jan 2009 17:48:23 +0300
with message-id <20090115144823.GA30409@gw1.net1>
and subject line Bug re-reported as Bug#511840
has caused the Debian Bug report #511447,
regarding installation-reports: USB-stick install: reboot after install fails due to incorrect root device
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
511447: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511447
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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]

Comments/Problems:

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 -----------------------------------------
#!/bin/sh
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
cd
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



--- End Message ---
--- Begin Message ---
I re-reported this bug as Bug#511840 to initramfs-tools.  It's been
subsequently reassigned to cryptsetup.


--- End Message ---

Reply to: