setup a rpi image for burning on linux [raspberrypi]

based on:
http://www.forum-raspberrypi.de/Thread-tutorial-festplatten-sd-image-unter-linux-einbinden-mounten

setup your raspbian image:
file -s 20*raspbian-*lite.img #to check if the startsectors in later code still fit
sudo mkdir -p /mnt/sda2
cd ~/Downloads
sudo mount 20*raspbian-*lite.img /mnt/sda2 -o offset=$((8192*512))
cd /mnt/sda2/
sudo touch ssh
cd
sudo umount /mnt/sda2
cd ~/Downloads
sudo mount 20*raspbian-*lite.img /mnt/sda2 -o offset=$((98304*512))
cd /mnt/sda2/etc/wpa_supplicant/
sudo nano wpa_supplicant.conf

now add your wlan at the end like:
network={
ssid="YOUR_WLAN_SSID"
psk="YOUR_WLAN_PASSWORD"
}

and unmount the image:
cd
sudo umount /mnt/sda2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.