developer.shyd.de. studying my hobby

1Jul/127

Raspberry Pi: Setup Debian with SanDisk Extreme

200px-Raspberry_Pi_Logo.svg
(2 votes, average: 3.50 out of 5)
Loading...Loading...

Finally my RPi has been delivered! After unboxing it I really couldn't image that is was that tiny. First thing I did, was grabbing my 8GB SanDisk SD-Card and copying the rootfs debian6-19-04-2012 onto it.

After plugging the sd card in the RPi and connecting power supply the problems came up...

This article is not a detailed guide how to set up your RPi. It just describes my second afford to get the RPi booting flawlessly in a few words I can refer to in the future.

Problems I had

  • device didn't boot at all
  • no serial output on the GPIOs
  • login failures with definitely correct password
  • mouse/keyboard stopped working after startx

Workthrough

Prepare the SD-Card as described here: elinux.org/RPi_Easy_SD_Card_Setup
After replugging it I used gparted on my laptop to resize the partitions to fill the card.

My card is an 8GB SanDisk Extreme class 10, which is too fast for the stock kernel and the RPi doesn't boot. Therefor we need a newer kernel. Grab the tarball from github.com/raspberrypi/firmware/tree/master/boot and overwrite the files on the sd card.

Now plug the card into the RPi and boot it. At this time I saw it was alive, I got the kernel output on the serial interface!

You should be able to login with pi:raspberry
Well, I wasn't... So sd card back into my laptop. I just edited the last line in /media/xyz/etc/shadow to another password. Then the login worked for me.

If you want to be able to login as root (make sure to change pw) type

sudo -i
passwd

To get the right timezone type:

dpkg-reconfigure tzdata

Change the update server to one nearby:

vim.tiny /etc/apt/sources.list

Then upgrade your installation:

apt-get update
apt-get dist-upgrade

If I now try to start the GUI with startx mouse and keyboard stop working. Due to the incredible fast sd card we need a newer kernel one more time. Get rpi-update as shown at github.com/Hexxeh/rpi-update/blob/master/README.md
Maybe you get dependency issues

apt-get install ca-certificates git-core

Another thing I noticed is that overscan is activated by default (maybe tv specific?). There are several things that can be set in the config.txt: elinux.org/RPi_config.txt
For me it's fine with these lines in /boot/config.txt

# create the file
vim.tiny /boot/config.txt
# insert the following
hdmi_force_hotplug=1
config_hdmi_boost=4
hdmi_group=1
hdmi_mode=32
disable_overscan=1

Update 22.07.2012: config.txt

Thanks to Patschi, he posted a link to a really nice description on the config.txt! You can read it in the spoiler:

Show »

################################################################################
##  Raspberry Pi Configuration Settings
##
##  Details taken from the eLinux wiki 2012/06/27
##  For up-to-date information please refer to wiki page.
##
##  Wiki Location : http://elinux.org/RPi_config.txt
##
################################################################################

################################################################################
##  Standard Definition Video Settings
################################################################################

## sdtv_mode
##     defines the TV standard for composite output
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Normal NTSC (Default)
##     1        Japanese version of NTSC - no pedestal
##     2        Normal PAL
##     3        Brazilian version of PAL - 525/60 rather than 625/50, different subcarrier
##
#sdtv_mode=0

## sdtv_aspect
##     defines the aspect ratio for composite output
##
##     Value    Description
##     -------------------------------------------------------------------------
##     1        4:3 (Default)
##     2        14:9
##     3        16:9
##
#sdtv_aspect=1

################################################################################
##  High Definition Video Settings
################################################################################

## hdmi_safe
##     Use "safe mode" settings to try to boot with maximum hdmi compatibility.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Disabled (Default)
##     1        Enabled (this does: hdmi_force_hotplug=1, config_hdmi_boost=4, hdmi_group=1, hdmi_mode=1, disable_overscan=0)
##
#hdmi_safe=1

## hdmi_force_hotplug
##     overrides the normal selection of composite if no HDMI is detected
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Disabled (Default)
##     1        Use HDMI mode even if no HDMI monitor is detected
##
#hdmi_force_hotplug=1 

