This returns lilo to functionality when the appropriate disk=/dev/sdb inaccessible
lines are present. Available in convenient dpatch format. It should be applied immediately, to a high-priority upload. ---- As noted in the patch description, this eliminates at least one of the failure modes: Fatal: '/dev/sdb' is not a whole disk device I believe it also eliminates this failure mode. Andrew Moise might care to confirm: Fatal: stat /dev/sda: No such file or directory It doesn't eliminate the third failure mode, which occurs when a device node is missing: Warning: '/proc/partitions' does not match '/dev' directory structure. Name change: '/dev/sdb' -> '/dev/sdb' Cannot proceed maybe you need to add this to your lilo.conf: disk=/dev/sdb inaccessible (real error shown below) Fatal: open /dev/sdb: No such file or directory This third failure mode can be worked around by creating the appropriate device nodes. That is obviously extremely suboptimal, so I wouldn't close the bug just yet. ---- -- Nathanael Nerode <[EMAIL PROTECTED]> Bush admitted to violating FISA and said he was proud of it. So why isn't he in prison yet?...
#! /bin/sh -e ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Make sure that disks marked 'inaccessible' do not have their ## DP: partition tables checked and do not have 'stat' run. ## DP: Doesn't fix the crash on missing /dev nodes, unfortunately. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts patch_opts="${patch_opts:--f --no-backup-if-mismatch}" if [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument " exit 1 fi case "$1" in -patch) patch $patch_opts -p1 < $0;; -unpatch) patch $patch_opts -p1 -R < $0;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1;; esac exit 0 @DPATCH@ --- geometry.c.old 2006-09-09 02:43:12.000000000 -0400 +++ geometry.c 2006-09-09 16:33:28.000000000 -0400 @@ -273,15 +273,17 @@ int major; entry = alloc_t(DT_ENTRY); + cfg_init(cf_disk); + (void) cfg_parse(cf_disk); disk = cfg_get_strg(cf_options,"disk"); - if (stat(disk,&st) < 0) die("stat %s: %s",disk,strerror(errno)); - if (!S_ISBLK(st.st_mode) || - (has_partitions(st.st_rdev) && (MINOR(st.st_rdev) & P_MASK(st.st_rdev)))) - die(" '%s' is not a whole disk device",disk); + if (!cfg_get_flag(cf_disk,"inaccessible")) { + if (stat(disk,&st) < 0) die("stat %s: %s",disk,strerror(errno)); + if (!S_ISBLK(st.st_mode) || + (has_partitions(st.st_rdev) && (MINOR(st.st_rdev) & P_MASK(st.st_rdev)))) + die(" '%s' is not a whole disk device",disk); + } entry->device = st.st_rdev; major = MAJOR(st.st_rdev); - cfg_init(cf_disk); - (void) cfg_parse(cf_disk); bios = cfg_get_strg(cf_disk,"bios"); sectors = cfg_get_strg(cf_disk,"sectors"); heads = cfg_get_strg(cf_disk,"heads");