ubuntuusers.de

Wie Grub bereinigen?

Status: Ungelöst | Ubuntu-Version: Ubuntu 24.04 (Noble Numbat)
Antworten |

tolter

Anmeldungsdatum:
19. November 2016

Beiträge: 268

Obwohl ich im System automatisches Login eingestellt habe, weil ich den PC allein nutze und kein Windows darauf zu starten ist, wird von Zeit zu Zeit beim Booten der Grub mit doppelten Zeilen angezeigt:

*Ubuntu
 Advanced options for Ubuntu
 Ubuntu
 Advanced options for Ubuntu
 Memory test (memtest86+x64.efi)
 Memory test (memtest86+x64.efi, serial console)
 UEFI Firmware SettingsUbuntu
 Ubuntu
 Advanced options for Ubuntu
 Memory test (memtest86+x64.efi)
 Memory test (memtest86+x64.efi, serial console)
 UEFI Firmware Settings

Danach muß ich mich mit Passwort anmelden. Bevor ich das System auf 26.04 upgrade, möchte ich das bereinigen.

Ich führe regelmäßig

sudo apt update && sudo apt upgrade && sudo snap refresh && sudo apt autopurge && sudo apt clean && sudo apt purge ~c

und

sudo apt-get autoremove –purge

aus

ls -l /boot zeigt:

rolf@PC:~$ ls -l /boot
insgesamt 214696
-rw-r--r-- 1 root root   308083 Sep  4 16:31 config-7.0.0-34-generic
-rw-r--r-- 1 root root   308111 Sep  9 18:01 config-7.0.0-38-generic
drwxr-xr-x 3 root root     4096 Jan  1  1970 efi
drwxr-xr-x 5 root root     4096 Okt 14 11:23 grub
lrwxrwxrwx 1 root root       27 Okt  2 21:10 initrd.img -> initrd.img-7.0.0-38-generic
-rw-r--r-- 1 root root 81627135 Sep 27 20:47 initrd.img-7.0.0-34-generic
-rw-r--r-- 1 root root 81633666 Okt  2 21:10 initrd.img-7.0.0-38-generic
lrwxrwxrwx 1 root root       27 Okt  2 21:10 initrd.img.old -> initrd.img-7.0.0-34-generic
-rw-r--r-- 1 root root   142796 Apr  8  2024 memtest86+ia32.bin
-rw-r--r-- 1 root root   143872 Apr  8  2024 memtest86+ia32.efi
-rw-r--r-- 1 root root   147744 Apr  8  2024 memtest86+x64.bin
-rw-r--r-- 1 root root   148992 Apr  8  2024 memtest86+x64.efi
-rw------- 1 root root 10652040 Sep  4 16:31 System.map-7.0.0-34-generic
-rw------- 1 root root 10662192 Sep  9 18:01 System.map-7.0.0-38-generic
lrwxrwxrwx 1 root root       24 Okt  2 21:10 vmlinuz -> vmlinuz-7.0.0-38-generic
-rw------- 1 root root 17009032 Sep  4 16:36 vmlinuz-7.0.0-34-generic
-rw------- 1 root root 17029512 Sep 14 17:28 vmlinuz-7.0.0-38-generic
lrwxrwxrwx 1 root root       24 Okt  2 21:10 vmlinuz.old -> vmlinuz-7.0.0-34-generic
rolf@PC:~$

und dpkg -l | grep linux-image:

rolf@PC:~$ dpkg -l | grep linux-image
ii  linux-image-7.0.0-34-generic                     7.0.0-34.34~24.04.1                              amd64        Signed kernel image generic
ii  linux-image-7.0.0-38-generic                     7.0.0-38.38~24.04.4                              amd64        Signed kernel image generic
ii  linux-image-generic-hwe-24.04                    7.0.0-38.38~24.04.4                              amd64        Generic Linux kernel image
rolf@PC:~$ 

Vielleicht ist die aktuelle Grubkonfigartion zur Fehlersuche hilfreich:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif 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
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b13cd543-678a-4086-8a61-bc3b59b97539' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
	linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-7.0.0-38-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_proxy ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif 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
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b13cd543-678a-4086-8a61-bc3b59b97539' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
	linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-7.0.0-38-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
}

### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+x64.efi)" --class memtest $menuentry_id_option 'memtest86+' {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
        linux    /boot/memtest86+x64.efi
}
menuentry 'Memory test (memtest86+x64.efi, serial console)' --class memtest $menuentry_id_option 'memtest86+-serial' {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
        linux   /boot/memtest86+x64.efi console=ttyS0,115200
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_os-prober_proxy ###
### END /etc/grub.d/30_os-prober_proxy ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/31_linux_proxy ###
### BEGIN /etc/grub.d/proxifiedScripts/linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif 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
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b13cd543-678a-4086-8a61-bc3b59b97539' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
	linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
	initrd	/boot/initrd.img-7.0.0-38-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-38-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-38-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-38-generic ...'
		linux	/boot/vmlinuz-7.0.0-38-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-38-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-advanced-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro  quiet splash $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
	menuentry 'Ubuntu, with Linux 7.0.0-34-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-7.0.0-34-generic-recovery-b13cd543-678a-4086-8a61-bc3b59b97539' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
		echo	'Loading Linux 7.0.0-34-generic ...'
		linux	/boot/vmlinuz-7.0.0-34-generic root=UUID=b13cd543-678a-4086-8a61-bc3b59b97539 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-7.0.0-34-generic
	}
}

### END /etc/grub.d/proxifiedScripts/linux ###
### BEGIN /etc/grub.d/proxifiedScripts/os-prober ###
### END /etc/grub.d/proxifiedScripts/os-prober ###
### END /etc/grub.d/31_linux_proxy ###

### BEGIN /etc/grub.d/32_linux_zfs ###
### END /etc/grub.d/32_linux_zfs ###

### BEGIN /etc/grub.d/33_linux_xen ###

### END /etc/grub.d/33_linux_xen ###

### BEGIN /etc/grub.d/34_memtest86+ ###
menuentry "Memory test (memtest86+x64.efi)" --class memtest $menuentry_id_option 'memtest86+' {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
        linux    /boot/memtest86+x64.efi
}
menuentry 'Memory test (memtest86+x64.efi, serial console)' --class memtest $menuentry_id_option 'memtest86+-serial' {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root b13cd543-678a-4086-8a61-bc3b59b97539
        linux   /boot/memtest86+x64.efi console=ttyS0,115200
}
### END /etc/grub.d/34_memtest86+ ###

### BEGIN /etc/grub.d/35_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/35_bli ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/36_os-prober_proxy ###
### END /etc/grub.d/36_os-prober_proxy ###

### BEGIN /etc/grub.d/37_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/37_uefi-firmware ###

### BEGIN /etc/grub.d/38_fwupd ###
### END /etc/grub.d/38_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/42_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/42_custom ###

Wie kann ich Grub säubern – das wird ja wohl beim Upgrade auf 26.04 nicht automatisch erledigt?

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

tolter schrieb:

sudo apt-get autoremove –purge

braucht es nicht extra - ist in dem davor schon dabei

Wie kann ich Grub säubern – das wird ja wohl beim Upgrade auf 26.04 nicht automatisch erledigt?

Nicht Grub ist zu säubern sondern der NVRAM.

>> efibootmgr <<

Nachtrag: und an der grub.cfg wird überhaupt NIEMALS rum gefummelt wenn man nicht genau weiss was man tut.

tolter

(Themenstarter)

Anmeldungsdatum:
19. November 2016

Beiträge: 268

rolf@PC:~$ efibootmgr 
BootCurrent: 0001
Timeout: 2 seconds
BootOrder: 0001,0002,0003,0004
Boot0001* Ubuntu	HD(1,GPT,9bfd3e3a-538b-41bf-acc0-4d3e089019cc,0x800,0x219800)/File(\EFI\ubuntu\shimx64.efi)
Boot0002* UEFI:CD/DVD Drive	BBS(129,,0x0)
Boot0003* UEFI:Removable Device	BBS(130,,0x0)
Boot0004* UEFI:Network Device	BBS(131,,0x0)
rolf@PC:~$ 

