DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default netstart equivalent .. pkg_add error

Hi everybody !

In OpenBSD, I usually do a $ sudo sh /etc/netstart to restart network ..
I wonder if there is an equivalent command for NetBSD .. to painlessly restart network ..


another question related to pkg_add :

in NetBSD 5.1 , pkg_add sends back an error message that reads something like : " .. is made with a newer pkg_install ..
what is the correct way to deal with this issue ?

Thanks !
Reply With Quote
  #2   (View Single Post)  
Old 13th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by daemonfowl View Post
in NetBSD 5.1 , pkg_add sends back an error message that reads something like : " .. is made with a newer pkg_install ..
what is the correct way to deal with this issue ?
Is the message like this example?:
Code:
pkg_add: Warning: package `ImageMagick-6.7.3.1nb2' was built for a platform:
pkg_add: NetBSD/i386 5.0.2 (pkg) vs. NetBSD/i386 5.1.0_PATCH (this host)
If not, please post the exact message. If so, my response has been to ignore the message and haven't had any problems. (But I'm not an expert.)
Reply With Quote
  #3   (View Single Post)  
Old 13th February 2012
s0xxx's Avatar
s0xxx s0xxx is offline
Package Pilot
 
Join Date: May 2008
Posts: 192
Default

Quote:
Originally Posted by daemonfowl View Post
Hi everybody !

In OpenBSD, I usually do a $ sudo sh /etc/netstart to restart network ..
I wonder if there is an equivalent command for NetBSD .. to painlessly restart network ..
Use:
Code:
# /etc/rc.d/network restart
__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
Reply With Quote
  #4   (View Single Post)  
Old 13th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Hi ldOp !
the error message is "<pkgname> is built with a newer pkg_name "..
there must be some discord between installed release (5.1) and the pkg_path I am using .. how do I know that the right packages should belong to -eg.- <pkgsrc_2011Q4) > and not to -eg.- <pkgsrc_2011Q1> ?
I prefer not to upgrade at this stage because I've already downloaded more than 12g of 5.1 packages from here:
ftp://ftp.netbsd.org/pub/pkgsrc/pack.../i386/5.1/All/

Thanks s0xxx !!
Reply With Quote
  #5   (View Single Post)  
Old 13th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by daemonfowl View Post
the error message is "<pkgname> is built with a newer pkg_name ".. there must be some discord between installed release (5.1) and the pkg_path I am using
That does sound plausible, although I don't remember off-hand seeing that error message.

Quote:
how do I know that the right packages should belong to -eg.- <pkgsrc_2011Q4) > and not to -eg.- <pkgsrc_2011Q1> ? I prefer not to upgrade at this stage because I've already downloaded more than 12g of 5.1 packages from here:
ftp://ftp.netbsd.org/pub/pkgsrc/pack.../i386/5.1/All/
I don't know the answer to the question. But, what I'd probably try in that case is to find a single package, with no pre-requisites, and that's not too big, and try to download it from other directories and see if you still get the same problem when trying to install it. FWIW, the PKG_PATH I use (for 5.1.0_PATCH) is

http://nyftp.netbsd.org./pub/pkgsrc/...D/i386/5.0/All

That said, if the packages you downloaded (12G, WOW!) don't match your system, then one or the other would have to change, no? I.e., either up/down-grade system or get new packages?
Reply With Quote
  #6   (View Single Post)  
Old 13th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Quote:
I.e., either up/down-grade system
thanks .. but how do I know right choice here ?
if I have installed the 5.1 release then LOGICALLY the 5.1 pkg_path should work .. what is wrong there than caused that error ?
Reply With Quote
  #7   (View Single Post)  
Old 13th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by daemonfowl View Post
thanks .. but how do I know right choice here ?
if I have installed the 5.1 release then LOGICALLY the 5.1 pkg_path should work .. what is wrong there than caused that error ?
I'm wondering if perhaps the error refers to a different dependency than you have installed? (Rather than an OS/package mismatch.) Can you post a complete example of such an error message (preferably copy/pasted in [code] blocks)? Also, did you compile any pkgsrc packages yourself, or are you only using downloaded binary packages?
Reply With Quote
  #8   (View Single Post)  
Old 15th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

I haven't installed anything yet ..
here is what I did a while ago :
I went to
http://www.netbsd.org/docs/guide/en/...d-stable<br />
I guess that is the right choice .. I am using 5.1 stable branch ..
but when as root I did the following :
Code:
export CVS_RSH="ssh"
export CVSROOT="anoncvs@anoncvs.jp.NetBSD.org:/cvsroot"
cd /usr
cvs checkout -r netbsd-5 -P src
I had to face an authentication problem ..
I used the jp mirror not because it is closest but because accessible ..
other mirrors options usually end up with time-outs ..
it seems like NetBSD with default settings is surrounded by problems that OpenBSD already solved .. for instance I never had problems like no route to host .. a strange example here :
while I could not connect to NetBSD.org main server from my NetBSD box , I did it many times from my OpenBSD machine .. why ? I still don't know .. I am using dhcp for both ..
I hope someone helps me here as I really want to use both operating systems for study and fun .. thanks in advance ..
what is there in OpenBSD default network settings that ancestral NetBSD lacks and so I could not connect to NetBSD servers except the japanese mirror ???
if this can be solved then I will go current as pkgsrc then won't be irresponsive ..

Last edited by daemonfowl; 15th February 2012 at 11:19 PM.
Reply With Quote
  #9   (View Single Post)  
Old 16th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

daemonfowl, I'm afraid I can't be of much help with the specifics of what you're doing because I don't use CVS. As for the network connectivity problem, this might be something wrong in the basic setup, which could easily happen in a new install. Did you check things like

* nameserver configuration in /etc/resolv.conf

* if you're using a local named (127.0.0.1 in resolv.conf) did you enable it in /etc/rc.conf ?

* routing, is the output of following command reasonable:

# route -n show -inet

* does the external interface have a reasonable IP address? (Check with ifconfig after DHCP as you seem to be using.)

* did you enable any packet filtering?

* could you ping and connect to any other local or remote hosts/servers ?

Just some ideas, not an exhaustive check-list.
Reply With Quote
Old 16th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Hi ldOp !
Thanks for the checklist .. helpful for a newbie ..

* less /etc/resolv.conf
Code:
# Created by dhclient from wpi0
nameserver 192.168.1.1
* /etc/rc.conf
Code:
rc_configured=YES

# Add local overrides below
#
wscons=YES

sshd=YES
dhclient=YES
defaultroute=192.168.1.1 
pf=NO
*#route -n show -inet
Code:
Routing table

Internet:
Destination        Gateway            Flags
default            192.168.1.1        UG
127.0.0.0/8        127.0.0.1          UGR
127.0.0.1          127.0.0.1          UH
192.168.1.0/24     link#1             U
192.168.1.1        00:80:5a:5a:36:32  UHL
192.168.1.2        127.0.0.1          UGH
* ifconfig -a
Code:
wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid Conceptronic
        powersave off
        bssid 00:80:5a:5a:36:33 chan 6
        address: 00:19:d2:28:eb:bc
        media: IEEE802.11 autoselect (OFDM36 mode 11g)
        status: active
        inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
        inet6 fe80::219:d2ff:fe28:ebbc%wpi0 prefixlen 64 scopeid 0x1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
* did you enable any packet filtering?
no I didn't .. and pf is set to no in rc.conf


* dmesg ? ...
Reply With Quote
Old 16th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Thank you, daemonfowl, for posting the actual output of some commands. dmesg couldn't hurt, I guess, though not sure if it will help in this case.

Looking over your output I don't see anything obviously wrong. So to recap, you're using dhclient and it provides you with an IP address of 192.168.1.2 on network 192.168.1.0/24, and the nameserver and defaultroute gateway are 192.168.1.1. Some questions:

Are these the same values you get when using the "OpenBSD machine" ?

Is that the same machine with a dual boot setup?

Are the problems you experience temporary, or are they repeatable over time (i.e., day-to-day reliably unreliable )? One thought here is that wireless drivers, as you are using, are not always perfect, but that doesn't explain why you can reach the Japanese mirror OK. So the question is, is it always this way?

Can you ping the gateway reliably?
# ping 192.168.1.1

Can you resolve hostnames on the Internet, e.g.:
# host google.com

How about pinging arbitrary external sites (google.com, oracle.com, etc.)?

Another possibility is that the US NetBSD servers were having problems at that time. Can you generally browse the web OK? (Well, maybe you have no browser installed ... do you have lynx?)
Reply With Quote
Old 16th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Quote:
on network 192.168.1.0/24
you mean 192.168.1.1/24 ..
Because I love both Dragons , I installed both .. NetBSD is installed on 16g usb flash for testing and if I overcome the prob I'm installing it to a spare 120g disk ..
I dont't have a dual OS machine ..

Here is the OpenBSD output of ifconfig -a :
Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33196
        priority: 0
        groups: lo
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
        inet 127.0.0.1 netmask 0xff000000
wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:19:d2:28:eb:bc
        priority: 4
        groups: wlan egress
        media: IEEE802.11 autoselect (OFDM54 mode 11g)
        status: active
        ieee80211: nwid Conceptronic chan 6 bssid 00:80:5a:5a:36:33 41dB
        inet6 fe80::219:d2ff:fe28:ebbc%wpi0 prefixlen 64 scopeid 0x1
        inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
bce0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:16:d4:d2:d6:5e
        priority: 0
        media: Ethernet autoselect (none)
        status: no carrier
enc0: flags=0<>
        priority: 0
        groups: enc
        status: active
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33196
        priority: 0
        groups: pflog
please consider the following :
* no route to host when installing via pkgsrc (persistent prob since I installed NBSD)
* I can ftp connect to all NetBSD mirrors via OpenBSD .. whereas on NetBSD I cannot except the jp.netbsd.org server ..
is it an ftp conf issue ?? or an ipv6 one ?? but then why was jp.netbsd reachable ??
Maybe now you realize why I downloaded that huge 13g of NetBSD.5.1 pkgs via Openbsd just to be able to locally install them on my NetBSD box .. only I could not do that too because of the pkg_install error .. so I am between scylla and charybdis : neither can I use pkgsrc nor install local pkgs ..

* yes the prob is persistent .. whenever I use pkgsrc it successfully fetches one or two pkgs but most of the time fails to get others ending up in a timeout ..
* even the "fr/se/es/.netbsd.org" servers fail me .. so it is not a us.mirror problem ..
* lol .. yes from official website I downloaded then compiled lynx .. the only successful pkg so far ..
.. ping and host work fine ..

Last edited by daemonfowl; 17th February 2012 at 12:57 AM.
Reply With Quote
Old 16th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by daemonfowl View Post
you mean 192.168.1.1/24 ..
Actually, I did mean it with .0. My understanding is that that is the notation conventionally used for the network, or even more simply just 192.168.1/24. On that network the IP addresses available for computers are 192.168.1.1, 192.168.1.2, ... 192.168.1.254. Your gateway is the first, your laptop is being assigned the second. For that network as a whole, the last octet doesn't matter (all are valid) and would usually be written as 0 or omitted.

Quote:
... I installed both .. NetBSD is installed on 16g usb flash for testing and if I overcome the prob I'm installing it to a spare 120g disk ..
I dont't have a dual OS machine ..
OK, not quite dual boot (unless you count the flash drive too), but they are running on the same computer, which is what I was after.

Quote:
Here is the OpenBSD output of ifconfig -a :
Thanks, so for wpi0 the info there looks consistent with the NetBSD output, to me. Your results with OpenBSD then indicate that physically the wireless device is capable of working well.

Quote:
* no route to host when installing via pkgsrc (persistent prob since I installed NBSD)
Sometimes this is due to an ARP problem. (ARP is used when an OS wants to send to a known local IP address but it needs to find the link level address (e.g., MAC) to send the packet to.) But if your computer couldn't, for example, resolve the wireless MAC address of the gateway, then how could you get to some sites? So maybe the problem is not local to you.

Quote:
* I can ftp connect to all NetBSD mirrors via OpenBSD .. whereas on NetBSD I cannot except the jp.netbsd.org server ..
is it an ftp conf issue ?? or an ipv6 one ?? but then why was jp.netbsd reachable ??

* yes the prob is persistent .. whenever I use pkgsrc it successfully fetches one or two pkgs but most of the time fails to get others ending up in a timeout ..
Ah, so you do get somewhere, but then it bogs down or dies. That is new info.

Quote:
* even the "fr/se/es/.netbsd.org" servers fail me .. so it is not a us.mirror problem ..
good to know

Quote:
* lol .. yes from official website I downloaded then compiled lynx .. the only successful pkg so far ..
.. ping and host in a while ... need to reboot on netflash :-)
These sound worth persuing, including browsing around a lot with lynx. The question here is, is any site really that reliably accessable? I know you said the japanese mirror was ... but how much did you use it?

I'm definitely puzzled by all this, but one hypothesis is that maybe the NetBSD wireless driver is just not reliable in your environment. My own experience is with the Ralink ral(4) driver, and on that one at least it seems the OpenBSD driver is, currently, clearly of higher quality. But for wpi this is nothing yet but speculation trying to find something that fits the observations, and maybe it will turn out false.
Reply With Quote
Old 17th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Hi ld0p ! thank you !
concerning lynx , I ftp connect to http://lynx.isc.org/ then got the newest source which compiled nicely ..
direct link is : http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz
Code:
 NetBSD wireless driver is just not reliable in your environment
if NetBSD detected my bce0 , then I wouldn't have had to use wpi0 ..
and yet .. estoy enamorado de NetBSD !

While wpi works out of the box in NetBSD and still no lynx no ssh no dhcp working out of the box ?
whereas on the other hand , OpenBSD is equipped with enough settings for immediate internet use while still asking for wpi firmware install on first boot ..
Maybe there is some genuine reason behind this or that choice that escapes my mind ..
Reply With Quote
Old 17th February 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by daemonfowl View Post
concerning lynx , I ftp connect to http://lynx.isc.org/ then got the newest source which compiled nicely
Good work compiling lynx in a pinch. DId you install it and use it? The idea here is to stress test the wireless connection with lynx, and other programs, to see if the speculation about its quality is valid or not. Heck, if you can access another machine on your local network through the wireless and try moving files around and stuff that would be a good test too.

Quote:
While wpi works out of the box in NetBSD ...
Just because it was detected, and the driver brought up, that doesn't mean the connection through it is working well. See prior paragraph.

Quote:
and still no lynx no ssh no dhcp working out of the box ?
whereas on the other hand , OpenBSD is equipped with enough settings for immediate internet use while still asking for wpi firmware install on first boot
In a big-picture sense the two OS are very similar, but there are many differences. NetBSD doesn't come with some of the conveniences of OpenBSD, e.g., lynx (text browser), mg (emacs-style editor), ppp (userland program) are not included. This has pro's and con's to it. It's just something you have to get used to, and in the end it's a small adjustment to all the packages that may be installed anyway.
Reply With Quote
Old 17th February 2012
daemonfowl daemonfowl is offline
bsdstudent
 
Join Date: Jan 2012
Location: DaemonLand
Posts: 834
Default

Quote:
DId you install it and use it?
yes I did and it is working fine ..
I am downloading NetBSD.5.1.2 iso for a new lazy-upgrade .. maybe it'll work with those downloaded packages .. Is is any good in my case to skip the 5.1.1 to 5.1.2 ? I wonder .. I hope I won't need to downgrade back to 5.1.1 .. :-)

Last edited by daemonfowl; 17th February 2012 at 11:39 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pkg_add error ustar archive header player1 OpenBSD Installation and Upgrading 4 31st May 2011 03:41 PM
Netstart / Required Reboots on Interface Changes dylanz OpenBSD General 0 17th June 2010 05:48 PM
equivalent to freebsd fetch pbd OpenBSD General 9 7th August 2009 11:45 AM
OpenSolaris equivalent of systrace? DraconianTimes Solaris 9 31st January 2009 05:36 AM
pkg_add error buba OpenBSD Packages and Ports 4 13th June 2008 03:29 PM


All times are GMT. The time now is 02:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick