MBR( master boot record) - 4 partitions
To boot mbr you need UEFI set to boot mode: Legacy BIOS.
Dont store kernel and initrd here, store them in /boot on the partition you install the linux os.
EFI partition - FAT16, FAT32 or VFAT
<EFI_SYSTEM_PARTITION>\EFI\
Will read folders from here - and display them in UEFI boot menu
Everyfolder must have a xxx.efi boot file
It also has the BCD (Boot Configuration Data) folder.
To avoid it press SHIFT+F10 at windows setup it opens a cmd :
diskpart
select disk 0
create partition primary
and continue with graphical setup.
select disk 0
bcdboot c:\Windows /l en-GB /s K: /f ALL/s k: = install to k:
Edit grub on windows
list volume
select volume 1
assign letter=z
Right click on start menu - and select PowerSheel (admin)
Type z: then use cd and ls to navigate
To edit grub.cfg type notepad grub.cfg at the proper path
For UEFI you need NVRAM access
ls /sys/firmware/efi/efivars -- NVRAM You dont ussually have it in chroot, so rut it from live media where you have efivars populated. After it createa /EFI/folder/GRUB64.EFI it has to tell NVRAM where to look. Alternative default is /EFI/BOOT/
I like to run grub-install from the live, then after it boots you run it again from your live system.
Most distros will want to install grub in /boot/grub - if you change it, it will break on updates.
--efi-directory=/mnt -- it will install under /mnt/EFI/os_name (Microsoft/Debian/Ubuntu etc)
grub-mkconfig > /mnt/grub/grub.cfg
grub> set root=(hd0,1) grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1 grub> initrd /boot/initrd.img-3.13.0-29-generic grub> boot
optional (insmod part_gpt, insmod chain)
set root=(hd0,gpt1)
use tab after / or after each folder to explore contents - bootmgr is for bios, bootmgfw.efi for uefi.
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
Grub: no suitable video mode found boot in blind mode
insmod all_video
# For booting Microsoft Windows
menuentry "Microsoft Windows 7" {
set root=(hd0,2)
chainloader +1
}
boot
initrd (lo)/artix.initrd.gz
ls (hd0,1)/ +tab = browse partitions
Grub custom font
# Generate a GRUB-compatible font with specified size
# from a TTF (type-type font)
sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono36.pf2 --size=36 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
Some usb sticks are not compatible with bios drivers for high speed usb. Other sticks might work at faster speeds.
For old laptops / pcs:
The Plop Boot Manager is a small program to boot different operating systems.The boot manager has a built-in ide cdrom and usb driver to access that hardware without the help/need of a bios.
https://www.plop.at/en/bootmanager/intro.html
DIRECT BOOT LINUX
lsblk -f
copy vmlinuz and initrd.img to EFI partition (FAT32)
sudo efibootmgr --create --disk /dev/sda --part 1 --label "Debian" --loader '\vmlinuz' --unicode 'root=UUID=e0543f3b-51c7-4c08-93e5-65d1aace36e9 ro acpi_mask_gpe=0x03 mem_sleep_default=s2idle'