You are not logged in.
Pages: 1
Since kernel 3.3 (sorry wheezy!) it has been possible to boot Debian up without a bootloader by using EFI BOOT STUB loading.
To take advantage of this feature simply create an EFI system partition on your hard drive -- it must be FAT-formatted (FAT32 is best) and some motherboards will only read the partition if it is 512MiB in size.
Then boot up the Arch live ISO in EFI-mode, create a directory and mount the Debian root partition* (/dev/sd<x><y>) to this directory:
sudo mkdir /debian
sudo mount /dev/sd<x><y> /debian
Then mount the EFI system partition (/dev/sd<x><z>) and copy over the Debian kernel image & initramfs:
sudo mount /dev/sd<x><z> /mnt
sudo cp /debian/boot/vmlinuz-<version> /mnt/vmlinuz
sudo cp /debian/boot/initrd.img-<version> /mnt/initrd.img
Then write the NVRAM entry (include any kernel parameters after "ro"):
sudo efibootmgr -d /dev/sd<x> -p <z> -c -L "Debian" -l /vmlinuz -u "root=/dev/sd<x><y> ro initrd=/initrd.img
You may have to tweak the order of the NVRAM entries using:
sudo efibootmgr -o xxxx,yyyy,zzzz
Where "xxxx", "yyyy" & "zzzz" are the bootnumbers of the NVRAM entries.
Then write a post-install script for the Debian kernel to copy over the fresh image and initramfs when the kernel is updated:
# /etc/kernel/postinst.d/zz-update-efistub
#!/bin/sh
mount /dev/sd<x><z> /mnt
cp /vmlinuz /initrd.img /mnt/
umount -R /mnt
Then make this script executable:
sudo chmod +x /etc/kernel/postinst.d/zz-update-efistub
This method can be used to convert a non-EFI Debian system to boot in EFI-mode.
* If you have a separate /boot partition mount this instead and miss out the leading "/boot" in the subsequent commands.
EDIT: If you are using this guide to convert wheezy/Waldorf (with a backported kernel) to EFI booting, remove the "-R" flag from the `umount` command in the zz-update-efistuib script.
Last edited by Head_on_a_Stick (2015-07-13 17:46:52)
Offline
Great howto
Just debian or any distro with the 3.3+ kernel ?
Offline
Thank you!
It works with anything -- I did it with Slackware 14.1 today.
Although it works best with Debian because of the kernel post-install script -- with other distributions that do not have this feature the kernel image & initramfs would have to be copied over manually whenever the kernel is updated (not very often in Slackware).
Last edited by Head_on_a_Stick (2015-03-08 23:21:04)
Offline
What about dual booting?
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
What about dual booting?
You would have to write a separate NVRAM entry for each system.
For Windows, use:
sudo efibootmgr -d /dev/sd<x> -p <z> -c -L "Windows" -l /Microsoft/EFI/bootmgfw.efi
Offline
I was just asking ... I'm my computer is too old for UEFI
Doesn't stop me from following the HoaS breadcrumbs and reading everything.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
For multi-boot systems, I would recommend gummiboot
I will write a tutorial for that when I have time.
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat