Editing Devuan on N900
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 170: | Line 170: | ||
- | The second problem of our system is SELinux. It is probably not needed (and if I am not wrong it is disabled in the kernel); in any case, at boot the | + | The second problem of our system is SELinux. It is probably not needed (and if I am not wrong it is disabled in the kernel); in any case, at boot the /sys/fs/selinux node is not mounted, and the init process, calling a function from libselinux to check whether selinux is enabled, tries anyway to mount the selinux filesystem: being unable to do that, it complains “loudly.” I found two solutions to this “issue:” an easy workaround, and a modification of the init code. |
- | The workaround consists in simply creating a | + | The workaround consists in simply creating a /selinux (empty) folder. In this way, the functions from libselinux, when they don’t find /sys/fs/selinux, mount the selinux fs at /selinux (and don’t complain anymore). Besides this, I disabled selinux in /etc/selinux/config by changing the declaration of the SELINUX variable to: |
- | + | SELINUX=disabled | |
- | If one does not like the | + | If one does not like the /selinux workaround, it is possible to modify the init code (and disable selinux in its config file as above). I think there is a bug here, since the code should not try to mount selinux in any case; however, the simplest thing to do is to get the source code for sysvinit and re-build it without declaring the WITH_SELINUX variable: this cancels out the pieces of code which take care of selinux. Here however we need the arm-linux-gnueabihf toolchain, due to a missing crypt library in the arm-none-eabi one. |
- | So let’s exit the chroot jail and the | + | So let’s exit the chroot jail and the n900 directory, and do: |
- | + | apt-get source sysvinit | |
- | + | cd sysvinit* (the actual name of the directory has the version appended) | |
- | + | export CC=arm-linux-gnueabihf-gcc | |
- | + | make | |
- | This should build the init code; I got a few warnings, but no errors. The new init binary is at | + | This should build the init code; I got a few warnings, but no errors. The new init binary is at src/init, and should replace the sbin/init in the n900 directory. |
Learn more about Contributing to the wiki.