Package: lilo
Version: 1:22.7.3-1
Followup-For: Bug #401393
lilo is definetely confused by /dev/dm-* devices.
If I remove /dev/dm-0 (my root LV) lilo correcly opens
/dev/mapper/control and issues DM_TABLE_STATUS:
8870 open("/dev/mapper/control", O_RDWR|O_LARGEFILE) = 4
[...]
8870 ioctl(4, DM_TABLE_STATUS, 0x80793b0) = 0
Lilo issues the ioctl using the device name, which in case of /dev/dm-0
is not recognized by the kernel.
For example in my setup the LV is
/dev/mapper/main_vol-root
hence the name that shall be used is main_vol-root (dm-0 is not
recognized by the kernel!).
The name that is passed to the library is created simply with strrchar
in order to isolate the file name from the full path
(01_devmapper.dpatch) and this name is used to call dm_task_run(). Now,
since lilo knows the device that has be used it could call
DM_TABLE_STATUS using the device number, but unfortunately dm_task_run()
doesn't support this (maybe lilo should be calling the ioctl by
itself?).
To recap:
struct dm_ioctl info;
...
strcpy(info.name, "dm-0");
ioctl(fd, DM_TABLE_STATUS, &info); /* FAILS */
strcpy(info.name, "main_vol-root");
ioctl(fd, DM_TABLE_STATUS, &info); /* WORKS */
stat("/dev/whatever", &buf);
info.dev = buf.st_rdev;
ioctl(fd, DM_TABLE_STATUS, &info); /* WORKS */
Luca
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.utf8)
Versions of packages lilo depends on:
ii debconf 1.5.3 Debian configuration management sy
ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries
ii libdevmapper1.02 2:1.02.03-1 The Linux Kernel Device Mapper use
ii mbr 1.1.9-2 Master Boot Record for IBM-PC comp
lilo recommends no packages.
-- debconf information excluded
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]