On 05/02/2014 18:50, James wrote: > Ok, > > So I'm running Grub2, openrc, and a gentoo patched kernel. This is > a new system I've been fiddling with, so the problem could easily > be my oversite. > > I'v build several kernels. I go into the advanced tab upon reboot > and boot up the latest kernel I've compiled, (3.13.1-gentoo). It > boot fine. Printing works. lp and lpr still do not work for printing > raw text files? I used cups and hplip (8600 pro officejet). All > other printing is find. > > > Here is what has me stumped.I started out with this kernel: > kernel-3.10.25-gentoo. Since I have built and successfully > ran (most things) on these kernels too: kernel-3.13.0-gentoo-r1 > and last: kernel-3.13.1-gentoo. > > I have built these kernels same way as all others > > cd /usr/src/ > ln -sf <target kernel> linux > cd linux > make && make modules && make modules_install > cp arch/x86_64/boot/bzImage /boot/kernel-3.13.1-gentoo > cp System.map /boot/System.map-3.13.1-gentoo > cp .config /boot/config-3.13.1-gentoo > grub2-mkconfig -o /boot/grub/grub.cfg > > So the new kernels work, but, besides permission problems, it only looks > to the original /lib/modules/ dir for modules (example): > > # /etc/init.d/cupsd restart > Stopping cupsd ... > /etc/init.d/../conf.d/modules: line 25: > /lib/modules/3.10.25-gentoo/kernel/drivers/char/kcopy/kcopy.ko: Permission > denied > > <same for these modules: nf_nat_sip.ko, nf_nat_irc.ko > xt_LOG.ko, xt_nat.ko xt_mark.ko nf_nat.ko > nf_nat_ftp.ko ipt_MASQUERADE.ko iptable_nat.ko nf_nat_ipv4.ko> > > ERROR: modules failed to start > Starting cupsd ... > > So what should the perms. be and what do I need to do to get it to > point to the kernel I'm booting, 3.13.1-gentoo ?
Ordinarily permissions should not apply as it's root doing the work (the kernel mostly pretends there are no permissions when root is involved). FWIW, the permissions on all modules files is 644: khamul modules # pwd /lib/modules khamul modules # ls -al total 36 drwxr-xr-x 7 root root 4096 Jan 27 09:36 . drwxr-xr-x 16 root root 12288 Feb 2 10:51 .. drwxr-xr-x 4 root root 4096 Feb 2 09:42 3.11.10-gentoo drwxr-xr-x 5 root root 4096 Feb 2 09:40 3.12.7-gentoo drwxr-xr-x 5 root root 4096 Feb 2 09:40 3.12.8-gentoo drwxr-xr-x 4 root root 4096 Feb 2 18:01 3.12.9-gentoo drwxr-xr-x 4 root root 4096 Feb 2 09:43 3.13.0-gentoo-r1 khamul modules # find /lib/modules -type f -not -perm 644 khamul modules # That's what I just get with make && make modules && make modules_install with no further intervention. But even your 600 permissions should also work as normal. > > It is a grub 2 thing or what? > /lib/modules/3.13.1-gentoo/kernel/net/netfilter > total 100K > -rw------- 1 root root 25K Feb 4 09:17 nf_nat.ko > -rw------- 1 root root 6.0K Feb 4 09:17 nf_nat_ftp.ko > -rw------- 1 root root 5.6K Feb 4 09:17 nf_nat_irc.ko > -rw------- 1 root root 15K Feb 4 09:17 nf_nat_sip.ko > -rw------- 1 root root 22K Feb 4 09:17 xt_LOG.ko > -rw------- 1 root root 4.5K Feb 4 09:17 xt_mark.ko > -rw------- 1 root root 5.5K Feb 4 09:17 xt_nat.ko > > /lib/modules/3.10.25-gentoo/kernel/net/netfilter > total 100K > -rw-r--r-- 1 root root 27K Jan 14 23:28 nf_nat.ko > -rw-r--r-- 1 root root 6.0K Jan 14 23:28 nf_nat_ftp.ko > -rw-r--r-- 1 root root 5.5K Jan 14 23:28 nf_nat_irc.ko > -rw-r--r-- 1 root root 16K Jan 14 23:28 nf_nat_sip.ko > -rw-r--r-- 1 root root 22K Jan 14 23:28 xt_LOG.ko > -rw-r--r-- 1 root root 4.5K Jan 14 23:28 xt_mark.ko > -rw-r--r-- 1 root root 5.5K Jan 14 23:28 xt_nat.ko > > > What did I miss, besides the permissions? Do you have some MAC system like SELinux configured? Necessary filesystems like /proc or /dev omitted in that problematic kernel? I can't think of anything else that could interfere with root's ability to do what root does. -- Alan McKinnon alan.mckin...@gmail.com