# Bootstrapping pkg from pkg.FreeBSD.org, please wait ... 3 minutes



## frijsdijk (Apr 11, 2020)

Why is this process so slow? It's a new install, I'm on the console, trying to install packages. In the mean time in another console, I portsnap fetch extract, and this finishes before pkg was bootstrapped!


----------



## stratacast1 (Apr 17, 2020)

I think I had this problem before from a virtual machine. Are you running this on metal or in Virtualbox?


----------



## frijsdijk (Apr 18, 2020)

stratacast1 said:


> I think I had this problem before from a virtual machine. Are you running this on metal or in Virtualbox?



This is old fashioned metal. I really wonder why a VM would (could) make any difference.


----------



## stratacast1 (Apr 19, 2020)

I couldn't figure it out either. What was odd was Virtualbox NAT would let me bootstrap no problem, but bridged wouldn't. Had the same issue as you. I swear I had a similar issue to this just recently on metal but I'm trying to remember what I did. I think it ended up being something to do with my firewall rules. Do you have rules enabled?


----------



## acheron (Apr 19, 2020)

It's a problem with the pkg mirrors in the EU.


----------



## DavidMarec (Apr 19, 2020)

There was an issue with  pkg 1.14.0/1.14.1.  tcp keepalive  activation by default makes repositories behind an nginx proxy fail spinning their wheels.


----------



## rootbert (Apr 19, 2020)

yeah but it's probably due to the mirros in the EU ... it really has not been fun to do anything with pkg for the last 6 months. A simple "pkg search" as root (because it downloads metadata) needs 15-40 seconds here (not hardware related - 8core/64GB/1TB nvme idle system, 60MBit connection), a pkg upgrade manages approximately 10 Megabytes per minute, no matter what time of the day. Sometimes, when I am lucky I manage to download 20 MB per minute ... sorry for the rant but this is really annoying


----------



## xtaz (Apr 19, 2020)

Yeah. I've given up with the EU mirror today. It's completely useless, has been for months. Trying to download a 70MB file this morning at 20kbit/sec just makes you want to scream. And I'm in the UK which is also where the mirror server is located (at Bytemark). There's something seriously wrong with that server.

I've switched pkg to use a mirror from the US now and it's back to full speed. Problem solved. But if everyone does this it's going to put more load on the other mirrors.

Basically you create a /usr/local/etc/pkg/repos/FreeBSD.conf file with this in it (I've switched the actual hostname out with a fake one so hopefully people would pick different ones). Pick a mirror from the list at the bottom of http://pkg.freebsd.org/. Either use latest or quarterly in that URL depending on what you normally use. But if/when they fix the EU mirror you should delete this file again.


```
FreeBSD: {
  url: "pkg+http://pkg0.mirror.FreeBSD.org/${ABI}/latest"
}
```


----------



## frijsdijk (Apr 20, 2020)

stratacast1 said:


> I couldn't figure it out either. What was odd was Virtualbox NAT would let me bootstrap no problem, but bridged wouldn't. Had the same issue as you. I swear I had a similar issue to this just recently on metal but I'm trying to remember what I did. I think it ended up being something to do with my firewall rules. Do you have rules enabled?



This is definitely a problem freebsd (hosting/resources), not on my machine, virtual or iron.


----------

