Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104309 - lilo (sys-boot/lilo-22.7) fails to work with device numbers bigger that 255/255
Summary: lilo (sys-boot/lilo-22.7) fails to work with device numbers bigger that 255/255
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-30 15:29 UTC by Honza
Modified: 2008-01-15 08:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Beta version of patch (lilo-mdp.patch,2.44 KB, patch)
2005-08-30 16:01 UTC, Honza
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Honza 2005-08-30 15:29:48 UTC
lilo has it's own definition of MAJOR, MINOR and MKDEV in geometry.h. Problem is
that that's an old definition with 8bit minor numbers, while new (2.6.?+)
definition have 32bit minor and 32bit major, as seen in
/usr/include/sys/sysmacros.h, or maybee 20bit minor and 12bit major, as seen in
/usr/src/linux/include/linux/kdev_t.h (2.6.12).

Problem arise for example for device 254, 963 - partitionable raid 15, partition 3.

Reproducible: Always
Steps to Reproduce:
1. Setup partitionable raid bigger that 4.
2. Run lilo.


Actual Results:  
Lilo is complaining that it can't find devices from mentioned array in /dev and
create temporary device nodes in /tmp with bad minor number.

Expected Results:  
In my case, lilo should find correct devices in /dev/DEVfs/md/d15/part3. In all
cases, lilo should both search and create devices with correct minor number.

Note that this can be extremly dangerous if someone want to USE that devices in
lilo, for example as boot device ... and do not forget that there will be more
devices with non-16bit device number later.

Portage 2.0.51.22-r2 (default-linux/x86/2004.0, gcc-3.3.2, glibc-2.3.2-r9,
2.6.12-gentoo-r8-32 i686)
=================================================================
System uname: 2.6.12-gentoo-r8-32 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.3
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.4.3-r3, 1.5.2-r7
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=athlon -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=athlon -march=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d aalib alsa apache2 apm arts avi bash-completion
berkdb bitmap-fonts caps cdr crypt cups curl dga directfb doc dvd emboss encode
esd f77 fbcon flac font-server foomaticdb fortran gd gdbm ggi gif gnome gpm gtk
gtk2 imagemagick imlib innodb ipv6 java jpeg lcms lesstif libcaca libg++ libwww
lirc mad mailwrapper mbox mcal memlimit mikmod mmx mmx2 mmxext mng motif mozilla
mp3 mpeg multislot mysql ncurses nls ogg oggvorbis opengl oss pam pdflib perl
png python qt quicktime readline real samba sdl slang snmp spell sqlite sse sse2
ssl svga tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb
v4l v4l2 vhosts videos vorbis wmf x86 xgetdefault xml xml2 xmms xosd xv xvid
zlib userland_GNU kernel_linux elibc_glibc"
Unset:  LDFLAGS
Comment 1 Honza 2005-08-30 16:01:53 UTC
Created attachment 67300 [details, diff]
Beta version of patch

Note "bigger that 4" means "with number bigger that 4", ie. /dev/md/mdp4 ...

Attached patch work for me, but I assume more complicated test could be needed
for compatibility with older ... what owns /usr/include/sys/sysmacros.h ...
sys-libs/glibc (than 2.3.2-r9). Also there may be other points where 8bit
minors are assumed, which I missed - lilo doesn't look like so clean piece of
code.

(And it's 1 am here ...)
Comment 2 SpanKY gentoo-dev 2005-08-31 15:44:01 UTC
you should e-mail the lilo maintainer about the issue:
http://home.san.rr.com/johninsd/
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-01-15 08:45:32 UTC
upstream bug.