Raspberry Pi first boot up

从https://www.raspberrypi.org/downloads/raspbian/ 下载的raspbian的镜像,解压后用 Win32DiskImager解压到一张microSD卡上即可。

用hdmi连接显示器,显示器指示没有信号。需要把sd卡拿下来,编辑boot区的 config.txt:
hdmi_force_hotplug=1

再重启后,显示器就有显示了。

但是装东西失败,显示disk full。

pi@raspberrypi ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 6.3G 6.0G 25M 100% /
devtmpfs 428M 0 428M 0% /dev
tmpfs 87M 336K 86M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 173M 0 173M 0% /run/shm
/dev/mmcblk0p5 60M 20M 41M 33% /boot
/dev/mmcblk0p3 27M 397K 25M 2% /media/SETTINGS

可以用 sudo apt-get purge wolfram-engine

释放掉600M的空间。但是我8G的卡只能用4G。

可以运行 sudo raspi-config -> Expand Filesystem,重启后空间就回来了。

也可以用resize2fs /dev/mmcblk0p6 。但是没有试。

接下来是打开ssh,用ps显示ssh-server已经启动,apt-get重装openssh-server也不行。 ssh localhost也显示,connection refused。需要重新运行:
 sudo raspi-config

选择advanced setting,再选ssh就可以了。

  • Re-size to file-system to use the entire SD card in my case (8GB)
    First option in setup menu
  • Change the locale to match your location
    This is found under “Internationalization Options”
  • Change the timezone to match your location
    This is found under “Internationalization Options”
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.