Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

1. Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 12:16h

Olá pessoas, eu finalmente consegui instalar o kernel no meu gentoo, mais agora parece que o grub se recusa a instalar. Vejam:

Instalando para a plataforma x86_64-efi.
grub-install: informação: não foi possível abrir '/boot/grub/device.map': Arquivo ou diretório não encontrado.
grub-install: informação: /dev/sda1 is not present.
grub-install: informação: Looking for /dev/sda1.
grub-install: informação: /dev/sda is a parent of /dev/sda1.
grub-install: informação: /dev/sda1 starts from 2048.
grub-install: informação: opening the device hostdisk//dev/sda.
grub-install: informação: drive = 0.
grub-install: aviso: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: informação: /dev/sda1 is present.
grub-install: informação: Looking for /dev/sda1.
grub-install: informação: /dev/sda is a parent of /dev/sda1.
grub-install: informação: /dev/sda1 starts from 2048.
grub-install: informação: opening the device hostdisk//dev/sda.
grub-install: informação: drive = 0.
grub-install: aviso: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: informação: /dev/sda1 is present.
grub-install: informação: Looking for /dev/sda1.
grub-install: informação: /dev/sda is a parent of /dev/sda1.
grub-install: informação: /dev/sda1 starts from 2048.
grub-install: informação: opening the device hostdisk//dev/sda.
grub-install: informação: drive = 0.
grub-install: aviso: disk does not exist, so falling back to partition device /dev/sda1.
grub-install: informação: drive = 1.
grub-install: erro: disco 'hostdisk//dev/sda1' não encontrado.



  


2. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 12:33h

AndrewUser escreveu:


A partição de boot está montada? Como está teu fstab?

Chegou a verificar esta documentação também? -> https://wiki.gentoo.org/wiki/GRUB2

-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."




3. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 12:41h

luiztux escreveu:

AndrewUser escreveu:


A partição de boot está montada? Como está teu fstab?

Chegou a verificar esta documentação também? -> https://wiki.gentoo.org/wiki/GRUB2

-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."


Eu estou usando UEFI, ou seja, eu montei a partição /boot/efi, mais o interresante: fdisk -l não retorna a nada dentro do chroot. Parece que ele não reconhece meu disco.

Meu Fstab tá assim:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
# filesystems. This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
# more reliable to use filesystem labels or UUIDs. See your filesystem
# documentation for details on setting a label. To obtain the UUID, use
# the blkid(8) command.

#LABEL=boot /boot ext4 noauto,noatime 1 2
#UUID=58e72203-57d1-4497-81ad-97655bd56494 / ext4 noatime 0 1
#LABEL=swap none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0

/dev/sda3 / ext4 noatime 0 1




Everything that happens has an initial reaction.



4. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 13:07h

AndrewUser escreveu:


Chama o mount sem nenhum parâmetro e o df -h e posta aqui...

fdisk -l /dev/sda não mostra as partições criadas? Se ele não informa nada, verifica no /proc/partitions o que tem lá...

-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."




5. Re: Não Consigo Instalar o Grub no Gentoo.

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 13:10h

Aqui está:
mount:

/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
blkio on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
net_cls on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
perf_event on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
pids on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=475421,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/udev type tmpfs (rw,nodev,relatime,size=383536k,mode=755)

df -h:

Sist. Arq. Tam. Usado Disp. Uso% Montado em
/dev/sda3 252G 4,8G 235G 2% /
/dev/sda1 511M 4,6M 507M 1% /boot/efi
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
udev 10M 4,0K 10M 1% /dev
shm 1,9G 0 1,9G 0% /dev/shm
tmpfs 375M 1,2M 374M 1% /run/udev

cat /proc/partitions:

major minor #blocks name

1 0 16384 ram0
1 1 16384 ram1
1 2 16384 ram2
1 3 16384 ram3
1 4 16384 ram4
1 5 16384 ram5
1 6 16384 ram6
1 7 16384 ram7
1 8 16384 ram8
1 9 16384 ram9
1 10 16384 ram10
1 11 16384 ram11
1 12 16384 ram12
1 13 16384 ram13
1 14 16384 ram14
1 15 16384 ram15
7 0 1221188 loop0
8 0 976762584 sda
8 1 524288 sda1
8 2 706795520 sda2
8 3 269441024 sda3
11 0 1048575 sr0
8 16 3915776 sdb
8 17 1389622 sdb1
8 18 17408 sdb2
8 19 32767 sdb3


