##// END OF EJS Templates
Added: Updated Networking and Keyboard texts
drtyhlpr -
r53:172ae22b25dc
parent child
Show More
@@ -1,155 +1,166
1 1 # rpi2-gen-image
2 2 ## Introduction
3 3 `rpi2-gen-image.sh` is an advanced Debian Linux bootstrapping shell script for generating Debian OS images for the Raspberry 2 (RPi2) computer. The script at this time only supports the bootstrapping of the current stable Debian 8 "jessie" release.
4 4
5 5 ## Build dependencies
6 6 The following list of Debian packages must be installed on the build system because they are essentially required for the bootstrapping process. The script will check if all required packages are installed and missing packages will be installed automatically if confirmed by the user.
7 7
8 8 ```debootstrap debian-archive-keyring qemu-user-static dosfstools rsync bmap-tools whois git-core```
9 9
10 10 ## Command-line parameters
11 11 The script accepts certain command-line parameters to enable or disable specific OS features, services and configuration settings. These parameters are passed to the `rpi2-gen-image.sh` script via (simple) shell-variables. Unlike environment shell-variables (simple) shell-variables are defined at the beginning of the command-line call of the `rpi2-gen-image.sh` script.
12 12
13 13 #####Command-line examples:
14 14 ```shell
15 15 ENABLE_UBOOT=true ./rpi2-gen-image.sh
16 16 ENABLE_CONSOLE=false ENABLE_IPV6=false ./rpi2-gen-image.sh
17 17 ENABLE_WM=xfce4 ENABLE_FBTURBO=true ENABLE_MINBASE=true ./rpi2-gen-image.sh
18 18 ENABLE_HARDNET=true ENABLE_IPTABLES=true /rpi2-gen-image.sh
19 19 APT_SERVER=ftp.de.debian.org APT_PROXY="http://127.0.0.1:3142/" ./rpi2-gen-image.sh
20 20 ENABLE_MINBASE=true ./rpi2-gen-image.sh
21 21 ```
22 22
23 23 #### APT settings:
24 24 ##### `APT_SERVER`="ftp.debian.org"
25 25 Set Debian packages server address. Choose a server from the list of Debian worldwide [mirror sites](https://www.debian.org/mirror/list). Using a nearby server will probably speed-up all required downloads within the bootstrapping process.
26 26
27 27 ##### `APT_PROXY`=""
28 28 Set Proxy server address. Using a local Proxy-Cache like `apt-cacher-ng` will speed-up the bootstrapping process because all required Debian packages will only be downloaded from the Debian mirror site once.
29 29
30 30 ##### `APT_INCLUDES`=""
31 31 A comma seperated list of additional packages to be installed during bootstrapping.
32 32
33 33 #### General system settings:
34 34 ##### `HOSTNAME`="rpi2-jessie"
35 35 Set system host name. It's recommended that the host name is unique in the corresponding subnet.
36 36
37 37 ##### `PASSWORD`="raspberry"
38 38 Set system `root` password. The same password is used for the created user `pi`. It's **STRONGLY** recommended that you choose a custom password.
39 39
40 40 ##### `DEFLOCAL`="en_US.UTF-8"
41 41 Set default system locale. This setting can also be changed inside the running OS using the `dpkg-reconfigure locales` command. The script variant `minbase` (ENABLE_MINBASE=true) doesn't install `locales`.
42 42
43 43 ##### `TIMEZONE`="Europe/Berlin"
44 44 Set default system timezone. All available timezones can be found in the `/usr/share/zoneinfo/` directory. This setting can also be changed inside the running OS using the `dpkg-reconfigure tzdata` command.
45 45
46 46 ##### `EXPANDROOT`=true
47 47 Expand the root partition and filesystem automatically on first boot.
48 48
49 49 #### Keyboard settings:
50 50 These options are used to configure keyboard layout in `/etc/default/keyboard` for console and Xorg. These settings can also be changed inside the running OS using the `dpkg-reconfigure keyboard-configuration` command.
51
51 52 ##### `XKBMODEL`=""
53 Set the name of the model of your keyboard type.
54
52 55 ##### `XKBLAYOUT`=""
56 Set the supported keyboard layout(s).
57
53 58 ##### `XKBVARIANT`=""
59 Set the supported variant(s) of the keyboard layout(s).
60
54 61 ##### `XKBOPTIONS`=""
62 Set extra xkb configuration options.
55 63
56 #### Networking settings
57 These settings are used to set up networking configuration in `/etc/systemd/network/eth.network`.
64 #### Networking settings (DHCP)
65 This setting is used to set up networking auto configuration in `/etc/systemd/network/eth.network`.
58 66
59 67 #####`ENABLE_DHCP`=true
60 Set the system to use DHCP. When set to "true", the following `NET_*` settings (used for static configuration) are ignored.
68 Set the system to use DHCP. This requires an DHCP server.
69
70 #### Networking settings (static)
71 These settings are used to set up a static networking configuration in /etc/systemd/network/eth.network. The following static networking settings are only supported if `ENABLE_DHCP` was set to `false`.
61 72
62 73 #####`NET_ADDRESS`=""
63 74 Set a static IPv4 or IPv6 address and its prefix, separated by "/", eg. "192.169.0.3/24".
64 75
65 76 #####`NET_GATEWAY`=""
66 77 Set the IP address for the default gateway.
67 78
68 79 #####`NET_DNS_1`=""
69 80 Set the IP address for the first DNS server.
70 81
71 82 #####`NET_DNS_2`=""
72 83 Set the IP address for the second DNS server.
73 84
74 85 #####`NET_DNS_DOMAINS`=""
75 86 Set the default DNS search domains to use for non fully qualified host names.
76 87
77 88 #####`NET_NTP_1`=""
78 89 Set the IP address for the first NTP server.
79 90
80 91 #####`NET_NTP_2`=""
81 92 Set the IP address for the second NTP server.
82 93
83 94 #### Basic system features:
84 95 ##### `ENABLE_CONSOLE`=true
85 96 Enable serial console interface. Recommended if no monitor or keyboard is connected to the RPi2. In case of problems fe. if the network (auto) configuration failed - the serial console can be used to access the system.
86 97
87 98 ##### `ENABLE_IPV6`=true
88 99 Enable IPv6 support. The network interface configuration is managed via systemd-networkd.
89 100
90 101 ##### `ENABLE_SSHD`=true
91 102 Install and enable OpenSSH service. The default configuration of the service doesn't allow `root` to login. Please use the user `pi` instead and `su -` or `sudo` to execute commands as root.
92 103
93 104 ##### `ENABLE_RSYSLOG`=true
94 105 If set to false, disable and uninstall rsyslog (so logs will be available only
95 106 in journal files)
96 107
97 108 ##### `ENABLE_SOUND`=true
98 109 Enable sound hardware and install Advanced Linux Sound Architecture.
99 110
100 111 ##### `ENABLE_HWRANDOM`=true
101 112 Enable Hardware Random Number Generator. Strong random numbers are important for most network based communications that use encryption. It's recommended to be enabled.
102 113
103 114 ##### `ENABLE_MINGPU`=false
104 115 Minimize the amount of shared memory reserved for the GPU. It doesn't seem to be possible to fully disable the GPU.
105 116
106 117 ##### `ENABLE_DBUS`=true
107 118 Install and enable D-Bus message bus. Please note that systemd should work without D-bus but it's recommended to be enabled.
108 119
109 120 ##### `ENABLE_XORG`=false
110 121 Install Xorg open-source X Window System.
111 122
112 123 ##### `ENABLE_WM`=""
113 124 Install a user defined window manager for the X Window System. To make sure all X related package dependencies are getting installed `ENABLE_XORG` will automatically get enabled if `ENABLE_WM` is used. The `rpi2-gen-image.sh` script has been tested with the following list of window managers: `blackbox`, `openbox`, `fluxbox`, `jwm`, `dwm`, `xfce4`, `awesome`.
114 125
115 126 #### Advanced sytem features:
116 127 ##### `ENABLE_MINBASE`=false
117 128 Use debootstrap script variant `minbase` which only includes essential packages and apt. This will reduce the disk usage by about 65 MB.
118 129
119 130 ##### `ENABLE_UBOOT`=false
120 131 Replace default RPi2 second stage bootloader (bootcode.bin) with U-Boot bootloader. U-Boot can boot images via the network using the BOOTP/TFTP protocol.
121 132
122 133 ##### `ENABLE_FBTURBO`=false
123 134 Install and enable the hardware accelerated Xorg video driver `fbturbo`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling.
124 135
125 136 ##### `ENABLE_IPTABLES`=false
126 137 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
127 138
128 139 ##### `ENABLE_USER`=true
129 140 Create pi user with password raspberry
130 141
131 142 ##### `ENABLE_ROOT`=true
132 143 Set root user password so root login will be enabled
133 144
134 145 ##### `ENABLE_ROOT_SSH`=true
135 146 Enable password root login via SSH. May be a security risk with default
136 147 password, use only in trusted environments.
137 148
138 149 ##### `ENABLE_HARDNET`=false
139 150 Enable IPv4/IPv6 network stack hardening settings.
140 151
141 152 ## Logging of the bootstrapping process
142 153 All information related to the bootstrapping process and the commands executed by the `rpi2-gen-image.sh` script can easily be saved into a logfile. The common shell command `script` can be used for this purpose:
143 154
144 155 ```shell
145 156 script -c 'APT_SERVER=ftp.de.debian.org ./rpi2-gen-image.sh' ./build.log
146 157 ```
147 158
148 159 ## Flashing the image file
149 160 After the image file was successfully created by the `rpi2-gen-image.sh` script it can be copied to the microSD card that will be used by the RPi2 computer. This can be performed by using the tools `bmaptool` or `dd`. Using `bmaptool` will probably speed-up the copy process because `bmaptool` copies more wisely than `dd`.
150 161
151 162 #####Flashing examples:
152 163 ```shell
153 164 bmaptool copy ./images/jessie/2015-12-13-debian-jessie.img /dev/mmcblk0
154 165 dd bs=4M if=./images/jessie/2015-12-13-debian-jessie.img of=/dev/mmcblk0
155 166 ```
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant