View previous topic :: View next topic |
Author |
Message |
torham n00b
Joined: 26 Jun 2023 Posts: 3
|
Posted: Tue Aug 27, 2024 6:35 pm Post subject: distributing kernels built on binhost server |
|
|
I'm looking for some advice improving the way I install my kernel from a central build machine.
For regular packages I have a binhost setup, but for the kernel I have this system compiles the kernel and I share the /usr/src/linux directory over NFS. The other systems on my network mount the NFS share and just run `make install`. However, as of late when I do this I get:
Code: | # make module_install
mkdir: cannot create directory ‘.tmp_22607’: Read-only file system
mkdir: cannot create directory ‘.tmp_22612’: Read-only file system
mkdir: cannot create directory ‘.tmp_22617’: Read-only file system
mkdir: cannot create directory ‘.tmp_22622’: Read-only file system
mkdir: cannot create directory ‘.tmp_22627’: Read-only file system
...
mkdir: cannot create directory ‘.tmp_22757’: Read-only file system
mkdir: cannot create directory ‘.tmp_22762’: Read-only file system
mkdir: cannot create directory ‘.tmp_22767’: Read-only file system
mkdir: cannot create directory ‘.tmp_22772’: Read-only file system
make[1]: *** No rule to make target 'module_install'. Stop.
make: *** [Makefile:234: __sub-make] Error 2
|
Nothing gets installed. This makes sense I guess, and though it's not clear to me why it needs to make temp directories in this spot to install, I don't think I want to make this a directory writable. How is everyone else going about this? |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1948
|
Posted: Thu Aug 29, 2024 10:51 pm Post subject: |
|
|
You can try make V=1 to get better information about what's going on, as it'll print the commands to-be-executed, but FWIW, gentoo-kernel is really made for this (working with binpkgs). |
|
Back to top |
|
|
torham n00b
Joined: 26 Jun 2023 Posts: 3
|
Posted: Fri Sep 06, 2024 1:43 am Post subject: |
|
|
Gentoo-kernel seems close to what I want, I'll experiment with it. I'd like to start my config from `make defconfig`, normally I use ./scripts/kconfig/merge_config.sh to merge my changes from this point. I do see there is a savedconfig option, so I suppose I could run `make defconfig` and copy it over every now and again. It would be nice if there was a way to run a script to prepare the config though.
I also have a custom initramfs, presumably I could put any script in /etc/kernel/preinst.d? |
|
Back to top |
|
|
freke Veteran
Joined: 23 Jan 2003 Posts: 1028 Location: Somewhere in Denmark
|
Posted: Fri Sep 06, 2024 10:03 pm Post subject: |
|
|
Is that copy/pasted output - or typed?
Shouldn't it be Code: | make modules_install | instead of Code: | make module_install |
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5084 Location: Bavaria
|
|
Back to top |
|
|
Ralphred l33t
Joined: 31 Dec 2013 Posts: 652
|
Posted: Sat Sep 07, 2024 5:52 am Post subject: Re: distributing kernels built on binhost server |
|
|
torham wrote: | However, as of late when I do this I get: "Read-only file system" | There was a fairly recent change to security defaults on NFS. I had to change export options (on a system that's been working for 15 years I might add!) to include "no_root_squash", but if you've been exporting "ro" all along then you can ignore that.
If it just wants to make .tmp-[something] files, maybe you can sidestep it with Code: | mkdir ~/local-linux; cd ~/local-linux; for file in /path/to/nfs/linux/*;do ln -s $file ./$(basename $file);done; make install;make modules_install | which makes a writable local directory and adds the contents of the NFS share as symlinks. You can obviously delete the directory afterwards.
If it is just making .tmp-[something] files though, there is probably a more elegant solution with having the kernel source directory writable by a specific user, and making sure that user is used to access it on the client end; as said user won't have the rights to delete/alter anything extant (as only the NFS host's root user would have that privilege) you can "safely" export/mount it as read/write, but that involves setting up kerberos IIRC (read: A chore if the symlink one liner works, IMHO). |
|
Back to top |
|
|
torham n00b
Joined: 26 Jun 2023 Posts: 3
|
Posted: Sat Sep 07, 2024 8:51 pm Post subject: |
|
|
Thanks for the tips everyone.
pietinger wrote: |
But I'm just wondering why you want to do a “make install” when two simple copy commands can do the job?
|
Well, it is mostly about installing the modules.
pietinger wrote: |
If you've only created a config ONCE that is exactly what you want, then you can use it over and over again by doing a “make oldconfig” with it.
|
I did do this originally, but found that the config fell out of date over time. It also seemed easier to keep track of the changes I made instead of the full config. |
|
Back to top |
|
|
|