Eigentlich brauche ich für die ständige Arbeit nur einen Bootvorgang (ich boote weder von CD noch vom Netz und nur manchmal zum Ausprobieren anderer Distributionen vom Stick). Kann ich die anderen Bootvorgänge einfach löschen?

schwarzheit schrieb:

Nachtrag: und an der grub.cfg wird überhaupt NIEMALS rum gefummelt wenn man nicht genau weiss was man tut.

Habe ich auch nicht getan. Deshalb hatte ich doch die Grubkonfiguration in eine gesonderte Datei kopiert.

Die Hauptfrage für mich ist aber, warum wird der Grub überhaupt beim Booten manchmal angezeigt. Kann da noch irgendein anderer Fehler im System sein?

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

Dann musste schon die richtige Datei zeigen.

cat /etc/default/grub

tolter

(Themenstarter)

Anmeldungsdatum:
19. November 2016

Beiträge: 268

rolf@PC:~$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
rolf@PC:~$ 

kB Team-Icon

Supporter, Wikiteam
Avatar von kB

Anmeldungsdatum:
4. Oktober 2007

Beiträge: 10338

Wohnort: Münster

schwarzheit schrieb:

[…] Nicht Grub ist zu säubern sondern der NVRAM.

Grub und NVRAM haben absolut nichts miteinander zu tun.

Gleichwohl ist natürlich ratsam, auch die Einträge für den EFI-Bootmanager in der Firmware des Rechners zu pflegen, die bei Dir allerdings in Ordnung sind. Wenn Dich die Einträge für BBS stören, reicht möglicherweise die Deaktivierung der veralteten Bios-Boot-Methode (alias BBS = Bios Boot Specification) in der Firmware des Rechners aus.

Für Dein eigentliches Anliegen zeige bitte auch:

ls -al /etc/default/grub.d/ /etc/grub.d/ 

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

Das sieht alles sauber aus. Es gibt damit eigentlich keinen Grund warum dir Grub angezeigt werden sollte. Also zumindest nichts was an Grub selber liegt. Was aber nicht heisst das nicht andere Systemfehler die Anzeige beeinflussen können.

Aber um das ganze mal etwas zu sortieren:

  • Systemstart - hat nichts mit Grub und Login zu tun

  • Anzeige Grub - hat nichts mir Login zu tun, kann aber durchaus ein Fallback sein

  • automatischer Login - hat nichts mit Grub oder dessen Anzeige und Auswahl zu tun

Du würfelst hier mal wieder alles durcheinander.

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

kB schrieb:

Grub und NVRAM haben absolut nichts miteinander zu tun.

Hab ich auch an keiner Stelle behauptet.

Nur wenn man sich ansieht wie seine Grubanzeige angeblich (weil wahrscheinlich nur abgeschrieben) aussieht lag der Verdacht nahe das da noch alte Reste im NVRAM rumliegen. Das wurde geprüft und hat sich nicht bestätigt.

tolter

(Themenstarter)

Anmeldungsdatum:
19. November 2016

Beiträge: 268

kB schrieb:

Für Dein eigentliches Anliegen zeige bitte auch: ls -al /etc/default/grub.d/ /etc/grub.d/

rolf@PC:~$ ls -al /etc/default/grub.d/ /etc/grub.d/ 
/etc/default/grub.d/:
insgesamt 8
drwxr-xr-x 2 root root 4096 Sep 11  2024 .
drwxr-xr-x 3 root root 4096 Okt 14 11:42 ..

/etc/grub.d/:
insgesamt 280
drwxr-xr-x   5 root root  4096 Jul 12 23:03 .
drwxr-xr-x 173 root root 12288 Okt 14 11:42 ..
-rwxr-xr-x   1 root root 10661 Sep 11  2024 00_header
-rwxr-xr-x   1 root root  6260 Sep 11  2024 05_debian_theme
-rwxr-xr-x   1 root root 18133 Sep 11  2024 10_linux
-rwxr-xr-x   1 rolf rolf   694 Aug 13  2025 10_linux_proxy
-rwxr-xr-x   1 root root 43202 Sep 11  2024 10_linux_zfs
-rwxr-xr-x   1 root root 14513 Sep 11  2024 20_linux_xen
-rwxr-xr-x   1 root root  4228 Apr  8  2024 20_memtest86+
-rwxr-xr-x   1 root root   786 Sep 11  2024 25_bli
-rwxr-xr-x   1 root root 13120 Sep 11  2024 30_os-prober
-rwxr-xr-x   1 rolf rolf  1181 Aug 13  2025 30_os-prober_proxy
-rwxr-xr-x   1 root root  1174 Sep 11  2024 30_uefi-firmware
-rwxr-xr-x   1 rolf rolf  1887 Aug 13  2025 31_linux_proxy
-rwxr-xr-x   1 rolf rolf 43202 Apr  4  2024 32_linux_zfs
-rwxr-xr-x   1 rolf rolf 14513 Apr  4  2024 33_linux_xen
-rwxr-xr-x   1 rolf rolf  4228 Apr  8  2024 34_memtest86+
-rwxr-xr-x   1 rolf rolf   786 Apr  4  2024 35_bli
-rwxr-xr-x   1 root root   744 Mär 12  2026 35_fwupd
-rwxr-xr-x   1 rolf rolf  1183 Aug 13  2025 36_os-prober_proxy
-rwxr-xr-x   1 rolf rolf  1174 Apr  4  2024 37_uefi-firmware
-rwxr-xr-x   1 rolf rolf   722 Apr  5  2024 38_fwupd
-rwxr-xr-x   1 root root   214 Sep 11  2024 40_custom
-rwxr-xr-x   1 root root   215 Sep 11  2024 41_custom
-rwxr-xr-x   1 rolf rolf   214 Apr  4  2024 42_custom
drwxr-xr-x   4 rolf rolf  4096 Nov 22  2025 backup
drwxr-xr-x   2 rolf rolf  4096 Nov 22  2025 bin
drwxr-xr-x   2 rolf rolf  4096 Nov 22  2025 proxifiedScripts
-rw-r--r--   1 root root   483 Sep 11  2024 README
-rw-r--r--   1 rolf rolf   304 Aug 13  2025 .script_sources.txt
rolf@PC:~$

tolter

(Themenstarter)

Anmeldungsdatum:
19. November 2016

Beiträge: 268

schwarzheit schrieb:

Nur wenn man sich ansieht wie seine Grubanzeige angeblich (weil wahrscheinlich nur abgeschrieben) aussieht lag der Verdacht nahe das da noch alte Reste im NVRAM rumliegen.

die Anzeige ist nicht angeblich, ich habe sie tatsächlich abgeschrieben, weil 'Foto mit Handy machen, auf PC schieben und in einen Post einfügen' umständlicher und Screenshot auf dem PC zu diesem Zeitpunkt nicht möglich ist.

schwarzheit schrieb:

Das wurde geprüft und hat sich nicht bestätigt.

Aber wieso sind dann diese doppelten Zeilen im Grub ??

Lidux

Anmeldungsdatum:
18. April 2007

Beiträge: 17142

Hallo tolter,

Dann schiebe bitte mal:

sudo parted -l
sudo fdisk -l

nach.

Gruss Lidux

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

@tolter

Hast du ggf. ein

sudo update-grub 

vergessen?

kB Team-Icon

Supporter, Wikiteam
Avatar von kB

Anmeldungsdatum:
4. Oktober 2007

Beiträge: 10338

Wohnort: Münster

tolter schrieb:

kB schrieb:

