SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-03-17 07:43:07

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

How to boot faster replacing Grub2 with Syslinux

WARNING
While this works for me this is an advanced procedure. If you have never had to boot a computer off a live-cd and chroot into your hard-drive, then this might put you in a sketchy place that you don't want to be at and have no experience in fixing. I am almost certain i remembered every step and i have tried to be as diligent as possible in the creation of this write-up but i am still just some guy from the internet.

If your still reading I assume that that you are an intermediate or above user and won't be simplifying things too much.

Are you a candidate for this tutorial?

  1. Are you only using EXT 2/3/4 or BTRFS?

  2. You are using a BIOS not UEFI

  3. Do you single boot your Debian/#! install

  4. Do you want a screaming fast no-menus no-options no-memtest no-nothing git-er-dun boot?

  5. Do you have root access?

Background
Syslinux is the very small fast and lightweight bootloader used on many live-cd's. Just because it works on live cd's does not mean thats all its good for. It is also a great fast boot-loader for desktop instalations

Procedure
Either do this step by step or use the script at the bottom.

become root

sudo $SHELL

Get the software

apt-get install extlinux syslinux-common

Now do come configuring

extlinux --install /boot/extlinux

Double check there is a * next to your boot partition

fdisk -l /dev/sda

Overwrite your MBR that has been molested by grub

cat /usr/lib/extlinux/mbr.bin >/dev/sda

Get my theme (really just a stripped Debian theme)

wget http://pibanglinux.org/pastebin/super.tar.bz2 -O /tmp/super.tar.bz2

unpack the theme

cd /tmp && tar xjfv super.tar.bz2 

Move it into place

cp -r /tmp/super /usr/share/syslinux/themes/

Change the config file to use my theme

sed -i /etc/default/extlinux -e 's#EXTLINUX_THEME="debian"#EXTLINUX_THEME="super"#'

make sure the timeout is a 1 and not a 0

sed -i /etc/default/extlinux -e 's#EXTLINUX_TIMEOUT="1"#EXTLINUX_TIMEOUT="1"#'

EDIT: Dont boot Read only!

sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet"#EXTLINUX_PARAMETERS="quiet"#'

Update extlinux

extlinux-update

Now if the gods love you, you can reboot, using syslinux.
Don't forget to remove grub.


Here is a script that does that for you!

#!/bin/bash
clear
set -e
if [ "$(id -u)" != "0" ]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
echo "Do you REALLY want to do this? (y/N)"
read a
if [[ $a == "Y" || $a == "y" ]]; then
        echo "We gonna do it"
else
        echo "quiting"
        exit 1
fi
apt-get install -y extlinux syslinux-common
extlinux --install /boot/extlinux
clear fdisk -l
echo "Your HD is /dev/sda Right?"
read b
if [[ $b == "Y" || $b == "y" ]]; then
        echo "sweet"
		cat /usr/lib/extlinux/mbr.bin >/dev/sda
else
        echo "Enter the whole path of your HD"
        read DISK
        cat /usr/lib/extlinux/mbr.bin >$DISK
fi
cd /tmp
wget http://pibanglinux.org/pastebin/super.tar.bz2 -O /tmp/super.tar.bz2 
tar xjfv super.tar.bz2 
cp -r /tmp/super /usr/share/syslinux/themes/
sed -i /etc/default/extlinux -e 's#EXTLINUX_THEME="debian"#EXTLINUX_THEME="super"#'
sed -i /etc/default/extlinux -e 's#EXTLINUX_TIMEOUT="1"#EXTLINUX_TIMEOUT="1"#'
sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet"#EXTLINUX_PARAMETERS="quiet"#'
extlinux-update
clear
echo "Do you want to remove Grub2?"
read c
if [[ $c == "Y" || $c == "y" ]]; then
        echo "Removing"
		apt-get remove -y grub-common grub-pc
fi
clear
echo "Do you want to reboot"
read d
if [[ $d == "Y" || $d == "y" ]]; then
        echo "Rebooting"
		sleep 3s && reboot
fi
echo "bye bye"
clear 
exit 0

Licences
My theme is derived from the original Debian theme and is re-released under the GPL. My script is released under the MIT liscence.

Last edited by Super-Nathan (2013-04-05 22:43:52)


#echo "Something useful" > /dev/null

PiBang Linux

Offline

Be excellent to each other!

#2 2013-03-17 19:43:57

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,106

Re: How to boot faster replacing Grub2 with Syslinux

Nice. Thanks.

Offline

#3 2013-03-18 02:22:25

mynis01
#! Die Hard
From: 127.0.0.1
Registered: 2010-07-02
Posts: 1,963

Re: How to boot faster replacing Grub2 with Syslinux

