-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathferretos.html
268 lines (248 loc) · 13.5 KB
/
ferretos.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<html>
<head>
<title>FerretOS</title>
</head>
<body>
<h1 style="text-align: center">FerretOS</h1>
<h2 style="text-align: center">Version 1 "Solver"</h2>
<p style="text-align: center">Github repo (work in progress): <a href=https://github.com/feli-flitzberg/FerretOS>github.com/feli-flitzberg/FerretOS</a></p>
<p style="text-align: center">Report issues here!: <a href=https://github.com/feli-flitzberg/FerretOS/issues>github.com/feli-flitzberg/FerretOS/issues</a></p>
<p>Welcome to FerretOS! This operating system project is currently a proof-of concept build/release of <a href=https://www.linuxfromscratch.org>Linux from Scratch</a> with some key differences:<br/>
<ul>
<li>GRUB is replaced with systemd-boot</li>
<li>System configuration and some package build configurations are modified to allow as much hardware compatibility as possible</li>
<li>The bootloader is configured to not pass anything but filesystem options to the kernel during boot</li>
</ul>
The resulting image (should) be fully capable of booting from a Blu-Ray or USB, with no prior knowledge of what hardware is available or where it's booting from, and still mount the root partition and the rest of the system with no issue.
Once fully booted, FerretOS has everything needed to build a new copy of LFS, following the LFS books.
FerretOS can also be used as a basic rescue disk for nonresponsive systems.</p>
<p style="text-align: center">FerretOS 1 (Solver) © 2024 by Feli Flitzberg</p>
<p style="text-align: center">Licensed under Apache 2.0: <a href=https://www.apache.org/licenses/LICENSE-2.0>apache.org</a></p>
<p style="text-align: center">PRIVACY POLICY: This site is hosted by Github, and the repository is also hosted by Github.
While this website and FerretOS do not collect anything or send us anything, Github could collect information for statistics panels in the repository.
We don't control these.
Github's privacy policy is available here: <a href=https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement>https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement</a></p>
<!---
### History
FerretOS was ultimately inspired by the now-defunct LFS LiveCD project! The last
update of its homepage can be found here: <https://www.linuxfromscratch.org/livecd/>.
Part of the proof-of-concept stage is simply to show that LFS can still produce a
LiveCD variant, provided there are people able to maintain it.
In regards to the name, I'm in a particular Discord server for these adorable wigglers:
<https://ferrets.live/>! Too cute to not name something after them.
<!---
## Installation
### .img File
Use a tool like `dd` or BalenaEtcher to directly copy the file byte for byte to a valid
USB drive. You might be able to boot directly using a tool like Ventoy, but this hasn't
been tested.
### .iso File
If you have something like Ventoy, the `.iso` file can be dropped directly into the USB
drive with no changes. Otherwise, you have some options:
- Use any (multi)boot USB creator to add the file to your USB drove.
- Follow the procedure for `.img` files above.
- If you have a Blu-Ray writer, you can burn the file to disk.
### Github Reop
You will have to install the system, bootloader, and kernel into your USB drive manually.
The drive must be formatted with an EFI partition and a Linux root partition following
the [Discoverable Partitions Specification](https://uapi-group.org/specifications/specs/discoverable_partitions_specification/).
Any other partitions must be configured following the specification.
- Copy the entire repo to the root partition of the drive.
- Mount the drive's EFI partition to `/boot` on the drive.
- Modify root's chroot script to have LFS point to the root partition of the drive.
- Run the chroot script.
- TODO: add the full command to install the bootloader to the drive without erroring out - they won't have guaranteed access to the host's EFI variables, so make sure it doesn't have to read them to install
- TODO: add the full command to install the kernel version without needing a machine id - it will likely default to using the kernel version unless we specify the entry token
- TODO: if they want to use kernel-install's normal defaults we need to tell them how to initialize the machine id
- TODO: direct them to check the command line passed to the kernel. it has to have rootwait (if we don't build it into the kernel directly), and they should remove the root line to prove our entire design.
- TODO: maybe we should make all of this a script? could be a lot of work though, especially to verify that the root node exists, has the correct partitions available, AND isn't just /dev/null or something else being passed maliciously. (you just know they'll try to blame us if they're bad actors or just dumb.)
--->
<!---## Changes
#### Packages
- Update expat to 2.6.4
- Update kernel to 6.11.7
- Update openssl to 3.3.2
- Update python to 3.12.7
- Add (blfs) libidn2 2.3.7
- Add (blfs) libunistring 1.2 as recommended dependency
- Build gmp 6.3.0 with `--disable-assembly --host=amd64-pc-linux-gnu`
- Build mpfr 4.2.1 with `--enable-decimal-float=generic`
- Build gcc 14.2.0 with `--with-arch=x86-64 --with-tune=generic`
- Install all of elfutils 0.191, then clean up all installed static libraries
- `rm -fv /usr/lib/lib{elf,dw,asm}.a`
- Build libffi 3.4.6 with `--with-gcc-arch=x86-64`
- Skip installing GRUB (source package is available in image)
- Personal preference: skip installing vim (source package is available in image)
- Personal preference: install (blfs) nano 8.1 as editor
- `/etc/nanorc` is made from editing and saving `doc/sample.nanorc` with the new
installation
- Install (external) pyelftools 0.31 to enable systemd-boot during configuration
- Build instructions:
```
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
pip3 install --no-index --no-user --find-links dist pyelftools
```
- Add (blfs) BLFS systemd units (2024-08-01)
- Add (blfs) wget 1.25.0
- Add (blfs) libpsl 0.21.5 as recommended dependency
- Add (blfs) make-ca 1.14 as recommended dependency
- Add (blfs) p11-kit 0.25.5 as dependency
- Add (blfs) libtasn1 4.19.0 as recommended dependency
- Add (blfs) openssh 9.8p1
- Add (blfs) sudo 1.9.15p5
- To enable insults: `--with-insults`
- To enable all insults: `--with insults --with-all-insults`
- Add (external) dracut (last commit 2024-03-21)
- Requires asciidoc for documentation, use `--disable-documentation` to avoid
- Add (blfs) btrfs-progs 6.10.1
- Add (blfs) lzo 2.10 as dependency
- Add (blfs) dosfstools 4.2
- Add (blfs) jfsutils 1.1.15
- Add (blfs) gptfdisk 1.0.10
- Add (blfs) popt 1.19 as dependency
- Add (blfs) parted 3.6
- Add (blfs) sshfs 3.7.3
- Add (blfs) fuse 3.16.2 as dependency
- Add (blfs) glib 2.80.4 as dependency
- Add (blfs) packaging 24.1 as dependency
- Add (blfs) docutils 0.21.2 as recommended dependency
- Add (blfs) libxslt 1.1.42 as recommended dependency
- Add (blfs) libxml2 2.13.3 as dependency
- Add (blfs) icu 75.1 as recommended dependency
- Add (blfs) docbook-xml 4.5 as recommended dependency
- Add (blfs) unzip 6.0 as unpack requirement
- Add (blfs) docbook-xsl-nons 1.79.2 as recommended dependency
- Add (blfs) pcre2 10.44 as recommended dependency
- Add (blfs) shared-mime-info 2.4 as dependency
- Add (blfs) desktop-file-utils 0.27 as dependency
- Add (blfs) xfsprogs 6.9.0
- Add (blfs) inih 58 as dependency
- Add (blfs) liburcu 0.14.0 as dependency
- Add (blfs) efivar 39
- Add (blfs) mandoc 1.14.6 as recommended dependency
- Add (blfs) efibootmgr 18
- `EFIDIR=ferretos`
- `EFI_LOADER=systemd-bootx64.efi`
- Add (blfs) iso-codes 4.17.0
- Debian has removed the previous version, so we move to the next available version
- Add (blfs) lsof 4.99.0
- Add (blfs) libtirpc 1.3.5 as dependency
- Add (blfs) tree 2.1.3
- Add (blfs) gpm 1.20.7
- Add (blfs) gnupg 2.4.5
- Add (blfs) libassuan 3.0.1 as dependency
- Add (blfs) libgpg-error 1.50 as dependency
- Add (blfs) libgcrypt 1.11.0 as dependency
- Add (blfs) libksba 1.6.7 as dependency
- Add (blfs) npth 1.7 as dependency
- Add (blfs) openldap 2.6.8 as dependency
- Add (blfs) cyrus-sasl 2.1.28 as recommended dependency
- Problems in including `time.h` in multiple files
- Remove `#ifdef ... #endif` from around `#include <time.h>` in `lib/saslutil.c`
- Add `#include <time.h>` to `plugins/cram.c`
- Add (blfs) lmdb 0.9.31 as recommended dependency
- Add (blfs) gnutls 3.8.7.1 as recommended dependency
- Add (blfs) nettle 3.10 as dependency
- Add (blfs) pinentry 1.3.1 as recommended dependency
- Add (blfs) libusb 1.0.27 as optional dependency (for building ccid driver)
- Add (blfs) hwdata 0.385
- Add (blfs) p7zip 17.04
- Add (blfs) pciutils 3.13.0
- Add (external) exfat 1.4.0
- `./configure --prefix=/usr --enable-year2038`
- Add (blfs) usbutils 017
- Add (blfs) which 2.21
- Add (blfs) rsync 3.3.0
- Add (blfs) iw 6.9
- Add (blfs) libnl 3.10.0
- Add (blfs) wpa-supplicant 2.11
- Add (blfs) curl 8.11.0
- Add (blfs) links 2.30
- Add (blfs) libevent 2.1.12 as recommended dependency
- Add (blfs) libburn 1.5.6
- Add (blfs) libisofs 1.5.6
- Add (blfs) libisoburn 1.5.6
- Add (external) tmux 3.5a
- Add (external) [linux-firmware](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/)
- Add (external) rdfind 1.6.0 as recommended dependency
- Package is made by packaging the git repo after checking for updates
#### Configuration
***Configuration files are made in a text editor (potentially outside chroot by
root until a text editor is available).***
- Source packages installed in LFS are in `/sources/base`
- Source packages installed in BLFS or beyond are in `/sources/extra`
- `/usr/lib64` is a symlink to `/usr/lib` to deter problems
- Mailboxes disabled for `useradd`
- Root password set
- Add `pip` as link to `pip3`
- Add `python` as link to `python3`
- `PAGE` is set to `letter`
- `/usr/lib/os-release` points to `/etc/os-release`
- Make single systemd network file to match any found network devices
- Not sure it will enable more than one device, but it will at least enable the first
- Add `noclear.conf` from 9.10 Systemd Usage & Configuration
- Add (blfs) `/usr/sbin/strip-all.sh`
- Add (blfs) `/usr/sbin/remove-la-files.sh`
- Add `/etc/profile.d` and various shell scripts
- Add `bash_completion.sh`
- Add `dircolors.sh`
- Add `extrapaths.sh`
- Add `readline.sh`
- Add `umask.sh`
- Add `i18n.sh`
- Add `pythoncerts.sh`
- Add `/etc/skel` with configuration files and FerretOS needs
- Files copied to `/root` when finishing image
- Add `.bash_profile`
- Add `.bashrc`
- Add `.bash_logout`
- Add `/etc/profile` from BLFS
- Add `/etc/bashrc` from BLFS
- Add `/etc/dircolors`
- Add `/etc/issue`
- wpa-supplicant not configured
#### Build/Configure process
- `$LFS` is any directory accessible to both root and a regular user
- Included convenience scripts use `/opt/lfs`
- No drives or partitions were mounted during the build stages
- git repo was set up during first build chapters
- This has the advantage of reducing the final upload size to Github
- This has the disadvantage of creating multiple files in Github LFS that have to be
manually pruned
- When changing ownership between users:
- To user lfs: `chown -vR lfs:lfs $LFS`
- To user root: `chown -vR root:root $LFS`
- To have internet access in chroot on systemd-based host systems:
- Remove `mount -vt tmpfs tmpfs $LFS/run`
- Use `mount -v --bind /run $LFS/run`
- `chroot-net.sh` is already set up for this purpose
- Ownership of gcc build directory is changed before installation
- `chown -vR root:root $PWD`
- Full `/etc/os-release` is added before systemd configure step
- Required for systemd-boot to configure correctly
- `-D firstboot=false` is removed from systemd configuration stage
- This image should boot anywhere, but some things can't be configured beforehand
- `-D default-dnssec=no` is removed from systemd configuration stage
- `-D ldconfig=false` is removed from systemd configuration stage
- Machine id is not initialized to avoid compiling any reference to it in later packages
- Timezone is not set to accomodate systemd-firstboot
- `/etc/adjtime` is not used to accomodate multiple hardware setups
- System locale is not set to accomodate systemd-firstboot
- Additional packages are added before building the kernel and finalizing the image
- `/etc/fstab` is not created
- As part of the [Bootloader Specification](https://uapi-group.org/specifications/specs/boot_loader_specification/)
this file isn't needed by a spec-compliant bootloader to find the root partition or data
partitions
***If you work in a chroot and reinstall dbus via BLFS instructions, `$LFS/dev` will no
longer unmount, and the host system will require a reboot. dbus will also warn about an
invalid user account/ID. If working in a chroot prior to creating an image or USB
installation, re-initialize the machine id. It is also advised to only reinstall dbus in
the chroot if you are sure you won't need the chroot environment after exiting that
instance.***
## PRIVACY POLICY
This repository is hosted by Github.
While FerretOS does not collect or send us anything, we have enabled the Issues and Discussions features, which could collect information beyond what is submitted directly.
Github also collects information for statistics panels in the repository.
We don't control these.
Github's privacy policy is available here: <https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement> --->
</html>