3

In the default Raspbian image I find *raspberrypi* kernel, bootloader, firmware etc. Using a bootstraped Installation I don't find them but using the same entries in /etc/apt/sources.list.
In detail:

With a default Raspbian image

Update package lists, list raspberry packages *raspberry* and archive /etc/apt/ directory.

pi@raspberrypi:~ $ sudo apt update
Hit:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
pi@raspberrypi:~ $

pi@raspberrypi:~ $ apt list *raspberry*
Listing... Done
libraspberrypi-bin/stable,now 1.20171029-1 armhf [installed]
libraspberrypi-dev/stable,now 1.20171029-1 armhf [installed]
libraspberrypi-doc/stable,now 1.20171029-1 armhf [installed]
libraspberrypi0/stable,now 1.20171029-1 armhf [installed]
raspberrypi-archive-keyring/stable 2016.10.31 all
raspberrypi-artwork/stable 20150921 all
raspberrypi-bootloader/stable,now 1.20171029-1 armhf [installed]
raspberrypi-kernel/stable,now 1.20171029-1 armhf [installed,automatic]
raspberrypi-kernel-headers/stable 1.20171029-1 armhf
raspberrypi-net-mods/stable,now 1.2.7 all [installed]
raspberrypi-sys-mods/stable,now 20180103 armhf [installed]
raspberrypi-ui-mods/stable 1.20171115 all

pi@raspberrypi:~ $ tar -czf raspberrypi-etc-apt.tar.gz -C /etc/ ./apt/
pi@raspberrypi:~ $

Using Installation from bootstrap

First copy the apt-settings

ingo@raspi1:~ $ scp pi@raspberrypi:raspberrypi-etc-apt.tar.gz .
ingo@raspi1:~ $ sudo rm -r /etc/apt/
ingo@raspi1:~ $ sudo tar -xzf raspberrypi-etc-apt.tar.gz -C /etc/
ingo@raspi1:~ $ ls /etc/apt
apt.conf.d/  preferences.d/  sources.list.d/  trusted.gpg.d/  listchanges.conf  sources.list  trusted.gpg
ingo@raspi1:~ $

Now update package lists

ingo@raspi1:~ $ sudo apt update
Get:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15,0 kB]
Get:2 http://archive.raspberrypi.org/debian stretch InRelease [25,3 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [11,7 MB]
Get:4 http://mirrordirector.raspbian.org/raspbian stretch/contrib armhf Packages [56,8 kB]
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [127 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian stretch/non-free armhf Packages [95,2 kB]
Get:7 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [27,7 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian stretch/rpi armhf Packages [1.360 B]
Fetched 12,0 MB in 16s (729 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
ingo@raspi1:~ $

But no raspberry packages

ingo@raspi1:~ $  apt list *raspberry*
Listing... Done
ingo@raspi1:~ $

Is this a feature? How can I get the raspberry packages into this raspberry?

UPDATE:
Maybe you have to add the key from http://archive.raspberrypi.org/debian to the apt keyring. For me it has no effect.

wget -O - http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | sudo apt-key add -
Ingo
  • 42,107
  • 20
  • 85
  • 197

1 Answers1

4

I got it. I thought to be on the safe side by copying the whole /etc/apt directory-structure to the bootstraped raspi. But that was too much. I only have do add the archive-address for the raspberrypi. Here are the two needed repositories:

ingo@raspi1:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ stretch main contrib non-free rpi

ingo@raspi1:~ $ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
ingo@rasp1:~ $

Get the key for the archive (needed only one time):

ingo@raspi1:~ $ wget -qO - http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | sudo apt-key add -
OK
ingo@rasp1:~ $

Update:

ingo@rasp1:~ $ sudo apt update
ingo@rasp1:~ $ apt list *raspberry*
Listing... Done
libraspberrypi-bin/stable 1.20171029-1 armhf
libraspberrypi-dev/stable 1.20171029-1 armhf
libraspberrypi-doc/stable 1.20171029-1 armhf
libraspberrypi0/stable 1.20171029-1 armhf
raspberrypi-archive-keyring/stable 2016.10.31 all
raspberrypi-artwork/stable 20150921 all
raspberrypi-bootloader/stable 1.20171029-1 armhf
raspberrypi-kernel/stable 1.20171029-1 armhf
raspberrypi-kernel-headers/stable 1.20171029-1 armhf
raspberrypi-net-mods/stable 1.2.7 all
raspberrypi-sys-mods/stable 20180103 armhf
raspberrypi-ui-mods/stable 1.20171115 all
ingo@rasp1:~ $

Voila!

Ingo
  • 42,107
  • 20
  • 85
  • 197