xerz,
@xerz@fedi.xerz.one avatar

currently bored, so I'm gonna build the smallest Linux live CD distro possible with a retro desktop and Flapak support :blobcatfluffowo:

xerz,
@xerz@fedi.xerz.one avatar

oh wait

Flathub has no i386 builds, right?

.......................ok let's try to just, build the absolute minimum to have Firefox running then

xerz,
@xerz@fedi.xerz.one avatar

Try 1: easy way, NixOS ISO

oh hey, I feel like Nix clicked on me at last, I feel way better at reading docs and writing flakes :blobcatrainbow:

xerz,
@xerz@fedi.xerz.one avatar

look at how little code you need to get a working ISO :blobcatsurprised:

….I admit I got confused when I tried to add a test package, but that’s about it

...and there you go, live ISO!
The entirety of the source used to generate the ISO

xerz,
@xerz@fedi.xerz.one avatar

…then again, I wish this barebones system didn’t use 700MB just to display a terminal…

xerz,
@xerz@fedi.xerz.one avatar
lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz git gud: https://hacktivis.me/articles/Install%20Gentoo%20via%20Floppy

(Could also try to fit qbe+cproc in a second floppy)

xerz,
@xerz@fedi.xerz.one avatar

@lanodan > The floppy image (2.88 MB)

that’s an ED you coward :blobcatfluffpout:

lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz Well Linux doesn't seems to fit in 1.44MB anymore.

While OpenBSD has actual floppy variants: https://www.openbsd.org/faq/faq4.html#Download

xerz,
@xerz@fedi.xerz.one avatar

ok nix build git+https://codeberg.org/xerz/quecto#quecto works, that’s pretty cool

xerz,
@xerz@fedi.xerz.one avatar

So, in reality it’s consuming <90MB for a framebuffer TTY. Not bad for a starting point, but I definitely think it should be better.

xerz,
@xerz@fedi.xerz.one avatar

Having a small enough userspace footprint sounds like is gonna be a bit hell

xerz,
@xerz@fedi.xerz.one avatar

Currently, the flake doesn’t build an ISO with BIOS support, but apparently it should be trivial https://github.com/NixOS/nixpkgs/blob/327b0cff7aedc20a148d245b1182f43800acc1f5/nixos/modules/installer/cd-dvd/iso-image.nix#L538

xerz,
@xerz@fedi.xerz.one avatar

fun

xerz,
@xerz@fedi.xerz.one avatar

ok so I have a conundrum

that issue is yet to be fixed on unstable presumably? but also, if I go and use nixos-22.10, then isoImage.makeBiosBootable doesn’t even exist……..

xerz,
@xerz@fedi.xerz.one avatar

in fact, it was added a month ago https://github.com/NixOS/nixpkgs/commit/e5b072eca165430efc4d7a179011a42aab4470a2

that’s some luck

xerz,
@xerz@fedi.xerz.one avatar

I read twice and I think that, in fact, the flag wasn’t needed before, it used to add the MBR bootloader by default

OK sure

xerz,
@xerz@fedi.xerz.one avatar

ok yes It Just Works™®© without my universal ISO target, goodgood :blobcatfluffowo:

xerz,
@xerz@fedi.xerz.one avatar

HELL YEAH. IT’S CDE TIME :blobcatdab:

CDE booted up on one of the very first builds of Quecto

lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz CDE on a 2023 system feels very weird, even Solaris 10 (2005) offers Gnome 1, some old Xfce and similarly old KDE.

xerz,
@xerz@fedi.xerz.one avatar

Also if you want to configure PAM to do something special such as send a slack message to some channel whenever someone logs into a machine or runs a sudo command and that option is not already in the pam options in nixpkgs, you’re basically doomed because pam is not very configurable on NixOS.

welp, thanks for the answer, Cadey

xerz,
@xerz@fedi.xerz.one avatar

at least what I want to do does seem to have an option, services.xserver.displayManager.sddm.autoLogin.minimumUid

…on SDDM, not LightDM

xerz,
@xerz@fedi.xerz.one avatar

shoutout to AMD for making all of these builds ridiculously fast to perform btw :blobcatrainbow: :blobcatrainbow: :blobcatrainbow:

xerz,
@xerz@fedi.xerz.one avatar

…wait is NixOS building Firefox as 64 bits even when the target is 32 bits?????????????????????????????????????

xerz,
@xerz@fedi.xerz.one avatar

ftr I’m handling cross-platform building with a combo of flake-utils and nixos-generators

but everything else worked as expected

xerz,
@xerz@fedi.xerz.one avatar

funnily enough, the very same Firefox build that Nix created for me runs just fine on… Arch

but yeah, it’s 64 bit???????????????

xerz,
@xerz@fedi.xerz.one avatar

I’m gonna assume that firefox is somehow an alias for firefox-bin

xerz,
@xerz@fedi.xerz.one avatar

same thing with LibreWolf, that sucks

xerz,
@xerz@fedi.xerz.one avatar

IS EVERY SINGLE BROWSER COMPILED ONLY FOR X86_64

OH

MY

GOD

lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz Someone reported that badwolf works on x86_32 (as should be) and webkit-gtk is a rather common dependency, no idea how good it is though, JS engine could be slow.

xerz,
@xerz@fedi.xerz.one avatar

@lanodan that’ll have to wait for the release of 23.05 I guess…

xerz,
@xerz@fedi.xerz.one avatar

WHY DO YOU EVEN OFFER AN I386 OPTION IF IT’S COMPLETELY FAKE????????? AM I DOING SOMETHING OBSCURELY WRONG OR??????????????

xerz,
@xerz@fedi.xerz.one avatar
lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz lol, funroll-loops.

We need a NixOS is rice.

xerz,
@xerz@fedi.xerz.one avatar

OK so I found out why it was installing x86_64 browsers all the time

I was, in my ignorance, accidentally telling Nix to install x86_64 packages 🥴

xerz,
@xerz@fedi.xerz.one avatar

Left Quecto recompiling itself with a bunch of flags for the night, it built…………… but is stuck at a black screen upon boot

xerz,
@xerz@fedi.xerz.one avatar

sadly, I couldn’t even compile with -Os, glibc didn’t like it….

xerz,
@xerz@fedi.xerz.one avatar
xerz,
@xerz@fedi.xerz.one avatar

At this point, while I love the workflow so much and it’s gotten me somewhere already, it’s starting to look like NixOS is constraining me a bit more than I need.

xerz,
@xerz@fedi.xerz.one avatar

ftr, I just checked aaaaaaaaaaaaand yeah, the OS compiled indeed, it’s all 32 bit binaries, and if I try to run e.g. coreutils or Netsurf on my Arch, they run just fine

so I definitely borked the kernel with the custom flags, I just wonder if I can make Linux itself an exception

xerz,
@xerz@fedi.xerz.one avatar

actually I’m not even sure what’s the problem, if I try to do an override on top it just…….. does nothing?

xerz,
@xerz@fedi.xerz.one avatar

so when does the 8950X come out? that’d come in quite handy right now :blobcatgooglyheadache:

xerz,
@xerz@fedi.xerz.one avatar

OK IT’S DONE AND IT WORKS, I CAN NOW USE PROPER 32 BITS AND CFLAGS EVERYWHERE :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow: :blobcatrainbow:

basically had to find out how to set nixpkgs with config.replaceStdenv ‒ apparently overlays don’t apply to every package and so I was getting ABI inconsistencies, so a lot of time was spent in a dead end (thx @K900 !)

xerz,
@xerz@fedi.xerz.one avatar

Not sure if I should further adopt Clang and/or some form of linking optimization (LTO, gold, whatevers)… this is already taking an eternity to build for what should be very trivial comparisons :blobcatsweats:

xerz,
@xerz@fedi.xerz.one avatar

Also, -Oz could be fun to try regardless of compiler, but I’m betting the most likely thing is that it will make my binaries way slower on old computers, so… probably not worth the hours upon hours of compile time?

xerz,
@xerz@fedi.xerz.one avatar

OK, so by the time it arrives at the kernel, it does... nothing. It simply fails at the linking stage no matter what.

Well uh.

xerz,
@xerz@fedi.xerz.one avatar

Yeah, no overlays seem to fix this, it looks like I have no choice but to drop at least some flags.

yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay

xerz,
@xerz@fedi.xerz.one avatar

It just fails silently, I can’t even debug it :blobcatgooglyheadache:

xerz,
@xerz@fedi.xerz.one avatar

even when trying verbose logs nothing happens???????? I just know that it happens right around

  AR      drivers/gpu/built-in.a
  AR      drivers/built-in.a

xerz,
@xerz@fedi.xerz.one avatar

I really wonder why it fails right at the finish line without saying a thing :blobcatderpy:

xerz,
@xerz@fedi.xerz.one avatar

OK waiting for failed optimizations is taking away the fun out of making an OS, I’ll leave that for last and maybe wait to save up money for some hours on a build farm or something

xerz,
@xerz@fedi.xerz.one avatar

Aaaaaaaaaaaaaaaaand pushed changes, give Quecto a try today! :blobcateyes: https://codeberg.org/xerz/quecto/

maxxcan,
@maxxcan@mastodon.social avatar

@xerz

xerz,
@xerz@fedi.xerz.one avatar

(also if you want, you can pass spectre_v2=off at GRUB for better performance at the cost of security, who cares anyway lmao)

xerz,
@xerz@fedi.xerz.one avatar

Remind me if I can set the mounting delay so the system doesn't stay pitch black during boot plsthx

Also, is Synaptics & other touchpad support missing out of the box on Nix or did I do something wrong?

xerz,
@xerz@fedi.xerz.one avatar

Honestly my partition trick mixed with flatpak --user and nix develop --store? Pretty cool :blobcatuwu:

xerz,
@xerz@fedi.xerz.one avatar

Oh yeah and presumably I need to add cryptsetup manually too

xerz,
@xerz@fedi.xerz.one avatar

OK so I'm trying to boot on a weird i5-480M+Radeon 5400… and when it reaches X11 it just stops working. Unless I go nomodeset, then X11 can't find a display.

ok

xerz,
@xerz@fedi.xerz.one avatar

what if :blobcatsip:

xerz,
@xerz@fedi.xerz.one avatar

gee, thanks Rediris 🥴

xerz,
@xerz@fedi.xerz.one avatar

……….oops?

xerz,
@xerz@fedi.xerz.one avatar

OK so I'm back to it. I think I can fix the weird hardware compatibility issue with one (1) line of code :blobcatthink:

xerz,
@xerz@fedi.xerz.one avatar

Yup

One line of code fixed it – might elaborate tomorrow, rn I must nini :blobcatsleep2:

xerz,
@xerz@fedi.xerz.one avatar

gosh do I love playing around with Quecto, I can do a query as large as grep /root $(find / -type f -name '*.mount') within mere milliseconds :blobcatmelt: 💗

xerz,
@xerz@fedi.xerz.one avatar

…I do find myself struggling with making Nix play nice tho because it’s missing one feature at a package manager configuration level :blobcatderpy:

xerz,
@xerz@fedi.xerz.one avatar

ok so how do I debug an OverlayFS mount error if all I can see is an error code 32

xerz,
@xerz@fedi.xerz.one avatar

this weird mix of Nix and Udev and Systemd and OverlayFS sure is: a thing

xerz,
@xerz@fedi.xerz.one avatar

like, it’s making my life terrible because I cannot configure a default path for nix --store, but I can also do things like systemd-analyze plot | nix run nixpkgs#feh -- - and it looks supercool :blobcatfluffowo:

xerz,
@xerz@fedi.xerz.one avatar

…I blame all of my suffering on https://github.com/systemd/systemd/issues/11301

xerz,
@xerz@fedi.xerz.one avatar

THERE YOU GO GODDAMMIT

xerz,
@xerz@fedi.xerz.one avatar

ok so now I have a brand new issue: I cannot boot from ext4 drives somehow??????????????

like, it’s perfectly fine as soon as I add fsType = ext4, I made a diff of the derivations’ JSON to see if there was anything really new but uh… yeah it only tells me the hashes of the packages it has generated, and I don’t know how to look further

xerz,
@xerz@fedi.xerz.one avatar

It should be the other way around, somehow btrfs is autodetected but not ext4?????????????

You can usually omit the file system type (fsType), since mount can usually detect the type and load the necessary kernel module automatically. However, if the file system is needed at early boot (in the initial ramdisk) and is not ext2, ext3 or ext4, then it’s best to specify fsType to ensure that the kernel module is available.