## hdmi_drive
##     chooses between HDMI and DVI modes
##
##     Value    Description
##     -------------------------------------------------------------------------
##     1        Normal DVI mode (No sound)
##     2        Normal HDMI mode (Sound will be sent if supported and enabled)
##
#hdmi_drive=2 

## hdmi_group
##     defines the HDMI type
##
##     [rgh] I think values are 0 and 1 really, and the default 0 for CEA - at least with the latest firmware as of May 25th 2012.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     1        CEA (Default)
##     2        DMT
##
#hdmi_group=1

## hdmi_mode
##     defines screen resolution in CEA or DMT format
##
##     H means 16:9 variant (of a normally 4:3 mode).
##     2x means pixel doubled (i.e. higher clock rate, with each pixel repeated twice)
##     4x means pixel quadrupled (i.e. higher clock rate, with each pixel repeated four times)
##
##     Value    hdmi_group=CEA                  hdmi_group=DMT
##     -------------------------------------------------------------------------
##     1        VGA                             640x350   85Hz
##     2        480p  60Hz                      640x400   85Hz
##     3        480p  60Hz  H                   720x400   85Hz
##     4        720p  60Hz                      640x480   60Hz
##     5        1080i 60Hz                      640x480   72Hz
##     6        480i  60Hz                      640x480   75Hz
##     7        480i  60Hz  H                   640x480   85Hz
##     8        240p  60Hz                      800x600   56Hz
##     9        240p  60Hz  H                   800x600   60Hz
##     10       480i  60Hz  4x                  800x600   72Hz
##     11       480i  60Hz  4x H                800x600   75Hz
##     12       240p  60Hz  4x                  800x600   85Hz
##     13       240p  60Hz  4x H                800x600   120Hz
##     14       480p  60Hz  2x                  848x480   60Hz
##     15       480p  60Hz  2x H                1024x768  43Hz  DO NOT USE
##     16       1080p 60Hz                      1024x768  60Hz
##     17       576p  50Hz                      1024x768  70Hz
##     18       576p  50Hz  H                   1024x768  75Hz
##     19       720p  50Hz                      1024x768  85Hz
##     20       1080i 50Hz                      1024x768  120Hz
##     21       576i  50Hz                      1152x864  75Hz
##     22       576i  50Hz  H                   1280x768        reduced blanking
##     23       288p  50Hz                      1280x768  60Hz
##     24       288p  50Hz  H                   1280x768  75Hz
##     25       576i  50Hz  4x                  1280x768  85Hz
##     26       576i  50Hz  4x H                1280x768  120Hz reduced blanking
##     27       288p  50Hz  4x                  1280x800        reduced blanking
##     28       288p  50Hz  4x H                1280x800  60Hz
##     29       576p  50Hz  2x                  1280x800  75Hz
##     30       576p  50Hz  2x H                1280x800  85Hz
##     31       1080p 50Hz                      1280x800  120Hz reduced blanking
##     32       1080p 24Hz                      1280x960  60Hz
##     33       1080p 25Hz                      1280x960  85Hz
##     34       1080p 30Hz                      1280x960  120Hz reduced blanking
##     35       480p  60Hz  4x                  1280x1024 60Hz
##     36       480p  60Hz  4x H                1280x1024 75Hz
##     37       576p  50Hz  4x                  1280x1024 85Hz
##     38       576p  50Hz  4x H                1280x1024 120Hz reduced blanking
##     39       1080i 50Hz  reduced blanking    1360x768  60Hz
##     40       1080i 100Hz                     1360x768  120Hz reduced blanking
##     41       720p  100Hz                     1400x1050       reduced blanking
##     42       576p  100Hz                     1400x1050 60Hz
##     43       576p  100Hz H                   1400x1050 75Hz
##     44       576i  100Hz                     1400x1050 85Hz
##     45       576i  100Hz H                   1400x1050 120Hz reduced blanking
##     46       1080i 120Hz                     1440x900        reduced blanking
##     47       720p  120Hz                     1440x900  60Hz
##     48       480p  120Hz                     1440x900  75Hz
##     49       480p  120Hz H                   1440x900  85Hz
##     50       480i  120Hz                     1440x900  120Hz reduced blanking
##     51       480i  120Hz H                   1600x1200 60Hz
##     52       576p  200Hz                     1600x1200 65Hz
##     53       576p  200Hz H                   1600x1200 70Hz
##     54       576i  200Hz                     1600x1200 75Hz
##     55       576i  200Hz H                   1600x1200 85Hz
##     56       480p  240Hz                     1600x1200 120Hz reduced blanking
##     57       480p  240Hz H                   1680x1050       reduced blanking
##     58       480i  240Hz                     1680x1050 60Hz
##     59       480i  240Hz H                   1680x1050 75Hz
##     60                                       1680x1050 85Hz
##     61                                       1680x1050 120Hz reduced blanking
##     62                                       1792x1344 60Hz
##     63                                       1792x1344 75Hz
##     64                                       1792x1344 120Hz reduced blanking
##     65                                       1856x1392 60Hz
##     66                                       1856x1392 75Hz
##     67                                       1856x1392 120Hz reduced blanking
##     68                                       1920x1200       reduced blanking
##     69                                       1920x1200 60Hz
##     70                                       1920x1200 75Hz
##     71                                       1920x1200 85Hz
##     72                                       1920x1200 120Hz reduced blanking
##     73                                       1920x1440 60Hz
##     74                                       1920x1440 75Hz
##     75                                       1920x1440 120Hz reduced blanking
##     76                                       2560x1600       reduced blanking
##     77                                       2560x1600 60Hz
##     78                                       2560x1600 75Hz
##     79                                       2560x1600 85Hz
##     80                                       2560x1600 120Hz reduced blanking
##     81                                       1366x768  60Hz
##     82                                       1080p     60Hz
##     83                                       1600x900        reduced blanking
##     84                                       2048x1152       reduced blanking
##     85                                       720p      60Hz
##     86                                       1366x768        reduced blanking
##
#hdmi_mode=1

