Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:user:kylek [2009/11/07 23:15] kylek created |
wiki:user:kylek [2010/05/16 00:02] (current) kylek fix link to proxydhcp page, [[ProxyDHCP]] -> [[/ProxyDHCP]] |
||
---|---|---|---|
Line 5: | Line 5: | ||
* Uses samba for network file access | * Uses samba for network file access | ||
* Boyscout level of security - program credentials into gpxe boot rom | * Boyscout level of security - program credentials into gpxe boot rom | ||
+ | * Controlled via ssh | ||
===== Get libraries for certain binaries ===== | ===== Get libraries for certain binaries ===== | ||
<code> | <code> | ||
Line 14: | Line 15: | ||
ldd `which watch` >> /tmp/libs | ldd `which watch` >> /tmp/libs | ||
ldd `which screen` >> /tmp/libs | ldd `which screen` >> /tmp/libs | ||
+ | # The Name Service Switch related libs aren't found with ldd | ||
+ | echo /lib/libnss_dns.so.2 >> /tmp/libs | ||
+ | echo /lib/libnss_files.so.2 >> /tmp/libs | ||
cat /tmp/libs | cut -f 2 -d '>' | cut -f 1 -d '(' | xargs -n 1 -I {} sh -c "readlink -f {} || echo {}" | sort | uniq | xargs -I {} cp {} . | cat /tmp/libs | cut -f 2 -d '>' | cut -f 1 -d '(' | xargs -n 1 -I {} sh -c "readlink -f {} || echo {}" | sort | uniq | xargs -I {} cp {} . | ||
</code> | </code> | ||
- | ===== embedding keys onto the eprom ===== | + | ===== embedding keys onto the rom image ===== |
- | For starters the boot script gets changed a little bit | + | Nothing needs to get changed. Files in the initrd provided via dhcp overwrite identically named files from the embedded initrd archive. It's still a good idea to segregate the embedded files for example /embed/* |
<code> | <code> | ||
#!gpxe | #!gpxe | ||
kernel vmlinuz-2.6.31-14-generic | kernel vmlinuz-2.6.31-14-generic | ||
initrd smith.ilz | initrd smith.ilz | ||
- | # todo: make an embed.img for the webserver that includes a .txt | + | boot</code> |
- | imgload embed.img | + | |
- | # Note the limitation | + | <code> |
- | # 123456789012345 | + | 00:50 < Docteh> i attached a gzipped tar to a gpxe image, and its automatically used along with the initrd specified via a script via dhcp, is that a known |
- | boot vmlinuz-2.6.31- | + | behavior? |
+ | 00:51 < Docteh> gzipped cpio, my bad | ||
+ | 00:52 < Docteh> I like that this is happening, I'm just wondering if I can expect it to work like that in the future | ||
</code> | </code> | ||
Formats: | Formats: | ||
- | gzipped cpio - works\\ | + | cpio archive compressed with gzip is the classic default, but I've seen support recently for bzip2 lzma |
- | gzipped tar - not tested yet\\ | + | <code> |
- | + | In make menuconfig under General Settings | |
- | Note: The default gpxe code might be incorrect. | + | [*] Support initial ramdisks compressed using gzip |
+ | [*] Support initial ramdisks compressed using bzip2 | ||
+ | [*] Support initial ramdisks compressed using LZMA | ||
+ | </code> | ||
+ | Note: My assumption of the default gpxe script might be incorrect. | ||
<code> | <code> | ||
echo \#\!gpxe > default.gpxe | echo \#\!gpxe > default.gpxe | ||
- | echo autoboot >> default.gpxe | + | echo autoboot >> default.gpxe</code> |
- | make EMBEDDED_IMAGE=./default.gpxe,./embed.img bin/pcnet32.pxe</code> | + | Build the desired image (cwd = gpxe/src) |
+ | <code> | ||
+ | mkdir embed | ||
+ | put files in embed directory | ||
+ | # Check permissions, ssh private keys wont get used if they're not set to be -rw-r--r-- | ||
+ | find embed -xdev |sort| cpio --quiet -H newc -o |TIME gzip > embed.img | ||
+ | </code> | ||
+ | |||
+ | <code>make EMBEDDED_IMAGE=./default.gpxe,./embed.img bin/pcnet32.pxe</code> | ||
+ | <code>make EMBEDDED_IMAGE=./default.gpxe,./embed.img bin/10ec8139.rom</code> | ||
+ | |||
+ | |||
+ | ===== Burning an eeprom ===== | ||
+ | Burning an eeprom is two steps, enabling bootrom with rset8139 and programming it | ||
+ | I fired up RSET8139 in freedos with the bootrom socket empty and set the bootrom size to 128kb. RSET8139 has options for 8kb 16kb 32kb 64kb and 128kb. This appears to work if multiple cards are plugged in. | ||
+ | |||
+ | Note: running rset8139 with a 1mbit eeprom in the socket while the 8139 was set to not have a boot rom caused rset8139 to hang. | ||
+ | |||
+ | http://ctflasher.sourceforge.net/ can write to an eeprom on a rtl8139b/c board via a /proc interface. I compiled a 2.6.17 kernel and used that with ctflasher | ||
+ | |||
+ | ===== Issues so far ===== | ||
+ | cifs client doesn't appear to watch connections as well as it should | ||
+ | |||
+ | there is not much documentation on [[/ProxyDHCP]] concept |