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.
I'll post notes after I get it finished. |
subscribed, thanks :)
|
I might also have found the secret to ZFS as well thanks to Funtoo. Only time will tell though.
Edit: Due to acquiring a new hard drive, the ZFS+OpenRC+B/LFS project will be going forward. |
Update #1:
Created a partition layout on my /dev/sdc disk with the following layout: /dev/sdc1 - linux type - ext2 - /boot /dev/sdc2 - linux swap type - swap - swap /dev/sdc3 - solaris root type - zfs - / Created zpool with the following options: Code:
zpool create -f -o ashift=12 -o cachefile=/tmp/zpool.cache -O normalization=formD -m none -R /mnt/lfs ztank /dev/sdc3 Code:
zfs create -p ztank/lfs Note: For anyone following this, when you unmount the main LFS zpool, use: Code:
zpool export ztank Code:
zpool import -f -R /mnt/lfs ztank Halting build at libstdc++ for the day. |
Update #2:
Resumed build of OpenRC+ZFS+B/LFS today. Re-import of ztank was successful. Status of ztank zpool was clear. No problems with partition found. Code:
bash-4.3# zpool list Stopped at man-pages in chapter 6. zpool exported without issue. No problems found. |
what are the advantages of zfs over ext for lfs?
|
Depends on what you need, but only I'm doing it just to prove it can be done, and document the process of getting it done correctly.
If anyone wants info on ZFS, check here: https://en.wikipedia.org/wiki/ZFS Update 3: Only got glibc-2.21 built and installed today due to time constraint. Otherwise, system is still in working order without issue. |
Update 4:
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: os-prober openrc aadityabagga-openrc-services spl zfs 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. Anyways, it's about done, so cross those fingers. |
Supplemental update:
Patch for Grub-2.02~beta2 ( grub-legacy_detection+zfs+btrfs.patch ) Note: This doesn't give FULL ZFS support, so you will have to edit the grub.cfg file manually to add the ZFS root partition. Code:
diff -Naur grub-2.02~beta2.orig/Makefile.util.def.orig grub-2.02~beta2/Makefile.util.def |
Supplement update #2:
os-prober may need needed to correctly identify the partitions if you have it in the system. To install os-prober grab the source here: URL: http://http.debian.net/debian/pool/m...er_1.65.tar.xz MD5: a7e833555f54387a4798ffea8c2bf0d4 Build instructions: Code:
make |
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 To check the snapshot list use: Code:
zfs list -t snapshot Code:
zfs rollback ztank/lfs/root@install |
Booting with Grub-2.02~beta2 (patched)
Edit your /boot/grub/grub.cfg as so: Code:
cat > /boot/grub/grub.cfg << "EOF" |
Update:
Build on hold due to error during compile: Filed report with zfsonlinux developers and awaiting solution. https://github.com/zfsonlinux/zfs/issues/3546 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: https://git.kernel.org/cgit/linux/ke...b83fc4a4f3aa60 I think I can make a patch to fix this code from what was provided so tomorrow hopefully this can get back in gear and build. Was able to patch the kernel, and continued onward: include/linux/ftrace_event.h Code:
edit line 202 from: Code:
edit line 43 from: |
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). |
All times are GMT -5. The time now is 06:59 PM. |