Meu computador é um notebook HP Pavillion g4. Fiz algumas modificações, como instalar um SSD de 120 GB, substituir o drive de CD por um HDD de 120 GB e expandir a RAM de 4 GB para 8 GB.
Quando instalei o Ubuntu, geralmente usei a opção "Apagar disco e instalar o Ubuntu" e sempre funcionou para mim até o mês passado, quando tentei inicializar meu PC e ele mostrou um erro. Quando voltei para o GRUB, o menu de inicialização estava com problemas, então pensei que precisava reinstalar. Mas quando instalei o Ubuntu via "Apagar disco e instalar o Ubuntu", depois de reiniciar, ele disse unable to read and write outside of hd0
e error: you need to load the kernel first
.
Eu tentei algumas soluções mostradas aqui: O que fazer quando recebo um erro "tentativa de ler ou escrever fora do disco 'hd0'" e o Boot Repair não resolve o problema? Incluindo Boot-Repair.
O primeiro:
grub rescue > ls
(hd0) (hd0, msdos9)
grub rescue > ls (hd0,msdos9)/
grub rescue > ls (hd0,msdos8)/
grub rescue > ls (hd0,msdos5)/ # suppose this is root and bootloader of Linux
grub rescue > ls (hd0,msdos5)/
grub rescue > set root=(hd0,msdos5)
grub rescue > set prefix=(hd0,msdos5)/boot/grub
grub rescue > insmod normal
grub rescue > normal
Minhas partições eram diferentes, mas consegui localizá-las usando o ls
comando.
Adições 19/11/2024: As partições eram GPT, então acho que pode suportar UEFI, mas ainda não consigo inicializar.
Outra solução que tentei e que funcionou parcialmente foi criar uma partição ext4 de 1024 MB localizada em /boot
que funciona, mas...
- O tempo de inicialização é muito longo, sério. Posso ligar o PC, preparar o café da manhã, assistir alguns vídeos e ele ainda inicializa com uma tela preta. Demora muito para mostrar a tela do Ubuntu Plymouth. Às vezes, isso termina em um tempo limite ou kernel panic.
- Quebrar algumas ferramentas como haxeflixel (eu acho) antes desse problema eu não tive problemas com isso levou mas quando eu inicializo usando a
/boot
partição. Funciona, mas com muitos erros, um deles sendo "falha de segmentação".
Também acontece quando instalo outras distros baseadas no Ubuntu, como Linux Mint ou Elementary OS, sempre instalo o Ubuntu no SSD, meu PC não suporta GPT, então tenho que usar mbr. Fiz a unidade de inicialização do Windows usando Rufus.
Edição 19/11/2024: Consegui obter um pastebin quando tentei https://paste.ubuntu.com/p/hw3vFSmpKs/
============================= Boot Repair Summary ==============================
Recommended repair: ____________________________________________________________
The default repair of the Boot-Repair utility will purge (in order to reset grubenv) and reinstall the grub2 of
sda2 into the MBR of sda.
Grub-efi will not be selected by default because no ESP detected.
Additional repair will be performed: unhide-bootmenu-10s
chroot /mnt/boot-sav/sda2 apt-get -y update
Running in chroot, ignoring command 'start'
Purge the GRUB of /dev/sda2
grub-pc available
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 210 not upgraded.
DEBCHECK debOK, grub-pc
DEBCHECK debOK
Please type: sudo chroot "/mnt/boot-sav/sda2" dpkg --configure -ansudo chroot "/mnt/boot-sav/sda2" apt-get install -fynsudo chroot "/mnt/boot-sav/sda2" apt-get purge --allow-remove-essential -y grub-com*nsudo chroot "/mnt/boot-sav/sda2" apt-get purge --allow-remove-essential -y grub2-com*nsudo chroot "/mnt/boot-sav/sda2" apt-get purge --allow-remove-essential -y shim-signednsudo chroot "/mnt/boot-sav/sda2" apt-get purge --allow-remove-essential -y grub-common:*nsudo chroot "/mnt/boot-sav/sda2" apt-get purge --allow-remove-essential -y grub2-common:*n
Then type: sudo chroot "/mnt/boot-sav/sda2" apt-get install -y grub-pc
Unhide GRUB boot menu in sda2/etc/default/grub
====================== Reinstall the grub-pc of /dev/sda2 ======================
chroot /mnt/boot-sav/sda2 grub-install --version
grub-install (GRUB) 2.12-1ubuntu7
==> Reinstall the GRUB of /dev/sda2 into the MBR of /dev/sda
chroot /mnt/boot-sav/sda2 grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
chroot /mnt/boot-sav/sda2 update-grub
Sourcing file `/etc/default/grub'
Found linux image: /boot/vmlinuz-6.8.0-41-generic
Found initrd image: /boot/initrd.img-6.8.0-41-generic
Adding boot menu entry for UEFI Firmware Settings ...
Unhide GRUB boot menu in sda2/boot/grub/grub.cfg
Boot successfully repaired.
You can now reboot your computer.
Please do not forget to make your BIOS boot on sda (ATA HP SSD S600 120G) disk!
The boot files of [sda2 (end>100GB)] are far from the start of the disk. Your BIOS may not detect them. You may want to retry after creating a /boot partition (EXT4, >200MB, start of the disk). This can be performed via tools such as gParted. Then select this partition via the [Separate /boot partition:] option of [Boot Repair]. (https://help.ubuntu.com/community/BootPartition)
```none
============================ Boot Info After Repair ============================
=> Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 2048
of the same hard drive for core.img. core.img is at this location and
looks for (,gpt2)/boot/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
fshelp ext2 part_gpt biosdisk
---------------------------------------------------------------------------
=> Grub2 (v1.99-2.00) is installed in the MBR of /dev/sdb and looks at sector
58715260 of the same hard drive for core.img, but core.img can not be
found at this location.
=> Grub2 (v2.00) is installed in the MBR of /dev/sdc and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (hd0,msdos1)/boot/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
biosdisk part_msdos fshelp fat ntfs exfat
---------------------------------------------------------------------------
sda1: __________________________________________________________________________
File system: BIOS Boot partition
Boot sector type: Grub2's core.img
Boot sector info:
sda2: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 24.04.1 LTS
Boot files: /boot/grub/grub.cfg /etc/fstab /etc/default/grub
/boot/grub/i386-pc/core.img
sdb1: __________________________________________________________________________
File system:
Boot sector type: -
Boot sector info:
sdc1: __________________________________________________________________________
File system: vfat
Boot sector type: MSWIN4.1: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /efi/boot/bootx64.efi
/efi/boot/grubx64.efi /efi/boot/mmx64.efi
================================ 1 OS detected =================================
OS#1 (linux): Ubuntu 24.04.1 LTS on sda2
================================ Host/Hardware =================================
CPU architecture: 64-bit
Video: 2nd Generation Core Processor Family Integrated Graphics Controller from Intel Corporation
Live-session OS is Ubuntu 64-bit (Ubuntu 24.04.1 LTS, noble, x86_64)
===================================== UEFI =====================================
BIOS/UEFI firmware: F.66(15.102) from Insyde
This live-session is in Legacy/BIOS/CSM mode (not in EFI mode).
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
sda : is-GPT, hasBIOSboot, has-noESP, not-usb, not-mmc, has-os, no-wind, 2048 sectors * 512 bytes
sdb : is-GPT, no-BIOSboot, has-noESP, not-usb, not-mmc, no-os, no-wind, 2048 sectors * 512 bytes
Partitions info (1/3): _________________________________________________________
sda2 : is-os, 64, apt-get, grub-pc , grub2, grub-install, grubenv-ng, update-grub, end-after-100GB
sdb1 : no-os, 64, nopakmgr, no-docgrub, nogrub, nogrubinstall, no-grubenv, noupdategrub, end-after-100GB
Partitions info (2/3): _________________________________________________________
sda2 : isnotESP, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, ext4
sdb1 : isnotESP, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot,
Partitions info (3/3): _________________________________________________________
sda2 : not--sepboot, with-boot, fstab-without-boot, not-sep-usr, with--usr, fstab-without-usr, std-grub.d, sda
sdb1 : maybesepboot, no---boot, part-has-no-fstab, not-sep-usr, no---usr, part-has-no-fstab, no--grub.d, sdb
fdisk -l (filtered): ___________________________________________________________
Disk sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk identifier: 12D46356-934D-4D7E-9872-E4C77430651D
Start End Sectors Size Type
sda1 2048 4095 2048 1M BIOS boot
sda2 4096 234438655 234434560 111.8G Linux filesystem
Disk sdb: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk identifier: 4C9C1BF6-251D-4B61-86CC-7A7636193869
Start End Sectors Size Type
sdb1 2048 234438655 234436608 111.8G Linux filesystem
Disk sdc: 29.49 GiB, 31666995200 bytes, 61849600 sectors
Disk identifier: 0x0b08ce25
Boot Start End Sectors Size Id Type
sdc1 * 2048 61849599 61847552 29.5G c W95 FAT32 (LBA)
parted -lm (filtered): _________________________________________________________
sda:120GB:scsi:512:512:gpt:ATA HP SSD S600 120G:;
1:1049kB:2097kB:1049kB:::bios_grub;
2:2097kB:120GB:120GB:ext4::;
sdb:120GB:scsi:512:512:gpt:ATA FUJITSU MHW2120B:;
1:1049kB:120GB:120GB:::;
sdc:31.7GB:scsi:512:512:msdos:Generic Flash Disk:;
1:1049kB:31.7GB:31.7GB:fat32::boot, lba;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 858dfb0d-3d56-4566-b7d6-9ed8594070b7
└─sda2 ext4 81808195-6491-4c20-8ed7-35ebee622523 09f3ace7-51d7-4f26-aed4-3cde10f0f282
sdb
└─sdb1 bfe953ef-47e9-4e41-a55f-545178bede4c
sdc
└─sdc1 vfat D221-7693 0b08ce25-01 UBUNTU 24_0
Mount points (filtered): _______________________________________________________
Avail Use% Mounted on
/dev/sda2 93.9G 9% /mnt/boot-sav/sda2
/dev/sdc1 23.7G 20% /cdrom
Mount options (filtered): ______________________________________________________
/dev/sda2 ext4 rw,relatime
/dev/sdc1 vfat ro,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
====================== sda2/boot/grub/grub.cfg (filtered) ======================
Ubuntu 81808195-6491-4c20-8ed7-35ebee622523
### END /etc/grub.d/30_os-prober ###
UEFI Firmware Settings uefi-firmware
### END /etc/grub.d/30_uefi-firmware ###
========================== sda2/etc/fstab (filtered) ===========================
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/81808195-6491-4c20-8ed7-35ebee622523 / ext4 defaults 0 1
/swap.img none swap sw 0 0
======================= sda2/etc/default/grub (filtered) =======================
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false
==================== sda2: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
28.141605377 = 30.216818688 boot/grub/i386-pc/core.img 1
11.531497955 = 12.381851648 boot/vmlinuz 1
11.531497955 = 12.381851648 boot/vmlinuz-6.8.0-41-generic 1
11.531497955 = 12.381851648 boot/vmlinuz.old 1
7.126949310 = 7.652503552 boot/initrd.img 2
7.126949310 = 7.652503552 boot/initrd.img-6.8.0-41-generic 2
7.126949310 = 7.652503552 boot/initrd.img.old 2
===================== sda2: ls -l /etc/grub.d/ (filtered) ======================
-rwxr-xr-x 1 root root 18133 Apr 4 2024 10_linux
-rwxr-xr-x 1 root root 43202 Apr 4 2024 10_linux_zfs
-rwxr-xr-x 1 root root 14513 Apr 4 2024 20_linux_xen
-rwxr-xr-x 1 root root 786 Apr 4 2024 25_bli
-rwxr-xr-x 1 root root 13120 Apr 4 2024 30_os-prober
-rwxr-xr-x 1 root root 1174 Apr 4 2024 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Apr 4 2024 40_custom
-rwxr-xr-x 1 root root 215 Apr 4 2024 41_custom
====================== sdc1/boot/grub/grub.cfg (filtered) ======================
Try or Install Ubuntu
Ubuntu (safe graphics)
Boot from next volume
UEFI Firmware Settings
Test memory
==================== sdc1: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg
Minhas especificações são:
Intel core i5-2550M (4) 3.100GHz 2ª geração
8gb de ram
120gb SSD e 120gb HDD
Estou tentando instalar o Ubuntu com o gnome