Problem z grub - nie znajduje dysku

Ogólne pytania dotyczące systemu
witek_1308
Posty: 5
Rejestracja: 13 listopada 2020, 13:07

Problem z grub - nie znajduje dysku

Post autor: witek_1308 »

Witam wszystkich, to moj pierwszy post na tym forum.

Mam problem z grub, nie bardzo potrafie znalezc rozwiazanie w sieci, prosba o pomoc.
Krotki opis: od dluzszego czasu mialem Win 10 i Debiana 10 ktore wspolistnialy bez problemu. Jakis czas temu musialem zainstalowac Ubuntu na zewnetrznym dysku SSD i tez bylo znosnie po odpieciu tego dysku jak rowniez z nim. Problem sie zaczal kiedy wywalilem Ubuntu (wciaz dzialalo) ale chcialem zrobic modyifkacje w grubie. Standardowo install/update i zaczely sie problemy. Nie jestem w stanie sie z tego wygrzebac, a system juz wieloletni, szkoda mi go reinstalowac.
Objawy sa nastepujace: przy probie bootowania grub wywala:

Kod: Zaznacz cały

error: disk 'hd0,gpt4' not found.
loading initial ramdisk...
error: you need to load kernel first
Press any key to continue...
Problem w tym ze po wcisnieciu przycisku dostaje sie do command line grub (nawet nie rescue), jedyne co pokazuje ls to (proc), nie mam dostepu do zadnego dysku.
Nie pomaga reinstalacja grub z rescue mode ani reczna (pewnie cos zle robie), po zabutowaniu do linii komend z trybu rescue mam tak:
blkid

Kod: Zaznacz cały

/dev/nvme0n1p1: LABEL="SYSTEM" UUID="CE68-7D7F" TYPE="vfat" PARTLABEL="EFI" PARTUUID="54a897d1-1f09-4ac9-8b5f-33023b5bada3"
/dev/nvme0n1p3: LABEL="Windows" UUID="968424048423E609" TYPE="ntfs" PARTUUID="fcbb563a-0d40-4aef-9825-7a9f9beaf667"
/dev/nvme0n1p4: UUID="4882e7df-1858-42b5-a32c-80e3e65bdadd" TYPE="ext4" PARTLABEL="debian" PARTUUID="6d2da2f5-2710-0000-0c53-806e6f6e6963"
/dev/nvme0n1p5: LABEL="Data" UUID="01D49853D0C3D6F0" TYPE="ntfs" PARTUUID="713445bd-2710-0000-0c53-806e6f6e6963"
/dev/nvme0n1p6: LABEL="Recovery" UUID="70FAC140FAC102F8" TYPE="ntfs" PARTLABEL="Basi" PARTUUID="cbbdcd90-9d68-4e6b-a3e2-81013ffdb3a4"
/dev/sda1: UUID="2020-09-26-10-19-19-00" LABEL="Debian 10.6.0 amd64 n" TYPE="iso9660" PTUUID="60fb3a87" PTTYPE="dos" PARTUUID="60fb3a87-01"
/dev/sda2: SEC_TYPE="msdos" UUID="56EB-A87E" TYPE="vfat" PARTUUID="60fb3a87-02"
/dev/nvme0n1: PTUUID="9b0c05cd-511e-44f9-8ced-f44a5db34d56" PTTYPE="gpt"
/dev/nvme0n1p2: PARTLABEL="Micr" PARTUUID="44a3d0e1-566c-40f3-a77c-b919efad6598"
lsblk

Kod: Zaznacz cały

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    1   3.8G  0 disk 
├─sda1        8:1    1   349M  0 part 
└─sda2        8:2    1   2.8M  0 part 
nvme0n1     259:0    0 465.8G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0   125G  0 part 
├─nvme0n1p4 259:4    0    31G  0 part /
├─nvme0n1p5 259:5    0 308.5G  0 part 
└─nvme0n1p6 259:6    0  1000M  0 part 

Kod: Zaznacz cały

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p4 during installation
UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=CE68-7D7F  /boot/efi       vfat    umask=0077      0       1
grub.cfg z /boot/efi/EFI/debian

Kod: Zaznacz cały

search.fs_uuid 4882e7df-1858-42b5-a32c-80e3e65bdadd root 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
grub.cfg z /boot/grub/

Kod: Zaznacz cały

#
# 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 ###
insmod usb
insmod usb_keyboard
insmod ohci
insmod uhci
insmod ehci
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="2"
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 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
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
else
  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
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=C
  insmod gettext
fi
terminal_input usb_keyboard
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
else
  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
fi
insmod png
if background_image /usr/share/desktop-base/futureprototype-theme/grub/grub-16x9.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
	else
	  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
	fi
	echo	'Loading Linux 4.19.0-12-amd64 ...'
	linux	/boot/vmlinuz-4.19.0-12-amd64 root=UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-4.19.0-12-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
	menuentry 'Debian GNU/Linux, with Linux 4.19.0-12-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-12-amd64-advanced-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
		else
		  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
		fi
		echo	'Loading Linux 4.19.0-12-amd64 ...'
		linux	/boot/vmlinuz-4.19.0-12-amd64 root=UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.19.0-12-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 4.19.0-12-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-12-amd64-recovery-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
		else
		  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
		fi
		echo	'Loading Linux 4.19.0-12-amd64 ...'
		linux	/boot/vmlinuz-4.19.0-12-amd64 root=UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.19.0-12-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 4.19.0-11-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-11-amd64-advanced-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
		else
		  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
		fi
		echo	'Loading Linux 4.19.0-11-amd64 ...'
		linux	/boot/vmlinuz-4.19.0-11-amd64 root=UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.19.0-11-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 4.19.0-11-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-11-amd64-recovery-4882e7df-1858-42b5-a32c-80e3e65bdadd' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4882e7df-1858-42b5-a32c-80e3e65bdadd
		else
		  search --no-floppy --fs-uuid --set=root 4882e7df-1858-42b5-a32c-80e3e65bdadd
		fi
		echo	'Loading Linux 4.19.0-11-amd64 ...'
		linux	/boot/vmlinuz-4.19.0-11-amd64 root=UUID=4882e7df-1858-42b5-a32c-80e3e65bdadd ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.19.0-11-amd64
	}
}

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

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-CE68-7D7F' {
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  CE68-7D7F
	else
	  search --no-floppy --fs-uuid --set=root CE68-7D7F
	fi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $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 ###
