Hallo black_tencate!
Also ein Stück bin ich weiter gekommen.
Zuerst zu Deinen Fragen. Ja klar, ich hatte den Grub mit dem von Dir angegebenen Befehl auf dem Stick installiert. Und ja, es gibt auf dem Stick auch ein Verzeichnis /boot/grub/
. Hier ist sein Inhalt:
rolf@rolf-Lenovo-Yoga-500-14IBD:/mnt/boot/grub$ ls -l
insgesamt 27
drwxr-xr-x 2 root root 512 Feb 20 17:24 fonts
-rwxr-xr-x 1 root root 4522 Feb 21 09:52 grubalt.alt
-rwxr-xr-x 1 root root 866 Feb 21 10:05 grub.cfg
-rwxr-xr-x 1 root root 1024 Feb 20 17:24 grubenv
drwxr-xr-x 2 root root 19968 Feb 20 17:24 x86_64-efi
Dort habe ich die Datei grub.cfg
mit dem Inhalt zuerst einmal umbenannt (daher kommt die Datei grubalt.alt
und dann die Datei mit dem von Dir angegebenen Inhalt als grub.cfg
gespeichert. Hier ist der Inhalt dieser Datei:
set gfxmode=1920x1080
grub_gfxmode=1920x1080
grub_gfxpayload_linux=keep
gfxpayload=1920x1080x24,1920x1080
set color_normal=light-gray/black
set menu_color_normal=white/black
set menu_color_highlight=red/black
# bis hierher wenn gewünscht, kannst Du an Deine Gegebenheiten anpassen
set default=1
# hier könnten weitere wie countdown oder ähnliche gesetzt werden
menuentry " Windows auf sda3 (EFI)" {
search --no-floppy --fs-uuid --set=root 103C-33B1
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry "Kubuntu auf sda7 " {
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
linux /boot/vmlinuy root=UUID=<hierdieUUIDvonsda7>
initrd /boot7initrd.img
}
menuentry " cfg-file Kubuntu sda7" {
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
configfile /boot/grub/grub.cfg
}
Woher habe ich die UUIDs?
Nun, durch googeln bin ich auf diesen Seite gekommen: https://wiki.ubuntuusers.de/GRUB-Umgebung_analysieren/ Wie dort angegeben, habe ich den folgenden Befehl benutzt:
rolf@rolf-Lenovo-Yoga-500-14IBD:/boot/grub$ lsblk -o name,uuid,fstype,mountpoint,label,size
NAME UUID FSTYPE MOUNTPOINT LABEL SIZE
sda 119,2G
├─sda1 103C-33B1 vfat /boot/efi SYSTEM_DRV 260M
├─sda2 16M
├─sda3 7A603D22603CE693 ntfs Windows 51,1G
├─sda4 0430D98E30D986D8 ntfs 1000M
├─sda5 A0D0703DD0701C2A ntfs LENOVO_PART 14,6G
├─sda6 3442-0D13 vfat LRS_ESP 1000M
├─sda7 5e72469e-545c-4b8e-8fe5-82086f8bfb90 ext4 / 43,4G
└─sda8 b28f6827-4ece-46ab-acd6-c11ab34e0127 swap 7,9G
└─cryptswap1 41c6acc3-59f1-4e28-ba03-0e03e93f88f3 swap [SWAP] 7,9G
sdb 14,6G
├─sdb1 7211-BAE3 vfat /mnt GRUB 100M
└─sdb2 724A-D10C vfat SPEICHER 14,5G
rolf@rolf-Lenovo-Yoga-500-14IBD:/boot/grub$
Windows war demnach wohl sda1.
Aber ich wusste aber noch nicht, welche Partition die richtige für Linux ist. Also habe ich noch die grub.cfg
auf der Festplatte angeschaut:
#
# 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
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
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=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
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
#set_background_image "images/tile.png";
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 0,0,0; then
clear
fi
### 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 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-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
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
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
linux /boot/vmlinuz-5.4.0-65-generic root=UUID=5e72469e-545c-4b8e-8fe5-82086f8bfb90 ro quiet splash $vt_handoff
initrd /boot/initrd.img-5.4.0-65-generic
}
submenu 'Erweiterte Optionen für Ubuntu' $menuentry_id_option 'gnulinux-advanced-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
menuentry 'Ubuntu, mit Linux 5.4.0-65-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-65-generic-advanced-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
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
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
echo 'Linux 5.4.0-65-generic wird geladen …'
linux /boot/vmlinuz-5.4.0-65-generic root=UUID=5e72469e-545c-4b8e-8fe5-82086f8bfb90 ro quiet splash $vt_handoff
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-5.4.0-65-generic
}
menuentry 'Ubuntu, mit Linux 5.4.0-65-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-65-generic-recovery-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
echo 'Linux 5.4.0-65-generic wird geladen …'
linux /boot/vmlinuz-5.4.0-65-generic root=UUID=5e72469e-545c-4b8e-8fe5-82086f8bfb90 ro recovery nomodeset dis_ucode_ldr
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-5.4.0-65-generic
}
menuentry 'Ubuntu, mit Linux 4.15.0-135-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-135-generic-advanced-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
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
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
echo 'Linux 4.15.0-135-generic wird geladen …'
linux /boot/vmlinuz-4.15.0-135-generic root=UUID=5e72469e-545c-4b8e-8fe5-82086f8bfb90 ro quiet splash $vt_handoff
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-4.15.0-135-generic
}
menuentry 'Ubuntu, mit Linux 4.15.0-135-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-135-generic-recovery-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt7 --hint-efi=hd0,gpt7 --hint-baremetal=ahci0,gpt7 5e72469e-545c-4b8e-8fe5-82086f8bfb90
else
search --no-floppy --fs-uuid --set=root 5e72469e-545c-4b8e-8fe5-82086f8bfb90
fi
echo 'Linux 4.15.0-135-generic wird geladen …'
linux /boot/vmlinuz-4.15.0-135-generic root=UUID=5e72469e-545c-4b8e-8fe5-82086f8bfb90 ro recovery nomodeset dis_ucode_ldr
echo 'Initiale Ramdisk wird geladen …'
initrd /boot/initrd.img-4.15.0-135-generic
}
}
### END /etc/grub.d/10_linux ###
### 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+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (auf /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-103C-33B1' {
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 103C-33B1
else
search --no-floppy --fs-uuid --set=root 103C-33B1
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###
### 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 ###
Dort steht im Abschnitt "Linux" die Zeile
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5e72469e-545c-4b8e-8fe5-82086f8bfb90' {
Durch Abgleich mit der UUID-Liste ist es also tatsächlich (wie von Dir bereits angegeben) sda7.
Auch die UUID von sda1 für Winowws tauchte hier in dem entsprechenden Bereich auf.
Damit hatte ich alle Informationen zusammen.
Allerdings habe ich irgendwo noch einen Fehler drin. Wenn ich den Stick einstecke, dann erscheint das Bootmenü mit Windows und Linux (es wird tatsächlich angezeigt!). Wähle ich hier "Windows", dann erhalte ich die Fehlermeldung error: not a valid root device
. Wähle ich Linux, dann komme ich in das Bootmenü von der Festplatte. Von dort kann ich Linux starten, wenn ich von dort aber Windows starten will, kommt die gleiche Fehlermeldung.
Allerdings ist die Windows-Installatio wohl nicht wirklich kaputt. Nehme ich den Stick heraus und wähle den Weg, zuerst ins UEFI-Bios zu gehen und dieses ohne speichern wieder zu verlassen, dann wird ja auch das Bootmenü von der Festplatte angezeigt. Wähle ich dort dann "Windows", dann startet es einwandfrei.
Von daher denke ich, dass der Fehler doch etwas mit dem Stick zu tun hat. Was könnte da falsch sein?
Viele Grüße und vielen Dank für Deine geduldige Hilfe
Rolf