# HG changeset patch # User Stanislas Leduc # Date 1705428484 0 # Node ID e6c086aad08f289e5da32425b162743f1406e475 # Parent adb82ce06cee9ba040eb74495b6b666b9336cddd Add lilo patch and example config diff -r adb82ce06cee -r e6c086aad08f lilo/receipt --- a/lilo/receipt Mon Jan 15 22:12:34 2024 +0000 +++ b/lilo/receipt Tue Jan 16 18:08:04 2024 +0000 @@ -34,5 +34,22 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { + mkdir -p $fs/usr/share/examples/lilo cp -a $install/sbin $fs + cp $stuff/lilo.conf $fs/usr/share/examples/lilo } + +post_install() +{ + cat <= 3) { +@@ -708,6 +712,22 @@ + geo->start = hdprm.start; + break; + case MAJOR_SATA1: ++ /* check for nvme device and assume boot/this device is nvme if present */ ++ if (nvme_pr != 0) { ++ geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 4); ++ if (!get_all) break; ++ if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0) ++ die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device, ++ strerror(errno)); ++ if (all && !hdprm.sectors) ++ die("HDIO_REQ not supported for your NVME controller. Please " ++ "use a DISK section"); ++ geo->heads = hdprm.heads; ++ geo->cylinders = hdprm.cylinders; ++ geo->sectors = hdprm.sectors; ++ geo->start = hdprm.start; ++ break; ++ } + case MAJOR_SATA2: + printf("WARNING: SATA partition in the high region (>15):\n"); + printf("LILO needs the kernel in one of the first 15 SATA partitions. If \n"); +diff -Naru lilo-24.2/src/lilo.h lilo-24.2.new/src/lilo.h +--- lilo-24.2/src/lilo.h 2015-11-21 23:50:20.000000000 +0000 ++++ lilo-24.2.new/src/lilo.h 2018-02-15 15:27:35.647786827 +0000 +@@ -245,6 +245,7 @@ + + /* high partitions (>15) on SATA hard disks */ + #define MAJOR_SATA1 259 /* high SATA disk partitions (Block Extended Major) */ ++ /* also used by kernel for nvme disks */ + #define MAJOR_SATA2 260 /* high SATA disk partitions (Block Extended Major) (obsolete) */ + +