lilo + lvm2 don't work following upgrade to breezy

Bug #23835 reported by Renaud Bruyeron on 2005-10-13
26
Affects Status Importance Assigned to Milestone
lilo (Debian)
Invalid
Undecided
Unassigned
lilo-installer (Ubuntu)
High
Unassigned

Bug Description

I cannot upgrade the kernel because of this problem when I try to run lilo:

root@hal:/dev # lilo
Warning: '/proc/partitions' does not match '/dev' directory structure.
    Name change: '/dev/dm-0' -> '/dev/dm'
device-mapper ioctl cmd 12 failed: No such device or address
Fatal: device-mapper: dm_task_run(DM_DEVICE_TABLE) failed

The system was installed from a Hoary CD, with all the partitions under LVM2
(yes, including / and /boot). It worked fine. / and /boot are ext3 partitions.
The problem above appeared after I upgraded to breezy, therefore it is a regression.

I am not the only one having this problem:
http://ubuntuforums.org/showthread.php?t=68971&highlight=device-mapper%3A+failed
http://ubuntuforums.org/showthread.php?t=73979&highlight=device-mapper%3A+failed

I have put this bug under lilo, but it could be a number of things:
libdevmapper, udev (it is not setting up /dev/dm-* properly, see the warning
message above), etc, and lilo just being a victim.

Here's the relevant lilo.conf bits:

boot=/dev/sda
root=/dev/mapper/vg1-root

And the relevant extract of vgdisplay -v:

root@hal:/dev # vgdisplay -v
    Finding all volume groups
    Finding volume group "vg1"
  --- Volume group ---
  VG Name vg1
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 12
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 8
  Open LV 8
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 74.69 GB
  PE Size 4.00 MB
  Total PE 19120
  Alloc PE / Size 4771 / 18.64 GB
  Free PE / Size 14349 / 56.05 GB
  VG UUID GDWzzK-z7Sq-uZqH-QTxf-VK0A-oA2C-3IBNsD

  --- Logical volume ---
  LV Name /dev/vg1/boot
  VG Name vg1
  LV UUID zl9pM3-STfo-QI0e-oX4D-ZCZe-IyTj-mSL04B
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 52.00 MB
  Current LE 13
  Segments 1
  Allocation inherit
  Read ahead sectors 0
  Block device 254:0

  --- Logical volume ---
  LV Name /dev/vg1/root
  VG Name vg1
  LV UUID rNnNiW-R0cE-jj7t-5Kqf-n8q7-YVDP-8sMzL0
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 300.00 MB
  Current LE 75
  Segments 1
  Allocation inherit
  Read ahead sectors 0
  Block device 254:1

You did hit a set of bugs here:

lilo cannot understand correctly LVM2 metadata.
The hoary case at first install the kernel was probably (for sure i would say)
in a set of contiguos blocks that gave lilo
the possibility to read it.

lilo-installer did allow wrongly to install lilo with /boot on LVM2 device. lilo
has still several limitations reading from LVM1 and 2.

There are no known partition layouts changes between hoary and breezy kernels
(otherwise i won't be able to write right now ;)).

I assume that new version of lilo in breezy has a more strict controls of what
can do or not, and the command it issues to gather
some information from the device mapper, will consequently fail given that it
might issue the wrong request.

Colin, given that we have no control over lilo upstream, i suggest we fix
lilo-installer to handle this case properly and refuse
to install.

Fabio

Renaud Bruyeron (bruyeron) wrote :

Thanks for the explanation - I ended up reinstalling, making sure /boot is out
of LVM. It worked like a charm,
and it let me use Grub.

Panagiotis Issaris (t4k1s) wrote :

I'm having similar problems:
root@poseidon:~# lilo
Warning: '/proc/partitions' does not match '/dev' directory structure.
    Name change: '/dev/dm-0' -> '/dev/dm'
device-mapper ioctl cmd 12 failed: No such device or address
Fatal: device-mapper: dm_task_run(DM_DEVICE_TABLE) failed

Any known workarounds? (Besides repartitioning to create a separate /boot partition...)

I don't think it has anything to do with a newer lilo. I had sometimes problems with my system that forced me to rerun lilo. I have all my partitions except the swap under LVM, including / (and no specific partition for /boot).
It worked perfectly for ages, and now I get the same error:

bateleur:~# lilo
Warning: '/proc/partitions' does not match '/dev' directory structure.
    Name change: '/dev/dm-8' -> '/dev/mapper/gobelet-backup'
device-mapper: table ioctl failed: No such device or address
Fatal: device-mapper: dm_task_run(DM_DEVICE_TABLE) failed

But I run lilo from etch (package version 1:22.6.1-7), which has entered the archive for nearly 9 months (see http://packages.qa.debian.org/l/lilo.html).

This sounds pretty confirmed ("I'm having similar problems", "You did hit a set of bugs here").

Changed in lilo-installer:
status: Unconfirmed → Rejected
status: Rejected → Confirmed
Colin Watson (cjwatson) on 2006-10-06
Changed in lilo-installer:
assignee: kamion → nobody
Loic Pefferkorn (loic) wrote :

Still a problem with Edgy, fresh install.

Lilo install works fine during the install, but I tried to reinstall this bootloader later (using "rescue" from an edgy install cd) and I got this error too.

I have same the kind of lvm installation than the one described on description field of this bug.

Loic Pefferkorn (loic) wrote :

Just found a solution using "rescue mode" of Edgy install cd, just type "/etc/init.d/lvm start" then lilo works fine

Jonathan Gibert (jokot3) wrote :

Fresh edgy install, full lvm system (including /boot/ and /)
Pretty the same here, installer give me two choice, install lilo to mbr (/dev/sda) or to /boot (/dev/sda1), but it fail to install in both case, but it says something strange :
"couldn't install lilo in /target/" (free french translation).=, it seems the path isn't entirely passed to lilo's installer.

it's seems to be a general problem : http://<email address hidden>/msg278687.html

Simon Law (sfllaw) wrote :

This does not appear to be a valid upstream LILO bug, as they don't support LVM boot partitions.

Changed in lilo:
status: Unconfirmed → Rejected
Morten Abildgaard (mortn) wrote :

It works for me with Edgy on a fresh install but Feisty fails.

Should I report a new bug or will this be sufficient?

Fresh install from Edgy Alternative with LVM(2) on a software/fakeraid RAID1 (with mdadm and so on) seems to work just fine on my 2 servers with this setup. The Feisty doen'st work in any way. Neither fresh install nor upgrade from Edgy.

What to do?

Björn Streicher (bstreicher) wrote :

I got the same error message as in the initial post running Feisty (after not having problems for months). After taking out /boot from the LVM region and mounting it as a simple disk partition via /dev/evms/sda1 it worked fine again - this behaviour is according to the EVMS installation manual (see http://evms.sourceforge.net/install/boot.html):

NOTE: There are some limitations on the type of volume that can be used to hold your /boot filesystem, regardless of which boot-loader you're using. This volume must be created from a simple disk segment/partition, or from a raid-1 region on top of simple segments. Using a volume created from LVM regions to hold /boot is not supported at this time. The volume itself can be either an EVMS or a compatibility volume.

The volume in the initial post is also hold by a LVM region - which is probably why it doesn't work.

Scribit Björn Streicher dies 20/08/2007 hora 18:08:
> Using a volume created from LVM regions to hold /boot is not supported
> at this time.

It is, with LILO. I do that on a regular basis. I thought some recent
versions of GRUB supported that too.

Quickly,
Pierre
--
<email address hidden>
OpenPGP 0xD9D50D8A

Leon Weber (leonn) wrote :

Just in case someone doesn't get the problem fixed: It might be the stupid problem that "/boot" is not mounted...

garyo (garyo) wrote :
Download full text (3.2 KiB)

This is still happening on 8.04; every kernel upgrade we do (via apt-get dist-upgrade) gives these lilo errors. We are fully lvm, with a separate lvm boot partition. For instance after today's apt-get dist-upgrade that updated the kernel and initramfs:

update-initramfs: Generating /boot/initrd.img-2.6.24-19-server
Warning: LBA32 addressing assumed
Warning: '/proc/partitions' does not match '/dev' directory structure.
   Name change: '/dev/dm-0' -> '/dev/vg1/lv1'
Warning: Name change: '/dev/dm-1' -> '/dev/vg1/lv2'
Warning: Name change: '/dev/dm-2' -> '/dev/vg1/lv3'
Added Linux *
Added LinuxOLD
The Master boot record of /dev/sda has been updated.
Warning: /dev/sdb is not on the first disk
The Master boot record of /dev/sdb has been updated.

% df
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg1-lv3 461G 43G 395G 10% /
...
/dev/mapper/vg1-lv1 101M 64M 33M 67% /boot

lilo.conf bits:
boot=/dev/md0
raid-extra-boot=mbr-only
image=/vmlinuz
        label=Linux
        read-only
        append="root=/dev/mapper/vg1-lv3 "
        initrd=/initrd.img

% sudo vgdisplay -v
    Finding all volume groups
    Finding volume group "vg1"
  --- Volume group ---
  VG Name vg1
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 24
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 3
  Open LV 3
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 465.76 GB
  PE Size 4.00 MB
  Total PE 119234
  Alloc PE / Size 119234 / 465.76 GB
  Free PE / Size 0 / 0
  VG UUID G3cY9t-MZDF-ghxc-xkdG-k5Zq-gfsj-be8CG8

  --- Logical volume ---
  LV Name /dev/vg1/lv1
  VG Name vg1
  LV UUID BikR2Q-jjnM-2TbL-h1eQ-JwtD-36IC-IflP2h
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 104.00 MB
  Current LE 26
  Segments 1
  Allocation inherit
  Read ahead sectors 0
  Block device 254:0

  --- Logical volume ---
  LV Name /dev/vg1/lv2
  VG Name vg1
  LV UUID vCy8ea-ZC4C-VpCb-S1NV-w0lj-d0LB-URlJQP
  LV Write Access read/write
  LV Status available
  # open 2
  LV Size 1.95 GB
  Current LE 500
  Segments 1
  Allocation inherit
  Read ahead sectors 0
  Block device 254:1

  --- Logical volume ---
  LV Name /dev/vg1/lv3
  VG Name vg1
  LV UUID uSdl3j-Wk2p-WH8G-5IGH-thG0-MTdE-KPGq6H
  LV Write Access read/write
  LV Status available
  # open 1
  LV Size 463.70 GB
  Current LE 118708
  Segments 1
  Allocation inherit
  Read ahead sectors 0
  Block device 254:2

  --- Physical volumes ---
  PV Name /dev/md0
  PV UUID EJ222m-fxth-xR5T-9YL...

Read more...

Same problem here.

Installed hardy server amd64 from scratch, /boot is on lvm. Initially there were no problems. After the first kernel upgrade (probably the first, not 100% sure) got the directory structure warning. Kept ignoring the warnings, the system was working fine. Until this last hardy kernel upgrade, that would be linux-image-2.6.24-19-server, usual warning but the system did not reboot anymore. Don't have access to the server console, the admin that eventually restarted the server selected LinuxOLD.

The warning is trivial to replicate: just install hardy server, tried with i386 under virtualbox, and manually partition and put the whole root on lvm (including /boot). After the system is installed, run apt-get upgrade, the newer kernel will be installed. You will see the directory structure warning. This test system rebooted fine for me.

See attachment for exact warning.

Colin Watson (cjwatson) on 2009-02-12
Changed in lilo-installer:
assignee: nobody → kamion
Ante Karamatić (ivoks) wrote :

'Me too' for i386 Hardy. I've noticed that /proc/partitions mentions partitions (and disks) which don't exist.

Ante Karamatić (ivoks) wrote :

# lilo
Warning: LBA32 addressing assumed
Warning: '/proc/partitions' does not match '/dev' directory structure.
    Name change: '/dev/dm-0' -> '/dev/leonardo/system'
Warning: Name change: '/dev/dm-1' -> '/dev/leonardo/storage'
Warning: Name change: '/dev/sdb' -> '/dev/sdb'
Warning: Name change: '/dev/sdc' -> '/dev/sdc'
Warning: Name change: '/dev/sdc1' -> '/dev/sdc1'
Cannot proceed. Maybe you need to add this to your lilo.conf:
 disk=/dev/sdc inaccessible
(real error shown below)
Fatal: open /dev/sdc: No such file or directory

Ante Karamatić (ivoks) wrote :

In my case it appears that lilo is trying to acccess unavailable USB disk. I removed the disk from SCSI:

echo "scsi remove-single-device 3 0 0 1" > /proc/scsi/scsi

and run lilo again and everything worked.

Thank you for posting this bug.

Does this occur in Lucid?

Changed in lilo-installer (Ubuntu):
status: Confirmed → Incomplete
Colin Watson (cjwatson) on 2011-01-19
Changed in lilo-installer (Ubuntu):
assignee: Colin Watson (cjwatson) → nobody
dino99 (9d9) wrote :

outdated, dont got answer to #19 above

Changed in lilo-installer (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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