Jesli wchodze do grub command line z rescue USB to bez problemu widzi (hd0). Jestem na nvme0 i nie wiem czy to ma znaczenie ale grub-probe wyrzuca:

Kod: Zaznacz cały

# grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
grub-probe: warning: unknown device type nvme0n1
Zupelnie nie wiem jak to ugryzc. Nie znalazlem nic na necie co by mi pomoglo (oprocz hintow w stylu - zainstaluj od nowa...)

Z gory dziekuje
witek_1308
Posty: 5
Rejestracja: 13 listopada 2020, 13:07

Re: Problem z grub - nie znajduje dysku

Post autor: witek_1308 »

Chcialem dorzucic wynik komenty efibootmgr ale niestety blokuje mi filtr z tekstem: Forbidden. Contains contacts. Message seems to be spam.
Wrzucony jako zalacznik
Awatar użytkownika
dedito
Moderator
Posty: 3512
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Re: Problem z grub - nie znajduje dysku

Post autor: dedito »

Przed ls w grub-ie wykonaj

Kod: Zaznacz cały

insmod part_gpt
insmod ext2
Powinny być wtedy widoczne dyski.
A próbowałeś w rescue mode zwyczajnie jako root wykonać

Kod: Zaznacz cały

update-grub2
?
witek_1308
Posty: 5
Rejestracja: 13 listopada 2020, 13:07

Re: Problem z grub - nie znajduje dysku

Post autor: witek_1308 »

niestety to nie pomaga (wczesnieju juz probowalem update jak rowniez w grub widzialem ze moduly powinny byc ladowane ale zaladowalem recznie).
Awatar użytkownika
dedito
Moderator
Posty: 3512
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Re: Problem z grub - nie znajduje dysku

Post autor: dedito »

Może wynik bootinfoscript coś więcej podpowie.
Jest też taki program bootrepair.
witek_1308
Posty: 5
Rejestracja: 13 listopada 2020, 13:07

Re: Problem z grub - nie znajduje dysku

Post autor: witek_1308 »

Dopiero sobie zdalem sprawe ze zalaczniki nie docieraja, i to co wrzucilem wczesniej nie bylo dostepne. Jesli chodzi o boot-repair to mam problem - twierdzi ze nie mam partycji ESP podczas gdy na pewno jest i gparted pokazuja ja jak nalezy (hidden, boot), rozmiar ok, pierwsza na dysku. Nie wiem czy u mnie cos namieszane czy narzedzie dziala srednio. Raport jest tu http://paste.ubuntu.com/p/ysSDXVgR4B/
jesli zas chodzi o bootinfoscript to wyniku nie moge wkleic (filtr twierdzi ze 'contains contacts;; jestem nowy nie wiem jak to obejsc mimo ze wklejam jako kod) , ale pokazuje wyniki z gruba z sdb (bo bootowalem sie z pendrive), nie z mojego, nie wiem jak to zmienic

powoli godze sie z mysla o reinstalacji...
Awatar użytkownika
saturno
Junior Member
Posty: 741
Rejestracja: 08 lipca 2008, 20:04

Re: Problem z grub - nie znajduje dysku

Post autor: saturno »

witek_1308 pisze: 13 listopada 2020, 21:33 Jesli chodzi o boot-repair to mam problem - twierdzi ze nie mam partycji ESP podczas gdy na pewno jest i gparted pokazuja ja jak nalezy (hidden, boot), rozmiar ok, pierwsza na dysku.
U mnie jest flagi na efi są tylko: boot i esp
witek_1308
Posty: 5
Rejestracja: 13 listopada 2020, 13:07

Re: Problem z grub - nie znajduje dysku

Post autor: witek_1308 »

usunalem flage hidden ale nic to nie zmienilo (nie wiem jak sie tam pojawila bo rzeczywiscie na drugim laptopie z ubuntu tez jej nie ma)
Awatar użytkownika
dedito
Moderator
Posty: 3512
Rejestracja: 18 listopada 2013, 21:07
Lokalizacja: Gliwice

Re: Problem z grub - nie znajduje dysku

Post autor: dedito »

No jest tam dalej grub.
Pewnie W10 namieszał.
Jak ściągnąłeś flagę hidden to załącz znowu raport z boot-repair.
Awatar użytkownika
voti
Posty: 9
Rejestracja: 07 czerwca 2011, 23:49

Re: Problem z grub - nie znajduje dysku

Post autor: voti »

Och ten Windows... Tfuuj, tfuuj. :D
Spróbuj w ten sposób:

1. Wyłącz "Szybki start" w Win10 (blokuje efi)
2. Odpal
Boot-Repair
(Jeśli debian nie wstanie z gruba, to):

Kod: Zaznacz cały

# apt purge grub*
# apt auroremove
# apt install grub grub-efi efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB_EFI
# update-grub
# efibootmgr --verbose (zapisz wynik. Przyda się do analizy)
ODPOWIEDZ