https://nixos.org/manual/nixos/stable/

xerz,
@xerz@fedi.xerz.one avatar

furthermore, adding or removing ext2/ext3/ext4 from boot.initrd.supportedFilesystems doesn’t matter at all, since it all evaluates to the exact same derivations…

xerz,
@xerz@fedi.xerz.one avatar

like, all I can guess from here is that it can't see the label without figuring out the filesystem first, and I guess it's trying to find the partition that matches without trying to figure out the filesystem first... which somehow works with Btrfs but not with ext4?????

xerz,
@xerz@fedi.xerz.one avatar

…I swear if a custom partition type ID works….

xerz,
@xerz@fedi.xerz.one avatar

...right, but MBR and GPT use different ones...

xerz,
@xerz@fedi.xerz.one avatar

so in essence and presuming this is the kernel's fault, at this point I should choose between either LABEL (deprecating ext4) or GUID/PARTLABEL (deprecating MBR)

ugh

xerz,
@xerz@fedi.xerz.one avatar

…actually holdup, let’s see if PARTLABEL even works

xerz,
@xerz@fedi.xerz.one avatar

oh yeah, GPT (the good one) should be backwards-compatible with MBR, so maybe it can even host a DOS install and everything :thinksphere:

xerz,
@xerz@fedi.xerz.one avatar
xerz,
@xerz@fedi.xerz.one avatar

ultimately, both tradeoffs suck and feel completely artificial, but one of them only affects existing hard disk drives with MS-DOS and alike, while the other affects the most common use cases for formatting...

xerz,
@xerz@fedi.xerz.one avatar

sfdisk‘s unnamed field format is a bit disappointing tbh https://man7.org/linux/man-pages/man8/sfdisk.8.html#INPUT_FORMATS

xerz,
@xerz@fedi.xerz.one avatar

for comparison, here’s how you create a disk with a single, bootable partition on each format:

unnamed

label: gpt
,,,-

named

label: gpt
bootable

xerz,
@xerz@fedi.xerz.one avatar

aaaaaaaaaaand yeah, ext4 with PARTLABEL works, guess I'm deprecating MBR

xerz,
@xerz@fedi.xerz.one avatar

back to being stuck here :blobcatrainbow:

best part is that I would be fine if Linux was not built within the flake itself, but the dependency graph couldn’t care less

xerz,
@xerz@fedi.xerz.one avatar

in theory there should be more error messages I could read more about

in practice? nope

xerz,
@xerz@fedi.xerz.one avatar

HELL YEAH GOT IT :blobcatrainbow: :blobcatrainbow: :blobcatrainbow:

…I had to replace linuxPackages, not just linux :blobcatderpy:

so far it went down from ~1.5GB to ~1.1, which is decent but needs to improve 10x yet

xerz,
@xerz@fedi.xerz.one avatar

So the only naïve thing that lowers the .iso to juuuuuuuuuuuuuuuuuuuust barely under 700MB is removing the extra hardware support I added

welp

xerz,
@xerz@fedi.xerz.one avatar

even if I do that, there's still a long way to go to fit into a MiniDisc

...and I guess I know why now

xerz,
@xerz@fedi.xerz.one avatar

literally why is rav1e here

xerz,
@xerz@fedi.xerz.one avatar

(yes, that’s 2.4GB, yes that fits into a CD, that’s the magic of Zstandard for you :blobcatrainbow: )

xerz,
@xerz@fedi.xerz.one avatar

so I ran this wonderful tool called nix-tree, very straightforward to use

so uh, apparently rav1e is required for libheif which is required for feh which for some goddamn reason is required by xsession???????????????????????????????? :blobcatgooglyheadache:

xerz,
@xerz@fedi.xerz.one avatar

OH YEAH LET ME GUESS, IT'S FOR WALLPAPER SUPPORT

WHO ASKED FOR THIS (not me)

Polychrome,

@xerz I wonder what's taking so much memory?

xerz,
@xerz@fedi.xerz.one avatar

@Polychrome wonder no more

it’s probably Squashfs I dunno?

lanodan,
@lanodan@queer.hacktivis.me avatar

@xerz Firefox? On 32-bit? That sounds like pain, would go with like netsurf.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • provamag3
  • megavids
  • tester
  • lostlight
  • All magazines