{"id":835,"date":"2014-05-10T22:16:08","date_gmt":"2014-05-10T21:16:08","guid":{"rendered":"http:\/\/www.symablog.de\/blog\/?p=835"},"modified":"2017-03-20T19:44:41","modified_gmt":"2017-03-20T18:44:41","slug":"raspberry-pi-erste-schritte-start-im-headless-mode","status":"publish","type":"post","link":"https:\/\/www.symablog.de\/blog\/raspberry-pi-erste-schritte-start-im-headless-mode\/","title":{"rendered":"Raspberry Pi &#8211; erste Schritte \/ Start im headless mode"},"content":{"rendered":"<p><strong>Raspberry Pi ohne Tastatur und Monitor an den Start bringen<\/strong><br \/>\nDies ist eine Anleitung f\u00fcr die initiale Installation eines Raspberry Pi Model B ohne angeschlossenen Monitor und Tastatur (sogenannter headless Modus). Danach kann der Raspberry Pi f\u00fcr den jeweiligen Spezialfall konfiguriert werden.<\/p>\n<p>\u2013 Raspberry Pi Model B am LAN angeschlossen<br \/>\n\u2013 Kartenleser am Windows Computer<br \/>\n\u2013 leere SD-Karte &gt; 4GB vorzugsweise von SanDisk oder anderem qualitativ guten Hersteller!<br \/>\n\u2013 ein Tool zum Beschreiben der SD-Karte, z.B. unter Windows den \u201eWin32 Disk Imager\u201c (<a title=\"heise.de: Win32 Disk Imager\" href=\"http:\/\/0815.ws\/zD9zB\" target=\"_blank\">Download bei Heise.de<\/a>)<br \/>\n\u2013 das Image f\u00fcr den Raspberry Pi \u2013 hier Raspian <a href=\"https:\/\/www.raspberrypi.org\/downloads\/\" target=\"_blank\">yyyy-mm-dd-wheezy-raspbian.zip<\/a> von raspberrypi.org<br \/>\n\u2013 ein SSH Terminal \/ \u201eTool\u201c z.B. putty<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-836 size-full\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_02.jpg\" alt=\"Win32 Disk Imager\" width=\"422\" height=\"215\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_02.jpg 422w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_02-150x76.jpg 150w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/p>\n<p>\u2013 Nach dem Auspacken der Zip-Datei kann das Image mit dem Win32 Disk Imager auf die SD-Karte gebracht werden.<br \/>\n&#8211; <strong>Achtung!<\/strong> Ab Raspian Jessie ist ssh nicht mehr per default aktiv! Wenn das Image fertig auf die SD-Karte geschrieben ist, via Explorer <strong>direkt unter \/ eine leere Datei ssh anlegen.<br \/>\n<\/strong>Die Sinnhaftigkeit dieser &#8222;Neuerung&#8220; m\u00f6chte ich nicht diskutieren.<br \/>\n\u2013 Karte in den Raspberry Pi stecken und einschalten.Wer auf seine Platine schauen kann, sieht alle vier LEDs leuchten <a href=\"http:\/\/biturlz.com\/NxegsW7\">click for source<\/a>.<\/p>\n<p>Wir wollen den Raspberry ohne Monitor und Tastatur betreiben (sogenannter \u201eheadless mode\u201c \u2013 kopfloser Betrieb). Da kommen die aktuellen Images mit <strong>aktiviertem ssh<\/strong> und <strong>dhcp<\/strong>! Dies bedeutet, wir m\u00fcssen nur die IP unseres Raspberry herausbekommen, indem wir z.B. auf dem Router nachsehen.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-837\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_01.jpg\" alt=\"Router DHCP Liste\" width=\"348\" height=\"177\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_01.jpg 348w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_01-150x76.jpg 150w\" sizes=\"(max-width: 348px) 100vw, 348px\" \/>Der Eintrag mit der MAC beginnend B8:27:EB \u2026 ist unser Raspberry.<br \/>\nBei einer FritzBox zeigt uns diese die IP an (unter Punkt \u201eHeimnetz\u201c)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1079\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/fritzbox_ip.jpg\" alt=\"fritzbox_ip\" width=\"544\" height=\"30\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/fritzbox_ip.jpg 544w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/fritzbox_ip-150x8.jpg 150w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/fritzbox_ip-500x28.jpg 500w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/>Nun verbinden wir uns mit ssh (z.B. mit Putty ssh Port 22) auf die ermittelte IP. Der Standarduser ist<strong> pi<\/strong> und Passwort<strong> raspberry<\/strong> \u2026<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-838\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_03.jpg\" alt=\"putty ssh to raspberry\" width=\"842\" height=\"278\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_03.jpg 842w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_03-150x49.jpg 150w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_firststeps_03-500x165.jpg 500w\" sizes=\"(max-width: 842px) 100vw, 842px\" \/><\/p>\n<p>Mit der NOTICE wird man aufgefordert, mit dem Tool raspi-config Einstellungen auszuf\u00fchren.<br \/>\nDies machen wir hier jedoch nicht, sondern setzen diese direkt auf der Kommandozeile.<\/p>\n<p>Zuerst setzen wir ein <strong>neues Passwort<\/strong> f\u00fcr den user pi mit:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-848\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_passwd.jpg\" alt=\"sudo passwd pi\" width=\"385\" height=\"92\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_passwd.jpg 385w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_passwd-150x35.jpg 150w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/>Nun <strong>aktualisieren<\/strong> wir das System (Internetverbindung vorausgesetzt) mit:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-841\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_update.jpg\" alt=\"rasp_apt-get_update\" width=\"398\" height=\"20\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_update.jpg 398w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_update-150x7.jpg 150w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/>und mit:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-842\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_upgrade.jpg\" alt=\"rasp_apt-get_upgrade\" width=\"390\" height=\"18\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_upgrade.jpg 390w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_apt-get_upgrade-150x6.jpg 150w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/p>\n<p>Das Upgrade ben\u00f6tigt eine Best\u00e4tigung zur Benutzung des geforderten \u201ePlattenplatz\u201c und danach etwas Zeit, je nach aktuellem Versionsstand des Images und der enthaltenen Pakete!<\/p>\n<p>Die <strong>Einstellung der Zeitzone<\/strong> mit dpkg-reconfigure tzdata. Zur Auswahl von \u201eEurope\u201c und \u201eBerlin\u201c erscheint ein grafisches Men\u00fc aus dem Tool \u201eraspi-config\u201c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-850\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_dpkg-reconfigure_tzdata.jpg\" alt=\"dpkg-reconfigure tzdata\" width=\"544\" height=\"100\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_dpkg-reconfigure_tzdata.jpg 544w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_dpkg-reconfigure_tzdata-150x27.jpg 150w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_dpkg-reconfigure_tzdata-500x91.jpg 500w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/p>\n<p><strong>Partitionserweiterung auf gesamte SD-Karte<\/strong><br \/>\nDie Partition ist nun ziemlich klein und allein mit dem Image zu 90% ausgelastet.<br \/>\nWir sollten also die Partition auf den gesamten Datentr\u00e4ger, also die gesamte SD-Karte, ausweiten und nutzen.<br \/>\nAls \u201eStarter\u201c k\u00f6nnen wir daf\u00fcr das Tool \u201eraspi-config\u201c nutzen.<br \/>\nsudo raspi-config \u00f6ffnet dieses Tool:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-897\" src=\"http:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_raspi-config.jpg\" alt=\"DasToolRaspiConfig\" width=\"867\" height=\"292\" srcset=\"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_raspi-config.jpg 867w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_raspi-config-150x50.jpg 150w, https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/rasp_raspi-config-500x168.jpg 500w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/>Expand Filesystem erweitert die Partition. Wir rebooten das System um die \u00c4nderung an der Partitionstabelle wirksam werden zu lassen. Als fortgeschrittener oder interessierter Anwender k\u00f6nnen die unter der GUI verborgenen Befehle und Aktionen auch selbst gesteuert und durchgef\u00fchrt werden. Dazu gibt es eine extra Anleitung im Beitrag <a title=\"Partiton erweitern\" href=\"http:\/\/www.symablog.de\/blog\/raspberry-pi-partition-auf-gesamte-sd-karte-erweitern\/\">\u201ePartition auf gesamte SD-Karte erweitern\u201c<\/a>.<\/p>\n<p><strong>Hostname \u00e4ndern<\/strong><br \/>\nWer sein System individuaisieren m\u00f6chte, bzw. mehr als ein Raspberry Pi in seinem Netz betreiben will, kann den Systemnamen \u00e4ndern. Einfach in den zwei folgenden Dateien den bisherigen Namen raspberrypi durch den gew\u00fcnschten neuen Namen ersetzen:<br \/>\n<strong>sudo nano \/etc\/hostname<\/strong><br \/>\n<strong>sudo nano \/etc\/hosts<\/strong><br \/>\nDanach ist ein Reboot (<em>sudo reboot<\/em>) erforderlich und nach der Anmeldung kann man mit <em>hostname<\/em> den neuen Systemnamen abfragen, bzw. man sieht ihn schon im Prompt.<\/p>\n<p><strong>Image sichern<\/strong><br \/>\nWer nun sein Image sichern m\u00f6chte, f\u00e4hrt den Raspberry Pi herunter (sudo poweroff) und steckt die SD-Karte in den Kartenleser, um mit W32DiskImager das Image in eine Datei zu sichern. Funktion \u201eRead\u201c ausw\u00e4hlen!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Raspberry Pi ohne Tastatur und Monitor an den Start bringen Dies ist eine Anleitung f\u00fcr die initiale Installation eines Raspberry Pi Model B ohne angeschlossenen Monitor und Tastatur (sogenannter headless Modus). Danach kann der Raspberry Pi f\u00fcr den jeweiligen Spezialfall &hellip; <a class=\"more-link\" href=\"https:\/\/www.symablog.de\/blog\/raspberry-pi-erste-schritte-start-im-headless-mode\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":676,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[78,98],"tags":[151,197,152],"class_list":["post-835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-praxis","category-raspberry-pi","tag-erste-schritte-mit-dem-raspberry-pi","tag-raspberry-pi","tag-tutorial-raspberry-pi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.symablog.de\/blog\/wp-content\/uploads\/RaspberryPi_WLAN2.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p37Rzq-dt","_links":{"self":[{"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/posts\/835"}],"collection":[{"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/comments?post=835"}],"version-history":[{"count":23,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/posts\/835\/revisions"}],"predecessor-version":[{"id":1162,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/posts\/835\/revisions\/1162"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/media\/676"}],"wp:attachment":[{"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/media?parent=835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/categories?post=835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.symablog.de\/blog\/wp-json\/wp\/v2\/tags?post=835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}