Skip to contentSkip to conversation

device-mapper patch for lilo (/ and/or /boot on LVM2)

linux-lvm Christophe Saout 2 participants 2 messages Dec 26, 2002 – Dec 30, 2002 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi!

Perhaps you might be interested: I've written a small patch agains lilo-21.7 so that it recognizes boot files on a /dev/mapper/* volume.

I attached the patch below, but you can also find it at
http://www.saout.de/misc/. I also uploaded my initrd, to boot from a root volume on LVM2 for newer 2.5 kernels, there if someone is interested. (the libc is optimized for athlon and it needs a 8 MB ram disk - see kernel configuration).

Makefile +4 -2
diff -Nur lilo-21.7.5/Makefile lilo-21.7.5-devmapper/Makefile
@@ -57,9 +57,11 @@
 LD86=ld86 -0
 
 AFLAGS=`cat mylilo.h`
-CFLAGS=-Wall -g $(PCONFIG) $(AFLAGS)
+CFLAGS=-Wall -O6 -fomit-frame-pointer -pipe $(PCONFIG) $(AFLAGS)
 LDFLAGS=#-Xlinker -qmagic
 
+DEVMAPPER=-ldevmapper
+
 OBJS=lilo.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o temp.o \
   partition.o identify.o probe.o lrmi.o
 
@@ -121,7 +123,7 @@
 		cp -p dparam.S dparam.s
 
 lilo:		mylilo.h $(OBJS)
-		$(CC) -o lilo $(LDFLAGS) $(OBJS)
+		$(CC) -o lilo $(LDFLAGS) $(DEVMAPPER) $(OBJS)
 
 boot-text.b:	first.b second.b
 		(dd if=first.b bs=512 conv=sync; dd if=second.b) >boot-text.b
geometry.c +153 -8

233 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Christophe Saout

Hi!

Perhaps you might be interested: I've written a small patch agains lilo-21.7 so that it recognizes boot files on a /dev/mapper/* volume.

Cool, I especially like the fact that you haven't needed any nasty BMAP ioctls :)

- Joe