Bedrock Linux itself is largely agnostic of which bootloader you choose to use. Syslinux installation is documented here rather than another bootloader primarily due to the fact it is relatively simple and easy to set up by hand. If you would prefer a different bootloader, such as GRUB or LILO, and you are confident you are able to set it up (with documentation from another source), you are welcome to use another bootloader. If you are dual booting with another operating system which has its own bootloader and you know how to add Bedrock Linux to the other operating system's bootloader, you are welcome to do that as well. If you are able to setup the system without a bootloader (e.g. leveraging EFI), that too is fine.
Syslinux is both the name of a project which contains multiple bootloaders and the name of one of the bootloaders within the project. If you are using ext2, ext3, ext4 or BTRFS as your filesystem, the "extlinux" bootloader from Syslinux should suffice. If you are using another filesystem, you can either look at another member of the Syslinux family which supports your filesystem or find a completely different bootloader. If you do choose to use a different syslinux bootloader, the steps should be largely the same, replacing "extlinux" with the bootloader of choice.
Download Syslinux from the official syslinux website. Be sure to read the specific pages for the given release in case there are any known issues. You should probably at least skim the contents of the doc/ directory in the tarball as well. If you are using BTRFS, you need at least version 4.0.
Note: These instructions were written for Syslinux 6.01. 6.02 has been found
to have issues
chain.c32. 6.03 has been released since this document was
written, but it has not yet been tested.
Unpackage syslinux and change directories into the extlinux subdirectory in it:
Next, compile as a non-root user. If you are making this for non-EFI systems run:
If you are making it for 32-bit EFI systems, run:
Or, if you are making it for 64-bit EFI systems, run:
Remember which choice you made here, as you will need that information later.
You may receive an error about lacking
uuid-dev or some other
packages. If so, install those packages and try again.
You should now have an
extlinux executable somewhere.
Once it has successfully compiled, switch to a root user and set a new variable indicating the location of the unpackaged source:
If you do not have a
$ROOTFS variable pointing to the Bedrock Linux mount
point from the installation instructions, make one:
Make a directory to install extlinux into:
As root with the ROOTFS variable set,
cd to the directory containing the
extlinux executable and then install it into Bedrock Linux:
Although syslinux is installed on the partition, it still needs to be properly
set up on the harddrive itself. Find the corresponding device file for device
you made bootable when you partitioned/formatted earlier. Note that here we
aren't looking for the partition device file -
/dev/sd - but rather the
device's file -
/dev/sd. There should be no 0-9 digit in the filename. As
Find the mbr.bin
If there are multiple results - one for each bios, efi32 and efi64 - use the one corresponding to which system you are using.
cd into the directory containing
mbr.bin. Copy it over the desired drive's
master boot record. Be very careful here.
X# change X accordingly
Syslinux will need additional support files. You may read syslinux's documentation for what each of these do; however, unless you are short on disk space, it may be easiest to simply grab all of them. Again, like with mbr.bin, if there are multiple groups of results we want those corresponding to to your earlier choice of bios vs efi32 vs efi64. First, find the bios directory:
Next, copy all of the files ending in
.c32 in this directory into the
extlinux install directory.
Now you should create the configuration file for syslinux. Unlike GRUB, syslinux must be configured by hand. Assuming you want a graphical menu, run the following to get a basic menu in syslinux:
cat > $ROOTFS/boot/extlinux/extlinux.conf << EOF
UI menu.c32MENU TITLE Syslinux Bootloader DEFAULT bedrock PROMPT 0 TIMEOUT 50 LABEL bedrock MENU LABEL Bedrock Linux 1.0beta2 Nyla LINUX ../
XNquiet rw init=/bedrock/sbin/brn
Consider changing the following:
/dev/sdto the partition you set to boot - either Bedrock's main/root partition or its
/bootpartition if you made one.
vmlinuz-KERNEL-VERSIONto the filename of a kernel image installed into
$ROOTFS/boot. If you don't have any yet, you should get at least one during the installation instructions - once you've done that update this file.
INITRD ../initrd.img-VERSIONto the initrd you are using, if any. If you don't have any yet you probably will acquire at least one during later installation instructions. Update this file at that time.
vesamenu.c32for a fancier menu or remove the
line completely for a command line interface.
If you would like to dual-boot with another operating system such as Windows, append the following:
cat >> /mnt/bedrock/boot/extlinux/extlinux.conf << EOF LABEL
LABEL NAMEMENU LABEL
Operating System NameCOM32 chain.c32 APPEND hd
Consider changing the following from this addition:
LABEL NAMEis what Syslinux refers to this item - something short and simple such as "win7" should suffice.
Operating System Nameis what you will see for the item in the menu if you are using
vesamenu.c32. Something such as "Windows 7" should be fine.
hdrefers to the hard drive (the first number) and partition (the second number) on which the bootloader you are chainloading is installed. It appears both numbers are zero-indexed, but if this does not work for you try with them either or both of them being one-indexed. For example, if the target operating system's bootloader is on
/dev/sda1(the first partition on the first harddrive), you will want
You should now have the syslinux bootloader installed. If it does not seem to work, consider installing a different syslinux release or trying out another bootloader.