The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Extlinux"
(→GPT) |
|||
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= What is | == What is extlinux? == | ||
{{Warning|with e2fsprogs-1.43, mke2fs have the metadata_csum and 64bit features enabled by default. Extlinux does not support booting from partitions formatted with 64-bit ext4. Users have to edit <code>/etc/mke2fs.conf</code> to disable this features '''before''' partioning drive. Otherwise, extlinux will not boot. Ref. [1], [2].}} | |||
extlinux is a simple and modern bootloader and is a part of the syslinux tools. Installation is simple and fast, in Funtoo the configuration is easily automated. | |||
= Installing extlinux = | |||
<console> | <console> | ||
# ##i##emerge syslinux | # ##i##emerge syslinux | ||
</console> | </console> | ||
This will install complete syslinux suite, including <code>extlinux</code>. | |||
== Using extlinux == | |||
== | |||
<console> | <console> | ||
# ##i##install -d /boot/extlinux | # ##i##install -d /boot/extlinux | ||
# ##i##extlinux --install /boot/extlinux | # ##i##extlinux --install /boot/extlinux | ||
</console> | </console> | ||
The next steps are different depending on if you use an MBR or GPT setup and the HDD you installed on and want to boot from. Let us assume that <tt>/dev/sda</tt> is the drive you will be booting from. | |||
=== MBR === | === MBR === | ||
If you set up your disk with MBR partition scheme | If you set up your disk with a MBR partition scheme, run the following: | ||
<console> | <console> | ||
Line 42: | Line 29: | ||
=== GPT === | === GPT === | ||
On the other hand, if you te up your disk using GPT, run these commands: | |||
<console> | <console> | ||
Line 54: | Line 43: | ||
== Setting up the Kernel == | == Setting up the Kernel == | ||
=== The extlinux.conf === | |||
For other kernels, like those created by genkernel or by the binary USE-flag you need to edit your config by yourself. Just open <tt>/boot/extlinux/extlinux.conf</tt> in your favorite editor: | |||
For other kernels, like those created by genkernel or by the binary USE-flag you need to edit your config by yourself. Just open /boot/extlinux/extlinux.conf in your favorite editor | |||
{{file|name=/boot/extlinux/extlinux.conf|desc= |body= | |||
TIMEOUT 30 | TIMEOUT 30 | ||
UI menu.c32 | UI menu.c32 | ||
Line 118: | Line 61: | ||
INITRD /<initramfs> | INITRD /<initramfs> | ||
APPEND rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap | APPEND rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap | ||
}} | |||
That's all | That's all. You are now ready for boot. You can also define several LABELs in that list to have multiple kernel selections to choose from before booting. | ||
* [1] http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=cd27af3ecb83e8fd1e3eaa14994284a1818c7c15 | |||
* [2] https://bugzilla.redhat.com/show_bug.cgi?id=1099237 | |||
[[Category:HOWTO]] | [[Category:HOWTO]] | ||
[[Category:Bootloaders]] |
Latest revision as of 18:09, December 27, 2017
What is extlinux?
with e2fsprogs-1.43, mke2fs have the metadata_csum and 64bit features enabled by default. Extlinux does not support booting from partitions formatted with 64-bit ext4. Users have to edit /etc/mke2fs.conf
to disable this features before partioning drive. Otherwise, extlinux will not boot. Ref. [1], [2].
extlinux is a simple and modern bootloader and is a part of the syslinux tools. Installation is simple and fast, in Funtoo the configuration is easily automated.
Installing extlinux
root # emerge syslinux
This will install complete syslinux suite, including extlinux
.
Using extlinux
root # install -d /boot/extlinux root # extlinux --install /boot/extlinux
The next steps are different depending on if you use an MBR or GPT setup and the HDD you installed on and want to boot from. Let us assume that /dev/sda is the drive you will be booting from.
MBR
If you set up your disk with a MBR partition scheme, run the following:
root # dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda root # cp /usr/share/syslinux/menu.c32 /boot/extlinux/ root # cp /usr/share/syslinux/libutil.c32 /boot/extlinux/ root # touch /boot/extlinux/extlinux.conf
GPT
On the other hand, if you te up your disk using GPT, run these commands:
root # sgdisk /dev/sda --attributes=1:set:2 root # sgdisk /dev/sda --attributes=1:show 1:2:1 (legacy BIOS bootable) root # dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda root # cp /usr/share/syslinux/menu.c32 /boot/extlinux/ root # cp /usr/share/syslinux/libutil.c32 /boot/extlinux/ root # touch /boot/extlinux/extlinux.conf
Setting up the Kernel
The extlinux.conf
For other kernels, like those created by genkernel or by the binary USE-flag you need to edit your config by yourself. Just open /boot/extlinux/extlinux.conf in your favorite editor:
/boot/extlinux/extlinux.conf
TIMEOUT 30
UI menu.c32
MENU TITLE Boot Menu
MENU COLOR title 1;37;40
MENU COLOR border 30;40
MENU COLOR unsel 37;40
LABEL funtoo1
MENU LABEL Funtoo Linux KERNEL-VERSION
LINUX /<kernel>
INITRD /<initramfs>
APPEND rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap
That's all. You are now ready for boot. You can also define several LABELs in that list to have multiple kernel selections to choose from before booting.