##// END OF EJS Templates
Added: Logging of the bootstrapping process...
drtyhlpr -
r13:2f9424e87ca9
parent child
Show More
@@ -1,86 +1,93
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 enviroment 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_HARDNET=true ENABLE_IPTABLES=true /rpi2-gen-image.sh
18 18 APT_SERVER=ftp.de.debian.org APT_PROXY="http://127.0.0.1:3142/" ./rpi2-gen-image.sh
19 19 ```
20 20
21 21 #### APT settings:
22 22 ##### `APT_SERVER`="ftp.debian.org"
23 23 Set Debian packages server address. Choose a server from the list of Debian wordwide [mirror sites](https://www.debian.org/mirror/list). Using a nearby server will probably speed-up all required downloads within the bootstrapping process.
24 24
25 25 ##### `APT_PROXY`=""
26 26 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.
27 27
28 28 #### General system settings:
29 29 ##### `HOSTNAME`="rpi2-jessie"
30 30 Set system host name. It is recommended that the host name is unique in the corresponding subnet.
31 31
32 32 ##### `PASSWORD`="raspberry"
33 33 Set system root password. It is **STRONGLY** recommended that you choose a custom password.
34 34
35 35 ##### `DEFLOCAL`="en_US.UTF-8"
36 36 Set default system locale and keyboard layout. This setting can also be changed inside the running OS using the `dpkg-reconfigure locales` command.
37 37
38 38 ##### `TIMEZONE`="Europe/Berlin"
39 39 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.
40 40
41 41 #### Basic system features:
42 42 ##### `ENABLE_CONSOLE`=true
43 43 Enable console output
44 44
45 45 ##### `ENABLE_IPV6`=true
46 46 Enable IPv6 support
47 47
48 48 ##### `ENABLE_SSHD`=true
49 49 Install and enable OpenSSH service
50 50
51 51 ##### `ENABLE_SOUND`=true
52 52 Enable sound hardware and install Advanced Linux Sound Architecture
53 53
54 54 ##### `ENABLE_HWRANDOM`=true
55 55 Enable Hardware Random Number Generator
56 56
57 57 ##### `ENABLE_MINGPU`=false
58 58 Minimize the amount of shared memory reserverd for the GPU
59 59
60 60 ##### `ENABLE_DBUS`=true
61 61 Install and enable D-Bus message bus
62 62
63 63 ##### `ENABLE_XORG`=false
64 64 Install Xorg open-source X Window System
65 65
66 66 ##### `ENABLE_FLUXBOX`=false
67 67 Install Fluxbox window manager for the X Window System
68 68
69 69 #### Advanced sytem features:
70 70 ##### `ENABLE_UBOOT`=false
71 71 Replace default RPi bootloader with U-Boot bootloader
72 72
73 73 ##### `ENABLE_IPTABLES`=false
74 74 Enable iptables IPv4/IPv6 firewall
75 75
76 76 ##### `ENABLE_HARDNET`=false
77 77 Enable IPv4/IPv6 network stack hardening settings
78 78
79 ## Logging of the bootstrapping process
80 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:
81
82 ```shell
83 script -c 'APT_SERVER=ftp.de.debian.org ./rpi2-gen-image.sh' ./build.log
84 ```
85
79 86 ## Flashing the image file
80 87 After the image file was succesfully 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`.
81 88
82 89 #####Flashing examples:
83 90 ```shell
84 91 bmaptool copy ./images/jessie/2015-12-13-debian-jessie.img /dev/mmcblk0
85 dd bs=4M if=./images/jessie/2015-12-13-debian-jessie.img of=/dev/mmcblk
92 dd bs=4M if=./images/jessie/2015-12-13-debian-jessie.img of=/dev/mmcblk0
86 93 ```
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant