diff -upk.orig lilo-22.7.3.orig/lilo.c lilo-22.7.3/lilo.c --- lilo-22.7.3.orig/lilo.c 2006-12-29 14:14:48 +0000 +++ lilo-22.7.3/lilo.c 2006-12-29 14:18:48 +0000 @@ -23,6 +23,10 @@ source directory. #include /*#include */ +#ifdef LCF_BLKID +#include +#endif + #include "config.h" #include "lilo.h" #include "common.h" @@ -912,6 +916,20 @@ extern int has_partitions_beta(dev_t dev " disk addresses below the 1024 cylinder limit; LBA32 specifies 32-bit disk\n" " addresses not subject to cylinder limits on systems with EDD-BIOS extensions;\n" " use LINEAR only if you are aware of its limitations."); + +#ifdef LCF_BLKID +{ + char *boot_dev = cfg_get_strg(cf_options, "boot"); + + if (boot_dev && strlen(boot_dev) > 5 && !strncmp(boot_dev, "UUID=", 5)) { + char *dev = blkid_get_devname(NULL, boot_dev, NULL); + if (!dev) + die("%s: boot device not found", boot_dev); + cfg_unset(cf_options, "boot"); + cfg_set(cf_options, "boot", dev, NULL); + } +} +#endif if (identify) identify_image(identify,ident_opt); diff -upk.orig lilo-22.7.3.orig/Makefile lilo-22.7.3/Makefile --- lilo-22.7.3.orig/Makefile 2006-12-29 14:14:48 +0000 +++ lilo-22.7.3/Makefile 2006-12-29 14:17:13 +0000 @@ -66,7 +66,7 @@ CONFIG=-DBDATA -DDSECS=3 -DEVMS -DIGNORECASE -DLVM -DNOKEYBOARD -DONE_SHOT \ -DPASS160 -DREISERFS -DREWRITE_TABLE -DSOLO_CHAIN -DVERSION -DVIRTUAL \ - -DMDPRAID + -DMDPRAID -DBLKID # set the following if you wish LILO.COM to be installed DOS_DIR=/dosC/boot @@ -117,6 +117,10 @@ CFLAGS=$(OPT) $(PCONFIG) LDFLAGS=#-Xlinker -qmagic LIBS=$(DEVMAPPER) +ifneq (,$(findstring BLKID,$(CONFIG))) +LIBS+=-lblkid +endif + OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \ partition.o identify.o probe.o shs2.o edit.o temp.o