Wojciech Górski <wgorski1@gmail.com> (2014-03-17): > Package: os-prober > Version: 1.63 > Severity: normal > Tags: patch > > Hi, > > when detecting kernels on a linux system without grub/lilo, the 90fallback > script is used, which looks for kernel/image files in a few well-known > locations using 'ls'. This makes the output least-recent-first ordered, causing > grub to use the oldest kernel as default, making it necessary to use a submenu > to boot the most recent one. > > Attaching a patch reversing the ordering. Thanks. If we're going to fix that, don't we want to be sorting based on time (-t), instead sorting alphabetically (the default). Ideally we could do version-based sorting, but then people might come up with funny versioning schemes, so time-based looks better to me at first glance. Thoughts? > --- linux-boot-probes/mounted/common/90fallback 2011-02-10 03:00:20.000000000 +0100 > +++ linux-boot-probes/mounted/common/90fallback.new 2014-03-17 00:56:49.001460861 +0100 > @@ -19,7 +19,7 @@ > else > kernbootpart="$partition" > fi > - for kernfile in $(eval ls "$mpoint$kernpat" 2>/dev/null); do > + for kernfile in $(eval ls -r "$mpoint$kernpat" 2>/dev/null); do > kernbasefile=$(echo "$kernfile" | sed "s!^$mpoint!!") > if [ -f "$kernfile" ] && [ ! -L "$kernfile" ]; then > initrdname=$(echo "$kernfile" | sed "s/vmlinu[zx]/initrd\*/") Mraw, KiBi.
Attachment:
signature.asc
Description: Digital signature