Im getting nfsroot build error on 2 configs, both carried forward
from good rc4 and from rc3-mm1 builds.
turning off nfsroot fixes the err.
[jimc@harpo linux-2.6.17-rc4-mm1-sk]$ make
CHK include/linux/version.h
CHK include/linux/compile.h
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
fs/built-in.o(.init.text+0x15d4): In function `nfs_root_setup':
fs/nfs/nfsroot.c:399: undefined reference to `root_nfs_parse_addr'
fs/built-in.o(.init.text+0x15dc):fs/nfs/nfsroot.c:399: undefined
reference to `root_server_addr'
fs/built-in.o(.init.text+0x16d6): In function `nfs_root_data':
fs/nfs/nfsroot.c:310: undefined reference to `root_server_path'
fs/built-in.o(.init.text+0x1733):fs/nfs/nfsroot.c:331: undefined
reference to `root_server_addr'
make: *** [.tmp_vmlinux1] Error 1
A little digging suggests the problem is in here:
git-klibc.patch:13607:-u32 root_server_addr = INADDR_NONE; /* Address
of NFS server */
git-klibc.patch:13840:- if (root_server_addr == INADDR_NONE)
git-klibc.patch:13841:- root_server_addr = ic_servaddr;
git-klibc.patch:14682:- * need to have root_server_addr set _before_
IPConfig gets called as it
git-klibc.patch:14752:- && root_server_addr == INADDR_NONE
git-klibc.patch:14806:- if (root_server_addr == INADDR_NONE)
git-klibc.patch:14807:- root_server_addr = addr;
git-klibc.patch:14842:- printk(", rootserver=%u.%u.%u.%u",
NIPQUAD(root_server_addr));
git-klibc.patch:78496:+static u_int32_t root_server_addr;
git-klibc.patch:78882:+ s = getenv("root_server_addr");
git-klibc.patch:78884:+ root_server_addr = strtoul(s, NULL, 10);
git-klibc.patch:78900:+ if ((servaddr = root_server_addr) ==
INADDR_NONE) {
Im likely to try taking 'static' off of line 78496,
but that lands in: devel-akpm/usr/klibc/tests/nfs_no_rpc.c
so I suspect I dont know the proper fix.
or indeed, whether it isnt a bonehead error.
thanks in advance
Jim Cromie
Jim Cromie wrote:
>
> Im getting nfsroot build error on 2 configs, both carried forward
> from good rc4 and from rc3-mm1 builds.
> turning off nfsroot fixes the err.
>
Could you throw me your configs, so I can try to reproduce it here?
-hpa
Jim Cromie wrote:
>
> Im getting nfsroot build error on 2 configs, both carried forward
> from good rc4 and from rc3-mm1 builds.
> turning off nfsroot fixes the err.
>
> A little digging suggests the problem is in here:
>
> git-klibc.patch:
I backed out these:
[jimc@harpo lxbuild]$ diff broken-out/series broken-out/nfsroot-fix-series
229,231c229,231
< git-klibc.patch
< git-klibc-alpha-fixes.patch
< git-klibc-ident-fix.patch
---
> # git-klibc.patch
> # git-klibc-alpha-fixes.patch
> # git-klibc-ident-fix.patch
with this it compiled cleanly, but broke on boot
[ 23.133338] eth0: Setting full-duplex based on negotiated link
capability.
[ 23.151837] IP-Config: Complete:
[ 23.155028] device=eth0, addr=192.168.42.100,
mask=255.255.255.0, gw=192.168.42.1,
[ 23.163329] host=soekris, domain=, nis-domain=(none),
[ 23.168943] bootserver=192.168.42.1, rootserver=192.168.42.1,
rootpath=
[ 23.181928] Looking up port of RPC 100003/2 on 192.168.42.1
[ 23.193280] Looking up port of RPC 100005/1 on 192.168.42.1
[ 23.295101] TSC appears to be running slowly. Marking it as unstable
[ 20.564000] Time: pit clocksource has been installed.
[ 42.836000] portmap: server localhost not responding, timed out
[ 42.840000] RPC: failed to contact portmap (errno -5).
[ 77.852000] portmap: server localhost not responding, timed out
[ 77.856000] RPC: failed to contact portmap (errno -5).
[ 112.864000] portmap: server localhost not responding, timed out
[ 112.868000] RPC: failed to contact portmap (errno -5).
[ 112.876000] BUG: unable to handle kernel NULL pointer dereference at
virtual address 00000000
[ 112.884000] printing eip:
[ 112.888000] c01d4523
[ 112.888000] *pde = 00000000
[ 112.892000] Oops: 0000 [#1]
[ 112.892000] last sysfs file:
[ 112.892000] Modules linked in:
[ 112.892000] CPU: 0
[ 112.892000] EIP: 0060:[<c01d4523>] Not tainted VLI
[ 112.892000] EFLAGS: 00010286 (2.6.17-rc4-mm1-sk #1)
[ 112.892000] EIP is at _atomic_dec_and_lock+0xf/0x44
[ 112.892000] eax: c02fc508 ebx: 00000000 ecx: 00000000 edx: 000000c0
[ 112.892000] esi: fffffff4 edi: fffffff4 ebp: c113bcec esp: c113bce8
[ 112.892000] ds: 007b es: 007b ss: 0068
[ 112.892000] Process idle (pid: 1, threadinfo=c113a000 task=c11395b0)
[ 112.892000] Stack: <0>00000000 c113bd00 c0199545 00000000 c02fc508
c12c2c14 c113bd10 c0199a21
[ 112.892000] 00000000 c113bd66 c113bd40 c019a56a c12c2c14
c12c2c14 c112b4d0 c113bd44
[ 112.892000] c015bfa0 00000004 00000001 c113bd66 00000060
c113bde8 c113bdf4 c01a0162
[ 112.892000] Call Trace:
[ 112.892000] <c0102fe2> show_stack_log_lvl+0x8b/0x95 <c010315f>
show_registers+0x124/0x18a
[ 112.892000] <c0103420> die+0x14d/0x20f <c010c76d>
do_page_fault+0x438/0x52e
[ 112.892000] <c0102b7f> error_code+0x4f/0x60 <c0199545>
nfs_put_client+0x2a/0x9f
[ 112.892000] <c0199a21> nfs_free_server+0xae/0xd4 <c019a56a>
nfs_create_server+0x46e/0x47d
[ 112.892000] <c01a0162> nfs_get_sb+0x458/0x475 <c014cb4d>
vfs_kern_mount+0x34/0x95
[ 112.892000] <c014cbea> do_kern_mount+0x28/0x3c <c015fef2>
do_mount+0x5d7/0x621
[ 112.892000] <c015ffa8> sys_mount+0x6c/0xa6 <c036a6be>
do_mount_root+0x13/0x8c
[ 112.892000] <c036a92e> mount_root+0x6d/0xd9 <c036aa1c>
prepare_namespace+0x82/0xae
[ 112.892000] <c01003d9> init+0x13a/0x1ed <c0101005>
kernel_thread_helper+0x5/0xb
[ 112.892000] Code: d1 0a c1 e2 0a 8d 43 01 0f a4 d1 0a c1 e2 0a 89 06
8d 65 f8 89 d0 89 ca 5b 5e 5d c3 55 89 e5 53 8b 5d 08 8b 45 0c e8 8f dd
0c 00 <8b> 03 85 c0 75 10 68 d4 56 2b c0 e8 7d d8 f3 ff e8 e9 ea f2 ff
[ 112.892000] EIP: [<c01d4523>] _atomic_dec_and_lock+0xf/0x44 SS:ESP
0068:c113bce8
[ 112.892000] <0>Kernel panic - not syncing: Attempted to kill init!
[ 112.900000] <0>Rebooting in 5 seconds..
POST: 0123456789bcefghipajklnopq,,,tvwxy
If theres more I should try, send, etc, please let me know.
thanks
Jim Cromie
On Mon, May 15, 2006 at 09:11:15PM -0700, H. Peter Anvin wrote:
> Jim Cromie wrote:
> >
> >Im getting nfsroot build error on 2 configs, both carried forward
> >from good rc4 and from rc3-mm1 builds.
> >turning off nfsroot fixes the err.
> >
>
> Could you throw me your configs, so I can try to reproduce it here?
The problem is:
CONFIG_IP_PNP=y
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
A (compile-only) .config exhibiting this error is attached.
> -hpa
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Adrian Bunk wrote:
> On Mon, May 15, 2006 at 09:11:15PM -0700, H. Peter Anvin wrote:
>> Jim Cromie wrote:
>>> Im getting nfsroot build error on 2 configs, both carried forward
>> >from good rc4 and from rc3-mm1 builds.
>>> turning off nfsroot fixes the err.
>>>
>> Could you throw me your configs, so I can try to reproduce it here?
>
> The problem is:
>
> CONFIG_IP_PNP=y
> CONFIG_NFS_FS=y
> CONFIG_ROOT_NFS=y
>
> A (compile-only) .config exhibiting this error is attached.
>
Yeah, OK, problem recovered; total thinko on my part -- I forgot to remove the in-kernel
nfsroot code. Just setting CONFIG_ROOT_NFS=n will work just fine; right now kinit doesn't
depend on the configuration (another buglet for my list), so if you set CONFIG_ROOT_NFS=n
the kernel will compile *and* nfsroot should still work.
-hpa
H. Peter Anvin wrote:
> Adrian Bunk wrote:
>> On Mon, May 15, 2006 at 09:11:15PM -0700, H. Peter Anvin wrote:
>>> Jim Cromie wrote:
>>>> Im getting nfsroot build error on 2 configs, both carried forward
>>> >from good rc4 and from rc3-mm1 builds.
>>>> turning off nfsroot fixes the err.
>>>>
>>> Could you throw me your configs, so I can try to reproduce it here?
>>
>> The problem is:
>>
>> CONFIG_IP_PNP=y
>> CONFIG_NFS_FS=y
>> CONFIG_ROOT_NFS=y
>>
>> A (compile-only) .config exhibiting this error is attached.
>>
>
> Yeah, OK, problem recovered; total thinko on my part -- I forgot to
> remove the in-kernel nfsroot code. Just setting CONFIG_ROOT_NFS=n
> will work just fine; right now kinit doesn't depend on the
> configuration (another buglet for my list), so if you set
> CONFIG_ROOT_NFS=n the kernel will compile *and* nfsroot should still
> work.
>
> -hpa
>
Ok, it built clean, but broke on boot.
Running ipconfig
IP-Config: argc == 3
argv[1]: '-n'
argv[2]:
'nfsaddrs=192.168.42.100:192.168.42.1:192.168.42.1:255.255.255.0:soekris:eth0'
IP-Config: parse_device: "nfsaddrs=192.168.4[ 58.550017] eth0: DSPCFG
accepted after 0 usec.
[ 58.555452] eth0: link up.
[ 58.558221] eth0: Setting full-duplex based on negotiated link
capability.
2.100:192.168.42.1:192.168.42.1:255.255.255.0:soekris:eth0"
IP-Config: opt #0: '192.168.42.100'
IP-Config: opt #1: '192.168.42.1'
IP-Config: opt #2: '192.168.42.1'
IP-Config: opt #3: '255.255.255.0'
IP-Config: opt #4: 'soekris'
IP-Config: opt #5: 'eth0'
IP-Config: eth0 hardware address 00:00:24:c2:46:c8 mtu 1500
IP-Config: eth0 guessed broadcast address 192.168.42.255
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 192.168.42.1 [ 58.616298] Kernel panic - not syncing:
Attempted to kill init!
dns0 : 192.[ 58.622750] 168.42.1 dns<0>Rebooting in 5
seconds..1 : 0.0.0.0
host : soekris
rootserver: 192.168.42.1 rootpath:
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
NFS-Root: mounting console=ttyS0,115200n81 on /root with options 'none'
kinit: need a server
Checking for init: /sbin/init
Checking for init: /bin/init
Checking for init: /etc/init
Checking for init: /bin/sh
kinit: init not found!
POST: 0123456789bcefghipajklnopq,,,tvwxy
Jim Cromie wrote:
>>
> Ok, it built clean, but broke on boot.
>
What does the full command line look like?
-hpa
H. Peter Anvin wrote:
> Jim Cromie wrote:
>>>
>> Ok, it built clean, but broke on boot.
>>
>
> What does the full command line look like?
>
> -hpa
>
I presume you mean the kernel boot-line, since last post included the
'Running ipconfig'
Ive been banging at the kernel with permutations of the following
pxelinux stanza.
LABEL I 2.6.17-rc4-mm1-sk
MENU LABEL ^i. 2.6.17-rc4-mm1-sk
KERNEL vmlinuz-2.6.17-rc4-mm1-sk
APPEND console=ttyS0,115200n81 root=/dev/nfs
nfsroot=/nfshost/truck
ip=192.168.42.100:192.168.42.1:192.168.42.1:255.255.255.0:soekris:eth0
panic=5
I think the problem lies with picking up a decent 'rootpath', since that
part of the output is always empty, for all variations tried so far..
[ 58.619824] Kernel command line: console=ttyS0,115200n81
root=/dev/nfs nfsroot=192.168.42.1:/nfshost/truck
ip=::192.168.42.1:255.255.255.0:soekris:eth0 panic=5
BOOT_IMAGE=vmlinuz-2.6.17-rc4-mm1-sk
Running ipconfig
IP-Config: argc == 3
argv[1]: '-n'
argv[2]: 'ip=::192.168.42.1:255.255.255.0:soekris:eth0'
IP-Config: parse_device: "ip=::192.168.42.1:255.255.255.0:soekris:eth0"
IP-[ 63.978181] eth0: DSPCFG accepted after 0 usec.
[ 63.983643] eth0: link up.
[ 63.986413] eth0: Setting full-duplex based on negotiated link
capability.
Config: opt #2: '192.168.42.1'
IP-Config: opt #3: '255.255.255.0'
IP-Config: opt #4: 'soekris'
IP-Config: opt #5: 'eth0'
IP-Config: eth0 hardware address 00:00:24:c2:46:c8 mtu 1500 DHCP RARP
eth0: state = 2
timeout
Delta: 10 ms
Delta: 5 ms
eth0: state = 2
Delta: 5 ms
Delta: 7 ms
eth0: state = 2
Delta: 5 ms
Delta: 12 ms
eth0: state = 2
Delta: 5 ms
Delta: 7 ms
eth0: state = 2
Delta: 5 ms
Delta: 6 ms
eth0: state = 2
Delta: 5 ms
Delta: 6 ms
eth0: state = 2
Delta: 5 ms
Delta: 5 ms
eth0: state = 2
[ 64.092414] TSC appears to be running slowly. Marking it as unstable
[ 20.596000] Time: pit clocksource has been installed.
Delta: 606 ms
Delta: 396 ms
eth0: state = 2
timeout
-> dhcp discover xid 5a2913c7 secs 1
udp src 68 dst 67
ip src 0.0.0.0 dst 255.255.255.255
bytes 283
<- bytes 328
ip src 192.168.42.1 dst 192.168.42.100
udp src 67 dst 68
dhcp xid 5a2913c7
dhcp offer
-> dhcp request xid 5a2913c7 secs 1
udp src 68 dst 67
ip src 0.0.0.0 dst 255.255.255.255
bytes 295
Delta: 3 ms
Delta: 1004 ms
eth0: state = 3
timeout
-> dhcp request xid 5a2913c7 secs 2
udp src 68 dst 67
ip src 0.0.0.0 dst 255.255.255.255
bytes 295
<- bytes 328
ip src 192.168.42.1 dst 192.168.42.100
udp src 67 dst 68
dhcp xid 5a2913c7
dhcp ack
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 0.0.0.0 dns0 : 192.168.42.1 dns1 : 0.0.0.0
rootserver: 192.168.42.1 rootpath:
eth0: state = 4
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
NFS-Root: mounting console=ttyS0,115200n81 on /root with options 'none'
this 'mount' -------------^---------- is clearly broken,
DEBUG(("NFS-Root: mounting %s on %s with options '%s'\n",
argv[a - 1], mtpt, opts ? opts : "none"));
though I havent un-wound it back far enough to figure whether this kinit
function
actually wants to look at the entire kernel boot-line (the IP-Config:
argc part
shows that this prog/tool/thingy doesnt get the entire boot-line (so it
will never see the nfsroot= bit)
kinit: ne[ 22.664000] Kernel panic - not syncing: Attempted to kill init!
ed a server
Che[ 22.668000] cking for init: <0>Rebooting in 5 seconds../sbin/init
Checking for init: /bin/init
Checking for init: /etc/init
Checking for init: /bin/sh
kinit: init not found!
POST: 0123456789bcefghipajklnopq,,,tvwxy
another run, with some alterations on kernel cmdline
[ 114.558035] Kernel command line:
ip=::192.168.42.1:255.255.255.0:soekris:eth0 panic=5
console=ttyS0,115200n81 root=/dev/nfs nfsroot=/nfshost/truck
BOOT_IMAGE=vmlinuz-2.6.17-rc4-mm1-sk
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 0.0.0.0 dns0 : 192.168.42.1 dns1 : 0.0.0.0
rootserver: 192.168.42.1 rootpath:
eth0: state = 4
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
NFS-Root: mounting ip= on /root with options 'none'
kinit: need a server
Check[ 22.664000] Kernel panic - not syncing: Attempted to kill init!
ing for init: /s[ 22.668000] bin/init
Checki<0>Rebooting in 5 seconds..ng for init: /bin/init
Checking for init: /etc/init
Checking for init: /bin/sh
kinit: init not found!
POST: 0123456789bcefghipajklnopq,,,tvwxy
[ 19.417201] Kernel command line: ip=::::soekris:eth0 panic=5
console=ttyS0,115200n81 root=/dev/nfs nfsroot=/nfshost/truck
BOOT_IMAGE=vmlinuz-2.6.17-rc4-mm1-sk
Running ipconfig
IP-Config: argc == 3
argv[1]: '-n'
argv[2]: 'ip=::::soekris:eth0'
IP-Config: parse_device: "ip=::::soekris:eth0"
IP-Config: opt #4: 'soekris'
IP-Config: opt #5: 'eth[ 24.771544] eth0: DSPCFG accepted after 0 usec.
[ 24.777287] eth0: link up.
[ 24.780061] eth0: Setting full-duplex based on negotiated link
capability.
0'
IP-Config: eth0 hardware address 00:00:24:c2:46:c8 mtu 1500 DHCP RARP
eth0: state = 2
< good dhcp negotiation trimmed>
ip src 192.168.42.1 dst 192.168.42.100
udp src 67 dst 68
dhcp xid 03859cb5
dhcp ack
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 0.0.0.0 dns0 : 192.168.42.1 dns1 : 0.0.0.0
rootserver: 192.168.42.1 rootpath:
eth0: state = 4
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
NFS-Root: mounting ip= on /root with options 'none'
^ again, argv[a - 1] passed to
mount_nfs_root() has garbage in it.
kinit: need a server
Checkin[ 22.656000] Kernel panic - not syncing: Attempted to kill init!
g for init: /sbi[ 22.660000] n/init
Checking<0>Rebooting in 5 seconds.. for init: /bin/init
Checking for init: /etc/init
Checking for init: /bin/sh
kinit: init not found!
OK - one more run, this time with root-path option given via dhcpd
host soekris {
hardware ethernet 00:00:24:C2:46:C8;
fixed-address 192.168.42.100;
filename "pxelinux.0";
option root-path "/nfshost/truck";
}
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 0.0.0.0 dns0 : 192.168.42.1 dns1 : 0.0.0.0
rootserver: 192.168.42.1 rootpath: /nfshost/truck
eth0: state = 4
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
nfsroot=/nfshost/truck overrides boot server bootpath /nfshost/truck
^ output shows that the boot-line is being picked up, so apparently its
just not getting passed properly into
int mount_nfs_root(int argc, char *argv[], int flags)
..I think.. FMIIW .. (thats Forgive!)
NFS-Root: mo[ 22.656000] Kernel panic - not syncing: Attempted to kill
init!
unting ip= on /r[ 22.664000] oot with options<0>Rebooting in 5
seconds.. 'none'
kinit: need a server
Checking for init: /sbin/init
Checking for init: /bin/init
Checking for init: /etc/init
Checking for init: /bin/sh
kinit: init not found!
hth,
thanks for yours,
-jimc
Jim Cromie wrote:
> H. Peter Anvin wrote:
>> Jim Cromie wrote:
>>>>
>>> Ok, it built clean, but broke on boot.
>>>
>>
>> What does the full command line look like?
>>
>> -hpa
>>
> I presume you mean the kernel boot-line, since last post included the
> 'Running ipconfig'
>
> Ive been banging at the kernel with permutations of the following
> pxelinux stanza.
>
> LABEL I 2.6.17-rc4-mm1-sk
> MENU LABEL ^i. 2.6.17-rc4-mm1-sk
> KERNEL vmlinuz-2.6.17-rc4-mm1-sk
> APPEND console=ttyS0,115200n81 root=/dev/nfs
> nfsroot=/nfshost/truck
> ip=192.168.42.100:192.168.42.1:192.168.42.1:255.255.255.0:soekris:eth0
> panic=5
>
> I think the problem lies with picking up a decent 'rootpath', since that
> part of the output is always empty, for all variations tried so far..
>
Okay, this is probably a result of specifying the NFS server in the ip=
option and the nfsroot not having a server. I will try to debug this
and straighten it out.
-hpa
H. Peter Anvin wrote:
> Jim Cromie wrote:
>> H. Peter Anvin wrote:
>>> Jim Cromie wrote:
>>>>>
>>>> Ok, it built clean, but broke on boot.
>>>>
>>>
>>> What does the full command line look like?
>>>
>>> -hpa
>>>
>> I presume you mean the kernel boot-line, since last post included the
>> 'Running ipconfig'
>>
>> Ive been banging at the kernel with permutations of the following
>> pxelinux stanza.
>>
>> LABEL I 2.6.17-rc4-mm1-sk
>> MENU LABEL ^i. 2.6.17-rc4-mm1-sk
>> KERNEL vmlinuz-2.6.17-rc4-mm1-sk
>> APPEND console=ttyS0,115200n81 root=/dev/nfs
>> nfsroot=/nfshost/truck
>> ip=192.168.42.100:192.168.42.1:192.168.42.1:255.255.255.0:soekris:eth0
>> panic=5
>>
>> I think the problem lies with picking up a decent 'rootpath', since that
>> part of the output is always empty, for all variations tried so far..
>>
>
> Okay, this is probably a result of specifying the NFS server in the
> ip= option and the nfsroot not having a server. I will try to debug
> this and straighten it out.
>
ok - that may need attention, but its also my misunderstanding of the
rootpath field;
which describes only what it got from dhcp, I was looking for the
cmd-line arg
to show up there also. the 'complete' threw me.
Anyway, I passed it in via dhcp.conf, so I now get this, (and
command-line override)
IP-Config: eth0 guessed nameserver address 192.168.42.1
IP-Config: eth0 complete (from 192.168.42.1):
address: 192.168.42.100 broadcast: 192.168.42.255 netmask:
255.255.255.0
gateway: 0.0.0.0 dns0 : 192.168.42.1 dns1 : 0.0.0.0
rootserver: 192.168.42.1 rootpath: /nfshost/truck
eth0: state = 4
kinit: do_mounts
kinit: name_to_dev_t(/dev/nfs) = dev(0,255)
kinit: root_dev = dev(0,255)
nfsroot=/nfshost/truck overrides boot server bootpath /nfshost/truck
NFS-Root: mo[ 22.660000] Kernel panic - not syncing: Attempted to kill
init!
unting ip= on /r[ 22.668000] oot with options<0>Rebooting in 5
seconds.. 'none'
kinit: need a server
Checking for init: /sbin/init
Checking for init: /bin/init
Ive added this, but havent yet seen its output :-/
[jimc@harpo kinit]$ diff -u nfsmount/main.c~ nfsmount/main.c
--- nfsmount/main.c~ 2006-05-15 10:03:56.000000000 -0600
+++ nfsmount/main.c 2006-05-17 11:39:59.000000000 -0600
@@ -247,6 +247,10 @@
return 1;
#endif
+ fprintf(stderr, "nfs_mount:"
+ "rem_name %s, hostname %s, server %x, rem_path %s, path
%s\n",
+ rem_name, hostname, server, rem_path, path);
+
if (nfs_mount(rem_name, hostname, server, rem_path, path,
&mount_data) != 0)
return 1;
> -hpa
>
thanks
diff -ruNp -X dontdiff -X exclude-diffs linux-2.6.17-rc4-mm1/usr/kinit/nfsmount/main.c linux-2.6.17-rc4-mm1-ska/usr/kinit/nfsmount/main.c
--- linux-2.6.17-rc4-mm1/usr/kinit/nfsmount/main.c 2006-05-17 14:57:55.000000000 -0600
+++ linux-2.6.17-rc4-mm1-ska/usr/kinit/nfsmount/main.c 2006-05-17 16:47:59.000000000 -0600
@@ -203,13 +203,19 @@ int nfsmount_main(int argc, char *argv[]
return 1;
}
}
+ fprintf(stderr, "%s options done: args remaining: %d\n",
+ progname, optind);
+ for (c=0; argv[c]; c++)
+ fprintf(stderr, "arg %d: %s\n", c, argv[c]);
+
+ // optind++; // remove the 'NFS-Mount'
if (optind == argc) {
fprintf(stderr, "%s: need a path\n", progname);
return 1;
}
-
- hostname = rem_path = argv[optind];
+ c = 1;
+ hostname = rem_path = argv[c]; //optind];
if ((rem_name = strdup(rem_path)) == NULL) {
perror("strdup");
@@ -217,25 +223,30 @@ int nfsmount_main(int argc, char *argv[]
}
if ((rem_path = strchr(rem_path, ':')) == NULL) {
- fprintf(stderr, "%s: need a server\n", progname);
+ fprintf(stderr, "%s: need a server address: (%s) ng\n",
+ progname, hostname);
return 1;
}
*rem_path++ = '\0';
+ fprintf(stderr, "rem_name: %s rem_path: %s\n", rem_name, rem_path);
if (*rem_path != '/') {
- fprintf(stderr, "%s: need a path\n", progname);
+ fprintf(stderr, "%s: now need a path\n", progname);
return 1;
}
+ fprintf(stderr, "server %x hostname %s\n", server, hostname);
server = parse_addr(hostname);
+ fprintf(stderr, "server %x hostname %s\n", server, hostname);
if (optind <= argc - 2)
path = argv[optind + 1];
else
path = "/nfs_root";
- check_path(path);
+ fprintf(stderr, "path %s\n", path);
+ //check_path(path);
#if! _KLIBC_NO_MMU
/* Note: uClinux can't fork(), so the spoof portmapper is not
@@ -247,6 +258,10 @@ int nfsmount_main(int argc, char *argv[]
return 1;
#endif
+ fprintf(stderr,"nfs_mount: "
+ "rem_name %s, hostname %s, server %x, rem_path %s, path %s\n",
+ rem_name, hostname, server, rem_path, path);
+
if (nfs_mount(rem_name, hostname, server, rem_path, path,
&mount_data) != 0)
return 1;
diff -ruNp -X dontdiff -X exclude-diffs linux-2.6.17-rc4-mm1/usr/kinit/nfsroot.c linux-2.6.17-rc4-mm1-ska/usr/kinit/nfsroot.c
--- linux-2.6.17-rc4-mm1/usr/kinit/nfsroot.c 2006-05-17 14:57:55.000000000 -0600
+++ linux-2.6.17-rc4-mm1-ska/usr/kinit/nfsroot.c 2006-05-17 15:41:33.000000000 -0600
@@ -97,12 +97,15 @@ int mount_nfs_root(int argc, char *argv[
}
DEBUG(("NFS-Root: mounting %s on %s with options '%s'\n",
- argv[a - 1], mtpt, opts ? opts : "none"));
+ nfs_argv[1], mtpt, opts ? opts : "none"));
nfs_argv[a++] = mtpt;
nfs_argv[a] = NULL;
assert(a <= NFS_ARGC);
+ for (ret = 0; ret<a; ret++)
+ DEBUG(("arg %d: %s'\n", ret, nfs_argv[ret]));
+
if ((ret = nfsmount_main(a, nfs_argv)) != 0) {
ret = -1;
goto done;