Für Dein eigentliches Anliegen zeige bitte auch: ls -al /etc/default/grub.d/ /etc/grub.d/

rolf@PC:~$ ls -al /etc/default/grub.d/ /etc/grub.d/ 
/etc/default/grub.d/:
insgesamt 8
drwxr-xr-x 2 root root 4096 Sep 11  2024 .
drwxr-xr-x 3 root root 4096 Okt 14 11:42 ..

/etc/grub.d/:
insgesamt 280
drwxr-xr-x   5 root root  4096 Jul 12 23:03 .
drwxr-xr-x 173 root root 12288 Okt 14 11:42 ..
-rwxr-xr-x   1 root root 10661 Sep 11  2024 00_header
-rwxr-xr-x   1 root root  6260 Sep 11  2024 05_debian_theme
-rwxr-xr-x   1 root root 18133 Sep 11  2024 10_linux
-rwxr-xr-x   1 rolf rolf   694 Aug 13  2025 10_linux_proxy
-rwxr-xr-x   1 root root 43202 Sep 11  2024 10_linux_zfs
-rwxr-xr-x   1 root root 14513 Sep 11  2024 20_linux_xen
-rwxr-xr-x   1 root root  4228 Apr  8  2024 20_memtest86+
-rwxr-xr-x   1 root root   786 Sep 11  2024 25_bli
-rwxr-xr-x   1 root root 13120 Sep 11  2024 30_os-prober
-rwxr-xr-x   1 rolf rolf  1181 Aug 13  2025 30_os-prober_proxy
-rwxr-xr-x   1 root root  1174 Sep 11  2024 30_uefi-firmware
-rwxr-xr-x   1 rolf rolf  1887 Aug 13  2025 31_linux_proxy
-rwxr-xr-x   1 rolf rolf 43202 Apr  4  2024 32_linux_zfs
-rwxr-xr-x   1 rolf rolf 14513 Apr  4  2024 33_linux_xen
-rwxr-xr-x   1 rolf rolf  4228 Apr  8  2024 34_memtest86+
-rwxr-xr-x   1 rolf rolf   786 Apr  4  2024 35_bli
-rwxr-xr-x   1 root root   744 Mär 12  2026 35_fwupd
-rwxr-xr-x   1 rolf rolf  1183 Aug 13  2025 36_os-prober_proxy
-rwxr-xr-x   1 rolf rolf  1174 Apr  4  2024 37_uefi-firmware
-rwxr-xr-x   1 rolf rolf   722 Apr  5  2024 38_fwupd
-rwxr-xr-x   1 root root   214 Sep 11  2024 40_custom
-rwxr-xr-x   1 root root   215 Sep 11  2024 41_custom
-rwxr-xr-x   1 rolf rolf   214 Apr  4  2024 42_custom
drwxr-xr-x   4 rolf rolf  4096 Nov 22  2025 backup
drwxr-xr-x   2 rolf rolf  4096 Nov 22  2025 bin
drwxr-xr-x   2 rolf rolf  4096 Nov 22  2025 proxifiedScripts
-rw-r--r--   1 root root   483 Sep 11  2024 README
-rw-r--r--   1 rolf rolf   304 Aug 13  2025 .script_sources.txt
rolf@PC:~$

Da sind etliche Dateien, die hier nicht hingehören:

  • Alle, die dem Benutzer rolf gehören.

  • Alle, die doppelt vorkommen, und die dann auch doppelte Menüeinträge für Grub anlegen.

Bereinige das Verzeichnis und starte dann:

sudo update-grub 

Lidux

Anmeldungsdatum:
18. April 2007

Beiträge: 17142

Hallo tolter,

Ist da irgenwann mal der grub-costumizer verwendet worden ?

Gruss Lidux

schwarzheit Team-Icon

Supporter
Avatar von schwarzheit

Anmeldungsdatum:
31. Dezember 2007

Beiträge: 9073

Lidux schrieb:

grub-costumizer verwendet worden ?

Die /etc/default/grub sieht zumindest nicht danach aus.

Antworten |