Firstly this isn't my own work - it is taken from a number of other websites to put this together. The Raspberry Pi web site is a good place to start for information. Here you will find a downloads page with three versions of Linux. I originally started with the Debian Squeeze version and then went to the Arch Linux and then went back to the Squeeze version. I intend getting the Arch Linux one up and running as it might give more control as I can build exactly what I need.
1. Download from the Raspberry Pi downloads page the debian6-19-04-2012.img file (or the latest that is available).
2. I use a PC so have used a utility called Win32DiskImager. Download this. It isn't installed on your PC but you need to unzip the file. Once unzipped run the Win32DiskImager.exe. Choose the location of the debian image file and write it to a SD card you have inserted into your PC (make sure you choose the write disk as the tool apparently does not worry about where it writes to).
3. Once written put it in the Raspberry Pi. Attach a keyboard, mouse and monitor. You will also need a CAT 5 cable to connect it to your router. Your router should then provide an IP address to your machine.
4. Connect the power cable. You will need a 5V Micro USB connector (used by some mobile phones). The power light should come on and the display should run through some boot things. If your display is blank I have read reports of some problems with some displays (some with HDMI to DVI) and also some reports of issues with resolution (black borders and the resolution reduced). If the former you need to do some searching on the internet for solutions or use another monitor initially. For the latter I wouldn't worry about it yet.
5. The device will boot up to do some initialisation - then reboot itself. You will be presented with a login screen. The username is pi and the password is raspberry.
6. There is a little bit of work to do in configuration. When you logon to a Linux machine you generally do not use the Superuser (which is user root) - we are logging on as the user pi which means we do not have superuser privileges. However, if we type the command sudo at the start of a command it will run as if we were a superuser. (Lets not worry about how this works at the moment).
7. The first thing I did was enable ssh. This is the Secure Shell which allows us to connect to the RPi from another computer (securely). To do this you need to execute the commands below and reboot
cd /boot sudo mv boot_enable_ssh.rc boot.rc
8. To login from your PC you should download a utility such as putty. This is a telnet and SSH client. You just need to download the executable and run it (it is not installed so will not be on your start menu). You need to get the IP address of your RPi. The following command
ip addr
will put out some information about your connections.
pi@pi:~$ ip addr 1: lo:mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: mtu 1488 qdisc pfifo_fast state UNKNOWN qlen 1000 link/ether b8:27:eb:f6:67:12 brd ff:ff:ff:ff:ff:ff inet 192.168.11.7/16 brd 192.168.255.255 scope global eth0
Once you have the IP address (in this case 192.18.11.7) you can connect using Putty. Run the putty executable and enter the IP address. You should now be able to logon (and thus not need a keyboard, mouse and monitor attached to your RPi - although it might be useful to still have the monitor attached to see if any messages get displayed from time to time whilst you are installing)
9. I used a 4GB SD disk - but the image does not use all of it. It is necessary to do some configuration of it. You need to run a utility called fdisk. Firstly if you run the command
sudo df -h
it will display a list of disks available. You will see on this list /dev/mmcblk0p1 or similar. Things begining with /dev are devices and /dev/mmcblk0 is your SD card. It is split into three parts - 1 is the "boot" partition, which is used to startup the device. 2 is the "root" disk and 3 is set as "swap". The Raspberry Pi uses this to put contents of memory when all the memory is used.
To reconfigure the disk run the command
sudo fdisk -uc /dev/mmcblk0
Whilst running type the commands
- p - which will print the current list of partitions and sizes
- d - to delete a partition
- 3 - to specify the swap partition to be deleted
- d - to delete a partition
- 2 - to specify the root disk
- n - to create a new partition
- p - to create a primary partition
- 2 - to specify the root disk
- 157976 - the start of the partition. This may be different from you - see the output from print which displays the original partitions.
- Enter - press enter for the next question and it will use the rest of the disk
- w - to write the changes
You now need to reboot the RPi, with
sudo reboot
Once rebooted you then need to run the command
sudo resize2fs /dev/mmcblk0p2
Then reboot again and check the disk (with df -h) to see if it is correct. I will post later how to add back swap.
No comments:
Post a Comment