You are not logged in.

#26 2012-03-25 11:04:21

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]The linux kernel with build in bootloader?

Perhaps a separate wiki page for efistub booting with/without refind? (as an alternative for grub2-efi-x86_64)

Offline

#27 2012-03-25 13:57:38

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

the.ridikulus.rat wrote:

Perhaps a separate wiki page for efistub booting with/without refind? (as an alternative for grub2-efi-x86_64)

Ah yes, coincidentally i was just typing a wiki example for dual-booting OSX/linux with EFI_STUB on Macs.


ᶘ ᵒᴥᵒᶅ

Offline

#28 2012-03-26 13:50:12

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]The linux kernel with build in bootloader?

Offline

#29 2012-03-26 16:35:00

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: [Solved]The linux kernel with build in bootloader?

To those of you who have tried it now: is it noticeably faster than before?

Offline

#30 2012-03-26 18:15:36

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

mariusmeyer wrote:

To those of you who have tried it now: is it noticeably faster than before?

Well, the boot process itself takes the same amount of time as before, but getting to the boot process is a lot faster, almost instantly. For me personally though, the idea of getting rid of those stupid bootloaders (grub and friends) is the most important part.


ᶘ ᵒᴥᵒᶅ

Offline

#31 2012-03-26 19:04:46

mariusmeyer
Member
From: Norway
Registered: 2009-04-25
Posts: 244

Re: [Solved]The linux kernel with build in bootloader?

Sounds cool, I'm now one step closer to having Arch on my MacBook wink

Offline

#32 2012-03-26 19:54:54

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

mariusmeyer wrote:

Sounds cool, I'm now one step closer to having Arch on my MacBook wink

Here's a video of an EFI_STUB boot: http://youtu.be/Mi_XZocjoIA


ᶘ ᵒᴥᵒᶅ

Offline

#33 2012-04-03 22:15:29

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: [Solved]The linux kernel with build in bootloader?

interesting. too bad the "boot manager" is still needed.  I mean, my UEFI-enabled laptop has a fancy menu where you can select what to boot.  if i could just add all arguments in there, that would be neat.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#34 2012-04-03 22:28:01

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [Solved]The linux kernel with build in bootloader?

Dieter@be wrote:

interesting. too bad the "boot manager" is still needed.  I mean, my UEFI-enabled laptop has a fancy menu where you can select what to boot.  if i could just add all arguments in there, that would be neat.

You could give this a try.

Offline

#35 2012-04-03 22:36:12

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [Solved]The linux kernel with build in bootloader?

Dieter@be wrote:

interesting. too bad the "boot manager" is still needed.  I mean, my UEFI-enabled laptop has a fancy menu where you can select what to boot.  if i could just add all arguments in there, that would be neat.

Or you can do using startup.nsh with efi-shell, like I have done temporary for archiso[#1],

[#1] http://mailman.archlinux.org/pipermail/ … 02451.html

Last edited by djgera (2012-04-03 22:36:41)

Offline

#36 2012-04-14 18:50:51

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]The linux kernel with build in bootloader?

Experimental linux based "bless" utility by Fedora devs at https://aur.archlinux.org/packages.php?ID=54847 . Please test it (I haven't because I don't own a Mac).

Offline

#37 2012-04-14 19:02:46

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

the.ridikulus.rat wrote:

Experimental linux based "bless" utility by Fedora devs at https://aur.archlinux.org/packages.php?ID=54847 . Please test it (I haven't because I don't own a Mac).

Cool, 'experimental' sounds a bit scary though... wink


ᶘ ᵒᴥᵒᶅ

Offline

#38 2012-04-16 14:07:15

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]The linux kernel with build in bootloader?

Archiso getting UEFI boot support (but no GPT+UEFI support in AIF yet) via Shell+EFISTUB (x86_64 only, but nothing stopping you from creating a 32-bit EFI bootable USB in similar way).

Instructions for creating UEFI bootable iso - https://bbs.archlinux.org/viewtopic.php … 9#p1083439
Relevant Archiso git commit - http://projects.archlinux.org/archiso.g … 4350a11056

Last edited by the.ridikulus.rat (2012-04-17 07:25:04)

Offline

#39 2012-04-17 07:15:26

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: [Solved]The linux kernel with build in bootloader?

litemotiv wrote:

Update: i am now succesfully booting the stock Arch 3.3 kernel from rEFInd with EFI_STUB.

Thanks for the tip!
I successfully used this method on a MBA 3,2.


gh · da · ds

Offline

#40 2012-04-18 17:01:13

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved]The linux kernel with build in bootloader?

I just tried this on my system with an Intel DH67GD following this and the aforementioned mailing list entry.

I was surprised that I actually got this to work, just wanted to share my experience:

I got the UEFI shell to boot from a USB stick with the instructions from the wiki. Unfortunately UEFI Shell 2.0 didn't work for me, I get a strange ASSERT_EFI_ERROR on boot. UEFI Shell 1.0 booted just fine however.
Then I copied /boot/initramfs-linux.img and /boot/vmlinuz-linux (as bzImage.efi) to the USB stick. Then I could boot from the Shell with:

bzImage.efi initrd=\initramfs-linux.img root=/dev/mapper/crypt cryptdevice=/dev/sda3:crypt ro quiet

Then I put this in the file "startup.nsh" so it automatically boots after a 5 second timer.

the.ridikulus.rat wrote:

... the proposed linux.conf efistub config file https://lkml.org/lkml/2012/3/18/45

Do I understand this correctly that I could then boot the kernel directly without having to load a UEFI Shell first? If so, how would the boot menu of the mainboard know that it is supposed to load the kernel? Simply replace the bootx64.efi in efi/boot/ with bzImage.efi ?

edit: nevermind: the archiso commit pretty much clears this up for me wink

Last edited by 65kid (2012-04-18 18:35:29)

Offline

#41 2012-04-18 22:12:31

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

Forgive my disbelief, but are you guys really saying that, as of kernel 3.3, it's possible to install Arch Linux on the GPT-formatted SSD of my UEFI-equipped computer and boot directly into Arch without using Grub2 or any other bootloader?

Does this mean that I no longer need a dedicated 200Mb FAT32 partition for EFI?

Assuming I use Archboot to install, I would skip the install-bootloader step entirely, right?

Then, what do I have to do to direct UEFI to boot my Arch installation?

Last edited by dhave (2012-04-18 22:14:45)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#42 2012-04-18 22:32:56

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

dhave wrote:

Forgive my disbelief, but are you guys really saying that, as of kernel 3.3, it's possible to install Arch Linux on the GPT-formatted SSD of my UEFI-equipped computer and boot directly into Arch without using Grub2 or any other bootloader?

Does this mean that I no longer need a dedicated 200Mb FAT32 partition for EFI?

Assuming I use Archboot to install, I would skip the install-bootloader step entirely, right?

Then, what do I have to do to direct UEFI to boot my Arch installation?

You place the kernel / initramfs directly on the EFI partition, that's how it boots.


ᶘ ᵒᴥᵒᶅ

Offline

#43 2012-04-18 22:40:23

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

litemotiv wrote:
dhave wrote:

Forgive my disbelief, but are you guys really saying that, as of kernel 3.3, it's possible to install Arch Linux on the GPT-formatted SSD of my UEFI-equipped computer and boot directly into Arch without using Grub2 or any other bootloader?

Does this mean that I no longer need a dedicated 200Mb FAT32 partition for EFI?

Assuming I use Archboot to install, I would skip the install-bootloader step entirely, right?

Then, what do I have to do to direct UEFI to boot my Arch installation?

You place the kernel / initramfs directly on the EFI partition, that's how it boots.

And nothing else needs to be on the EFI partition? Does the EFI partition still need to be formatted FAT32? Thanks *very* much. I'm eager to try this. It would be great to leapfrog directly to the kernel without going through a bootloader.

I'll worry about how to enter on-the-fly boot-time kernel options later.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#44 2012-04-18 22:44:04

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved]The linux kernel with build in bootloader?

dhave wrote:

And nothing else needs to be on the EFI partition? Does the EFI partition still need to be formatted FAT32? Thanks *very* much. I'm eager to try this. It would be great to leapfrog directly to the kernel without going through a bootloader.

I'll worry about how to enter on-the-fly boot-time kernel options later.

Yes as far as i know, the requirements for the EFI partition stay the same, the kernel just functions as an EFI application itself.


ᶘ ᵒᴥᵒᶅ

Offline

#45 2012-04-18 22:49:04

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

