installer doesn't add initrd option in lilo.conf

Bug #1156494 reported by morozovvs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lilo (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After installation of Ubuntu using netboot (ftp.ubuntu.com/ubuntu/dists/precise/main/installer/amd64/current/images/netboot/netboot.tar.gz+mini.iso) image with lilo as boot loader and non-standard root partition (encrypted) system can not boot - it can not mount root device. Busybox is unavailable.
Some googling and analysing of boot process have shown that initrd option is missing in lilo.conf so initrd.img can not be loaded, so init scripts can not be executed.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lilo 1:23.2-2
ProcVersionSignature: Ubuntu 3.2.0-38.61-generic 3.2.37
Uname: Linux 3.2.0-38-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Mon Mar 18 10:15:47 2013
MarkForUpload: True
ProcEnviron:
 LANGUAGE=ru:en
 PATH=(custom, no user)
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SourcePackage: lilo
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
morozovvs (vsmorozov) wrote :
Revision history for this message
Joachim Wiedorn (ad-debian) wrote : Re: [Bug 1156494] [NEW] installer doesn't add initrd option in lilo.conf

Hello morozovvs,

please show us your lilo.conf file (without comments) and a list of the
important files in /boot directory (vmlinux*, initrd*), then we have a
chance to find the problem.

---
Have a nice day.

Joachim (Germany)

Revision history for this message
morozovvs (vsmorozov) wrote :

Here is a list of /boot:
-rw------- 1 root root 2887333 Feb 19 14:58 System.map-3.2.0-38-generic
-rw-r--r-- 1 root root 792830 Feb 19 14:58 abi-3.2.0-38-generic
-rw-r--r-- 1 root root 512 Mar 16 19:16 boot.0801
-rw-r--r-- 1 root root 113162 Mar 16 19:16 coffee.bmp
-rw-r--r-- 1 root root 140488 Feb 19 14:58 config-3.2.0-38-generic
-rw-r--r-- 1 root root 22560 Mar 16 19:16 debian-de.bmp
-rw-r--r-- 1 root root 22466 Mar 16 19:16 debian.bmp
-rw-r--r-- 1 root root 31628 Mar 16 19:16 debianlilo.bmp
-rw-r--r-- 1 root root 21682330 Mar 19 10:37 initrd.img-3.2.0-38-generic
-rw-r--r-- 1 root root 22578 Mar 16 19:16 inside.bmp
drwx------ 2 root root 12288 Mar 16 11:41 lost+found
-rw------- 1 root root 18432 Mar 19 10:37 map
-rw-r--r-- 1 root root 176764 Nov 27 2011 memtest86+.bin
-rw-r--r-- 1 root root 178944 Nov 27 2011 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 6878 Mar 16 19:16 onlyblue.bmp
lrwxrwxrwx 1 root root 10 Mar 16 19:16 sarge.bmp -> debian.bmp
lrwxrwxrwx 1 root root 10 Mar 16 19:16 sid.bmp -> debian.bmp
-rw-r--r-- 1 root root 33192 Mar 16 19:16 tuxlogo.bmp
-rw------- 1 root root 4968592 Feb 19 14:58 vmlinuz-3.2.0-38-generic

in atatchment is a lilo.conf after installation.

Revision history for this message
morozovvs (vsmorozov) wrote :

Reinstallation of lilo didn't solve a problem, so i've started manual editing of lilo.conf.

Revision history for this message
Joachim Wiedorn (ad-debian) wrote : Re: [Bug 1156494] Re: installer doesn't add initrd option in lilo.conf

morozovvs wrote on 2013-03-19 08:52:

> Reinstallation of lilo didn't solve a problem, so i've started manual
> editing of lilo.conf.

Ubuntu 12.04 comes out a view weeks earlier then my patch to lilo. The
current Debian version of lilo (23.2-4) has the bugfix for this problem.

You can fix the bug with this small patch for liloconfig script:

--- aa/usr/sbin/liloconfig 2011-04-09 17:08:01.000000000 +0200
+++ bb/usr/sbin/liloconfig 2012-04-15 10:18:15.936797140 +0200
@@ -456,7 +456,7 @@
  my $nr2;

  # search for kernel image files
- my @vmlinuz = readpipe("/bin/ls -t -1 /boot/vmlinuz-2* 2>/dev/null");
+ my @vmlinuz = readpipe("/bin/ls -t -1 /boot/vmlinuz-* 2>/dev/null");

  # append to new lilo.conf
  open(MYFH_NEW, ">> $liloconfnew") or die "Cannot open file: $!";

You see: the old script working only for kernels beginning with 2*
and couldn't find the newer 3* kernel versions.

---
Have a nice day.

Joachim (Germany)

Revision history for this message
morozovvs (vsmorozov) wrote :

I think the problem is deeper.
Original liloconfig creates lilo.conf with empty per-image section.
After applying recommended patch the liloconfig generates correct lilo.conf, but it differs from one generated during ubuntu install.
Ububtu installer generates lilo.conf reffering to symlinks in root directory. Liloconf generates config reffering directly to kernel and initrd images in /boot directory.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lilo - 1:24.1-1

---------------
lilo (1:24.1-1) unstable; urgency=medium

  * New upstream release:
    - Fix liloconfig: not included initrd.img in lilo.conf, kernel
        installation/upgrading failed. Closes: #640792, #663586
        LP: #703371, #774733, #844859, #973903, #982791, #990306
        LP: #1002823, #1003865, #1004308, #1004919, #1017787, #1028113
        LP: #1029600, #1031770, #1042482, #1043352, #1057720, #1060584
        LP: #1070267, #1109340, #1132208, #1156494, #1173175, #1202943
        LP: #1210905, #1214153, #1218082, #1222073, #1264013, #1282115
        LP: #1304205, #1307211, #1318800, #1363551, #1374399
    - Fix liloconfig: no defined images in lilo.conf, initramfs hook
        failed. LP: #1014383
    - Fix hook scripts: kernel hook failed if RAID is degraded.
        Closes: #459713, #728622
    - More documentation about -R option. Closes: #720129
    - Optional: Set no-defragment bit on XFS filesystems.
    - Update some patches, remove all other patches.

  * Use better link to upstream packages in debian/watch.
  * Bump Standards Version to 3.9.6 (no changes).
  * Add hook scripts for saving kernel in /boot on XFS filesystems.
      These scripts can be found in dir. /usr/lib/lilo/ for optional
      installation. See: #566035
  * Remove obsolete symlinks sarge.bmp and sid.bmp to /boot/debian.bmp.
      Now using /boot/debian.bmp directly in /etc/lilo.conf.

 -- Joachim Wiedorn <email address hidden> Fri, 17 Oct 2014 21:40:40 +0200

Changed in lilo (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.