## hdmi_force_hotplug
##     Make RPi ignore hotplug signal from display and assume it is asserted.
##
#hdmi_force_hotplug=0

## config_hdmi_boost
##     configure the signal strength of the HDMI interface.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        (Default)
##     1
##     2
##     3
##     4        Try if you have interference issues with HDMI
##     5
##     6
##     7        Maximum
##
#config_hdmi_boost=0

################################################################################
##  Overscan Video Settings
################################################################################

## overscan_left
##     number of pixels to skip on left
##
#overscan_left=0

## overscan_right
##     number of pixels to skip on right
##
#overscan_right=0

## overscan_top
##     number of pixels to skip on top
##
#overscan_top=0

## overscan_bottom
##     number of pixels to skip on bottom
##
#overscan_bottom=0

## disable_overscan
##     set to 1 to disable overscan
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Overscan Enabled (Default)
##     1        Overscan Disabled
##
#disable_overscan=1

################################################################################
##  Framebuffer Video Settings
################################################################################

## framebuffer_width
##     console framebuffer width in pixels. Default is display width minus overscan.
##
#framebuffer_width=0

## framebuffer_height
##     console framebuffer height in pixels. Default is display height minus overscan.
##
#framebuffer_height=0

## framebuffer_depth
##     console framebuffer depth in bits per pixel.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     8        valid, but default RGB palette makes an unreadable screen
##     16       (Default)
##     24       looks better but has corruption issues as of 2012/06/15
##     32       has no corruption issues but needs framebuffer_ignore_alpha=1 and shows the wrong colors as of 2012/06/15
##
#framebuffer_height=16

## framebuffer_ignore_alpha
##     set to 1 to disable alpha channel. Helps with 32bit.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Enable Alpha Channel (Default)
##     1        Disable Alpha Channel
##
#framebuffer_ignore_alpha=0

################################################################################
##  Test Settings
################################################################################

