EFI

From noop linux
Jump to: navigation, search

Installation using EFI

It is possible to get noop running on an EFI system, it's just a little tricky at the moment.

The basic steps are:

  • Partition drive ( most likely GPT format )

Here's a super quick reference that will give you a 32 MB EFI partition, and the rest root:

mklabel gpt

mkpart primary fat32 0 32

mkpart primary ext4 32 <insert whatever total size of drive is eg. 107G>

quit


The idea is you need a separate partition at the beginning for EFI binaries.

  • Mount hard drive and install as you normally would, but you also need to mount efi partition as well in /boot/efi

Eg:

Note: sda1 is EFI partition, sda2 is root partition

mount /dev/sda2 /root/hdd

mkdir -p /root/hdd/boot/efi

mount /dev/sda1 /root/hdd/boot/efi

wget nooplinux.org/noop/instlr && chmod +x instlr

./instlr /root/hdd

  • Install bootloader (grub 2)

Make sure efibootmgr is installed, if not then: pkgr -i efibootmgr

and then run something like:

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

This should add grub as an entry in EFI, if it does not you will need to do this manually usually using an EFI shell.

  • Change grub.conf

Add efi modules:

insmod efi_gop

insmod efi_uga

Next, you will need to change the root drive that grub is looking for. The file is at /boot/grub/grub.cfg.

You will need to change it to something like:

set root=(hd1,gpt2)

as well as root=/dev/sda1 to sda2 probably ( gpt2...sda2...should make sense :D )

If you're not sure you can boot into grub's command line mode and type ls to view partitions.

  • Lastly, change fstab to reflect changes

Troubleshooting

  • Virtualbox's EFI settings dissapear

This is a known bug: https://www.virtualbox.org/ticket/11177

Workaround is creating a file in the EFI partition called startup.nsh.

Inside it, it will point to grub's .efi file.

Eg.

/startup.nsh:

FS0:\EFI\grub\grubx64.efi

  • X wont start

For some reason X needs a config file in some cases, when you get to the shell log in as root and try:

X -configure

cp xorg.conf.new /etc/xorg.conf

then restart the display manager, like:

systemctl restart kdm