litemotiv wrote:
dhave wrote:

And nothing else needs to be on the EFI partition? Does the EFI partition still need to be formatted FAT32? Thanks *very* much. I'm eager to try this. It would be great to leapfrog directly to the kernel without going through a bootloader.

I'll worry about how to enter on-the-fly boot-time kernel options later.

Yes as far as i know, the requirements for the EFI partition stay the same, the kernel just functions as an EFI application itself.

Thanks. I know you guys have said that ("the kernel just functions as an EFI application itself") a half-dozen times in this thread alone, but that statement is so mind-blowing that I've had trouble taking it in.

Next thing I know, you're going to be saying that there is a Santa Claus, after all. smile


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#46 2012-04-19 12:29:12

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved]The linux kernel with build in bootloader?

I patched my kernel with the efi config file patch and it works perfectly, the UEFI firmware boots the kernel directly without having to load a UEFI Shell or a bootloader. big_smile

# ls -l /boot/efi/boot/
total 7244
-rwxr-xr-x 1 root root 3324176 Apr 19 14:20 bootx64.efi
-rwxr-xr-x 1 root root 4092145 Apr 19 14:20 initramfs-linux.img
-rwxr-xr-x 1 root root     126 Apr 19 14:20 linux.conf
# cat /boot/efi/boot/linux.conf 
root=/dev/mapper/crypt cryptdevice=/dev/sda3:crypt ro quiet initrd=\efi\boot\initramfs-linux.img

the best thing about this is that I can now do this: big_smile

# pacman -R syslinux

only bad news: as far as I can see the patch didn't make it into 3.4 sad

Offline

#47 2012-04-19 16:40:19

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

65kid wrote:

I patched my kernel with the efi config file patch and it works perfectly, the UEFI firmware boots the kernel directly without having to load a UEFI Shell or a bootloader. big_smile

# ls -l /boot/efi/boot/
total 7244
-rwxr-xr-x 1 root root 3324176 Apr 19 14:20 bootx64.efi
-rwxr-xr-x 1 root root 4092145 Apr 19 14:20 initramfs-linux.img
-rwxr-xr-x 1 root root     126 Apr 19 14:20 linux.conf
# cat /boot/efi/boot/linux.conf 
root=/dev/mapper/crypt cryptdevice=/dev/sda3:crypt ro quiet initrd=\efi\boot\initramfs-linux.img

the best thing about this is that I can now do this: big_smile

# pacman -R syslinux

only bad news: as far as I can see the patch didn't make it into 3.4 sad

Thanks for the report. I'll try this this weekend. Meanwhile, a pre-patched efi config enabled kernel would be a cool thing to see on the AUR, if anybody is so inclined.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#48 2012-04-19 16:53:48

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [Solved]The linux kernel with build in bootloader?

dhave wrote:

Thanks for the report. I'll try this this weekend. Meanwhile, a pre-patched efi config enabled kernel would be a cool thing to see on the AUR, if anybody is so inclined.

I will upload an AUR package tomorrow.

Offline

#49 2012-04-19 17:27:28

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

65kid wrote:

I patched my kernel with the efi config file patch and it works perfectly, the UEFI firmware boots the kernel directly without having to load a UEFI Shell or a bootloader. big_smile
(

I'm getting an error when I try to apply the patch you linked:

patching file arch/x86/boot/compressed/eboot.c
Hunk #1 FAILED at 486.
patch: **** malformed patch at line 28: handle_ramdisks(efi_loaded_image_t *image,

I can't seem to track down the problem. Any ideas?

EDIT: I'm pretty sure these are trivial formatting problems.

Last edited by dhave (2012-04-19 18:34:57)


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

#50 2012-04-19 17:52:08

dhave
Arch Linux f@h Team Member
From: Outside the matrix.
Registered: 2005-05-15
Posts: 1,112

Re: [Solved]The linux kernel with build in bootloader?

65kid wrote:
dhave wrote:

Thanks for the report. I'll try this this weekend. Meanwhile, a pre-patched efi config enabled kernel would be a cool thing to see on the AUR, if anybody is so inclined.

I will upload an AUR package tomorrow.

Thanks. I'll look forward to that, especially since I'm botching the patch job.


Donate to Arch!

Tired? There's a nap for that. --anonymous

Offline

Board footer

Powered by FluxBB