LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-31-2016, 11:16 AM   #1
mps_ul
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Rep: Reputation: Disabled
booting from btrfs with extlinux not working


Hi there!
I have a fresh 14.2 installation with / on a btrfs partition and try to get extlinux to work. I have done something similar in the past but I am not shure what I am doing wrong this time...

Some facts about the system and what I have done so far:
  • old BIOS system, nothing special here
  • /dev/sdb1 is used as /, no seperate partition for /boot/
  • /dev/sdb1 was created with plain mkfs.btrfs with no options
  • mbr.bin from the syslinux directory was dd'ed to /dev/sdb
  • I created a directory /boot/syslinux
  • I ran
    Code:
    extlinux -i /boot/syslinux
    which didn't complain and just replied something like /boot/syslinux is on /dev/sdb. It did not put any files there, though. I m not shure if this is the intended behaviour.
  • /dev/sdb1 is marked as boot partition in fdisk
  • I have copied all *.c32 files into /boot/syslinux as some tutorials suggest
  • I have created a file named extlinux.conf in /boot/syslinux it reads like this:
    Code:
    TIMEOUT 1000
    UI menu.c32
    
    MENU TITLE Slackboot
    
    LABEL slack_huge_1
    	MENU LABEL Slack Huge 1
    	LINUX /boot/vmlinuz-huge
    
    LABEL slack_huge_2
    	MENU LABEL Slack Huge 2
    	LINUX /boot/vmlinuz-huge

This configuration might or might not work, but I am not even getting to the menu. When I am trying to boot the system, I am greeted with the line
Code:
SYSLINUX 4.07 EDD 2013-07-25 [...copyright notice...]
and nothing more happens. No prompt, no menu, no reaction on any keyboard input.
Now I am looking for a way to debug this and to understand where extlijnux is stuck and why.

Thanks in advance,
mps
 
Old 07-31-2016, 05:32 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Welcome to LQ!
I'm not clear on what is your goal here.
Why can you not simply do a normal installation and boot from your btrfs / using lilo?
There should be no need to use syslinux, and besides:

Quote:
man extlinux

...extlinux - install the SYSLINUX bootloader on a ext2/ext3 filesystem...

Last edited by STDOUBT; 07-31-2016 at 05:38 PM.
 
Old 07-31-2016, 06:09 PM   #3
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by STDOUBT View Post
Why can you not simply do a normal installation and boot from your btrfs / using lilo?
I don't believe lilo supports booting from btrfs. If you want btrfs as the root partition, you'll want to use an ext partition for /boot/.
 
Old 08-03-2016, 07:52 AM   #4
mps_ul
LQ Newbie
 
Registered: Jul 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi!
Quote:
Originally Posted by STDOUBT View Post
Why can you not simply do a normal installation and boot from your btrfs / using lilo?
To be honest: I did not check if LILO supports BTRFS before installing because I remembered that extlinux was the only sane option the last time I installed on BTRFS. After some googling now, it doesn't seem like this has changed.

The man-page for extlinux is not precise in this case, it is in fact meant to be used for BTRFS (so says the project homepage and also slackdocs)

I am quite confident about the general idea, I am just not shure what I did wrong and how to analyze it.

mps
 
Old 08-03-2016, 09:24 AM   #5
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

I've been recently struggling with extlinux, but I finally managed to have it working.
I can't spot possible errors in your installation procedure, but I'll detail you mine, that works for me.

Please note that I'm not using menus, just text prompt.
Also, instead of installing under /boot/syslinux I install under /boot.
In my example, I'm using /dev/sda, so make sure to adjust for it.

Code:
$ extlinux --install /boot
$ dd count=1 bs=440 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sda
I believe that upon successful installation, you should have the following file in your install dir:
Code:
$ ls -l /boot/ldlinux.sys 
-r--r--r-- 1 root root 37888 Dec 14  2015 /boot/ldlinux.sys
And then config reads like that:
Code:
$ cat /boot/syslinux.cfg 
PROMPT  1
TIMEOUT 5
DEFAULT vmlinuz-generic

LABEL vmlinuz-huge
  KERNEL vmlinuz-huge
  APPEND ro root=/dev/sda2

LABEL vmlinuz-generic
  KERNEL vmlinuz-generic
  APPEND ro
  INITRD initrd.gz
Please note that I didn't specify the full path to the kernel and initrd. This is really important when your rootfs is using unsupported (by extlinux) file system. The path to the kernel has to be relative to where the syslinux.cfg is placed. So, for simplicity reasons, I install everything under /boot. I have removed lilo/grub packages from my system, to the /boot directory looks clean ;-) :
Code:
$ ls -l /boot
total 26588
lrwxrwxrwx 1 root root      37 Jun 21 10:24 README.initrd -> /usr/doc/mkinitrd-1.4.8/README.initrd
lrwxrwxrwx 1 root root      22 Jun 25 10:22 System.map -> System.map-huge-4.4.14
-rw-r--r-- 1 root root 2725240 Jun 24 20:31 System.map-generic-4.4.14
-rw-r--r-- 1 root root 3958084 Jun 24 20:38 System.map-huge-4.4.14
lrwxrwxrwx 1 root root      18 Jun 25 10:22 config -> config-huge-4.4.14
-rw-r--r-- 1 root root  159775 Jun 24 20:31 config-generic-4.4.14
-rw-r--r-- 1 root root  159775 Jun 24 20:38 config-huge-4.4.14
-rw-r--r-- 1 root root 7208762 Jul 30 18:10 initrd.gz
-rw-r--r-- 1 root root  946176 Jul  7 00:28 intel-ucode.cpio
-r--r--r-- 1 root root   37888 Dec 14  2015 ldlinux.sys
-rw-r--r-- 1 root root     319 Jul 31 03:44 syslinux.cfg
lrwxrwxrwx 1 root root      19 Jun 25 10:22 vmlinuz -> vmlinuz-huge-4.4.14
lrwxrwxrwx 1 root root      22 Jun 25 10:22 vmlinuz-generic -> vmlinuz-generic-4.4.14
-rw-r--r-- 1 root root 4377248 Jun 24 20:31 vmlinuz-generic-4.4.14
lrwxrwxrwx 1 root root      19 Jun 25 10:22 vmlinuz-huge -> vmlinuz-huge-4.4.14
-rw-r--r-- 1 root root 7630144 Jun 24 20:38 vmlinuz-huge-4.4.14
EDIT:

It's important to flag the boot partition bootable. I'm writing this for the record, because you said you've marked yours bootable.

--
Best regards,
Andrzej Telszewski

Last edited by atelszewski; 08-03-2016 at 09:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with booting Ubuntu 14.04 from a btrfs partition slazerezals Linux - Software 5 05-01-2014 05:08 PM
LXer: Rollback To A Working State With btrfs + apt-btrfs-snapshot On Ubuntu 12.10 LXer Syndicated Linux News 0 11-25-2012 10:42 AM
[SOLVED] Booting of different distros from extlinux floppy_stuttgart Linux - Distributions 5 12-10-2011 05:54 AM
LXer: Booting Linux With the New EXTLINUX LXer Syndicated Linux News 0 08-11-2010 04:41 AM
Booting Ubuntu Linux from Btrfs Kenny_Strawn Ubuntu 1 02-16-2010 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration