1 |
On 05/02/2014 18:50, James wrote: |
2 |
> Ok, |
3 |
> |
4 |
> So I'm running Grub2, openrc, and a gentoo patched kernel. This is |
5 |
> a new system I've been fiddling with, so the problem could easily |
6 |
> be my oversite. |
7 |
> |
8 |
> I'v build several kernels. I go into the advanced tab upon reboot |
9 |
> and boot up the latest kernel I've compiled, (3.13.1-gentoo). It |
10 |
> boot fine. Printing works. lp and lpr still do not work for printing |
11 |
> raw text files? I used cups and hplip (8600 pro officejet). All |
12 |
> other printing is find. |
13 |
> |
14 |
> |
15 |
> Here is what has me stumped.I started out with this kernel: |
16 |
> kernel-3.10.25-gentoo. Since I have built and successfully |
17 |
> ran (most things) on these kernels too: kernel-3.13.0-gentoo-r1 |
18 |
> and last: kernel-3.13.1-gentoo. |
19 |
> |
20 |
> I have built these kernels same way as all others |
21 |
> |
22 |
> cd /usr/src/ |
23 |
> ln -sf <target kernel> linux |
24 |
> cd linux |
25 |
> make && make modules && make modules_install |
26 |
> cp arch/x86_64/boot/bzImage /boot/kernel-3.13.1-gentoo |
27 |
> cp System.map /boot/System.map-3.13.1-gentoo |
28 |
> cp .config /boot/config-3.13.1-gentoo |
29 |
> grub2-mkconfig -o /boot/grub/grub.cfg |
30 |
> |
31 |
> So the new kernels work, but, besides permission problems, it only looks |
32 |
> to the original /lib/modules/ dir for modules (example): |
33 |
> |
34 |
> # /etc/init.d/cupsd restart |
35 |
> Stopping cupsd ... |
36 |
> /etc/init.d/../conf.d/modules: line 25: |
37 |
> /lib/modules/3.10.25-gentoo/kernel/drivers/char/kcopy/kcopy.ko: Permission |
38 |
> denied |
39 |
> |
40 |
> <same for these modules: nf_nat_sip.ko, nf_nat_irc.ko |
41 |
> xt_LOG.ko, xt_nat.ko xt_mark.ko nf_nat.ko |
42 |
> nf_nat_ftp.ko ipt_MASQUERADE.ko iptable_nat.ko nf_nat_ipv4.ko> |
43 |
> |
44 |
> ERROR: modules failed to start |
45 |
> Starting cupsd ... |
46 |
> |
47 |
> So what should the perms. be and what do I need to do to get it to |
48 |
> point to the kernel I'm booting, 3.13.1-gentoo ? |
49 |
|
50 |
Ordinarily permissions should not apply as it's root doing the work (the |
51 |
kernel mostly pretends there are no permissions when root is involved). |
52 |
|
53 |
FWIW, the permissions on all modules files is 644: |
54 |
|
55 |
khamul modules # pwd |
56 |
/lib/modules |
57 |
khamul modules # ls -al |
58 |
total 36 |
59 |
drwxr-xr-x 7 root root 4096 Jan 27 09:36 . |
60 |
drwxr-xr-x 16 root root 12288 Feb 2 10:51 .. |
61 |
drwxr-xr-x 4 root root 4096 Feb 2 09:42 3.11.10-gentoo |
62 |
drwxr-xr-x 5 root root 4096 Feb 2 09:40 3.12.7-gentoo |
63 |
drwxr-xr-x 5 root root 4096 Feb 2 09:40 3.12.8-gentoo |
64 |
drwxr-xr-x 4 root root 4096 Feb 2 18:01 3.12.9-gentoo |
65 |
drwxr-xr-x 4 root root 4096 Feb 2 09:43 3.13.0-gentoo-r1 |
66 |
khamul modules # find /lib/modules -type f -not -perm 644 |
67 |
khamul modules # |
68 |
|
69 |
|
70 |
That's what I just get with make && make modules && make modules_install |
71 |
with no further intervention. |
72 |
|
73 |
But even your 600 permissions should also work as normal. |
74 |
|
75 |
> |
76 |
> It is a grub 2 thing or what? |
77 |
> /lib/modules/3.13.1-gentoo/kernel/net/netfilter |
78 |
> total 100K |
79 |
> -rw------- 1 root root 25K Feb 4 09:17 nf_nat.ko |
80 |
> -rw------- 1 root root 6.0K Feb 4 09:17 nf_nat_ftp.ko |
81 |
> -rw------- 1 root root 5.6K Feb 4 09:17 nf_nat_irc.ko |
82 |
> -rw------- 1 root root 15K Feb 4 09:17 nf_nat_sip.ko |
83 |
> -rw------- 1 root root 22K Feb 4 09:17 xt_LOG.ko |
84 |
> -rw------- 1 root root 4.5K Feb 4 09:17 xt_mark.ko |
85 |
> -rw------- 1 root root 5.5K Feb 4 09:17 xt_nat.ko |
86 |
> |
87 |
> /lib/modules/3.10.25-gentoo/kernel/net/netfilter |
88 |
> total 100K |
89 |
> -rw-r--r-- 1 root root 27K Jan 14 23:28 nf_nat.ko |
90 |
> -rw-r--r-- 1 root root 6.0K Jan 14 23:28 nf_nat_ftp.ko |
91 |
> -rw-r--r-- 1 root root 5.5K Jan 14 23:28 nf_nat_irc.ko |
92 |
> -rw-r--r-- 1 root root 16K Jan 14 23:28 nf_nat_sip.ko |
93 |
> -rw-r--r-- 1 root root 22K Jan 14 23:28 xt_LOG.ko |
94 |
> -rw-r--r-- 1 root root 4.5K Jan 14 23:28 xt_mark.ko |
95 |
> -rw-r--r-- 1 root root 5.5K Jan 14 23:28 xt_nat.ko |
96 |
> |
97 |
> |
98 |
> What did I miss, besides the permissions? |
99 |
|
100 |
Do you have some MAC system like SELinux configured? Necessary |
101 |
filesystems like /proc or /dev omitted in that problematic kernel? |
102 |
|
103 |
I can't think of anything else that could interfere with root's ability |
104 |
to do what root does. |
105 |
|
106 |
|
107 |
-- |
108 |
Alan McKinnon |
109 |
alan.mckinnon@×××××.com |