Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-11-01 Thread Geoff Swan
That works for me too. Using a 64-bit kernel and creating the EFI file
in the efi partition with the kernel boot parameters built into the kernel.
Also built efibootmgr utility.

On 1/11/2013 11:13 PM, Craig Magee wrote:
> I use UEFI by putting the kernel and an (optional) initrd in the EFI
> partition.  The kernel has EFI stubs if you enable the option.
> You can pass kernel parameters in the UEFI boot entry or put them in
> the kernel itself.  Both options are available towards the bottom of
> 'Processor type and features' in the kernel configuration.
> The only gotcha is booting 32-bit, my UEFI system only supports
> booting 64-bit so I had to install a 64-bit GRUB to then boot a 32-bit
> kernel.
>
> I find UEFI is actually pretty neat and removes the need for an
> additional bootloader.  Anytime I want to boot anything other than the
> default (including from CD or USB) I press the escape key and select
> the option I want.  GPT partitioning rocks as well (though you don't
> need to use UEFI to take advantage of that using Linux; you do for
> Windows).
>
>
> On 31 October 2013 06:02, Casey Daniels  > wrote:
>
>
> On 10/30/2013 12:47 PM, Dan McGhee wrote:
> > On 10/30/2013 11:26 AM, Casey Daniels wrote:
> >> On 10/30/2013 12:17 PM, Dan McGhee wrote:
> >>> Anyway, I just wanted to share what I have discovered.  This
> may lead to
> >>> posts like, "I did this and it didn't work.  The book needs to be
> >>> changed."  The implementation of LFS, configuring and
> installing both
> >>> the kernel and GRUB can be successful regardless of how the
> BIOS boots.
> >>> There is a learning curve though. And some of GRUB's building and
> >>> installing arguments need to be a little different.
> >>>
> >>> Dan
> >>>
> >> I played with UEFI Boot for almost a week and couldn't get
> anywhere with
> >> it.  I could get Grub Loaded, and and I could get grub to find the
> >> Kernel, but then it would ALWAYS fail at some memory point
> during the
> >> Kernel load, and I played and played with the kernel for that
> week and
> >> it keep freezing at the same point.
> >>
> >> The thing with UEFI Boot is you don't need Grub to boot if you
> don't
> >> want to.  If you have a Linux only or Windows only, computer
> you can
> >> actually boot with out user input without a bootloader.  From my
> >> understanding though if you have a dualboot system you need at
> a minimum
> >> a boot manager to boot without user intervention.  If you don't
> mind
> >> typing a few commands you can boot with out a boot manager or
> bootloader
> >> in a dual boot system, you just have to understand the UEFI
> Shell you get.
> >>
> >> Casey
> > Casey, your experience confirms what I have learned by reading
> and my
> > own experience. Yes, on dual boot you need a manager to get to the
> > loader you want. That's one of the functions of the EFI partition. I
> > don't want to address your specific situation until I have practical
> > experience with my LFS build and that won't be for a couple of
> more days.
> >
> > If you have not been successful in booting your LFS system and
> you want
> > to "play," I recommend turning off secure boot, checking your kernel
> > configuration to support efi and running 
> to select
> > the arguments you use for grub. I just finished reading
> "grub-install"
> > and it looks like it should detect your partition type--MBR or
> GPT. I
> > don't want to suggest anything definite because I haven't
> "proved" them
> > with my own experience. One of the possible outcomes is that your
> > computer won't boot. I would rather be the victim of my own
> eperiments
> > rather than having someone else be that victim. :)
> >
> > Dan
> >
>  I had no problem getting the Boot Loader working, surpurising
> enough, though I did learn that in order to get grub to do a
> proper UEFI
> Install, the system your installing it from had to have booted from
> UEFI.   I had Grub find the Kernel in the proper place, and start to
> load, but the Intel board I use does some type of Memory Check and
> always fails at the same Memory Address.  So I don't know if I had
> some
> incompatable Option in my Kernel or there is a issue with Intel's UEFI
> Implentation (Which from what I was able to read on the subject this
> might be the case, I think it trys to protect that Memory Address and
> the Linux Kernel trys to get into that specific Address).  Yes I did
> have Secure boot turned off.
>  I really don't care about UEFI boot for the current hardware
> of my
> servers, but from my understanding is my Intel Boards are UEFI boards
> that emulate the orginal BIOS for Compability reasons, how

Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-11-01 Thread Craig Magee
Just an additional note: using UEFI as my bootloader menu allowed me to
dualboot.  Both the kernel/GRUB and Windows bootloader are just executables
on the EFI partition.  Doing it that way removes the headache of chaining
or your bootloader getting overwritten (I'm looking at you, Windows 7).
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-11-01 Thread Craig Magee
I use UEFI by putting the kernel and an (optional) initrd in the EFI
partition.  The kernel has EFI stubs if you enable the option.
You can pass kernel parameters in the UEFI boot entry or put them in the
kernel itself.  Both options are available towards the bottom of 'Processor
type and features' in the kernel configuration.
The only gotcha is booting 32-bit, my UEFI system only supports booting
64-bit so I had to install a 64-bit GRUB to then boot a 32-bit kernel.

I find UEFI is actually pretty neat and removes the need for an additional
bootloader.  Anytime I want to boot anything other than the default
(including from CD or USB) I press the escape key and select the option I
want.  GPT partitioning rocks as well (though you don't need to use UEFI to
take advantage of that using Linux; you do for Windows).


On 31 October 2013 06:02, Casey Daniels  wrote:

>
> On 10/30/2013 12:47 PM, Dan McGhee wrote:
> > On 10/30/2013 11:26 AM, Casey Daniels wrote:
> >> On 10/30/2013 12:17 PM, Dan McGhee wrote:
> >>> Anyway, I just wanted to share what I have discovered.  This may lead
> to
> >>> posts like, "I did this and it didn't work.  The book needs to be
> >>> changed."  The implementation of LFS, configuring and installing both
> >>> the kernel and GRUB can be successful regardless of how the BIOS boots.
> >>> There is a learning curve though. And some of GRUB's building and
> >>> installing arguments need to be a little different.
> >>>
> >>> Dan
> >>>
> >> I played with UEFI Boot for almost a week and couldn't get anywhere with
> >> it.  I could get Grub Loaded, and and I could get grub to find the
> >> Kernel, but then it would ALWAYS fail at some memory point during the
> >> Kernel load, and I played and played with the kernel for that week and
> >> it keep freezing at the same point.
> >>
> >> The thing with UEFI Boot is you don't need Grub to boot if you don't
> >> want to.  If you have a Linux only or Windows only, computer you can
> >> actually boot with out user input without a bootloader.  From my
> >> understanding though if you have a dualboot system you need at a minimum
> >> a boot manager to boot without user intervention.  If you don't mind
> >> typing a few commands you can boot with out a boot manager or bootloader
> >> in a dual boot system, you just have to understand the UEFI Shell you
> get.
> >>
> >> Casey
> > Casey, your experience confirms what I have learned by reading and my
> > own experience. Yes, on dual boot you need a manager to get to the
> > loader you want. That's one of the functions of the EFI partition. I
> > don't want to address your specific situation until I have practical
> > experience with my LFS build and that won't be for a couple of more days.
> >
> > If you have not been successful in booting your LFS system and you want
> > to "play," I recommend turning off secure boot, checking your kernel
> > configuration to support efi and running  to select
> > the arguments you use for grub. I just finished reading "grub-install"
> > and it looks like it should detect your partition type--MBR or GPT. I
> > don't want to suggest anything definite because I haven't "proved" them
> > with my own experience. One of the possible outcomes is that your
> > computer won't boot. I would rather be the victim of my own eperiments
> > rather than having someone else be that victim. :)
> >
> > Dan
> >
>  I had no problem getting the Boot Loader working, surpurising
> enough, though I did learn that in order to get grub to do a proper UEFI
> Install, the system your installing it from had to have booted from
> UEFI.   I had Grub find the Kernel in the proper place, and start to
> load, but the Intel board I use does some type of Memory Check and
> always fails at the same Memory Address.  So I don't know if I had some
> incompatable Option in my Kernel or there is a issue with Intel's UEFI
> Implentation (Which from what I was able to read on the subject this
> might be the case, I think it trys to protect that Memory Address and
> the Linux Kernel trys to get into that specific Address).  Yes I did
> have Secure boot turned off.
>  I really don't care about UEFI boot for the current hardware of my
> servers, but from my understanding is my Intel Boards are UEFI boards
> that emulate the orginal BIOS for Compability reasons, however some
> boards are already coming out as UEFI only and it probably won't be too
> long before most boards don't have a legacy mode.
>
> Casey
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-10-30 Thread Casey Daniels

On 10/30/2013 12:47 PM, Dan McGhee wrote:
> On 10/30/2013 11:26 AM, Casey Daniels wrote:
>> On 10/30/2013 12:17 PM, Dan McGhee wrote:
>>> Anyway, I just wanted to share what I have discovered.  This may lead to
>>> posts like, "I did this and it didn't work.  The book needs to be
>>> changed."  The implementation of LFS, configuring and installing both
>>> the kernel and GRUB can be successful regardless of how the BIOS boots.
>>> There is a learning curve though. And some of GRUB's building and
>>> installing arguments need to be a little different.
>>>
>>> Dan
>>>
>> I played with UEFI Boot for almost a week and couldn't get anywhere with
>> it.  I could get Grub Loaded, and and I could get grub to find the
>> Kernel, but then it would ALWAYS fail at some memory point during the
>> Kernel load, and I played and played with the kernel for that week and
>> it keep freezing at the same point.
>>
>> The thing with UEFI Boot is you don't need Grub to boot if you don't
>> want to.  If you have a Linux only or Windows only, computer you can
>> actually boot with out user input without a bootloader.  From my
>> understanding though if you have a dualboot system you need at a minimum
>> a boot manager to boot without user intervention.  If you don't mind
>> typing a few commands you can boot with out a boot manager or bootloader
>> in a dual boot system, you just have to understand the UEFI Shell you get.
>>
>> Casey
> Casey, your experience confirms what I have learned by reading and my
> own experience. Yes, on dual boot you need a manager to get to the
> loader you want. That's one of the functions of the EFI partition. I
> don't want to address your specific situation until I have practical
> experience with my LFS build and that won't be for a couple of more days.
>
> If you have not been successful in booting your LFS system and you want
> to "play," I recommend turning off secure boot, checking your kernel
> configuration to support efi and running  to select
> the arguments you use for grub. I just finished reading "grub-install"
> and it looks like it should detect your partition type--MBR or GPT. I
> don't want to suggest anything definite because I haven't "proved" them
> with my own experience. One of the possible outcomes is that your
> computer won't boot. I would rather be the victim of my own eperiments
> rather than having someone else be that victim. :)
>
> Dan
>
 I had no problem getting the Boot Loader working, surpurising 
