Author Topic: Replacing Grub With Syslinux  (Read 8838 times)

lwfitz

  • DEFCON 1
  • Posts: 1761
  • sudo rm -rf /
    • View Profile
Replacing Grub With Syslinux
« on: January 17, 2013, 08:28:16 PM »
A number of our users have expressed their disdain towards Grub so to keep them happy here is how to replace Grub with extlinux which is one of the many spinoffs of syslinux and is quite often used in booting live disks.
As always before making any major changes to a system its a good idea to have a backup and I always like to keep a super grub disk around just in case something goes haywire, I will still be able to boot into my system and repair it.

Remove grub and Install extlinux (remember all this must be done as root)

Code: [Select]
sudo su
Code: [Select]
apt-get remove grub-common
Code: [Select]
apt-get install extlinux syslinux-common
Code: [Select]
extlinux --install /boot/extlinux

Make sure your /boot partition is flagged as bootable

A bootable partition will have an * in the boot column

Code: [Select]
fdisk -l /dev/sda
Mine looks like this

Code: [Select]
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2655    21326256   83  Linux               
/dev/sda3            2655       60315   463153950   83  Linux                 
/dev/sda2           60315       60802     3911827   82  Linux swap


If there is no boot partiton flagged you can fix that with a tool such as gparted





At this point if you never had any other bootloader installed on your system then you should be able to reboot, but if you are replacing another loader such as any version of grub or lilo then if has  probably overwritten the disk's master boot record (MBR). Even if you told it not to. If so, you'll need to replace the grub/lilo code with a more standard MBR. There's one that comes with extlinux, and you can install it like this:

Code: [Select]
cat /usr/lib/extlinux/mbr.bin >/dev/sda

Exltlinux is now installed and you can reboot but there will not be any menu.



Setting up a boot menu

Extlinux needs extra code to display a menu and on  Debian, that code comes from the syslinux-common package rather than the extlinux package, which is why we installed both packages. Copy the menu files into place:

Code: [Select]
cp /usr/lib/syslinux/*menu* /boot/extlinux
If you are dual booting with any other OS you will also need the chainloader

Code: [Select]
cp /usr/lib/syslinux/chain.c32 /boot/extlinux
The menu is auto added now by running

Code: [Select]
sudo extlinux-update
If you have a windows bootable partition this will also add that portion of the menu just like grub does.

Themes

Themes are located in /usr/share/syslinux/themes/ and to change your theme you will edit /etc/default/extlinux

Mine looks like

Code: [Select]
## /etc/default/extlinux - configuration file for extlinux-update(8)

EXTLINUX_UPDATE="true"

EXTLINUX_ALTERNATIVES="default recovery"
EXTLINUX_DEFAULT="l0"
EXTLINUX_ENTRIES="all"
EXTLINUX_MEMDISK="true"
EXTLINUX_MEMDISK_DIRECTORY="/boot"
EXTLINUX_MENU_LABEL="VSIDO GNU/Linux, kernel"
EXTLINUX_OS_PROBER="true"
EXTLINUX_PARAMETERS="ro quiet"
EXTLINUX_ROOT="root=/dev/sda1"
EXTLINUX_THEME="vsido"
EXTLINUX_TIMEOUT="50"

Change the line

Code: [Select]
EXTLINUX_THEME="vsido"
to the theme name that you want


Extlinux can display custom y image backgrounds, start with a 640x480 image then move up in resolution to see what works for you. Originally an upgraded resolution worked for me but after a couple boots my background image disappeared. The only resolution I can use that seems to be stable is 640x480.

Here is my VSIDO extlinux theme if anyone is interested

Just extract that file and copy the extracted folder to /usr/share/syslinux/themes/

After making any changes to your theme or extlinux settings you will need to run

Code: [Select]
sudo extlinux-update



VastOne

  •      v-ger
  • Posts: 4129
    • View Profile
    • VSIDO Community
Re: Replacing Grub With Syslinux
« Reply #1 on: January 17, 2013, 08:34:03 PM »
Very nice and informative How To lwfitz! 

Thank you!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Sector11

  • Posts: 870
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #2 on: January 17, 2013, 08:46:45 PM »
We need a "Cool Beans Icon" or a "10000 Cookie Icon"

For now this will have to do: Cookies10000

Someday I might try it ... don't tell my wife though, she'd have my skin hanging on the wall.  :D
Stay Home

jedi

  • DEFCON 1
  • Posts: 1594
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Replacing Grub With Syslinux
« Reply #3 on: January 17, 2013, 09:47:57 PM »
 ;D Wow lwfitz!  Wow!  This is great.  I'll be doing this tonight...  Thanks for the great How To...
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

lwfitz

  • DEFCON 1
  • Posts: 1761
  • sudo rm -rf /
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #4 on: January 17, 2013, 10:17:38 PM »
Thanks guys  :)

Im working on a nice theme that maybe can be used as the default if your interested VastOne

Sector11

  • Posts: 870
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #5 on: January 17, 2013, 10:29:47 PM »
I'm curious.... ( looking for justification maybe )

   1. What advantages are there with Syslinux over Grub?
   2. Why don't Linux Distros in general use it?


Stay Home

lwfitz

  • DEFCON 1
  • Posts: 1761
  • sudo rm -rf /
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #6 on: January 17, 2013, 11:07:00 PM »
I'm curious.... ( looking for justification maybe )

   1. What advantages are there with Syslinux over Grub?
   2. Why don't Linux Distros in general use it?

Well for me, I did it because dizzie wouldnt shut up about how crappy grub is.......

But to answer your question......

I noticed a definite increase in my boot up time (about 6seconds) and the comfiguration files are a bit more straight forward (at least for me) than grub2.

Grub is pretty much an automated install where as with syslinux there is some editing of config files to get things working.
I could be wrong but syslinux seems to be a bit more configurable also.

Why its not used more? I dont have any clue :D

Sector11

  • Posts: 870
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #7 on: January 18, 2013, 02:10:06 AM »
Well for me, I did it because dizzie wouldnt shut up about how crappy grub is.......

  :D  Now that's honesty!  :D

Why its not used more? I dont have any clue :D

I may have to give this some serious consideration.  I remember when GRUB had files one could tweak, changing the names of things if you wanted.  My "Windows" entry because: "W2K" - then they changed this, hid everything and says - "Now you do it our way!" {well, OK, not really but you get my drift}
Stay Home

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #8 on: January 18, 2013, 08:00:44 PM »
Well for me, I did it because dizzie wouldnt shut up about how crappy grub is.......
Yeah!  ;D
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #9 on: January 18, 2013, 08:03:42 PM »
With Syslinux i have access to : Linux, Hackintosh, and FreeBSD  ;D
With Grub2 i have access to : Anger and agony  >:(
*gives lwfitz a cookie and a glass of cold milk*  8)
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


apprentice

  • Posts: 12
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #10 on: January 19, 2013, 08:37:50 PM »
thanks fitz

if im starting from a blank slate
where does sys/extlinux come from

or do i use grub to install then follow your tut from there?

make sense?

Things turn out best for people who make the best of the way things turn out.

lwfitz

  • DEFCON 1
  • Posts: 1761
  • sudo rm -rf /
    • View Profile
Re: Replacing Grub With Syslinux
« Reply #11 on: January 20, 2013, 02:51:33 AM »
thanks fitz

if im starting from a blank slate
where does sys/extlinux come from

or do i use grub to install then follow your tut from there?

make sense?


Hey apprentice, yeah just install like normal, install updates if any and then install syslinux. If you have any questions just ask