Syslinux works with efi in versions >=6.00 as well. The steps in the tutorial would be a bit different though. You basically just have to have a kernel which is efistub enabled and then stick the kernel and syslinux in /boot/efi/ somewhere and put .efi at the end of a couple of the filenames.

Offline

#4 2013-04-04 11:27:08

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

Tested, The script works great. Just used Waldorf as the base for a new XBMC media center and used this trick.


#echo "Something useful" > /dev/null

PiBang Linux

Offline

#5 2013-04-04 19:00:27

Bradi
#! CrunchBanger
From: Poland
Registered: 2013-01-21
Posts: 114

Re: How to boot faster replacing Grub2 with Syslinux

This looks interesting, I am thinking of trying it. What kind of features does syslinux miss that grub2 has, and can it read an encrypted LVM?

edit: i mean, i fill all five criteria that you posted, but I am afraid that there might be something which seems obvious now, but will turn out that it's actually not supported by syslinux. I don't know much about bootloaders and I am too lazy to read all the documentation 3:]

Last edited by Bradi (2013-04-04 19:06:46)

Offline

#6 2013-04-04 20:33:41

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: How to boot faster replacing Grub2 with Syslinux

Bradi wrote:

This looks interesting, I am thinking of trying it. What kind of features does syslinux miss that grub2 has, and can it read an encrypted LVM?

Yes, but it needs a separate /boot partition.

Offline

#7 2013-04-05 03:45:20

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

el_koraco wrote:
Bradi wrote:

This looks interesting, I am thinking of trying it. What kind of features does syslinux miss that grub2 has, and can it read an encrypted LVM?

Yes, but it needs a separate /boot partition.

Meaning it ONLY needs a seperate /boot partition if you are using encryption. otherwise it is fine

i am not sure what grub can do that syslinux cannot. If you remove grub and update your kernel, apt looks for syslinux afer it looks for grub and it updates fine. you can have multiple menu entrys in syslinux, but with my script we disable all menus to enable faster booting.


#echo "Something useful" > /dev/null

PiBang Linux

Offline

#8 2013-04-05 04:20:45

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 254

Re: How to boot faster replacing Grub2 with Syslinux

This looks interesting, but I'm wondering whether it will make my  high end i7 overclockable + 32gb ram + ssd boot much faster?

Ozi

Offline

#9 2013-04-05 05:15:41

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

Ozitraveller wrote:

This looks interesting, but I'm wondering whether it will make my  high end i7 overclockable + 32gb ram + ssd boot much faster?

Ozi

While I realize you have a fast computer, the big gains come from 2 things:

First there is no timeout in this script. Yes that can be achieved in grub, but it is also achievable here.
Second, if you boot like I do without plymouth (so you can see the init messages) you see for a split second "grub loading" on the top left of the screen. This is a time waster, it is only a half second or so, but it is it also ugly. This eliminates that.

So all in all you are only getting maybe a second at most and half a second at least versus a "configured with no timeout grub setup". For me and my Debian servers it is absolutely worth it. For my laptop? Why not? There is an easy and convienent script (mine) to install it and it works great. Plus all my configs are the same.


#echo "Something useful" > /dev/null

PiBang Linux

Offline

#10 2013-04-05 08:45:33

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 567

Re: How to boot faster replacing Grub2 with Syslinux

Hey there!

i tryed the script you provided but i got:

Do you REALLY want to do this? (y/N)
y
killgrub.sh: 10: killgrub.sh: [[: not found
killgrub.sh: 10: killgrub.sh: y: not found
quiting

but i REALLY wanted to do this!!!
trying it manually and will be right back...

UPDATE: It works fine and saved me.. lets say 5 sec. (out of 20 on my t60)  and a bunch full of uglyness..
but whats up with the theme? i still recieve text-output..

non the less, thanks!

-naik

Last edited by Naik (2013-04-05 11:11:56)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#11 2013-04-05 22:46:57

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

If you have already ran this, you should edit /etc/default/extlinux

I just noticed while running this on one of my servers that i had an extra qoute in the one of the functions and sed didnt run just right. What i put was

sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet""#EXTLINUX_PARAMETERS="quiet"#'

what i need to have was

sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet"#EXTLINUX_PARAMETERS="quiet"#'

so just do this to fix it all

sudo sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet"#EXTLINUX_PARAMETERS="quiet"#' && sudo update-extlinux

#echo "Something useful" > /dev/null

PiBang Linux

Offline

#12 2013-04-05 22:48:34

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

Naik wrote:

Hey there!

i tryed the script you provided but i got:

Do you REALLY want to do this? (y/N)
y
killgrub.sh: 10: killgrub.sh: [[: not found
killgrub.sh: 10: killgrub.sh: y: not found
quiting

but i REALLY wanted to do this!!!
trying it manually and will be right back...

UPDATE: It works fine and saved me.. lets say 5 sec. (out of 20 on my t60)  and a bunch full of uglyness..
but whats up with the theme? i still recieve text-output..

non the less, thanks!

-naik

you SHOULD still get text output from init. For me it starts with "starting early decompress in kernel.........."
you SHOULD NOT get any text from boot menus and the like


#echo "Something useful" > /dev/null

PiBang Linux

Offline

#13 2013-04-06 03:47:49

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 567

Re: How to boot faster replacing Grub2 with Syslinux

  Super-Nathan wrote:

you SHOULD still get text output from init. For me it starts with "starting early decompress in kernel.........."
you SHOULD NOT get any text from boot menus and the like

Ah ok!
I AM NOT getting any sort of boot menu or the like and that`s the bunch of uglyness it saved me!
but i AM getting the prompt starting with TCSl something, makeing filesize-concurent boot-system or the like (i am not aktually able to read it..)

So where is the theme to come into play? I thought it should show up replacing the prompt. Obviously this was wrong, but is there a possibility to have it doing this?
AND what if i want to run -let`s say- memtest86+ befor booting? can i still choose this option?

Thanks -naik

Last edited by Naik (2013-04-06 03:48:41)


*kaum macht man es richtig, funktioniert es sofort*

Offline

#14 2013-04-06 06:23:37

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: How to boot faster replacing Grub2 with Syslinux

Super-Nathan wrote:

Meaning it ONLY needs a seperate /boot partition if you are using encryption. otherwise it is fine

In this case, it needs a separate boot partition if you're using LVM. One thing Grub can do and syslinux can't is boot from a logical volume. This is because Grub puts an entire filesystem in the MBR, while syslinux just places its MBR code and lets it execute the first sector of the active partition (which is really the proper way to do an MBR boot).

Offline

#15 2013-04-06 11:59:57

Bradi
#! CrunchBanger
From: Poland
Registered: 2013-01-21
Posts: 114

Re: How to boot faster replacing Grub2 with Syslinux

Thank you el_koraco and Super-Nathan. I followed the step-by-step guide (didn't use the script) and everything works as described. Now I have a slightly faster boot, but more importantly I don't have to stare at the ugly GRUB menu smile.

Offline

#16 2013-04-06 18:23:37

himmelwr
Member
From: Easton, Pa, USA
Registered: 2013-03-18
Posts: 17
Website

Re: How to boot faster replacing Grub2 with Syslinux

Okay  I tried this but have a big problem now.

When I reboot I am getting the "Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key" error.

When I put in a live usb flash driver, I am able to load the live sessions and even install the os no problem. I cannot get my computer to go to grub though without this error coming up.

Does anyone know what to so?

Offline

#17 2013-04-07 12:54:39

Bradi
#! CrunchBanger
From: Poland
Registered: 2013-01-21
Posts: 114

Re: How to boot faster replacing Grub2 with Syslinux

I don't really know what to do, but I found this guide:

http://crunchbang.org/forums/viewtopic.php?id=15351

Offline

#18 2013-04-07 17:21:59

himmelwr
Member
From: Easton, Pa, USA
Registered: 2013-03-18
Posts: 17
Website

Re: How to boot faster replacing Grub2 with Syslinux

I eventually got it to work with a complete reinstall of the whole hard drive.

Thank you though smile

Offline

#19 2013-04-07 20:42:45

Naik
#! Die Hard
From: Leipzig
Registered: 2012-11-16
Posts: 567

Re: How to boot faster replacing Grub2 with Syslinux

@himmelwr: I was rescued by the Super-GRUB-Disk* several times when getting this prompt. It is able find any bootable partition and boot it. So you could get into your system again try to get things straight without having to reinstall the whole hard-drive.

*i think anyone should have one ;-)

greetz -naik


*kaum macht man es richtig, funktioniert es sofort*

Offline

#20 2013-04-19 11:33:44

Super-Nathan
#! CrunchBanger
From: South Korea
Registered: 2009-12-18
Posts: 158
Website

Re: How to boot faster replacing Grub2 with Syslinux

@ Bradi:
I am so glad it worked for you!

@ Others:

I am sorry, i have done this all with the same script on every computer I own at this point, so i wish i knew what was different with your installs...........


#echo "Something useful" > /dev/null

PiBang Linux

Offline

#21 2013-04-19 13:28:42

DebianJoe
#! Code Whisperer
From: The Bleeding Edge
Registered: 2013-03-13
Posts: 1,207
Website

Re: How to boot faster replacing Grub2 with Syslinux

I like it.  I've been using syslinux for some time and actually prefer to syntax to grub.  Thanks for sharing your scripts.  There are a few factors that can cause syslinux to run into major issues.  Himmelwr, were you multi-booting previously?  If so, what distros?

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo