eth0s/README.md

67 lines
2.6 KiB
Markdown
Raw Normal View History

2018-11-30 22:01:27 +08:00
# lfs-scripts
2018-12-01 00:28:25 +08:00
2020-07-02 23:58:22 +08:00
This repo contain scripts to automate multilib LFS build + livecd. This LFS build is using [CRUX](https://crux.nu)'s pkgutils for managing packages and initramfs generator from [Venom Linux](https://venomlinux.org) for livecd initramfs.
2018-12-01 00:28:25 +08:00
2020-07-03 00:01:37 +08:00
### Requirements
2018-12-01 00:28:25 +08:00
2021-03-16 19:22:16 +07:00
* `sudo` / `doas`
* `wget`
* passes lfs `version-check.sh` test
* `squashfs-tools` & `libisoburn` (optional to create the livecd iso)
2018-12-01 00:28:25 +08:00
2020-07-03 00:01:37 +08:00
### Scripts
2018-12-01 00:28:25 +08:00
* 01-toolchain
- toolchain script to build base lfs (required)
- this script need run as regular user
2018-12-01 11:44:37 +08:00
- this script resume-able, just re-run the script to continue where you left
2018-12-01 00:28:25 +08:00
2019-10-31 22:54:20 +08:00
* 02-base
2018-12-01 00:28:25 +08:00
- script to build base lfs system
- this script need run as root
2019-10-31 22:54:20 +08:00
- all package is build using port system (pkgutils)
- you can create your own ports by follow guide [here](https://crux.nu/Main/Handbook3-5#ntoc23)
2018-12-01 11:44:37 +08:00
- extra packages is added into this base lfs, eg:
- linux kernel
- wget
2018-12-01 00:28:25 +08:00
- dhcpcd
- wpa_supplicant
2018-12-01 11:44:37 +08:00
- mkinitramfs (taken from Venom Linux, livecd support)
2020-07-02 23:58:22 +08:00
- syslinux
2018-12-01 11:44:37 +08:00
- this script resume-able, just re-run the script to continue where you left
2019-10-31 22:54:20 +08:00
- created packages can be reused
2018-12-01 00:28:25 +08:00
2019-10-31 22:54:20 +08:00
* 03-mkiso
2018-12-01 00:28:25 +08:00
- script to build lfs livecd iso
- this script need run as root
2018-12-01 11:44:37 +08:00
* version-check.sh
- script to check utilities requirements to build lfs
2020-07-02 23:58:22 +08:00
2020-07-03 00:01:37 +08:00
### Step
2020-07-02 23:58:22 +08:00
Basically you just need to run all those 3 scripts without other command to get LFS system built including live ISO. You can run:
```
$ ./01-toolchain && sudo ./02-base && sudo ./03-mkiso
```
2021-03-16 19:22:16 +07:00
> Note: script 01-toolchain gonna ask for sudo or doas password
2020-07-02 23:58:22 +08:00
2020-07-03 00:02:03 +08:00
- First grab any distro's livecd to use as host, or you can just your current running linux distro as host. (read below for tested host)
2020-07-02 23:58:22 +08:00
- Prepare your partition for LFS and mount it on `/mnt/lfs` or you can change where LFS build directory in `config` file.
- Optionally modify `config` file to suit your need.
- Run script `01-toolchain` to build temporary toolchain.
- Run script `02-base` to build base LFS system.
- Optionally run script `03-mkiso` to build live iso, then you can test the iso using qemu by running `./run_qemu <iso file>`.
2020-07-03 00:02:42 +08:00
- Run `./enter-chroot` to enter chroot environment to configure your system. [configure instruction here](./rootfs/root/README)
2020-07-02 23:58:22 +08:00
- Exit chroot environment.
- Then you should have working LFS system now.
- Reboot to test it out.
2018-12-01 00:28:25 +08:00
2020-07-03 00:01:37 +08:00
### Tested host
2018-12-01 00:28:25 +08:00
2020-07-09 00:33:47 +08:00
- [Venom Linux](https://venomlinux.org)
2020-07-02 23:58:22 +08:00
- [Artix Linux](https://artixlinux.org/) - require base-devel and wget
- [Arya Linux](https://aryalinux.info/) (live environment)
2020-07-09 00:33:47 +08:00
- [Slackware](http://www.slackware.com/) - Thanks to [joe71](https://github.com/joe71) for testing
2020-07-02 23:58:22 +08:00
- (more will come)