seriousness
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
Mir fiel unlängst auf, daß bei mir unter Ubuntu Studio 19.04 (Upgrade von 18.10) beim Generieren des Bootmenues keine Einträge für die alten Kernel (unter "Erweiterte Optionen...") angelegt werden. Das sieht z.B. so aus:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-5.0.0-25-lowlatency
initrd-Abbild gefunden: /boot/initrd.img-5.0.0-25-lowlatency
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Windows 7 auf /dev/sda1 gefunden
erledigt
An der GRUB-Konfiguration wurde von meiner Seite nichts verändert. Kennt jemand das Problem?
|
Lidux
Anmeldungsdatum: 18. April 2007
Beiträge: 15843
|
Hallo seriousness, Dann zeige doch bitte mal wie viele Kernel installiert sind ...... Gruss Lidux
|
tomtomtom
Supporter
Anmeldungsdatum: 22. August 2008
Beiträge: 53483
Wohnort: Berlin
|
Lidux schrieb: Dann zeige doch bitte mal wie viele Kernel installiert sind ......
Auf deutsch: Zeige ls -aluh /boot und dpkg -l | grep linux-image
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
Lidux schrieb: Hallo seriousness, Dann zeige doch bitte mal wie viele Kernel installiert sind ...... Gruss Lidux
Drei! Der aktuelle & die zwei Vorgänger. Wobei der älteste wie üblich den Status "automatisch entfernbar" hat.
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
Mir fällt auf, daß das Verzeichnis /etc/default/grub.d/ ausschließlich die Datei init-select.cfg enthält... Ich sitze gerade an einem anderen Rechner, aber sinngemäß steht da drin, daß diese Datei nichts macht, sondern ein Workaround für einen Bug ist, wenn init-select removed, aber nicht purged wurde und in einer künftigen Version entfernt wird.
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
Guten Abend! So, bin zurück in meinem kleinen Tonstudio... Zu den installierten Kerneln: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | sagich@nich:~$ ls -aluh /boot
insgesamt 157M
drwxr-xr-x 3 root root 4,0K Aug 15 18:06 .
drwxr-xr-x 26 root root 4,0K Aug 15 18:00 ..
-rw-r--r-- 1 root root 220K Aug 14 14:13 config-5.0.0-21-lowlatency
-rw-r--r-- 1 root root 220K Aug 14 14:13 config-5.0.0-23-lowlatency
-rw-r--r-- 1 root root 220K Aug 14 14:13 config-5.0.0-25-lowlatency
drwxr-xr-x 6 root root 4,0K Aug 15 18:21 grub
-rw-r--r-- 1 root root 40M Jul 23 09:34 initrd.img-5.0.0-21-lowlatency
-rw-r--r-- 1 root root 40M Aug 8 14:41 initrd.img-5.0.0-23-lowlatency
-rw-r--r-- 1 root root 40M Aug 14 14:13 initrd.img-5.0.0-25-lowlatency
-rw-r--r-- 1 root root 179K Jun 25 21:09 memtest86+.bin
-rw-r--r-- 1 root root 181K Jun 25 21:09 memtest86+.elf
-rw-r--r-- 1 root root 181K Jun 25 21:09 memtest86+_multiboot.bin
-rw------- 1 root root 4,2M Jul 23 09:34 System.map-5.0.0-21-lowlatency
-rw------- 1 root root 4,2M Aug 1 11:47 System.map-5.0.0-23-lowlatency
-rw------- 1 root root 4,2M Aug 14 14:12 System.map-5.0.0-25-lowlatency
-rw------- 1 root root 8,4M Jul 23 09:33 vmlinuz-5.0.0-21-lowlatency
-rw------- 1 root root 8,4M Aug 1 11:46 vmlinuz-5.0.0-23-lowlatency
-rw------- 1 root root 8,4M Aug 14 14:12 vmlinuz-5.0.0-25-lowlatency
sagich@nich:~$ dpkg -l | grep linux-image
ii linux-image-5.0.0-21-lowlatency 5.0.0-21.22 amd64 Signed kernel image lowlatency
ii linux-image-5.0.0-23-lowlatency 5.0.0-23.24 amd64 Signed kernel image lowlatency
ii linux-image-5.0.0-25-lowlatency 5.0.0-25.26 amd64 Signed kernel image lowlatency
ii linux-image-lowlatency 5.0.0.25.26 amd64 lowlatency Linux kernel image
|
Der Inhalt von /etc/default/grub.d/init-select.cfg:
| # Work around a bug in the obsolete init-select package which broke
# grub-mkconfig when init-select was removed but not purged. This file does
# nothing and will be removed in a later release.
#
# See:
# https://bugs.debian.org/858528
# https://bugs.debian.org/863801
|
Nachtrag: Es KÖNNTE sein, daß es sich um ein Ubuntu Studio-spezifisches Problem handelt (ubuntustudio-lowlatency-settings etc.) und vom Team irgendwann gefixt wird. Zudem war ich noch nie in der Verlegenheit, unter Ubuntu Studio einen alten Kernel booten zu müssen...
|
tomtomtom
Supporter
Anmeldungsdatum: 22. August 2008
Beiträge: 53483
Wohnort: Berlin
|
Zeig bitte mal dpkg -l | grep grub-common
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
:~$ dpkg -l | grep grub-common
ii grub-common 2.02+dfsg1-12ubuntu2 amd64 GRand Unified Bootloader (common files)
|
Frieder108
Anmeldungsdatum: 7. März 2010
Beiträge: 8989
|
was zeigt eigentlich ein simples
sudo update-grub
|
tomtomtom
Supporter
Anmeldungsdatum: 22. August 2008
Beiträge: 53483
Wohnort: Berlin
|
Frieder108 schrieb: was zeigt eigentlich ein simples
sudo update-grub
Steht im ersten Posting. 😉 Das macht nichts anderes, als grub-mkconfig -o /boot/grub/grub.cfg auszuführen, und das sucht in /etc/grub.d/ nach ausführbaren Skripten. Wenn da keine Sind kann es keine ausführen. Einmal (in der Reihenfolge) ein ls -aluh /etc/grub.d/ dann sudo apt install --reinstall grub-common und nochmal ls -aluh /etc/grub.d/ sowie dpkg -L grub-common zeigen, bitte. (Hintergrund: Das Paket liefert die Skripte mit, wenn es installiert ist, sollten sie also da sein.
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
Hey tomtomtom, das mit den Skripten hat sich erledigt. Die sind da, aber halt nicht in /etc/default/grub.d/ ... Sorry für die Verwirrung!
|
tomtomtom
Supporter
Anmeldungsdatum: 22. August 2008
Beiträge: 53483
Wohnort: Berlin
|
seriousness schrieb: das mit den Skripten hat sich erledigt. Die sind da, aber halt nicht in /etc/default/grub.d/ ...
Installiere das Paket grub-common bitte trotzdem nochmal neu, denn es scheint sich hier schon um ein Problem mit den abzuarbeitenden Skripten zu handeln.
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
So sieht es in /etc/grub.d/ aus: insgesamt 112K
drwxr-xr-x 2 root root 4,0K Jul 22 09:26 ./
drwxr-xr-x 155 root root 12K Sep 6 16:44 ../
-rwxr-xr-x 1 root root 11K Feb 5 2019 00_header*
-rwxr-xr-x 1 root root 6,2K Okt 17 2018 05_debian_theme*
-rwxr-xr-x 1 root root 9,7K Sep 2 2016 09_lowlatency*
-rw-r--r-- 1 root root 14K Mär 11 22:48 10_linux
-rwxr-xr-x 1 root root 12K Mär 11 22:48 20_linux_xen*
-rwxr-xr-x 1 root root 2,0K Jan 28 2016 20_memtest86+*
-rwxr-xr-x 1 root root 12K Okt 17 2018 30_os-prober*
-rwxr-xr-x 1 root root 1,4K Okt 17 2018 30_uefi-firmware*
-rwxr-xr-x 1 root root 214 Okt 17 2018 40_custom*
-rwxr-xr-x 1 root root 216 Okt 17 2018 41_custom*
-rw-r--r-- 1 root root 483 Okt 17 2018 README
-rw-r--r-- 1 root root 260 Jul 21 22:42 README.lowlatency
09_lowlatency, das aus dem Paket ubuntustudio-default-settings stammt, ersetzt 10_linux und sollte eigentlich die Einträge für die installierten Kernel in /boot/grub/grub.cfg anlegen. Neuinstallation von ubuntustudio-default-settings brachte keine Änderung. x@y:~$ sudo update-grub
[sudo] Passwort für x:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
GRUB-Konfigurationsdatei wird erstellt …
Linux-Abbild gefunden: /boot/vmlinuz-5.0.0-27-lowlatency
initrd-Abbild gefunden: /boot/initrd.img-5.0.0-27-lowlatency
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Windows 7 auf /dev/sda1 gefunden
erledigt Die anderen Skripte in /etc/grub.d/ scheinen zu funktionieren.
|
Taomon
Supporter
Anmeldungsdatum: 30. Januar 2011
Beiträge: 8430
Wohnort: Digiworld
|
cat /etc/grub.d/09_lowlatency Gruß Taomon
|
seriousness
(Themenstarter)
Anmeldungsdatum: 22. Juni 2009
Beiträge: 233
|
x@y:/etc/grub.d$ cat 09_lowlatency
#! /bin/sh
set -e
# grub-mkconfig helper script.
#
# Ubuntustudio customization that keeps the latest lowlatency kernel
# as the first menu item and default boot even if there is a newer
# generic or other kernel. Often the updated generic kernel is
# released a few days earlier than the lowlatency kernel
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
. "${datarootdir}/grub/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
if [ "${GRUB_DISTRIBUTOR}" = "Ubuntu" ] ; then
OS="${GRUB_DISTRIBUTOR}"
else
OS="${GRUB_DISTRIBUTOR} GNU/Linux"
fi
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
# We can't cope with devices loop-mounted from files here.
case ${GRUB_DEVICE} in
/dev/*) ;;
*) exit 0 ;;
esac
;;
esac
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
|| ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
|| uses_abstraction "${GRUB_DEVICE}" lvm; then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
GRUBFS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`"
if [ x"$GRUBFS" = x ]; then
GRUBFS="$(stat -f --printf=%T / || true)"
fi
case x"$GRUBFS" in
xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
if [ "x${rootsubvol}" != x ]; then
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi;;
xzfs)
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
;;
esac
title_correction_code=
for word in $GRUB_CMDLINE_LINUX_DEFAULT; do
if [ "$word" = splash ]; then
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT \$vt_handoff"
fi
done
# add crashkernel option if we have the required tools
if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
fi
linux_entry ()
{
os="$1"
version="$2"
type="$3"
args="$4"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
if [ x$type != xsimple ] ; then
case $type in
recovery)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
*)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
esac
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
fi
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
else
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
echo "recordfail" | sed "s/^/$submenu_indentation/"
if [ x$type != xrecovery ] ; then
save_default_entry | sed -e "s/^/\t/"
fi
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
else
if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
fi
fi
if [ x$type != xrecovery ] ; then
echo " gfxmode \$linux_gfx_mode" | sed "s/^/$submenu_indentation/"
fi
echo " insmod gzio" | sed "s/^/$submenu_indentation/"
if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then
prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
else
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xsimple ]; then
message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
EOF
fi
if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then
sed "s/^/$submenu_indentation/" << EOF
linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args}
EOF
else
sed "s/^/$submenu_indentation/" << EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
fi
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
if [ x$type != xsimple ]; then
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
EOF
fi
sed "s/^/$submenu_indentation/" << EOF
initrd ${rel_dirname}/${initrd}
EOF
fi
sed "s/^/$submenu_indentation/" << EOF
}
EOF
}
machine=`uname -m`
case "x$machine" in
xi?86 | xx86_64)
list=`for i in /boot/vmlinuz-*lowlatency /boot/kernel-*lowlatency ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done` ;;
*)
list=`for i in /boot/vmlinuz-*lowlatency /boot/vmlinux-*lowlatency /boot/kernel-*lowlatency ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
done` ;;
esac
case "$machine" in
i?86) GENKERNEL_ARCH="x86" ;;
mips|mips64) GENKERNEL_ARCH="mips" ;;
mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
arm*) GENKERNEL_ARCH="arm" ;;
*) GENKERNEL_ARCH="$machine" ;;
esac
prepare_boot_cache=
prepare_root_cache=
boot_device_id=
title_correction_code=
cat << 'EOF'
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
EOF
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
echo "set linux_gfx_mode=$GRUB_GFXPAYLOAD_LINUX"
else
cat << EOF
if [ "\${recordfail}" != 1 ]; then
if [ -e \${prefix}/gfxblacklist.txt ]; then
if hwmatch \${prefix}/gfxblacklist.txt 3; then
if [ \${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
EOF
fi
cat << EOF
export linux_gfx_mode
EOF
# Extra indentation to add to menu entries in a submenu. We're not in a submenu
# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
submenu_indentation=""
is_first_entry=true
if [ "x$list" != "x" ]; then
linux=`version_find_latest $list`
case $linux in
*.efi.signed)
# We handle these in linux_entry.
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
continue
;;
esac
gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
"initramfs-genkernel-${alt_version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
fi
done
config=
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
if test -e "${i}" ; then
config="${i}"
break
fi
done
initramfs=
if test -n "${config}" ; then
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
fi
if test -n "${initrd}" ; then
gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
elif test -z "${initramfs}" ; then
# "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE}
fi
if [ "x$is_first_entry" = xtrue ]; then
linux_entry "${OS} (lowlatency)" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}"
fi
fi
echo "$title_correction_code"
|