enough, though I did learn that in order to get grub to do a proper UEFI 
Install, the system your installing it from had to have booted from 
UEFI.   I had Grub find the Kernel in the proper place, and start to 
load, but the Intel board I use does some type of Memory Check and 
always fails at the same Memory Address.  So I don't know if I had some 
incompatable Option in my Kernel or there is a issue with Intel's UEFI 
Implentation (Which from what I was able to read on the subject this 
might be the case, I think it trys to protect that Memory Address and 
the Linux Kernel trys to get into that specific Address).  Yes I did 
have Secure boot turned off.
 I really don't care about UEFI boot for the current hardware of my 
servers, but from my understanding is my Intel Boards are UEFI boards 
that emulate the orginal BIOS for Compability reasons, however some 
boards are already coming out as UEFI only and it probably won't be too 
long before most boards don't have a legacy mode.

Casey
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-10-30 Thread Dan McGhee
On 10/30/2013 11:26 AM, Casey Daniels wrote:
> On 10/30/2013 12:17 PM, Dan McGhee wrote:
>> Anyway, I just wanted to share what I have discovered.  This may lead to
>> posts like, "I did this and it didn't work.  The book needs to be
>> changed."  The implementation of LFS, configuring and installing both
>> the kernel and GRUB can be successful regardless of how the BIOS boots.
>> There is a learning curve though. And some of GRUB's building and
>> installing arguments need to be a little different.
>>
>> Dan
>>
> I played with UEFI Boot for almost a week and couldn't get anywhere with
> it.  I could get Grub Loaded, and and I could get grub to find the
> Kernel, but then it would ALWAYS fail at some memory point during the
> Kernel load, and I played and played with the kernel for that week and
> it keep freezing at the same point.
>
> The thing with UEFI Boot is you don't need Grub to boot if you don't
> want to.  If you have a Linux only or Windows only, computer you can
> actually boot with out user input without a bootloader.  From my
> understanding though if you have a dualboot system you need at a minimum
> a boot manager to boot without user intervention.  If you don't mind
> typing a few commands you can boot with out a boot manager or bootloader
> in a dual boot system, you just have to understand the UEFI Shell you get.
>
> Casey
Casey, your experience confirms what I have learned by reading and my 
own experience. Yes, on dual boot you need a manager to get to the 
loader you want. That's one of the functions of the EFI partition. I 
don't want to address your specific situation until I have practical 
experience with my LFS build and that won't be for a couple of more days.

If you have not been successful in booting your LFS system and you want 
to "play," I recommend turning off secure boot, checking your kernel 
configuration to support efi and running  to select 
the arguments you use for grub. I just finished reading "grub-install" 
and it looks like it should detect your partition type--MBR or GPT. I 
don't want to suggest anything definite because I haven't "proved" them 
with my own experience. One of the possible outcomes is that your 
computer won't boot. I would rather be the victim of my own eperiments 
rather than having someone else be that victim. :)

Dan

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: [lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-10-30 Thread Casey Daniels

On 10/30/2013 12:17 PM, Dan McGhee wrote:
> Anyway, I just wanted to share what I have discovered.  This may lead to
> posts like, "I did this and it didn't work.  The book needs to be
> changed."  The implementation of LFS, configuring and installing both
> the kernel and GRUB can be successful regardless of how the BIOS boots.
> There is a learning curve though. And some of GRUB's building and
> installing arguments need to be a little different.
>
> Dan
>
I played with UEFI Boot for almost a week and couldn't get anywhere with 
it.  I could get Grub Loaded, and and I could get grub to find the 
Kernel, but then it would ALWAYS fail at some memory point during the 
Kernel load, and I played and played with the kernel for that week and 
it keep freezing at the same point.

The thing with UEFI Boot is you don't need Grub to boot if you don't 
want to.  If you have a Linux only or Windows only, computer you can 
actually boot with out user input without a bootloader.  From my 
understanding though if you have a dualboot system you need at a minimum 
a boot manager to boot without user intervention.  If you don't mind 
typing a few commands you can boot with out a boot manager or bootloader 
in a dual boot system, you just have to understand the UEFI Shell you get.

Casey
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


[lfs-support] EFI, UEFI and LFS--Complicated, Confusing or Can of Worms

2013-10-30 Thread Dan McGhee
As a continuation of the quest I started the other day with learning 
about GRUB configuration and my system, I have encountered some 
*interesting* information that could, as an extension of logic, have an 
impact on building LFS.

In trying to discern whether my new HP Envy has UEFI firmware, I've done 
some extensive reading in the last couple of days.  The first thing of 
which I became aware is that many terms in use these days; e.g., BIOS 
System, are uses that aren't quite specific to the actual situation.  
More precisely, in terms of booting, the question is, "Does the BIOS use 
an MBR partition or EFI partition to boot?"

I have learned that in even UEFI firmware there is an "MBR protected" 
area at the beginning of the hard drive.  This is for backward 
compatibility.  I have also learned that GRUB can work in "old," 
"hybrid," or "new" firmware environments.  This all depends on where 
GRUB puts its "stage 2" files.  Of course, when GRUB is configured for 
"efi," there are no stage 2 files.

The "indicators" that the firmware is UEFI and that an *actual* GPT 
partition is in use are that there exist an EFI partition with a FAT32 
file system and that the number of primary partitions is not limited to 
four.  If a person has Windows installed, one can go to disk management 
and look at the volumes.  If one is, "EFI, healthy" then there is an 
actual, not hybrid, GPT partition.  If there is no such animal and the 
partition table show only "C:\" which is healthy and has the boot flag 
set, it is an MBR partition.

I have also learned that the kernel must be configured with the efi 
options turned on.  I can't remember their specific names right now, but 
I'll note and report when I configure my kernel shortly.

Those are all the "complicated or confusing" things.  Now to the 
possible can of worms.

It's the signing of kernels and boot loaders.  At the start, I must say 
that the way around this is to turn off "secure boot" in the BIOS 
setup.  But, then, some folks may not want to do this.  If so, they may 
have to deal with this signing stuff.  Right now, and I repeat, right 
now; i.e., currently, GRUB can be used as a bootloader in a secure 
environment, if and only if, there is a signed key. Only Ubuntu and 
Fedora have those.  There is a way to generate personal keys, but I 
haven't learned that yet.  I'm just hoping that this stuff doesn't 
"progress" to the point at which we, LFS builders, will need them.  The 
war has already started.

Microsoft can "revoke" any firmware certificate it wants "without 
notice."  It does this through Windows Update.  I don't know how far 
this will go, but I'm distressed about it.  As long as I don't have to 
proceed with secure boot, I'm happy.

Anyway, I just wanted to share what I have discovered.  This may lead to 
posts like, "I did this and it didn't work.  The book needs to be 
changed."  The implementation of LFS, configuring and installing both 
the kernel and GRUB can be successful regardless of how the BIOS boots.  
There is a learning curve though. And some of GRUB's building and 
installing arguments need to be a little different.

Dan

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page