## test_mode
##     enable test sound/image during boot for manufacturing test.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Disable Test Mod (Default)
##     1        Enable Test Mode
##
#test_mode=0

################################################################################
##  Cache Settings
################################################################################

## disable_l2cache
##     disable arm access to GPU's L2 cache. Needs corresponding L2 disabled kernel.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     0        Enable L2 Cache (Default)
##     1        Disable L2 cache
##
#disable_l2cache=0

################################################################################
##  Boot Option Settings
################################################################################

## disable_commandline_tags
##     Stops start.elf from filling in ATAGS (memory from 0x100) before launching kernel
##
#disable_commandline_tags=0

## cmdline (string)
##     Command line parameters. Can be used instead of cmdline.txt file
##
#cmdline=""

## kernel (string)
##     Alternative name to use when loading kernel.
##
#kernel=""

## kernel_address
##     address to load kernel.img file at
##
#kernel_address=0x00000000

## ramfsfile (string)
##     ramfs file to load
##
#ramfsfile=""

## device_tree_address
##     address to load device_tree at
##
#device_tree_address=0x00000000

## init_uart_baud
##     initial uart baud rate. Default 115200
##
#init_uart_baud=115200

## init_uart_clock
##     initial uart clock. Default 3000000
##
#init_uart_clock=3000000

## init_emmc_clock
##     initial emmc clock. Default 50000000 (50mhz default. increasing this can speedup your SD-card)
##
#init_emmc_clock=50000000

## boot_delay
##     Waits for given number of seconds in start.elf before loading kernel.img.
##
#boot_delay=0

################################################################################
##  Overclocking Settings
################################################################################

## arm_freq
##     frequency of ARM in MHz. Default 700.
##
#arm_freq=700

## gpu_freq
##     Sets core_freq, h264_freq, isp_freq, v3d_freq together.
##
#gpu_freq=250

## core_freq
##     frequency of GPU processor core in MHz. Default 250.
##
#core_freq=250

## h264_freq
##     frequency of hardware video block in MHz. Default 250.
##
#h264_freq=250

## isp_freq
##     frequency of image sensor pipeline block in MHz. Default 250.
##
#isp_freq=250

## v3d_freq
##     frequency of 3D block in MHz. Default 250.
##
#v3d_freq=250

## sdram_freq
##     frequency of SDRAM in MHz. Default 400.
##
#sdram_freq=400

################################################################################
##  Voltage Settings
##
##  WARNING: Setting any of the parameters which over volt your Raspberry Pi
##  will set a permanent bit within the SOC and your warranty is void. So If
##  you care about the warranty do not adjust voltage.
##
################################################################################

## over_voltage
##     ARM/GPU core voltage adjust.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     -16      0.8   V
##     -15      0.825 V
##     -14      0.85  V
##     -13      0.875 V
##     -12      0.9   V
##     -11      0.925 V
##     -10      0.95  V
##     -9       0.975 V
##     -8       1.0   V
##     -7       1.025 V
##     -6       1.05  V
##     -5       1.075 V
##     -4       1.1   V
##     -3       1.125 V
##     -2       1.15  V
##     -1       1.175 V
##     0        1.2   V (Default)
##     1        1.225 V
##     2        1.25  V
##     3        1.275 V
##     4        1.3   V
##     5        1.325 V
##     6        1.35  V
##     7        1.375 V
##     8        1.4   V
##
#over_voltage=0

## over_voltage_sdram
##     Sets over_voltage_sdram_c, over_voltage_sdram_i, over_voltage_sdram_p together
##
##     Value    Description
##     -------------------------------------------------------------------------
##     -16      0.8   V
##     -15      0.825 V
##     -14      0.85  V
##     -13      0.875 V
##     -12      0.9   V
##     -11      0.925 V
##     -10      0.95  V
##     -9       0.975 V
##     -8       1.0   V
##     -7       1.025 V
##     -6       1.05  V
##     -5       1.075 V
##     -4       1.1   V
##     -3       1.125 V
##     -2       1.15  V
##     -1       1.175 V
##     0        1.2   V (Default)
##     1        1.225 V
##     2        1.25  V
##     3        1.275 V
##     4        1.3   V
##     5        1.325 V
##     6        1.35  V
##     7        1.375 V
##     8        1.4   V
##
#over_voltage_sdram=0

## over_voltage_sdram_c
##     SDRAM controller voltage adjust.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     -16      0.8   V
##     -15      0.825 V
##     -14      0.85  V
##     -13      0.875 V
##     -12      0.9   V
##     -11      0.925 V
##     -10      0.95  V
##     -9       0.975 V
##     -8       1.0   V
##     -7       1.025 V
##     -6       1.05  V
##     -5       1.075 V
##     -4       1.1   V
##     -3       1.125 V
##     -2       1.15  V
##     -1       1.175 V
##     0        1.2   V (Default)
##     1        1.225 V
##     2        1.25  V
##     3        1.275 V
##     4        1.3   V
##     5        1.325 V
##     6        1.35  V
##     7        1.375 V
##     8        1.4   V
##
#over_voltage_sdram_c=0

## over_voltage_sdram_i
##     SDRAM I/O voltage adjust.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     -16      0.8   V
##     -15      0.825 V
##     -14      0.85  V
##     -13      0.875 V
##     -12      0.9   V
##     -11      0.925 V
##     -10      0.95  V
##     -9       0.975 V
##     -8       1.0   V
##     -7       1.025 V
##     -6       1.05  V
##     -5       1.075 V
##     -4       1.1   V
##     -3       1.125 V
##     -2       1.15  V
##     -1       1.175 V
##     0        1.2   V (Default)
##     1        1.225 V
##     2        1.25  V
##     3        1.275 V
##     4        1.3   V
##     5        1.325 V
##     6        1.35  V
##     7        1.375 V
##     8        1.4   V
##
#over_voltage_sdram_i=0

## over_voltage_sdram_p
##     SDRAM phy voltage adjust.
##
##     Value    Description
##     -------------------------------------------------------------------------
##     -16      0.8   V
##     -15      0.825 V
##     -14      0.85  V
##     -13      0.875 V
##     -12      0.9   V
##     -11      0.925 V
##     -10      0.95  V
##     -9       0.975 V
##     -8       1.0   V
##     -7       1.025 V
##     -6       1.05  V
##     -5       1.075 V
##     -4       1.1   V
##     -3       1.125 V
##     -2       1.15  V
##     -1       1.175 V
##     0        1.2   V (Default)
##     1        1.225 V
##     2        1.25  V
##     3        1.275 V
##     4        1.3   V
##     5        1.325 V
##     6        1.35  V
##     7        1.375 V
##     8        1.4   V
##
#over_voltage_sdram_p=0
Filed under: Hardware, Raspberry Pi | 8,467 views Leave a comment
  • http://pkern.at Patschi

    What exactly the config settings are making? In the blog entry there aren’t good descriptions of it…

    • shyd

      hdmi_force_hotplug=1 #Use HDMI mode even if no HDMI monitor is detected
      config_hdmi_boost=4 #just kept this from hdmi_safe, configure the signal strength of the HDMI interface
      hdmi_group=1 # CEA
      hdmi_mode=32 # 1080p 24Hz
      disable_overscan=1 # fill the entire screen

      I think they are quite clear

      • http://pkern.at Patschi

        Do you could explain me exactly what “config_hdmi_boost” and “hdmi_group” does? :)
        The rest is clear for me – Thanks!

  • http://pkern.at Patschi

    “login failures with definitely correct password”
    This problem I had too.. The reason was, that the default keyboard is setted to the american standard. After I logged in successfully logged in, I setted it to the Europe keyboard standard and it worked fine.

    • shyd

      Nope, that didn’t fix it for me. Typed the pass as user to check the keys.

  • http://pkern.at Patschi

    I found a nice discription about all config.txt commands: http://pastebin.com/HN9kMC8C

  • http://pkern.at Patschi

    I’ve found a nice description about all config.txt commands: http://pastebin.com/HN9kMC8C