Open berkasncc opened 4 years ago
On debian distro, building LFS often broken. This script is written using Venom Linux as host. Anyway i'm gonna try this script on different distro and fix accordingly, then update script requirement.
About wget and rsync i will update host requirement before running the script.
Step 2 does not need chroot, building in chroot is handled by the script.
You can run ./01-toolchain && sudo ./02-base && sudo ./03-mkiso
for one line run. Script 01 no need root, script 02 and 03 required root.
If you use kernel provided by this script, you need initrd to boot it. The initrd can be generated using provided initrd generator by running mkinitramfs
inside chroot (i think it already generated in in script 02, i will check it again).
I suggest you run grub-mkconfig -o /boot/grub/grub.cfg
to generate grub.
I found script 2, still have wrong setup at source location, and script 2 not auto generate initram, after mkinitramfs need put -k nameofkernel , if only mkinitramfs is fail, cause looking for host kernel
after i change config for source location, script 2, still find at other location, so script need download file again.
After success login root, how set wifi ?
Btw, are the result of this script, same like book at LFS?
Do you have script, result same 100 % like book at LFS ?
Thanks
What do you mean wrong location of sources? This script use pkgutils as the package manager, so source is located where pkgutils should found it, not /sources like LFS does.
Yes, mkinitramfs need ‘-o kernelversion’ when generate inside chroot, glad you know it.
Wifi need to set like in lfs book using wpa_supplicant and dhcpd.
The result is almost same as lfs book except it use package manager and multilib support.
After done building lfs using this script, you can choose where you want to continue use the package manager to build further package or goes without package manager.
Btw right now i’m testing the script using artix as host and i got the error like others too. I will fix it.
I've updated the scripts. Tested working perfectly on Artix and AryaLinux. Check the updated README
Great, i will test it at nutyx or at lfs build before- by the way , can you make 2 version, 1st with pkgmanager , 2nd its like original lfs like a book.
And your last script are already have init file ?
And i suggest write at readme, put source at same pkgbuild source directory, so script not need download again, if already have it.
I test the wifi already can connect,
Probally if you have time, make a script like bylfs, for start maybe the simple gui like lxde.
All is until now is cool, good for learning phase.
If i only need bash, opensshd, kernel, how minimal space i can build ?
Can you make minimal linux space ? Like tiny distro, or slitaz. They use only < 100 Mb
Thanks
Not sure i can make version without pkgmanager, i'm too busy lately. You can just continue without pkgmanager, nothing could goes wrong.
What you mean last script already have init?
This script should not download sources twice, so i dont need to change anything about it. Just dont download source the LFS way, just clone this repo, run the script, then everything done.
About gui, i've been plan about it, but i'm a little bit busy lately, maybe someday when i got free time. :D
Not sure how to get minimal packages because i'm follow LFS way to get LFS built. You can try build by cross compile. Maybe later i will write script to build minimal distro using musl instead of glibc and build by cross compile. :D
Personal experience : At debian this script not work , lz problem at Step 1 At archlinux not work too , lz problem , at Step 1
Error like /../x86_64-pc-linux-gnu/bin/ld: cannot find -lzstd and on both of ther others I also had -lbz2 & -llzma.
I think you must include at host must have rsync, wget too, if not will broken at step 1
At Nutyx linux base by lfs, work
But trying reboot, already put in Grub, nothing happen, blank only, hang
When step 2, are need chroot ? i try without chroot
Can you write after step 2, success compile, what next step ? I trying put at Grub, load it, but not work.
Grub config like this, i install to sda12
menuentry 'LFS (on /dev/sda12)' --class pclinuxos --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-79b8a501-f7c8-4b3c-8d25-39fd8a313bc9' { insmod part_gpt insmod fat set root='hd0,gpt12' linux /boot/vmlinuz-lfs root=/dev/sda12
initrd /boot/initrd-
}
Thanks