On Mon, Feb 05, 2007, Glennie Vignarajah wrote:
> As lilo depends on libdevmapper, Sarge one is not installable on
> Etch directly. So, I quickly complied the source package from sarge
> (not using the debian way ; just unpacked the source package from
> sarge and, typed 'make' in the source directory). When I
> run './lilo', I have the same error. I don't know if this is
> enough...
I think this is enough to suggest a change in the device names / kernel
/ udev probably exposed a bug in lilo or that the current kernel does
not accept what it used to accept from lilo.
> This is normal. It's a CD drive !
Ah! So, perhaps lilo is buggy with respect to the detection of the
layout of the RAID as well, but this seems to be a separate issue.
> Yep. See the attached file (lilo-sarge).
Ok, since it doesn't work, it's not that interesting to compare and
it's not really close anyway.
Could you please try building the attached program with:
gcc -o cciss cciss.c
(You might need linux-kernel-headers.)
Then run as root:
./cciss /dev/cciss/c0d0
Please report the output which should look like:
# ./cciss /dev/sda
0: ioctl(3, HDIO_GETGEO) succeeded!
1: ioctl(4, HDIO_GETGEO) succeeded!
2: ioctl(5, HDIO_GETGEO) succeeded!
--
Loïc Minier <[EMAIL PROTECTED]>
#define _LARGEFILE64_SOURCE 1
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <linux/hdreg.h>
void usage() {
printf("Usage: cciss DEVICE\n");
}
int main(int argc, char * argv[]) {
int i;
const int flags_list[] = {O_RDWR, O_RDONLY, O_RDONLY | O_LARGEFILE};
if (argc != 2) {
usage();
return 1;
}
for (i = 0; i < sizeof(flags_list) / sizeof(int); i++) {
int fd;
struct hd_geometry hdprm;
int r;
fd = open(argv[1], flags_list[i]);
if (fd < 0) {
printf("%i: open(%s, %i) failed: %m\n",
i,
argv[1],
flags_list[i]
);
continue;
}
r = ioctl(fd, HDIO_GETGEO, &hdprm);
if (r < 0) {
printf("%i: ioctl(%i, HDIO_GETGEO) failed: %m\n",
i,
fd);
continue;
}
printf("%i: ioctl(%i, HDIO_GETGEO) succeeded!\n",
i,
fd);
}
return 0;
}