1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
raspberrypi-build/README.md

109 lines
3.3 KiB
Markdown
Raw Normal View History

2017-07-03 13:59:39 +00:00
barnacleos/build
2017-06-30 21:32:33 +00:00
================
Tool used to create the [BarnacleOS](https://github.com/barnacleos) images.
Based on [pi-gen](https://github.com/rpi-distro/pi-gen) tool used to create
2017-07-02 15:12:22 +00:00
the official [raspberrypi.org](https://raspberrypi.org) Raspbian images.
2017-06-30 21:36:04 +00:00
Dependencies
------------
2016-04-11 07:25:30 +01:00
On Debian-based systems:
```bash
2017-07-07 16:42:48 +00:00
apt-get install bash quilt parted qemu-user-static debootstrap zerofree zip \
2017-07-03 07:13:19 +00:00
dosfstools libcap2-bin grep rsync
```
2017-07-02 04:19:03 +00:00
The file `depends` contains a list of tools needed. The format of this
2017-07-02 06:55:42 +00:00
file is `<tool>[:<debian-package>]`.
2017-07-06 22:03:27 +00:00
2017-07-09 16:27:50 +00:00
Network interfaces
------------------
Each network interface of Raspberry Pi can be used to connect to the Internet or
to be the gateway for [the internal Tor network](#network-configuration).
The [barnaconfig](https://github.com/barnacleos/barnaconfig) utility can be used
to configure the role of each network interface.
However some initial configuration may be required to use the default BarnacleOS
image, such as Wi-Fi drivers installation. It can be done via SSH. Network
interfaces [eth0](#eth0) and [eth1](#eth1) have default configurations to help
you to connect.
### eth0
`eth0` is configured by default to get IPv4 address from router via DHCP
without any assumptions about subnet configuration. You can just plug
your Raspberry Pi to router with Ethernet cable, discover which address
was given to it in router's web interface or with `nmap` utility and connect
to it via SSH.
Let's say your router has address `192.168.0.1`, subnet is `192.168.0.0/24`
(netmask `255.255.255.0`), your computer has address `192.168.0.2`.
Do the following:
```
$ sudo apt-get install nmap
$ nmap -sn 192.168.0.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2017-07-09 15:39 UTC
Nmap scan report for 192.168.0.1
Host is up (0.0039s latency).
Nmap scan report for 192.168.0.2
Host is up (0.00078s latency).
Nmap scan report for 192.168.0.3
Host is up (0.00104s latence).
Nmap done: 256 IP addresses (3 hosts up) scanned in 7.97 seconds
```
So your Raspbbery Pi has address `192.168.0.3`. Connect to it via SSH:
```
$ ssh user@192.168.0.3
```
### eth1
`eth1` is configured by default to be the gateway and the DHCP server
for the IPv4 subnet `192.168.82.0/24` (netmask `255.255.255.0`) with static
address `192.168.82.1` ([see also](#network-configuration)). If your
Raspberry Pi has two Ethernet ports, you can just plug your computer to it, run
DHCP client on the corresponding network interface and connect to it via SSH.
Let's say your computer has network interface `eth42` which is plugged to
Raspberry Pi. Do the following to connect to Raspberry Pi via SSH:
```
$ printf "allow-hotplug eth42\niface eth42 inet dhcp\n" | sudo tee /etc/network/interfaces.d/eth42
$ sudo ifup eth42
$ ssh user@192.168.82.1
```
2017-07-06 23:38:56 +00:00
System configuration
--------------------
* Root login via SSH is disabled
2017-07-07 16:29:43 +00:00
* Root password is disabled
2017-07-06 23:38:56 +00:00
* User `user` has access via SSH with password `password`
* SSH host keys are generated at first startup,
so fingerprint is different for each installation of the same image
* User has passwordless sudo
2017-07-09 16:32:15 +00:00
Network configuration
---------------------
* Hostname: `barnacleos`
* FQDN: `barnacleos.local`
* Subnet: `192.168.82.0/24` (netmask `255.255.255.0`)
* Gateway: `192.168.82.1`
* Broadcast: `192.168.82.255`
* IP range: `192.168.82.2` to `192.168.82.254`