|Bootloaders - aaarrghhh||Peter Chant||3/14/13 5:37 PM|
A bit of a rant - as I've been struggling to get a working configuration
after changing some disks around. I have finally achieved a successful
boot, so I'm just getting things off my chest. Perhaps its this machine
as I've always struggled on this one. Or perhaps the common denominator
Firstly I've made life difficult for myself as I've decided to use
btrfs. Also I am using 3.7.7 kernel - btrfs's created by this kernel
cannot be read by a stock Slack 14.0 kernel...
I also put root on a subvolume (so it was not in the default place),
there is no point using btrfs if you don't want to use the useful features.
Partitioned SSD as:
1. 200MB ext4 /boot (for /boot directory)
2. 1GB ext4 / (small install of slack just
(in case it is needed for
3. The rest btrfs / Root for the main install.
Understanding that lilo cannot deal with btrfs as / without putting the
boot directory on a separate non-btrfs file system I created partition 1.
To cut a long story short. None of the following seemed to work with
varying degrees of success / failure.
Lilo with btrfs root with and without separate ext4 /boot partition.
Grub2 with btrfs root with and without separate ext4 /boot partition.
As above with and without an initrd image.
* * *
What did work:
Install of just slackware 'a' base system on partition (2), with lilo
working from this install. There was still a challenge - I needed to
put a 3.7.7 kernel in partition 2 and all other partitions that might
have had a good one seemed to have various issues and of course btrfs
would not mount.
I seemed to be doing the right things but btrfs + grub2 + initrd or
btrfs + lilo + initrd + ext4 boot partitions seemed far too complex.
Having more than one disk and mounting a separate partition on /boot
(some of the time) seemed over complex. I had no confidence in the end
on where the boot-loader and config files were going nor where they were
expecting to find kernels and initrd images. Although grub2 has been
successful with this machine before I always seemed to get as far as
almost working. I always had to manually tweak the boot options no
matter how many iterations I had to go through to get them right.
Lilo is a little lacking in that it does not support btrfs fully.
I wonder if syslinux/extlinux is the way forward. It looks simpler, but
I've not played with it.
I hope no-one minds the rant, I hope it was not too incoherent. This is
far more difficult than it ought to be.
|Re: Bootloaders - aaarrghhh||jeff g.||3/14/13 9:53 PM|
On 03/14/2013 05:37 PM, Peter Chant wrote:Its seems to only be as difficult as you made it - sounds like the
computer version of climbing Mt. Everest.
Any real reason other than "because its there"?
|Re: Bootloaders - aaarrghhh||Peter Chant||3/15/13 10:49 AM|
Apart from the use of btrfs it I believe that it was as simple as it
could be. I can't see how it could be made more simple, unless grub2
and lilo both decided to do what they were told...
|Re: Bootloaders - aaarrghhh||Martin||3/15/13 1:07 PM|
On 03/15/2013 01:37 AM, Peter Chant wrote:That part I understand because apparently btrfs has not implemented the
ioctl FIBMAP which is required to map files to block numbers. It's not
This part surprises me (although I believe your statement that it didn't
work for you). When booting a kernel containing a filesystem driver like
btrfs, why on earth can't the kernel mount a root filesystem of that type?
Seems to me that btrfs is not ready yet.
|Re: Bootloaders - aaarrghhh||Olive||3/16/13 2:30 AM|
I use syslinux (extlinux) and it is definitevely more simple. syslinux (or the extlinux variant) should support btrfs (but I have not tested it). The basic principle of syslinux is simple: you install it in the boot partition and mark it bootable (and install a standard MBR that boot the first bootable partition, syslinux can do it if you like). Then syslinux find all its files from this boot partition with / meaning the root of the boot partition; it is able to find this boot partition at runtime and you do not have to worry about complex configuration option in order than it find it. Of course you have to configure the kernel/initrd as usual (passing boot parameters).
|Re: Bootloaders - aaarrghhh||Peter Chant||3/17/13 5:55 AM|
On 03/16/2013 09:30 AM, Olive wrote:Thanks, I had a look at it when fiddling around with a slax
installation. From googling it looks like it can be simple, but the
slax example was fairly complex. Now with extliux it loos like a more
general solution. I'll have to play with it on a usb stick.
|Re: Bootloaders - aaarrghhh||Peter Chant||3/18/13 3:19 PM|
On 03/15/2013 08:07 PM, Martin wrote:Hmm, catch 22. Seems like grub2, syslinux/extlinux can boot btrfs, and
since lilo users seem to be a minority and there is other work going on
in btrfs I suspect that situation won't change for a while.
From what I've seen grub2 and syslinux ought both to be able to boot
systems with a btrfs root. Lilo can, provided the kernel is another
file system that lilo is happy with mounted on /boot. However, none of
this worked for me. I seemed to be doing everything right but I could
not see why I was not having complete success. I was having limited
success in that I could manage to get a initrd image loaded under
certain circumstances. I was tweaking init in it it to get the correct
sub-volume mounted. Others have had success but it seemed to elude me.
It seems to be fairly mature from reading the btrfs site.
|Re: Bootloaders - aaarrghhh||Martin||3/19/13 12:52 PM|
On 03/18/2013 11:19 PM, Peter Chant wrote:maybe there even is a fundamental road block, for instance if the
filesystem reserves the right to move the files around.
surely the initrd image is on the non-btrfs-filesystem together with the
kernel? there should be no issue loading it. better still, all required
filesystem drivers should be in the kernel image (ie. not compiled as
they would say that, wouldn't they.
|Re: Bootloaders - aaarrghhh||Peter Chant||3/19/13 1:52 PM|
On 03/19/2013 07:52 PM, Martin wrote:Yes. Seems fair. From what I understand grub2 uses a sizeable chunk of
code to read btrfs - I think, but am not totally sure that lilo just
points at the correct section of disk - what I believe you are alluding to.
I was not sure that I would need it as I compiled btrfs into the kernel
I am using. However, I tried both with and without. I could on
occasion get the initrd image to load but it never seemed to mount the
correct part of btrfs. This was despite hacks to do so and subvol
parameters being passed to the kernel. I can't give a reliable list of
what worked and what did not as I was not attempting a formal test, just
trying to get _something reasonable_ working.
I admit to not having a large degree of success in the past with boot
loading in general. However, it seems all a little more complex than
ideal and is not at all forgiving if it does not work.
ext4 is still being tweaked as well.