Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Syslinux - A Simple Alternative Bootloader
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
anbc
n00b
n00b


Joined: 26 Jul 2013
Posts: 47

PostPosted: Fri Jul 26, 2013 1:59 pm    Post subject: Syslinux - A Simple Alternative Bootloader Reply with quote

Default bootloader choices for no-multilib amd64 users include grub-static and lilo according to gentoo amd64 install guide.

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1#book_part1_chap4
Quote:
... If you are using a non-multilib profile, you should not emerge grub, but instead you should emerge grub-static.
If you plan to use a non-multilib profile and you have disabled IA-32 emulation in your kernel, then you should use lilo.

In reality Syslinux seems a better choice though; it's simple to setup and the configuration is a breeze compared to the competition.

Here's a simple example setup...
Architecture =64bit no-multilib
kernel IA-32 emulation = none
partition table = MBR
root directory = ext4 (/dev/sda1)
no separate /boot partiton
kernel framebuffer = vesafb
video card = nvidia


INSTALL
# emerge syslinux
# mkdir /boot/syslinux
# extlinux --install /boot/syslinux
# dd bs=440 count=1 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sda

SILENT BOOT CONFIGURATION
# nano /boot/syslinux/syslinux.cfg
Code:
 PROMPT 0
 TIMEOUT 0
 DEFAULT gentoo
 
 LABEL gentoo
         LINUX ../bzImage-3.10.3-gentoo-r1
         APPEND root=/dev/sda1 vga=865 ro quiet consoleblank=0

Configuration details:
1. Boot prompt is turned off (PROMPT 0)
2. Immediate boot ( TIMEOUT 0)
3. Non KMS Framebuffer = vesafb 1280x800x32 (vga=865) :: for a 1920x1080 lcd monitor

That's all there is to it!! The boot process is fast and good to look at, too :-)

For GPT disks, other filesystems and KMS alternatives checkout the original Arch Linux Wiki on Syslinux
https://wiki.archlinux.org/index.php/Syslinux
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 117
Location: Finland

PostPosted: Sun Jul 28, 2013 1:14 pm    Post subject: Reply with quote

This didnt work for me. It didnt boot up at all so i chrooted and reinstalled grub2.

Now i have this file i cant remove.
# ls -lah /boot/syslinux/
total 68K
drwxr-xr-x 2 root root 4.0K 27.7. 21:01 .
drwxr-xr-x 4 root root 4.0K 27.7. 16:59 ..
-r--r--r-- 1 root root 57K 27.7. 17:00 ldlinux.sys
# rm -rf /boot/syslinux/
rm: cannot remove ‘/boot/syslinux/ldlinux.sys’: Operation not permitted

EDIT: I got it removed.
# chattr -i ldlinux.sys
# rm ldlinux.sys
_________________
koti.kapsi.fi/deferi
Back to top
View user's profile Send private message
anbc
n00b
n00b


Joined: 26 Jul 2013
Posts: 47

PostPosted: Sun Jul 28, 2013 2:56 pm    Post subject: Reply with quote

defer- wrote:
This didnt work for me...


I'd have looked at the arch wiki again and tried to work out where I went wrong.
If you go further and combine syslinux with systemd the results are even better!
However, if you're able to use grub2 (you have IA32 emulation) then sticking with it seems reasonable...
Back to top
View user's profile Send private message
rorgoroth
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 221
Location: England, UK

PostPosted: Sun Jul 28, 2013 3:46 pm    Post subject: Reply with quote

Not sure if this is on the Arch Wiki page (All I could be bothered to do is a quick 'find' for "compression").

Anyway, sys/extlinux does not cope well reading a config file on compressed file systems, so for example if you edit your config again after installing (the install done without compression enabled) or you convert say your ext4 partitions to btrfs and enable compression then later edit the config your next boot will fail. Quickest escape if you fall in this hole is probably to boot up live disk like sysrescuecd, mount the partition and edit the config that way since it wont use the compression mount options by default.

Of course this assumed you have btrfs /boot or /boot on /.


Also, I'll post my config file and the files I needed to copy from /usr/share/syslinux to make it work.

Config:
Code:
 UI vesamenu.c32
 DEFAULT gentoo
 PROMPT 0
 MENU TITLE Welcome to Gentoo.Mastodon
 MENU BACKGROUND bkgrnd.png
 TIMEOUT 50
 
 MENU WIDTH 78
 MENU MARGIN 4
 MENU ROWS 5
 MENU VSHIFT 10
 MENU TIMEOUTROW 13
 MENU TABMSGROW 11
 MENU CMDLINEROW 11
 MENU HELPMSGROW 16
 MENU HELPMSGENDROW 29
 
 MENU COLOR border       30;44   #40ffffff #a0000000 std
 MENU COLOR title        1;36;44 #9033ccff #a0000000 std
 MENU COLOR sel          7;37;40 #e0ffffff #20ffffff all
 MENU COLOR unsel        37;44   #50ffffff #a0000000 std
 MENU COLOR help         37;40   #c0ffffff #a0000000 std
 MENU COLOR timeout_msg  37;40   #80ffffff #00000000 std
 MENU COLOR timeout      1;37;40 #c0ffffff #00000000 std
 MENU COLOR msg07        37;40   #90ffffff #a0000000 std
 MENU COLOR tabmsg       31;40   #30ffffff #00000000 std
 
LABEL gentoo
      MENU LABEL Gentoo Linux
      LINUX /boot/vmlinuz
      APPEND root=/dev/sda1 ro quiet init=/usr/lib/systemd/systemd

LABEL gentoo1
      MENU LABEL Gentoo Linux Prev
      LINUX /boot/vmlinuz-old
      APPEND root=/dev/sda1 ro quiet init=/usr/lib/systemd/systemd


/boot/extlinux/:
Code:
.   extlinux.conf  libcom32.c32  memdisk   bkgrnd.png
..  ldlinux.c32    libutil.c32    menu.c32  vesamenu.c32
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum