# bsdconfig not able to retrieve packages



## ipfreak (Feb 21, 2015)

Hi all:

I am trying install packages with `bsdconfig` on freebsd FreeBSD 10.1 and failed.

It stuck at the following message for a while with follow message:


```
Attempting to update repository catalogue from selected media
```

Finally it gave up with following message:


```
No pkg(8) database found
```

Thanks in advance.

_dave


----------



## chrbr (Feb 22, 2015)

Dear Dave,

Some questions about your system are open. Which installation media have you used? Is the basic FreeBSD system already booting or do you stuck with the installation itself? Please post details about your hardware. If you can boot already please post the output of `dmesg` and `ifconfig`. Do not worry, the first steps are often the most difficult ones .


----------



## ipfreak (Feb 22, 2015)

chrbr said:


> Dear Dave,
> 
> Some questions about your system are open. Which installation media have you used? Is the basic FreeBSD system already booting or do you stuck with the installation itself? Please post details about your hardware. If you can boot already please post the output of `dmesg` and `ifconfig`. Do not worry, the first steps are often the most difficult ones .



Thanks for reply. Here is the info:

1) I used the cdrom version "FreeBSD-10.1-RELEASE-i386-disc1.iso". It is a very old system and only has cdrom. (iI am using this system for learning.)
2) The installation itself went through fine without any issue and reboots fine.
3) After installation, iI noticed there are no packages from post-installation, so iI launched `bsdconfig` (per Google research) and tried to install packages but failed to retrieve the packages (ith about messages).
4) iI tried to patch the kernel to -p5 with `freebsd-update fetch install` and it went through fine, but when iI tried to retrieve packages again with `bsdconfig`, I got error messages stating that there are no packages that match the kernel -p5. I guess one way or another iI have to install packages first before patching the kernel.

`$ dmesg`

```
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 22:51:51 UTC 2014
  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Intel(R) Pentium(R) 4 CPU 2.66GHz (2657.87-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf27  Family = 0xf  Model = 0x2  Stepping = 7
  Features=0xbfebf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x4400<CNXT-ID,xTPR>
real memory  = 1073741824 (1024 MB)
avail memory = 1029500928 (981 MB)
kbd1 at kbdmux0
random: <Software, Yarrow> initialized
acpi0: <DELL CPi R  > on motherboard
acpi0: reservation of 0, 9fc00 (3) failed
acpi0: reservation of 100000, 3fef0000 (3) failed
cpu0: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci_link1: BIOS IRQ 11 for 0.31.INTB is invalid
pci0: <ACPI PCI bus> on pcib0
agp0: <Intel 82845G host to AGP bridge> on hostb0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc0ff mem 0xe8000000-0xefffffff,0xfcff0000-0xfcffffff irq 11 at device 0.0 on pci1
vgapci0: Boot video device
uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0
usbus0 on uhci0
uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0xbf40-0xbf5f irq 11 at device 29.1 on pci0
usbus1 on uhci1
uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0xbf20-0xbf3f irq 11 at device 29.2 on pci0
usbus2 on uhci2
ehci0: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> mem 0xf4fffc00-0xf4ffffff irq 11 at device 29.7 on pci0
usbus3: EHCI version 1.0
usbus3 on ehci0
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci_link1: BIOS IRQ 11 for 2.1.INTA is invalid
pci2: <ACPI PCI bus> on pcib2
bfe0: <Broadcom BCM4401 Fast Ethernet> mem 0xfaffe000-0xfaffffff irq 9 at device 1.0 on pci2
miibus0: <MII bus> on bfe0
bmtphy0: <BCM4401 10/100 media interface> PHY 1 on miibus0
bmtphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bfe0: Ethernet address: 00:0d:56:31:36:32
cbb0: <TI4510 PCI-CardBus Bridge> at device 4.0 on pci2
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pci2: <serial bus, FireWire> at device 4.1 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xbfa0-0xbfaf at device 31.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
pcm0: <Intel ICH4 (82801DB)> port 0xb800-0xb8ff,0xbc40-0xbc7f mem 0xf4fff800-0xf4fff9ff,0xf4fff400-0xf4fff4ff irq 9 at device 31.5 on pci0
pcm0: <SigmaTel STAC9750/51 AC97 Codec>
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64,0x62,0x66 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcefff,0xcf000-0xcf7ff,0xcf800-0xcffff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: parallel port not found.
p4tcc0: <CPU Frequency Thermal Control> on cpu0
Timecounters tick every 1.000 msec
random: unblocking device.
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen3.1: <Intel> at usbus3
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen1.1: <Intel> at usbus1
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ada0 at ata1 bus 0 scbus1 target 0 lun 0
ada0: <HTS424040M9AT00 MA2IA70A> ATA-6 device
ada0: Serial Number MPA241Q2GZ8J8A
ada0: 100.000MB/s transfers (UDMA5, PIO 8192bytes)
ada0: 38154MB (78140160 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad2
cd0 at ata0 bus 0 scbus0 target 0 lun 0
cd0: <TEAC CD-W224E L.0E> Removable CD-ROM SCSI-0 device
cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
Timecounter "TSC-low" frequency 1328935648 Hz quality 800
uhub0: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
Root mount waiting for: usbus3
Root mount waiting for: usbus3
uhub1: 6 ports with 6 removable, self powered
Trying to mount root from ufs:/dev/ada0p2 [rw]...
stray irq7
stray irq7
stray irq7
stray irq7
too many stray irq 7's: not logging anymore
```
`$ ifconfig`

