README.md (3937B)
1 CRUX-MUSL (unofficial) 2 =========== 3 4 CRUX-MUSL is basically just [CRUX](https://crux.nu/) but using [musl](https://musl.libc.org/) instead of [glibc](https://www.gnu.org/software/libc/) as standard C library. Many Official CRUX ports required patches to make it work with musl. So this repo contains those patched ports. 5 6 You can't just install or replace libc library of your system but you need rebuild/rebootstrap new system. But I already did that, you can get prebuilt CRUX-MUSL tarball [here](https://sourceforge.net/projects/crux-musl/). 7 8 INSTALL 9 ------- 10 11 > disclaimer: if you faced any issue, broken build and etc, please open issue here! don't get help from Official CRUX, they won't help you. 12 13 - prepare your partition and mount it somewhere 14 ``` 15 # ?disk /dev/sd? 16 # mkfs.???? /dev/sd?? 17 # mkdir /mnt/???? 18 # mount /dev/sd?? /mnt/???? 19 ``` 20 21 - extract `CRUX-MUSL` tarball 22 ``` 23 # tar xvf CRUX-MUSL-20240801.tar.xz -C /mnt/???? 24 ``` 25 26 - for UEFI, create EFI partition and mount it to `/mnt/????/boot/efi` 27 ``` 28 # mkfs.fat -F 32 /dev/sd?? 29 # mount /dev/sd?? /mnt/????/boot/efi 30 ``` 31 32 - enter chroot of your CRUX-MUSL system 33 ``` 34 # mount --bind /dev /mnt/????/dev 35 # mount --bind /tmp /mnt/????/tmp 36 # mount --bind /run /mnt/????/run 37 # mount -t proc proc /mnt/????/proc 38 # mount -t sysfs none /mnt/????/sys 39 # mount -t devpts -o noexec,nosuid,gid=tty,mode=0620 devpts /mnt/????/dev/pts 40 (UEFI only) # mount --bind /sys/firmware/efi/efivars /mnt/????/sys/firmware/efi/efivars 41 (for working internet) cp -L /etc/resolv.conf /mnt/????/etc 42 # chroot /mnt/???? /bin/bash 43 ``` 44 > Note: Further on this guide you can just configure your CRUX-MUSL follow [Official CRUX installation guide](https://crux.nu/Main/Handbook3-7#ntoc9) (skip locale section). 45 46 - set root password 47 ``` 48 # passwd 49 ``` 50 51 - add your user 52 ``` 53 # useradd -m -G users,wheel,audio,video,input -s /bin/bash <your user> 54 # passwd <your user> 55 ``` 56 57 - configure `/etc/fstab` 58 ``` 59 # vim /etc/fstab 60 ``` 61 62 - configure `/etc/rc.conf` 63 ``` 64 # vim /etc/rc.conf 65 ``` 66 67 - configure `/etc/rc.d/net`, `/etc/hosts` and `/etc/resolv.conf` as needed 68 ``` 69 # vim /etc/rc.d/net 70 # vim /etc/hosts 71 # vim /etc/resolv.conf 72 ``` 73 74 - download kernel and configure it 75 ``` 76 # cd /usr/src 77 # curl -O https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.2.tar.xz (change kernel version as you need) 78 # tar xf linux-6.10.2.tar.xz 79 # cd linux-6.10.2 80 # make menuconfig 81 # make all 82 # make install 83 # make modules_install 84 # ln -s vmlinuz /boot/vmlinux-crux (grub won't detect 'vmlinuz' but 'vmlinuz-<something/version>') 85 ``` 86 87 - configure bootloader (i will only cover grub here) 88 ``` 89 # grub-install /dev/sd? 90 # grub-mkconfig -o /boot/grub/grub.cfg 91 ``` 92 93 - exit chroot environment 94 ``` 95 # exit 96 ``` 97 98 - unmount CRUX-MUSL partition 99 ``` 100 # umount -Rv /mnt/????/* 101 # umount -Rv /mnt/???? 102 ``` 103 104 - reboot and enjoy musl version of CRUX distribution :D 105 ``` 106 # reboot 107 ``` 108 109 POST INSTALL NOTES 110 ------------------ 111 112 - some packages built with musl produces same `/usr/lib/charset.alias` that causing file conflict when `pkgadd` try to install them. So you might need to add `INSTALL ^usr/lib/charset.alias NO` line to `/etc/pkgadd.conf`. 113 - `revdep` tool provided by `prt-utils` package is not work on CRUX-MUSL, so I already wrote the alternative script called `revdep-musl` provided by `prt-get` package from this repo. 114 - if you found ports does not compile but not in this repo, you can open issue and I will try patch it. 115 - you can also contribute your patched ports here so everyone else can use it too. 116 117 bonus tips 118 ---------- 119 120 - add `INSTALL ^.*\.la$ NO` to `/etc/pkgadd.conf` to avoid obsolete libtool files (*.la) got installed which could prevent you wasting time on rebuilding almost half ports to just fixing libtool build error. And adding `INSTALL ^usr/lib/ImageMagick-.*\.la$ YES` to allowing *.la files from `imagemagick` to get installed which is required for its utilities. [read](https://www.linuxfromscratch.org/blfs/view/svn/introduction/la-files.html)