LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-03-2015, 09:00 PM   #16
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097

By comparison, ZFS has a more proven track record and I'm far more familiar with it's usage than BtrFS. I don't discount BtrFS, but by fair comparison between the two ZFS is a wiser decision in my opinion.

Plus, I'm doing this for the sheer reason of doing it.

Small update. I did get syslinux built and installed, though it required installing a few extras, but worth it. Currently, thanks to Archlinux's wiki that's a gold mine of info, I'm nearly done getting it hopefully working. It oddly recommended using ucl and upx, but I think I see why. Syslinux seems to be more friendly than Grub, but I'll see when and if it boots.

If this pans out, this could be a good step forward, not just for me, but LFS as well.

Last edited by ReaperX7; 07-04-2015 at 10:19 AM.
 
Old 07-04-2015, 11:21 AM   #17
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Of course ZFS has proven more on the track record. It has been around longer than Btrfs. ZFS licensing forever sealed its chance for inclusion into mainline kernel. That's why Btrfs was written - to get a ZFS-like FS that can be part of Linux.

Getting to know Btrfs shouldn't be a problem since you've familiar with COW filesystems already, it's just that tools syntax is different (and obviously, the tools themself).

Couldn't hurt to try if you decide to table flip and rage quit on getting ZFS to work though (and let us know about your experience if you do, please) ...
 
Old 07-04-2015, 11:44 AM   #18
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Krejzi View Post
Of course ZFS has proven more on the track record. It has been around longer than Btrfs. ZFS licensing forever sealed its chance for inclusion into mainline kernel. That's why Btrfs was written - to get a ZFS-like FS that can be part of Linux.
Being the great conciliator that I am...

I like 'em both. My main LFS/BLFS system is ZFS -- and I mean everything including the boot partition dataset, swap and the various directories comprising my everyday computing platform. My somewhat more bleeding-edge VirtualBox version of LFS/BLFS is btrfs. I use the latter as a playpen, trying new packages and techniques there before committing it to my main system.

My exceedingly simple GRUB configuration files (which I generate manually) may be of interest and possibly of help. I likewise generate my initial RAM filesystem image manually using a script I wrote back in 2006 but have since evolved to handle btrfs and/or ZFS based on /proc/cmdline.

Code:
set timeout=5

menuentry 'LFS4/Linux 4.1.1 (ZFS)' {
        set root='(hd0,gpt2)'
        linux  /ducky/boot/@/bzImage-4.1.1 root=ZFS=zlfs4/ducky/root quiet ro
        initrd /ducky/boot/@/lfs4-4.1.1.img
}
Code:
set timeout=5

menuentry 'LFS5/Linux-4.1.1 (btrfs/VBox)' {
    set root='(hd0)'
    linux  /root/boot/bzImage-4.1.1 root=LABEL=lfs5 quiet ro 
    initrd /root/boot/lfs4-4.1.1.img
}
In general, btrfs is easier since it's mainlined into the kernel. But I've been doing ZFS for long that it's a tad more intuitive to me. Had I started first with btrfs, it probably would have become more comfortable to me.
 
Old 07-04-2015, 06:35 PM   #19
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I'm trying to get syslinux working now. I am having trouble getting the root partition going. This is my entry in syslinux.cfg:

Code:
LABEL lfs
  MENU LABEL LFS-SVN-20150623-zfs
  LINUX ../vmlinuz-4.1.1-lfs-SVN-20150623
  APPEND vga=792 real_root=ZFS=ztank/lfs/root spl.spl_hostid=a8c07601
I know I'm doing something wrong here, but I don't know what. ZFS and SPL both are built-into the kernel, but I keep getting VFS sync errors that halt the kernel.

As far as BtrFS, I really could care less about using it. To me, and just me, it's a pale comparison to ZFS. I don't care how advanced it's become. To me, it's Oracle's feigning attempt to put a thumb in the eye of OpenZFS and Illumos.

The license is a moot point anyway because the Software Freedom Law Center told Debian they were cleared to ship ZFS in Debian. The only thing keeping it out of the kernel are politics and bickering conned on by the FSF and GNU over the CDDL license. The problem is OpenZFS is CDDL licensed, no thanks to Oracle as normal being a royal pain in the ass, but it's managed under a GNU/BSD bylaw to be completely open source free software.

The Solaris Porting Layer however, did in fact get GPL licensed.

Now that I've aired out my views on it, all I'm trying to do is get the damned bloody thing working.

Last edited by ReaperX7; 07-04-2015 at 06:57 PM.
 
Old 07-04-2015, 07:09 PM   #20
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Now that I've aired out my views on it, all I'm trying to do is get the damned bloody thing working.
A year or so ago, I posted my journal of what I did (and am still doing) with ZFS. The only change since then was to use an altered version of GRUB from https://github.com/dweeezil/grub that groks com.delphix:hole_birth, an attribute added some 9 months ago that gets applied with zpool upgrade.

If you can find that, perhaps you'll find it of value and can return to GRUB.
 
Old 07-04-2015, 10:33 PM   #21
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I'll take a look at it. Thanks re_nelson.
 
Old 07-06-2015, 09:44 AM   #22
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Pending re_nelson's grub usage, I'm going to rebuild LFS. Single ZFS all inclusive with GPT with a BIOS boot. Everything seems better with the reworked Grub.

Two steps forward, and one step back.

Update:

Second rebuild works. Was rough worked a few times, so I'm going to perform a full checked rebuild a third time to redocument, provide the ZFS kernel patch, and all supporting documentation needed to build LFS-ZFS+OpenRC. Target is aimed at LFS-svn currently. Going to take a day or two off the system to rest.

Last edited by ReaperX7; 07-07-2015 at 09:50 AM.
 
Old 07-17-2015, 09:51 PM   #23
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Update:

Recently had enough time to get the build going again. This time with SVN-20150712.

This time I followed re_nelson's advice and rebuilt the system as a complete zfs zpool, and included the dweeezil grub_zfs-2.02~beta2 patched package, which I have yet to get built but am building at the moment. Everything is rebuilt as such and hopefully, soon, I can get it booted.

I'm currently in the process of getting the documentation finalized. When and if I get it booted, a video will be posted.

Last edited by ReaperX7; 07-17-2015 at 10:06 PM.
 
Old 07-17-2015, 10:36 PM   #24
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Update:

This time I followed re_nelson's advice and rebuilt the system as a complete zfs zpool, and included the dweeezil grub_zfs-2.02~beta2 patched package, which I have yet to get built but am building at the moment. Everything is rebuilt as such and hopefully, soon, I can get it booted.
I'm going to take a proactively negative approach ("expect the worst, hope for the best") based on my initial and painful early experiences with ZFS. If at all goes well, forget about this message.

OTOH, if problems arise with in boot process, what I found to be helpful was to build a full-featured initrd. I mean virtually everything -- bash shell, coreutils, udev, module utilities, e2fsprogs, text editor, all the SPL/ZFS stuff...essentially a mini-system to explore before trying to mount the real root and switch to it. Using such an initrd playpen allows you to diagnose things before the dreaded kernel panic occurs when root can't be found (and the messages often scroll off the screen). This allowed me to get a good handle on ZFS in that pre-boot environment and learn more about it -- without the frustration setting when the boot fails.
 
Old 07-18-2015, 10:09 AM   #25
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I have a feeling it will fail too, but honestly, I wouldn't be shocked if it did fail. If it passes, no biggie. That dweeezil's grub-zfs however did generate a very interesting grub.cfg with lots of new ZFS entries, so maybe, just maybe it will work right. I compared it to my PC-BSD grub.cfg and honestly, it might have worked properly. The path layouts are correct for once.

I'm going to do a full backup of the system before I try anything else though.

Edit:

It failed. Well, I'm at a loss on this one at the moment. I'm going to just probably publish what documentation I have left, as well as notes, but as far as I am concern ZFS is still a no-go on my end.

The kernel panics when it tries to sync the VFS and /(root), and then halts the boot entirely. Everything is setup from the Funtoo, Arch, Slackware, and other ZFS notes I've taken which are all similar. I honestly don't know what is wrong. The kernel with built-in ZFS just simply implodes when it tries to boot. I don't know enough about initramfs systems to accurately use one for a modular style. In fact, I'd rather just not.

I'm going to complete my notes this weekend maybe and then publish what I have and call it done. This is beyond aggravating for me now and my patience is already starting to wear thin as it is with this. If I decide to continue the effort, it won't be any time soon.

Last edited by ReaperX7; 07-18-2015 at 11:25 PM.
 
Old 07-19-2015, 08:02 PM   #26
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558

Original Poster
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Here's my notes, so use them as needed.
Attached Files
File Type: txt kernel_patch.txt (2.7 KB, 21 views)
File Type: txt writehostid.c.txt (1.8 KB, 22 views)
File Type: txt zfs_setup.txt (13.2 KB, 35 views)
 
Old 07-19-2015, 09:17 PM   #27
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
This is beyond aggravating for me now and my patience is already starting to wear thin as it is with this. If I decide to continue the effort, it won't be any time soon.
If it's any consolation -- small as it may be -- I came close to just ditching ZFS on LFS. In fact, several times over two year ago. I may (or may not) have provided the attached files in the past but here we go again. I can't emphasize enough the importance of getting ZFS working in the pre-boot initrd environment. Once past that hurdle, an epiphany set in for me and it all fell into place.

Without a warranty or a guarantee of any type, here are the files that -- ahem -- "work for me" (TM), including the current kernel 4.1.2 config that I use for my hardware. Virtually everything is modular. No patching is performed on the stock sources from kernel.org.

Basically, the steps boil down to:

1). Strip the ".txt" suffix from the files.

2). KMODS=4.1.12 ./create_bash_initramfs.sh init.generic

3). Boot using the newly-created initrd (from step 1). Provide a boot command argument of bshell to drop into a bash shell in initrd in order to experiment with ZFS before the kernel attempts to mount root and switch root.
Attached Files
File Type: txt grub.cfg.txt (194 Bytes, 17 views)
File Type: txt create_bash_initramfs.sh.txt (11.3 KB, 44 views)
File Type: txt .config.txt (84.0 KB, 22 views)
File Type: txt init.generic.txt (6.3 KB, 34 views)

Last edited by re_nelson; 07-19-2015 at 09:20 PM.
 
  


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
VirtualBox Starter Pack - LFS as a Host For Your LFS Build basica Linux From Scratch 4 11-25-2015 12:02 PM
[SOLVED] i can't perfome make install commond while build binutils-build LFS plzzz help me Carl_cj Linux From Scratch 19 09-04-2014 11:52 AM
[SOLVED] The build is prepared but confused about the next steps to build the LFS system CBM200 Linux From Scratch 3 02-04-2014 10:47 AM
Best OS to build lfs capricus Linux From Scratch 5 06-28-2012 04:28 AM
Will compiling LFS on an 64 bit distro build an 64 bit LFS? Vampirite Linux From Scratch 4 08-31-2007 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:52 AM.

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