# sudoers & ports missing, portsnap fetch fail SOLVED



## daBee (Mar 2, 2017)

Hi folks.  Installed `FreeBSD-11.0-STABLE-arm-armv6-RPI2-20170203-r313108` onto a Raspberry Pi 2.  All is mostly good.  It's missing both `sudoers` and `ports`, and I have no idea why.  As well, there is no login screen, just the login prompt.  

I would like to install `bash` and `sudo`, but `portsnap fetch` results in an error:


```
root@pi:/usr/local # portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found.
Fetching snapshot tag from your-org.portsnap.freebsd.org... failed.
Fetching snapshot tag from sourcefire.portsnap.freebsd.org... failed.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... failed.
Fetching snapshot tag from ec2-ap-southeast-2.portsnap.freebsd.org... failed.
Fetching snapshot tag from ec2-sa-east-1.portsnap.freebsd.org... failed.
Fetching snapshot tag from ec2-ap-northeast-1.portsnap.freebsd.org... failed.
No mirrors remaining, giving up.
```

At this point, not really sure how to move forward.  Here is `ifconfig`:


```
root@pi:~ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    inet 192.168.1.22 netmask 0xffffff00
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
    ether b8:27:eb:db:0c:3b
    inet6 fe80::ba27:ebff:fedb:c3b%ue0 prefixlen 64 scopeid 0x2
    inet 192.168.1.22 netmask 0xffffff00 broadcast 192.168.1.255
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```

...and `netstat`:


```
root@pi:~ # netstat
Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)
tcp4       0      0 192.168.1.22.ssh       192.168.1.4.52587      ESTABLISHED
udp6       0      0 fe80::ba27:ebff:.ntp   *.*
udp4       0      0 localhost.ntp          *.*
udp4       0      0 192.168.1.22.ntp       *.*
udp6       0      0 fe80::1%lo0.ntp        *.*
udp6       0      0 localhost.ntp          *.*
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
c45674d0 stream      0      0        0 c4567580        0        0
c4567580 stream      0      0        0 c45674d0        0        0
c4567790 stream      0      0 c44296c0        0        0        0 /var/run/devd.pipe
c47482c0 dgram       0      0        0 c45649a0        0 c4567630
c4567630 dgram       0      0        0 c45649a0        0        0
c45649a0 dgram       0      0 c46267e0        0 c47482c0        0 /var/run/logpriv
c4564a50 dgram       0      0 c4626900        0        0        0 /var/run/log
c45676e0 seqpac      0      0 c44295a0        0        0        0 /var/run/devd.seqpacket.pipe
```

Any advice appreciated.  Cheers


----------



## lostpacket (Mar 2, 2017)

Everything else working okay? 

Can you `ping` portsnap.freebsd.org? 

Do you have dns setup properly in /etc/resolv.conf? 

Specified default router in /etc/rc.conf?
What output from:

```
fetch http://portsnap.freebsd.org/pub.ssl
```


----------



## daBee (Mar 2, 2017)

I cannot `ping` portsnap.freebsd.org, but it resolved the IP.  


```
root@pi:/etc # fetch http://portsnap.freebsd.org/pub.ssl
fetch: http://portsnap.freebsd.org/pub.ssl: Network is unreachable
```

It seems the network doesn't want to work for some reason.  Here is `/etc/rc.conf`:


```
hostname="pi.local"
ifconfig_DEFAULT="192.168.1.22"
defaultrouter="192.168.1.1"
ifconfig_em0="inet 192.168.1.22 netmask 255.255.255.0"
sshd_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
growfs_enable="YES"
ntpd_enable="YES"
ntpdate_enable="YES"
```


----------



## Phishfry (Mar 2, 2017)

Hardy Har Har. You are setting up an em0 interface on PI !!!!


daBee said:


> ifconfig_em0="inet 192.168.1.22 netmask 255.255.255.0"



Try this instead:
`ifconfig_ue0="inet 192.168.1.22 netmask 255.255.255.0`
Are you sure you need a static IP?


```
root@rpi2:~ # cat /etc/rc.conf
hostname="rpi2"
ifconfig_ue0="DHCP"
sshd_enable="YES"
powerd_enable="YES"
dbus_enable="YES"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
```


----------



## daBee (Mar 2, 2017)

lostpacket said:


> Everything else working okay?
> 
> Can you `ping` portsnap.freebsd.org?
> 
> ...



Sorry, didn't fully reply.  

- I've not been able to get the login screen for some reason, even with other installations of 11.0
- I can't get networking properly working past the router, so no ports nor package insallations
- ntp isn't seeing anything.
- /etc/resolv.conf was generated by `resolvconf` (so it says)
- router is indeed set to 192.168.1.1


----------



## daBee (Mar 2, 2017)

Phishfry said:


> Hardy Har Har. You are setting up an em0 interface on PI !!!!
> 
> 
> Try this instead:
> ...



That's strange.  The last bit of your post was not showing two messages ago.  I want to force this IP internally.  Because I have a static IP on the public side, I want to resolve hard inside for routing purposes.


```
ifconfig_ue0="inet 192.168.1.22...
```

...has the same error.

Solved: Took out the ifconfig_DEFAULT and it worked.


----------

