View previous topic :: View next topic |
Author |
Message |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 4:04 am Post subject: my pc wont read grub2 or lilo (UEFI) |
|
|
i did install gentoo without problems, then i did install lilo, all fine 0 errors
+reboot my pc, it wont read lilo+
i do open livecd again, install grub2, on uefi mode. 0 issues
+reboot pc it wont read grub+
looks like not mater what i do the pc just dont want to read gentoo
(i had 0 issues with other distros)
((((((MY make.conf)))))
Code: | # These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
MAKEOPTS="-j4"
GRUB_PLATFORMS="emu efi-32 efi-64 pc" |
(((MY fstab )))))
Code: | # /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.
/dev/sda2 /boot vfat noauto,noatime 1 2
/dev/sda4 / ext4 noatime 0 1
/dev/sda3 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
|
what should i do? sorry if my question is too newbie
Code tags added by NeddySeagoon |
|
Back to top |
|
 |
Gentobobbyuk Apprentice

Joined: 23 May 2020 Posts: 196
|
Posted: Mon Jun 29, 2020 9:33 am Post subject: |
|
|
If you are using 64bit your
Are u sure you need a UEFI install ?
make.conf using uefi
GRUB_PLATFORMS="GRUB_PLATFORMS="efi-64"
GRUB_PLATFORMS="pc" used for mbr install
Make sure you emerged grub with the efi64 platform if thats what ur defiantly using
make sure your boot partition was mounted when you installed grub
sometimes you may need to use
grub-install --target=x86_64-efi --efi-directory=/boot --removable
make sure you have
on in parted
Did u compile all the correct file systems into the kernel ?
Whats the exact error message at boot ?
can you explain a bit more. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 10:28 am Post subject: |
|
|
themythtoon,
There are no questions "too newbie".
You cannot use lilo with UEFI. Grub2 works though.
lilo is not a EFI compliant program and development has stopped.
lilo cannot work with a GPT disk label either.
If you set your system to boot in BIOS/Legacy mode, then lilo is a possibility.
Until you see the boot loader screen, nothing else matters.
Is your BIOS set for BIOS/Legacy mode?
Which boot loader in installed?
These things can all be fixed without reinstalling. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 3:04 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
There are no questions "too newbie".
You cannot use lilo with UEFI. Grub2 works though.
lilo is not a EFI compliant program and development has stopped.
lilo cannot work with a GPT disk label either.
If you set your system to boot in BIOS/Legacy mode, then lilo is a possibility.
Until you see the boot loader screen, nothing else matters.
Is your BIOS set for BIOS/Legacy mode?
Which boot loader in installed?
These things can all be fixed without reinstalling. |
i did try with both uefi and legacy, with and without secure boot!
thanks for explain me more about lilo, i did try grub2 again but nothing did work now i will try what bobbyuk did explain |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 3:24 pm Post subject: |
|
|
Gentobobbyuk wrote: | If you are using 64bit your
Are u sure you need a UEFI install ?
make.conf using uefi
GRUB_PLATFORMS="GRUB_PLATFORMS="efi-64"
GRUB_PLATFORMS="pc" used for mbr install
Make sure you emerged grub with the efi64 platform if thats what ur defiantly using
make sure your boot partition was mounted when you installed grub
sometimes you may need to use
grub-install --target=x86_64-efi --efi-directory=/boot --removable
make sure you have
on in parted
Did u compile all the correct file systems into the kernel ?
Whats the exact error message at boot ?
can you explain a bit more. |
this is my boot message:
>>Checking media presence..............
>>media present.............
>>start PXE over IPv4.
+THEN+
>>Checking media presence..............
>>media present.............
>>start PXE over IPv6.
ti did install as you said (allso the parted part too and mounting) i did install on boot/efi because /boot said "is not a efi partition" :
(chroot) livecd /boot/efi # grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable
Installing for x86_64-efi platform.
Installation finished. No error reported
+now i will restart my pc+ |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 3:27 pm Post subject: |
|
|
themythtoon,
Turn off secureboot or grub will not load as its not signed.
You can use either BIOS/Legacy or UEFI mode.
Many new systems have broken BIOS/Legacy support and mixing BIOS/Legacy booting with a GPT disk label is getting more difficult.
On newish hardware, use UEFI mode.
Quote: | reboot pc it wont read grub | leaves us all to guess. Tell what you do see.
A blinking cursor?
A GRUB> prompt?
It all helps us to help you.
Do not reinstall your Gentoo. Get back into the chroot and fix grub. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 3:40 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
Turn off secureboot or grub will not load as its not signed.
You can use either BIOS/Legacy or UEFI mode.
Many new systems have broken BIOS/Legacy support and mixing BIOS/Legacy booting with a GPT disk label is getting more difficult.
On newish hardware, use UEFI mode.
Quote: | reboot pc it wont read grub | leaves us all to guess. Tell what you do see.
A blinking cursor?
A GRUB> prompt?
It all helps us to help you.
Do not reinstall your Gentoo. Get back into the chroot and fix grub. |
(No with secure boot off and uefi mode, my pc is new)
this is my boot message:
>>Checking media presence..............
>>media present.............
>>start PXE over IPv4.
+THEN+
>>Checking media presence..............
>>media present.............
>>start PXE over IPv6.
+THEN+
No booteable devices found.
(Is the same error as before) |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 3:46 pm Post subject: |
|
|
themythtoon,
Your system cannot see the boot media, so it tries to boot over the network.
Two things to check.
Is the boot order in the BIOS correct?
e.g. CDROM then Network is not right.
Is the VFAT partition marked bootable?
In parted
Code: | Number Start End Size File system Name Flags
1 1.00MiB 3.00MiB 2.00MiB grub bios_grub
2 3.00MiB 131MiB 128MiB boot boot
3 131MiB 643MiB 512MiB swap
4 643MiB 20479MiB 19836MiB rootfs |
Check that you have the boot flag. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 4:02 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
Your system cannot see the boot media, so it tries to boot over the network.
Two things to check.
Is the boot order in the BIOS correct?
e.g. CDROM then Network is not right.
Is the VFAT partition marked bootable?
In parted
Code: | Number Start End Size File system Name Flags
1 1.00MiB 3.00MiB 2.00MiB grub bios_grub
2 3.00MiB 131MiB 128MiB boot boot
3 131MiB 643MiB 512MiB swap
4 643MiB 20479MiB 19836MiB rootfs |
Check that you have the boot flag. |
Code: | (parted) print
Model: ATA SK hynix SC210 m (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB grub bios_grub
2 3146kB 137MB 134MB fat32 boot boot, esp
3 137MB 674MB 537MB linux-swap(v1) swap
4 674MB 256GB 255GB ext4 rootfs
|
thats what prints gives me (my flag said boot,esp what is esp? is normal ?)
Code tags added by NeddySeagoon |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3640
|
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 4:30 pm Post subject: Re: my pc wont read grub2 or lilo (UEFI) |
|
|
themythtoon wrote: | i did install gentoo without problems, then i did install lilo, all fine 0 errors
+reboot my pc, it wont read lilo+
i do open livecd again, install grub2, on uefi mode. 0 issues
+reboot pc it wont read grub+
looks like not mater what i do the pc just dont want to read gentoo
(i had 0 issues with other distros)
((((((MY make.conf)))))
Code: | # These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C
MAKEOPTS="-j4"
GRUB_PLATFORMS="emu efi-32 efi-64 pc" |
(((MY fstab )))))
Code: | # /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.
/dev/sda2 /boot vfat noauto,noatime 1 2
/dev/sda4 / ext4 noatime 0 1
/dev/sda3 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
|
what should i do? sorry if my question is too newbie
Code tags added by NeddySeagoon |
[NEWS]
i did go to my boot options and my pc have a option to choose a efi file and load grub !
so i did made 3 "boot options" manually
gentoo maybe 1 (is the auto detected by the sistem) it wont read grub.
gentoo maybe 2 (i did search in the boot files and i did put a grub.efi file on it) it reads grub ! but it wont go to the gentoo sistem just sais grub>
gentoo maybe 3 (another search in boot files but this time boot/efi files and did choose anoter .efi file ) it reads grub ! but it wont go to the gentoo sistem just sais grub>
so now my pc loads grub.
question: what is the default grub file i should choose on my setings ? and where is that one located.
should i just choose one file who reads grub and then manually made grub read gentoo ? or choose a specific efi file and it will load grub+gentoo? |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3640
|
Posted: Mon Jun 29, 2020 4:53 pm Post subject: Re: my pc wont read grub2 or lilo (UEFI) |
|
|
themythtoon wrote: | so now my pc loads grub.
question: what is the default grub file i should choose on my setings ? and where is that one located.
should i just choose one file who reads grub and then manually made grub read gentoo ? or choose a specific efi file and it will load grub+gentoo? |
Now you could ask yourself if you really need a bootloader since under UEFI the kernel can be enabled to boot itself, see https://wiki.gentoo.org/wiki/EFI_stub_kernel |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 5:26 pm Post subject: Re: my pc wont read grub2 or lilo (UEFI) |
|
|
charles17 wrote: | themythtoon wrote: | so now my pc loads grub.
question: what is the default grub file i should choose on my setings ? and where is that one located.
should i just choose one file who reads grub and then manually made grub read gentoo ? or choose a specific efi file and it will load grub+gentoo? |
Now you could ask yourself if you really need a bootloader since under UEFI the kernel can be enabled to boot itself, see https://wiki.gentoo.org/wiki/EFI_stub_kernel |
you recomend to delete grub or get something ready before made that proces?
sorry i just followet the handbook and i did try grub because was the default option nothing else xD |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 6:58 pm Post subject: |
|
|
themythtoon,
Stay with Grub.
It makes diagnositics and fixes simpler. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 7:06 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
Stay with Grub.
It makes diagnositics and fixes simpler. |
NeddySeagoon wrote: | themythtoon,
Stay with Grub.
It makes diagnositics and fixes simpler. |
I do have both now on my sistem efi and grub.
Booth of them boot!
Grub boots to "grub>"
And efi loads my sistem!
But it gives me a kernel panic error " Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)" |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 7:13 pm Post subject: |
|
|
themythtoon,
means that grub cannot find /boot/grub/grub.cfg
Did you make it?
That efi loads your kernel directly tells that you made the kernel an efi stub, so that the kernel is an efi compatible program.
To make grub work, you need to follow the handbook to make /boot/grub/grub.cfg
To make the efi stub kernel work, you need to build the intrd and kernel command line into the kernel.
That is not covered in the handbook. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 7:32 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
means that grub cannot find /boot/grub/grub.cfg
Did you make it?
That efi loads your kernel directly tells that you made the kernel an efi stub, so that the kernel is an efi compatible program.
To make grub work, you need to follow the handbook to make /boot/grub/grub.cfg
To make the efi stub kernel work, you need to build the intrd and kernel command line into the kernel.
That is not covered in the handbook. |
yes i did make it, maybe i am choosing the wrong grub.efi? i did choose a few .efi files from /boot and from /boot/efi to boot but all of them work the same looks like
(chroot) livecd /boot/grub # ls
fonts grub.cfg grubenv themes x86_64-efi
(also i did run the comand as the handbook said again just in case, this is what i did get )
grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
done |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 8:04 pm Post subject: |
|
|
themythtoon,
What does show when you are in the chroot? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 8:08 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
What does show when you are in the chroot? |
(chroot) livecd / # ls -l /boot
total 1
drwxr-xr-x 4 root root 512 Jun 29 03:29 EFI
drwxr-xr-x 5 root root 512 Jun 29 19:26 grub |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 47924 Location: 56N 3W
|
Posted: Mon Jun 29, 2020 8:11 pm Post subject: |
|
|
themythtoon,
No kernel or initrd?
I was expecting to see a kernel in /boot.
What do you have in /boot/grub/grub.cfg ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
themythtoon n00b

Joined: 05 Jul 2019 Posts: 41 Location: Argentina Córdoba Córdoba capital
|
Posted: Mon Jun 29, 2020 9:01 pm Post subject: |
|
|
NeddySeagoon wrote: | themythtoon,
No kernel or initrd?
I was expecting to see a kernel in /boot.
What do you have in /boot/grub/grub.cfg ? |
i did fix it, my gentoo is working perfectly (i did just fix my kernel error re installing properly uefi stub, i just had to check twice my kernel version and manually load the .efi file in /boot/EFI/gentoo bzimage.<kernel version>.efi)
thanks for all the support ant patience |
|
Back to top |
|
 |
|