```
bfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
  options=80008<VLAN_MTU,LINKSTATE>
  ether 00:0d:56:31:36:32
  inet 172.16.1.110 netmask 0xfffffe00 broadcast 172.16.1.255
  nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
  media: Ethernet autoselect (100baseTX <full-duplex>)
  status: active
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 0x2
  inet 127.0.0.1 netmask 0xff000000
  nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
```


----------



## junovitch@ (Feb 22, 2015)

You know I'm so used to doing things via CLI but now that I bring up `bsdconfig` I see what you are saying with it looking in the directory path for 10.1-RELEASE-p5.  That's pretty odd.  Does it work just installing packages manually?  Try something like `pkg install tmux`.


----------



## ipfreak (Feb 23, 2015)

junovitch said:


> You know I'm so used to doing things via CLI but now that I bring up `bsdconfig` I see what you are saying with it looking in the directory path for 10.1-RELEASE-p5.  That's pretty odd.  Does it work just installing packages manually?  Try something like `pkg install tmux`.



Sorry I am a bit confused. Right now the system is bare-bone system, it doesn't even have bash shell installed, with CLI `pkg install ...` to install package one by one, it would take forever to install all of packages, isn't?

BTW, i just installed freebsd FreeBSD 8.4 (CDROM version) and it uses `sysinstall` and the system got all of packages with no issues. Of course, I have to get packages first before patching the kernel, that part stays the same as the new 10.1 version.


----------



## chrbr (Feb 23, 2015)

Dear Dave,

I have had a look at the output of `dmesg`. You can easily run the AMD64 version instead of i386. This will increase the performance. When I have started with FreeBSD I have used i386 because I did not had an AMD CPU . Now I know it better. Please use the UFS file system and not ZFS.

Regarding the version it should be much faster to -re-start with an installation of 10.1 instead of running the upgrade process. But do not take this for granted. I am sure a more experienced user will correct me if the advise is wrong.

About the package installation `pkg install ...` is the normal way to install binary packages. In my opinion it is as fast as it could be. You will not need all FreeBSD packages anyhow. Please install just the packages you need. As far as I know installation of a package with lots of dependencies will pull in the dependencies as well. You can have a system with almost no overhead. I think it is worth to spend some time on that. In total you will spend more time on configuration than on installation.


----------



## junovitch@ (Feb 23, 2015)

ipfreak said:


> Sorry I am a bit confused. Right now the system is bare-bone system, it doesn't even have bash shell installed, with CLI `pkg install ...` to install package one by one, it would take forever to install all of packages, isn't?
> 
> BTW, i just installed freebsd FreeBSD 8.4 (CDROM version) and it uses `sysinstall` and the system got all of packages with no issues. Of course, I have to get packages first before patching the kernel, that part stays the same as the new 10.1 version.



Try:
`setenv PKG_ABI freebsd:10:x86:64` for tcsh(1)
`export PKG_ABI=freebsd:10:x86:64` for sh(1) compatible shells.
`bsdconfig`

It looks like there is some bug somewhere and the URL that gets accessed is incorrect.  Do the above to override it and you should be good.  Just an FYI, installing installing packages means all the dependencies gets pulled in.  So `pkg install bash xorg kde4` will install tons of packages to satisfy all the dependencies.  The CLI may be faster.  Of course knowing the name of what you need to install is needed.  But a `pkg search <name>` helps and of course the FreeBSD Handbook has the info for setting up quite a bit of stuff.  See: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/


----------