fdisk /dev/sda -l
Além disso, aparece isso: fdisk: não foi possível abrir /dev/sda: Operação não permitida

Everything that happens has an initial reaction.



6. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 13:14h

Pergunta, você não deveria ter descomentado ao menos o /boot no fstab?


7. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 13:19h

Cabreuvas escreveu:

Pergunta, você não deveria ter descomentado ao menos o /boot no fstab?


Não, eu não fiz uma partição de boot, apenas a pasta.
mkdir /boot


Everything that happens has an initial reaction.



8. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 14:03h

Ok.. coisas a se considerar:

Se você tem uma única partição e a mesma é a /dev/sda3, por qual motivo o grub-install está procurando o /dev/sda1?
grub-install: informação: /dev/sda1 is not present. 


Você viu esta seção no Handbook?


Important
Make sure the EFI system partition has been mounted before running grub-install. It is possible for grub-install to install the GRUB EFI file (grubx64.efi) into the wrong directory without providing any indication the wrong directory was used.


Como você rodou o comando pra instalar? Assim?

grub-install --target=x86_64-efi --efi-directory=/dev/sda3/boot 


O comando acima considerando o que você passou no post anterior...

O mount e df retornam que há uma partição /dev/sda1 montada:

/dev/sda1 on /boot/efi 



Sist. Arq. Tam. Usado Disp. Uso% Montado em
/dev/sda3 252G 4,8G 235G 2% /
/dev/sda1 511M 4,6M 507M 1% /boot/efi


Mas se você não criou uma partição de boot, que raios ela está fazendo ali? Õ.o

Verifique no diretório de boot se está criado o arquivo System.map... deveria estar após o make install...

Dê mais detalhes sobre como você particionou isto e como está executando os comandos.

-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."




9. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 14:05h

AndrewUser escreveu:

fdisk /dev/sda -l
Além disso, aparece isso: fdisk: não foi possível abrir /dev/sda: Operação não permitida


É porque a partição está montada... ;)


-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."




10. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 14:08h


What is the BIOS boot partition?
A BIOS boot partition is a very small (1 to 2 MB) partition in which boot loaders like GRUB2 can put additional data that doesn't fit in the allocated storage (a few hundred bytes in case of MBR) and cannot be placed elsewhere.

Such partitions are not always necessary, but considering the low space consumption and the difficulties we have with documenting the plethora of partitioning differences otherwise, it is recommended to create it in either case.

For completeness, the BIOS boot partition is needed when a GPT partition layout is used with GRUB2 in PC/BIOS mode. It is not required when booting in EFI/UEFI mode.


-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."




11. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 10/01/2018 - 14:11h

Está particionado assim:

Tabela: GPT

/dev/sda1 - EFI - /boot/efi
/dev/sda2 - Xubuntu 17.10 - Root
/dev/sda3 - Gentoo - Root

Ou seja, assim:
Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E7924287-38DA-4ED5-A160-9BA10A565134

Dispositivo Start Fim Setores Size Tipo
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 1414641663 1413591040 674,1G Linux filesystem
/dev/sda3 1414641664 1953523711 538882048 257G Linux filesystem

Eu quero que ele instale o grub no /boot/efi para inicializar o sistema. Assim como eu faço no arch linux e etc.
Eu uso assim: grub-install --target=x86_64-efi ou grub-install --target=x86_64-efi --efi-directory=/boot/efi


Everything that happens has an initial reaction.



12. Re: Não Consigo Instalar o Grub no Gentoo. [RESOLVIDO]

Luiz Santos
luiztux

(usa Gentoo)

Enviado em 10/01/2018 - 14:25h

Me diz uma coisa: o Xubuntu listado ali, dá boot pela partição /dev/sda1?

-----------------------------------''----------------------------------

Larry, The Cow, uses Gentoo GNU/Linux

^__^
(oo)
(__)

"If it moves, compile it."





01 02 03



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts