Cant boot with SSD, GPT, GRUB2 and UEFI

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
Hi all. I'm again with a newbie problem :/
I almost finish to install gentoo but I have a little problem, I can't boot gentoo ._.

I already installed the system with GRUB2 and systemd, I made partitions with GPT using parted, but I can't boot.


This "legacy_boot" flag is a recent try I made :P. I also tried with "boot" flag, and with no flags. But any way this does not work

My /boot/grub/grub.cfg http://bpaste.net/show/186355

GRUB never starts, I just can see the UEFI menu.

Another - no related - problem I have is that I cant update my system ._.
I do a
emerge --newuse --deep --update world
I dont get errors, but never starts to update. Emerge work as using a --pretend atribute, this say me all the packages to install/rebuild, but dont do anything... o.o


Is a output of 16k lines and 1,1 mb. Watch out! :/

It rebuild almost everything because I added doc and X to USE flags, and almost all package uses docs ._. (I think that..)

Any ideas? :P I hope somebody can help me plese! :/

I hope you understend me, me english is not perfect :/

Thank you all! 

P.D: I was following the gentoo handbook, and google for helps. :) But now I'm atasked D:
Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
Sorry about the double posting. I dont know what I made, but I could update the system. I just tried to install X, I changed some "local uses" in package.use because because errors. Afterwards tried to update and everything works :O jaja.

Any way, I still with problems on booting :/


2014-03-08 2:31 GMT-03:00 Facundo Curti <[hidden email]>:
Hi all. I'm again with a newbie problem :/
I almost finish to install gentoo but I have a little problem, I can't boot gentoo ._.

I already installed the system with GRUB2 and systemd, I made partitions with GPT using parted, but I can't boot.


This "legacy_boot" flag is a recent try I made :P. I also tried with "boot" flag, and with no flags. But any way this does not work

My /boot/grub/grub.cfg http://bpaste.net/show/186355

GRUB never starts, I just can see the UEFI menu.

Another - no related - problem I have is that I cant update my system ._.
I do a
emerge --newuse --deep --update world
I dont get errors, but never starts to update. Emerge work as using a --pretend atribute, this say me all the packages to install/rebuild, but dont do anything... o.o


Is a output of 16k lines and 1,1 mb. Watch out! :/

It rebuild almost everything because I added doc and X to USE flags, and almost all package uses docs ._. (I think that..)

Any ideas? :P I hope somebody can help me plese! :/

I hope you understend me, me english is not perfect :/

Thank you all! 

P.D: I was following the gentoo handbook, and google for helps. :) But now I'm atasked D:

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Pavel Volkov
In reply to this post by Facundo Curti
On Saturday 08 March 2014 02:31:35 Facundo Curti wrote:

> Hi all. I'm again with a newbie problem :/
> I almost finish to install gentoo but I have a little problem, I can't boot
> gentoo ._.
>
> I already installed the system with GRUB2 and systemd, I made partitions
> with GPT using parted, but I can't boot.
>
> My partitions: http://bpaste.net/show/186352/
>
> This "legacy_boot" flag is a recent try I made :P. I also tried with "boot"
> flag, and with no flags. But any way this does not work
>

With UEFI you don't need bios_grub partition.
You also don't nee the legacy_boot flag.

But what you need is a FAT32 partiton where the GRUB's UEFI binary will be
installed.

You mount that partition at /boot/efi
You should also set GRUB_PLATFORMS="efi-64" in make.conf and update world.

After that run "grub2-install /dev/sda" (or whatever block device you use).

Then you can verify that GRUB 2 is added into UEFI boot menu: run efibootmgr as
root (it's from sys-boot/efibootmgr package).

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Pavel Volkov
Some update: actually I'm not sure if efibootmgr will work until you boot with
UEFI.

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Pavel Volkov
In reply to this post by Pavel Volkov
Some more update:

1. You should correctly configure your kernel too boot with UEFI (but GRUB will
still boot).
2. I think you should run grub2-install from EFI-booted system. I suggest
SystemRescueCD, Gentoo minimal can't do that.

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
In reply to this post by Pavel Volkov
2014-03-08 3:20 GMT-03:00 Pavel Volkov <[hidden email]>:
On Saturday 08 March 2014 02:31:35 Facundo Curti wrote:
> Hi all. I'm again with a newbie problem :/
> I almost finish to install gentoo but I have a little problem, I can't boot
> gentoo ._.
>
> I already installed the system with GRUB2 and systemd, I made partitions
> with GPT using parted, but I can't boot.
>
> My partitions: http://bpaste.net/show/186352/
>
> This "legacy_boot" flag is a recent try I made :P. I also tried with "boot"
> flag, and with no flags. But any way this does not work
>

With UEFI you don't need bios_grub partition.
You also don't nee the legacy_boot flag.

But what you need is a FAT32 partiton where the GRUB's UEFI binary will be
installed.

You mount that partition at /boot/efi
You should also set GRUB_PLATFORMS="efi-64" in make.conf and update world.

After that run "grub2-install /dev/sda" (or whatever block device you use).

Then you can verify that GRUB 2 is added into UEFI boot menu: run efibootmgr as
root (it's from sys-boot/efibootmgr package).

Thank you men! You are awesome.

But I have a problem, after I do
emerge --update world
when I make grub2-install, I get off this error:

            /usr/lib/grub/i386-pc doesn't exist. Please especify --target or --directory

So I choice a target:
            grub-install --target x86_64-efi/ /dev/sdb

And this says me:
            Fatal: Couldn't open either sysfs or procfs directories for accesing EFI variables
            Try "modprobe efivars" as root

I try it and nothing happens... I mounted sys and proc following the gentoo handbook:
            # mount -t proc proc /mnt/gentoo/proc
            # mount --rbind /sys /mnt/gentoo/sys
            # mount --rbind /dev /mnt/gentoo/dev

This is my df -h: 
            Filesystem      Size  Used Avail Use% Mounted on
            rootfs           15G  3.1G   11G  23% /
            udev             10M  4.0K   10M   1% /dev
            tmpfs            15G  3.1G   11G  23% /
            /dev/sdb2        15G  3.1G   11G  23% /
            shm             1.8G     0  1.8G   0% /dev/shm
            /dev/sdb4        92G   60M   87G   1% /home
            /dev/sdb1       2.0M  124K  1.9M   7% /boot/efi
            udev             10M  4.0K   10M   1% /dev
            shm             1.8G     0  1.8G   0% /dev/shm

No errors mounting :/

Thank you! Bytes! ;)
Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
In reply to this post by Pavel Volkov
2014-03-08 3:37 GMT-03:00 Pavel Volkov <[hidden email]>:
Some more update:

1. You should correctly configure your kernel too boot with UEFI (but GRUB will
still boot).
Yep, this is done :)
2. I think you should run grub2-install from EFI-booted system. I suggest
SystemRescueCD, Gentoo minimal can't do that.
aaa, ok. Thanks, So my last question was out of place jaja :) I will try that. Thx! 

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Stefan G. Weichinger-3
In reply to this post by Facundo Curti
Am 08.03.2014 08:18, schrieb Facundo Curti:

> And this says me:
>             Fatal: Couldn't open either sysfs or procfs directories for
> accesing EFI variables
>             Try "modprobe efivars" as root

The system has to be booted via UEFI to be able to access the EFI system
(and tell it about your new OS). So you have to boot from a live-system
doing EFI boot. AFAI remember sysresccd is able to do that, for example.

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Neil Bothwick
In reply to this post by Facundo Curti
On Sat, 8 Mar 2014 02:31:35 -0300, Facundo Curti wrote:

> Another - no related - problem I have is that I cant update my
> system ._. I do a
> emerge --newuse --deep --update world
> I dont get errors, but never starts to update. Emerge work as using a
> --pretend atribute, this say me all the packages to install/rebuild, but
> dont do anything... o.o
>
> The portage: http://bpaste.net/show/186359
>
> Is a output of 16k lines and 1,1 mb. Watch out! :/
>
> It rebuild almost everything because I added doc and X to USE flags, and
> almost all package uses docs ._. (I think that..)
As previously stated, you should NOT enable the doc USE flag globally.
User docs are generated by default the flag controls the building of
developer docs, which no one needs for everything, and brings in some
heavy dependencies for some packages.

% euses doc
doc - Add extra documentation (API, Javadoc, etc). It is recommended to
enable per package instead of globally


--
Neil Bothwick

I typed Format SER: and accidentally killed a telephone operator!

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
2014-03-08 5:27 GMT-03:00 Neil Bothwick <[hidden email]>:
On Sat, 8 Mar 2014 02:31:35 -0300, Facundo Curti wrote:

> Another - no related - problem I have is that I cant update my
> system ._. I do a
> emerge --newuse --deep --update world
> I dont get errors, but never starts to update. Emerge work as using a
> --pretend atribute, this say me all the packages to install/rebuild, but
> dont do anything... o.o
>
> The portage: http://bpaste.net/show/186359
>
> Is a output of 16k lines and 1,1 mb. Watch out! :/
>
> It rebuild almost everything because I added doc and X to USE flags, and
> almost all package uses docs ._. (I think that..)

As previously stated, you should NOT enable the doc USE flag globally.
User docs are generated by default the flag controls the building of
developer docs, which no one needs for everything, and brings in some
heavy dependencies for some packages.

% euses doc
doc - Add extra documentation (API, Javadoc, etc). It is recommended to
enable per package instead of globally


--
Neil Bothwick

I typed Format SER: and accidentally killed a telephone operator!
:O Thank you. I didn't know that. So i'm going to disable this :)

About boot... :/ It still not working. I boot from sysresccd, make a:

           grub2-install /dev/sdb

