The officially official Devuan Forum!

You are not logged in.

#1 2017-04-19 21:18:12

fsmithred
Administrator
Registered: 2016-11-25
Posts: 759  

Replace GRUB with alternate bootloader: extlinux

extlinux is a simple bootloader that's part of the syslinux project. (syslinux is for FAT partitions, extlinux is for ext2/3/4 partitions, isolinux is for CD/DVD)

You can easily switch from using grub as a bootloader to using extlinux (and back again if you want).

Run the following commands as root. Replace /dev/sda and /dev/sda1 with the correct drive and partition for your system.
BE SURE YOU NAME THE CORRECT DEVICES!

apt-get install extlinux syslinux-common
mkdir /boot/extlinux
extlinux --install /boot/extlinux
dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sda bs=440 count=1
cp /usr/lib/syslinux/modules/bios/*.c32 /boot/extlinux

Create a boot menu with your favorite text editor, add the following lines and save it as /boot/extlinux/extlinux.conf

ui vesamenu.c32

label devuan
	menu label devuan
	kernel /vmlinuz
	append initrd=/initrd.img ro root=/dev/sda1

Reboot

If you want to add a splash image and 5-second timeout, copy a 640x480 png (or jpg) image named splash.png (or splash.jpg) to /boot/extlinux and add the following lines to extlinux.conf:

ui vesamenu.c32
menu background splash.png
timeout 50

label devuan
	menu label devuan
	kernel /vmlinuz
	append initrd=/initrd.img ro root=/dev/sda1

There are more things you can do with the menu. See syslinux documentation for more information:
http://www.syslinux.org/wiki/index.php?title=Menu


To revert to booting with grub, run

grub-install /dev/sda

Reboot


To switch back to extlinux again:

dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sda bs=440 count=1

Reboot

Offline

#2 2018-03-06 13:47:57

fsmithred
Administrator
Registered: 2016-11-25
Posts: 759  

Re: Replace GRUB with alternate bootloader: extlinux

If you're using gpt with bios, the procedure is slightly different. You may need to do the following steps first.

https://wiki.archlinux.org/index.php/sy … tion_table

GUID partition table

For a GPT, ensure bit 2 of the attributes is set for the /boot partition using gdisk. In other words, the "legacy_boot" flag must be set. Using sgdisk the command is:

# sgdisk /dev/sda --attributes=1:set:2

This would toggle the attribute legacy BIOS bootable on partition 1 of /dev/sda. To check:

# sgdisk /dev/sda --attributes=1:show

 1:2:1 (legacy BIOS bootable)

Then follow the instructions in the first post, except for the dd command.
Change the following

dd if=/usr/lib/EXTLINUX/mbr.bin of=/dev/sda bs=440 count=1

to this:

dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/mbr/gptmbr.bin of=/dev/sda

If you want to use UUID instead of device names in the menu, edit the 'append' line to replace

root=/dev/sda1

with something like

root=UUID=xxxxxxxxxxxxxxxxxxx

(replace xxxxx... with the correct uuid.)

Offline

Board footer