summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/wlan-boot/README
blob: 71bc5ff5a47029fb633365a6a1a0564de1584386 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
############################################
### README DRACUT MODUL FOR WLAN SUPPORT ###
############################################

SHORT LIST OF FILES
=============

/hooks
/hooks/parse-wlan-kernel-command-line-parameter.sh
/hooks/start_wlan.sh
/hooks/prepare-newroot.sh
/services
/services/dhcp.service
/services/wpa_supplicant.service
/udev
/udev/80-net-wlan.rules
/binaries
/binaries/systemd-preserve-process-marker
/binaries/dhcpcd
/scripts
/scripts/dhcpcd-hooks
/scripts/dhcpcd-hooks/20-resolv.conf
/scripts/dhcpcd-hooks/10-wpa_supplicant
/scripts/dhcpcd-run-hooks
/certs
/certs/Deutsche_Telekom_Root_CA_2.pem
/debug
/debug/services
/debug/services/debug-shell.service
/debug/binaries
/debug/binaries/busybox.tar
/debug/hooks
/debug/hooks/install_busybox.sh
/debug/scripts
/debug/scripts/restart_wpa.sh
/module-setup.sh
/chroot


WIFI DRIVER AND CHIP
====================

this module was built with the iwlwifi Linux kernel driver and tested with Intel Corporation Centrino Wireless-N 100


BUILDING THE INITRAMFS
======================

./build-initramfs.sh -s -d -p initramfs-wlan - --add "wlan crypt"


KERNEL COMMAND LINE EXAMPLE FOR EDUROAM
=======================================

../vmlinuz-centos-old slxsrv=132.230.8.90 slxbase=slx/cos7/ rd.shell rd.break=switch-root ssid=eduroam user=testoslx@hs-offenburg.de pw=password123


SEQUENCE
========

            ----------------------- cmdline
           /                           |
          /                            |
 parse the command line                |
                                       v
            -----------------------  udev
           /                           |
          /                            |
 set the interface name                |
                                       v
                                   pre-mount ------------------------
                                       |                             \
                                       |                              \
                                       |                   ------- start wlan -------
                                       v                  /                          \
           ----------------------  pre-pivot             /                            \
          /                                         set link up          start dhcpcd.service ------
         /                                                                                          \
 prepare newroot                                                                                     \
                                                                                         start wpa_supplicant.service
                                                                      
                                                                      


HOOKS
=====

cmdline
-------

/hooks/parse-wlan-kernel-command-line-parameter.sh
search the command line for 'ssid=' and 'pw=' and generates the wpa_supplicant configuration file /etc/wpa_supplicant.conf If you connect to eduroam you also need 'user='. It is important for dhcpcd that the config file includes the path to the ctrl_interface.


pre-mount
---------

/hooks/start_wlan.sh 
this script sets up the wlan interface and starts the dhcp.service. The dhcp.service runs the dhcp client dhcpcd which starts the wpa_supplicant.service if no wpa_supplicant already running. The script is waiting until its possible to ping the slxsrv from the command line.


pre-pivot
---------

/hooks/prepare-newroot.sh
copy files to the new system and disable NetworkManager



SERVICES
========

/services/dhcp.service
this service manages the dhcp client dhcpcd. It will be invoked by the start_wlan.sh script while pre-mount.

/services/wpa_supplicant.service
this service manages the wpa_supplicant. It will be invoked by dhcpcd.


DHCP
====

dhcpcd
------

the dhcp client we use is dhcpcd. dhcpcd runs /libexec/dhcpcd-run-hooks if an event occurs like no carrier is available. We want to use this hook event to restart wpa_supplicant every time we lost the connection. But in fact it doesnt work after the switch root, cause of any reason dhcpcd doesnt run the script.


dhcpcd-run-hooks
----------------

dhcpcd-run-hooks is used by dhcpcd to run any system and user defined hook scripts. It executes all scripts in /libexec/dhcpcd-hooks/.


/debug/scripts/restart_wpa.sh
-----------------------------

this script restarts the wpa_supplicant

DEBUG
=====

rescue shell
------------

after the new system booted you have a busybox available on tty9. You can use this if you lost the connection after the switch root.


CHROOT
======

here you find an environment which provides dhcpcd and wpa_supplicant. It isnt included automaticly, because its not really tested. For more Information you find some manual steps at chroot/README.