And give me this output:
           Path `/boot/grub` is not redeable by GRUB on boot. Installation is impossible. Aborting           

So, I try to do the same, but in chroot.
I mount everything (Including proc and sys), and:
           chroot /mnt/gentoo /bin/bash
           grub2-install --target x86_64-efi /dev/sdb          //Without target gives another error

And grub2-install says:
           Fatal: Couldn't open either sysfs or procfs directories for accesing EFI variables.
           Try `modprobe efivars` as root.
    (Same than before)

I was searching on google and I find various similar topics [1]. It recomend to mount proc and sys, but I already do thath... (unless I do that wrong)

Somes ideas? :/

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Stefan G. Weichinger-3
Am 08.03.2014 10:25, schrieb Facundo Curti:

> About boot... :/ It still not working. I boot from sysresccd

Did you boot via EFI or via BIOS? You have to choose (U)EFI in your BIOS
to enable the whole EFI-environment.

If you boot sysresccd via BIOS you don't get the efi variables accessible.

Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
Yes. I press F8 (boot menu) and I choice UEFI:Sandisk :/


2014-03-08 6:37 GMT-03:00 Stefan G. Weichinger <[hidden email]>:
Am 08.03.2014 10:25, schrieb Facundo Curti:

> About boot... :/ It still not working. I boot from sysresccd

Did you boot via EFI or via BIOS? You have to choose (U)EFI in your BIOS
to enable the whole EFI-environment.

If you boot sysresccd via BIOS you don't get the efi variables accessible.


Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Neil Bothwick
In reply to this post by Facundo Curti
On Sat, 8 Mar 2014 06:25:32 -0300, Facundo Curti wrote:

> About boot... :/ It still not working. I boot from sysresccd, make a:
>
>            grub2-install /dev/sdb
>
> And give me this output:
>            Path `/boot/grub` is not redeable by GRUB on boot.
> Installation is impossible. Aborting

You need to pass --boot-dir and --root-dir to grub2-install (check the
man page for the exact syntax). If your gentoo install is mounted
at /mnt/gentoo these should be /mnt/gentoo/boot and /mnt/gentoo.


--
Neil Bothwick

Why do kamikaze pilots wear helmets?

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Pavel Volkov
In reply to this post by Facundo Curti
On Saturday 08 March 2014 06:25:32 Facundo Curti wrote:

> So, I try to do the same, but in chroot.
> I mount everything (Including proc and sys), and:
>            chroot /mnt/gentoo /bin/bash
>            grub2-install --target x86_64-efi /dev/sdb          //Without
> target gives another error
>
> And grub2-install says:
>            Fatal: Couldn't open either sysfs or procfs directories for
> accesing EFI variables.
>            Try `modprobe efivars` as root.
>     (Same than before)
>
> I was searching on google and I find various similar topics [1]. It
> recomend to mount proc and sys, but I already do thath... (unless I do that
> wrong)
>
> Somes ideas? :/

Is there any content in ls /sys/firmware/efi/vars/ directory?

If not, are you sure you boot sysrescuecd in EFI mode?
It can boot in both EFI and legacy mode.
Check your boot menu again.


Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Michael Hampicke-7
In reply to this post by Facundo Curti
Am 08.03.2014 10:40, schrieb Facundo Curti:
> Yes. I press F8 (boot menu) and I choice UEFI:Sandisk :/
>

Also, make sure, that you modprobe efivarfs before you enter the chroot.
Then it sould work, you can verify that it works by using efibootmgr -v


signature.asc (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cant boot with SSD, GPT, GRUB2 and UEFI

Facundo Curti
In reply to this post by Pavel Volkov
2014-03-08 6:46 GMT-03:00 Pavel Volkov <[hidden email]>:
On Saturday 08 March 2014 06:25:32 Facundo Curti wrote:
> So, I try to do the same, but in chroot.
> I mount everything (Including proc and sys), and:
>            chroot /mnt/gentoo /bin/bash
>            grub2-install --target x86_64-efi /dev/sdb          //Without
> target gives another error
>
> And grub2-install says:
>            Fatal: Couldn't open either sysfs or procfs directories for
> accesing EFI variables.
>            Try `modprobe efivars` as root.
>     (Same than before)
>
> I was searching on google and I find various similar topics [1]. It
> recomend to mount proc and sys, but I already do thath... (unless I do that
> wrong)
>
> Somes ideas? :/

Is there any content in ls /sys/firmware/efi/vars/ directory?

If not, are you sure you boot sysrescuecd in EFI mode?
It can boot in both EFI and legacy mode.
Check your boot menu again.

Finally!!! I on gentoo with out usb! jaja

I just needed make some changes on BIOS, I was using a dual UEFI and Legacy (UEFI first) (Thank you Pavel):


Thank you all for the help!! I spent all the night trying to fix that ._. I  fell sleep on 7:40 am lol (I also had problems booting with rescue cd, with systemd, and a missconfig from fstab >.< lol).

Thank you once more! Bytes! ;)