New build of LFS I'm experimenting with. (OpenRC+ZFS+B/LFS)
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
New build of LFS I'm experimenting with. (OpenRC+ZFS+B/LFS)
Going to try and put another build together, this time with OpenRC. I figure by now I've studied up on it enough and gotten some usage with it via Slackware to try and fold it into LFS as neatly as possible. One step closer to my new ideal build, though my ideal filesystem still eludes me at getting ZFS into a bootable state. Really wish I could solve how to get ZFS as root working.
Okay, yesterday I finished the entire system in LFS, minus the kernel.
I have the kernel prepped for building SPL and ZFS modules internally into the kernel to be ready at boot time. OpenRC is installed and the initial runlevels are set, with udev and udev-trigger added to sysinit runlevel.
The only thing I have left is the import Python 2.x for rebuilding Grub-2.02~beta2 which is sporting a massive patch to support ZFS, btrfs, as well as several detection methods. I'll post the patch, as well as the build instructions for all extras I added which include:
and anything that will get added shortly later today when I get the system prepped for first boot. If all goes well, expect a video upload of the boot. If all does not go well, I might be screwed. LOL. Well, at least I can format it to JFS or Ext4 and reload the tarball backup I'll make. Heh.
make
cp -av linux-boot-prober os-prober /usr/bin
cp -av linux-boot-probes os-probes /usr/lib
( cd /usr/lib/linux-boot-probes
for probe in common/* ; do
ln -svf $probe .
done
cd mounted
for probe in common/* x86/* ; do
ln -svf $probe .
done
)
( cd /usr/lib/os-probes
for probe in common/* ; do
ln -svf $probe .
done
cd init
for probe in common/* ; do
ln -svf $probe .
done
cd ../mounted
for probe in common/* x86/* ; do
ln -svf $probe .
done
)
mkdir -pv /usr/lib/os-prober
cp -av newns /usr/lib/os-prober
mkdir -pv /usr/share/os-prober
cp -av common.sh /usr/share/os-prober
mkdir -pv /var/lib/os-prober
mkdir -pv /usr/doc/os-prober-1.65
cp -av README TODO /usr/doc/os-prober-1.65
This should expand the usefulness of Grub-2.02~beta2 a bit better.
ZFS can be used quite effectively with LFS, especially if you screw up something.
By this, you have the ability to use ZFS's snapshot feature to effectively rollback the system to a previous state. For a distribution like LFS, that can be lifesaving to avoid heavy rebuilds.
To create a snapshot, use:
Code:
zfs snapshot -r ztank@install
This shouldn't take a long time.
To check the snapshot list use:
Code:
zfs list -t snapshot
To restore a snapshot of a dataset:
Code:
zfs rollback ztank/lfs/root@install
Now you can effectively keep a core LFS on-hand just in case you nuke something, and want to avoid rebuilding. ZFS +1, other filesystems 0.
Pending the outcome, I may revert to using 7.7 as a baseline if GCC-5.1.0 is a source of the problem, otherwise, I'm going to wait for an official answer.
Contact from the project directed me to this commit:
After a day of fiddling with Grub to find out it's as useless as garbage with ZFS, even patched, I'm going to try and swap it out for syslinux. Really starting to wonder how well this will end up.
I apologize if you mentioned this somewhere, I just scrolled quickly without reading everything, but:
Why go with ZFS? I see you mention snapshot feature a lot. BTRFS offers similar features as ZFS (incl. snapshots), it's in the kernel, requires no patching, neither patching bootloader nor kernel, etc. Plus, the disk format was recently declared stable and preformance is decent when comparing to ext4 and xfs (faster than xfs in some cases, a bit slower than ext4).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.