Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - SCHEDA SD
  2. Scaricare immagine e scrivere sulla scheda sd con il comando:
  3. dd bs=1M if=archlinux-hf-2012-09-18.img of=/dev/mmcblk0
  4. - backup
  5. dd if=/dev/mmcblk0 of=archlinuxarm.img bs=1M
  6.  
  7. - AMPLIARE SCHEDA SD
  8. Now that you've got Arch on an SD card the next step is booting it up. Insert it into the Pi, connect your peripherals and you're good to go. Note that unlike Debian Arch has SSH activated by default and so you don't need to connect a monitor and keyboard as long as it's got network connectivity.
  9. Now you probably want to resize the partition to match the SD card since there is likely to be a lot of unused/unusable space by default. Log in with username root and password root (either via SSH or with a keyboard and screen connected to the Raspberry Pi, either will work). Run "fdisk /dev/mmcblk0". Type the command 'p' and press enter. You should see two lines looking similar to this:
  10. /dev/mmcblk0p1 1 195312 97656 c W95 FAT32 (LBA)
  11. /dev/mmcblk0p2 197265 15544319 7673527+ 83 Linux
  12. Those are the current partitions. What we need to do is delete the second one and recreate it larger. Make a note of the first number on the second line (in this case 197265) and then type the command 'd' (and press enter). Choose 2. Now we create a new one with 'n' and enter 'p' for primary and 2 for partition number 2. Now we get to the first sector, and here it's important that you enter the number we took note of earlier, in this case 197265. Select the largest value for last sector. Now that we've done that enter 'w' to write and then 'q' to quit. Reboot with the command 'reboot' and once you've booted and logged in again run 'resize2fs /dev/mmcblk0p2'. It'll take a while to complete but once done you'll be able to utilise the full size of the SD card.
  13.  
  14. - AGGIORNARE
  15. The next step is to update the system so you have the latest software running. Normally you would just need to run 'pacman -Syu' to update.
  16.  
  17. - SWAP (sconsigliato su una sd)
  18. To create a swap file (which is a good idea in case you end up in a situation where you need one) run the following commands (taken from Arch wiki):
  19. fallocate -l 128M /swapfile
  20. chmod 600 /swapfile
  21. mkswap /swapfile
  22. swapon /swapfile
  23. and add "/swapfile none swap defaults 0 0" to /etc/fstab.
  24.  
  25. - LOCALE
  26. # nano /etc/locale.gen
  27. decommentare
  28. it_IT.UTF-8 UTF-8
  29. poi
  30. # locale-gen
  31. poi
  32. echo LANG=it_IT.UTF-8 > /etc/locale.conf
  33. e
  34. export LANG=it_IT.UTF-8
  35. - tastiera italiana in console
  36. loadkeys it
  37. # nano /etc/vconsole.conf
  38. KEYMAP=it
  39.  
  40. - TIMEZONE
  41. # ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
  42.  
  43. - AUDIO
  44. 1. Install software
  45. sudo pacman -S alsa-utils alsa-firmware alsa-plugins
  46. 2. Turn sound device on
  47. sudo modprobe snd-bcm2835
  48. 3. create /etc/modules-load.d/snd-bcm2835.conf
  49. sudo echo "snd-bcm2835" >> /etc/modules-load.d/snd-bcm2835.conf
  50. 4. unmute and adjust volume with alsamixer (mine is already unmuted at this point)
  51. sudo alsamixer
  52. 5. test sound
  53. speaker-test -c 2
  54. 6. save adjustments
  55. sudo alsactl store
  56.  
  57. - AMBIENTE GRAFICO
  58. pacman -S xorg-server xorg-xinit xorg-server-utils
  59. pacman -S mesa
  60. pacman -Sy xf86-video-fbdev xf86-video-vesa
  61. - Per la Tastiera italiana in ambiente grafico
  62. create a number-*.conf file (e.g. 10-keyboard.conf) with the following content:
  63. nano /etc/X11/xorg.conf.d/10-keyboard.conf
  64. Section "InputClass"
  65. Identifier "Keyboard Defaults"
  66. MatchIsKeyboard "yes"
  67. Option "XkbLayout" "it"
  68. #Option "XkbVariant" "colemak"
  69. EndSection
  70. - test dell'ambiente grafico
  71. pacman -S xorg-twm xorg-xclock xterm
  72. echo 'exec /usr/bin/X -nolisten tcp vt$XDG_VTNR "$@"' > ~/.xserverrc
  73. startx
  74. exit
  75.  
  76. - FONTS
  77. pacman -S ttf-dejavu
  78.  
  79. - DE
  80. pacman -S lxde
  81. mkdir -p ~/.config/openbox
  82. cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart ~/.config/openbox
  83. pacman -S gamin
  84. pacman -S leafpad obconf
  85.  
  86. LOGIN AUTOMATICO SU CONSOLE
  87. cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
  88. Once created you can link the new autologin@.service to your chosen tty, e.g. tty1, tty2, [...] tty8, etc., by specifying it as an alias in the [Install] section of the unit file. Accordingly, change the value of ExecStart in autologin@.service:
  89. nano /etc/systemd/system/autologin@.service
  90. [Service]
  91. [...]
  92. ExecStart=-/sbin/agetty --noclear -a USERNAME %I 38400
  93. [...]
  94. [Install]
  95. Alias=getty.target.wants/getty@tty1.service
  96. Tip: It is possible to change Type=idle to Type=simple and avoid delaying the execution of agetty until all jobs (state change requests to units) are completed. This option is more useful when starting X automatically. See man systemd.service for more info.
  97. Note: Type=simple can cause systemd boot-up messages to pollute the login prompt.
  98. Finally, you need to disable the old getty@.service for the specified tty and enable the new autologin@.service for the same tty:
  99. # systemctl daemon-reload
  100. # systemctl disable getty@tty1
  101. # systemctl enable autologin@tty1
  102. # systemctl start autologin@tty1
  103. Warning: If you are currently in an X session on the same tty configured in the service file, starting autologin@ttyX.service will kill your X server.
  104. To avoid errors related to display-manager.service in dmesg, you should set the default target to multi-user instead of graphical:
  105. # systemctl enable multi-user.target
  106.  
  107.  
  108. - AVVIO AUTOMATICO X
  109. nano .bash_profile
  110. e aggiungere
  111. [[ -f ~/.bashrc ]] && . ~/.bashrc
  112. export DESKTOP_SESSION=LXDE
  113. per far funzionare xdg-open
  114. poi aggiungere
  115. [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1
  116. per far partire startx all'avvio
  117. prima configurare xinitrc
  118. cp /etc/skel/.xinitrc ~
  119. e aggiungere
  120. exec startlxde
  121.  
  122. AVVIO AUTOMATICO LXDE
  123. Use a ~/.config/lxsession/LXDE/autostart file. This file is not a shell script, but each line represents a command to be executed, if a line begins with a @ symbol, the command following the @ will be automatically re-executed if it crashes. For example, to execute lxterminal and leafpad automatically at startup:
  124. ~/.config/lxsession/LXDE/autostart
  125. @conky
  126. @xbmc
  127. Note: The commands do not end with a & symbol.
  128. There is also a global autostart file at /etc/xdg/lxsession/LXDE/autostart. If both files are present, all entries in both files will be executed.
  129.  
  130. IP STATICO
  131. Install ifplugd, which is required for net-auto-wired:
  132. # pacman -S netcfg ifplugd
  133. Copy a sample profile from /etc/network.d/examples to /etc/network.d:
  134. # cp /etc/network.d/examples/ethernet-static /etc/network.d/ethernet-static
  135. Edit the profile as needed:
  136. # nano ethernet-static
  137. Edit the NETWORKS array in /etc/conf.d/netcfg to refer to the network config file /etc/network.d/ethernet-static.
  138. nano /etc/conf.d/netcfg
  139. NETWORKS=(ethernet-static)
  140. Disabilitiamo il dhcp all'avvio
  141. systemctl disable dhcpcd@eth0.service
  142. rm '/etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service'
  143. e abilitiamo netcfg di partire in avvio
  144. systemctl enable netcfg.service
  145. ln -s '/usr/lib/systemd/system/netcfg.service' '/etc/systemd/system/multi-user.target.wants/netcfg.service'
  146. aggiungiamo?
  147. systemctl enable netcfg@ethernet-static
  148. e in fine questo?
  149. systemctl enable net-auto-wired.service
  150.  
  151. per connettere
  152. netcfg ethernet-static
  153. per disconnettere il profilo
  154. netcfg down ethernet-static
  155.  
  156. editare /etc/hosts e /etc/hostname
  157.  
  158. NFS
  159. pacman -s nfs-utils
  160. metterlo in fstab
  161. 192.168.1.2:/nfs/stele /media/terry nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
  162. e abilitare i servizi (demoni) all'avvio
  163. systemctl enable nfsd.service rpc-idmapd.service
  164.  
  165. - BORDI NERI
  166. nano /boot/config.txt
  167. or if your display has some overscan:
  168. overscan_left=-50
  169. overscan_right=-50
  170. overscan_top=-50
  171. overscan_bottom=-50
  172.  
  173. -PACCHETTI LOCALI
  174. Per sapere i pacchetti installati localmente
  175. yaourt -Qm
  176.  
  177. -MEMORIA GPU
  178. Edit /boot/config.txt and add or edit the following line:
  179. gpu_mem=128
  180. The value can be 16, 64, 128 or 256 and represents the amount of RAM available to the GPU.
  181.  
  182. CODECs e VIDEO
  183. pacman -S libdvdcss gstreamer0.10-ffmpeg gstreamer0.10-bad gstreamer0.10-bad-plugins gstreamer0.10-ugly gstreamer0.10-ugly-plugins
  184. compilare omxplayer-git da aur
  185. wget https://aur.archlinux.org/packages/om/omxplayer-git/omxplayer-git.tar.gz
  186. tar zxvf omxplayer-git.tar.gz
  187. cd omxplayer-git
  188. makepkg -s
  189. pacman -U omxplayer-git
  190.  
  191. - XBMC (La compilazione richiede circa 11 ore)
  192. Controllare se hai bisogno di spazio libero sulla scheda. Se hai bisogno libera spazio es.
  193. pacman -Scc
  194. assegnare il massimo della memoria alla cpu dal /boot/config.txt e riavviare (senza entrare in x) per liberarla
  195. wget http://aur.archlinux.org/packages/xbmc-rbp-git/xbmc-rbp-git.tar.gz
  196. tar zxvf xbmc-rbp-git.tar.gz
  197. cd xbmc-rbp-git
  198. makepkg -si
  199.  
  200. TAR
  201. tar cvzf directory.tar.gz directory/
  202.  
  203. USER, SUDO
  204. # useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash stele
  205. Next, add a password for your new user using /usr/bin/passwd.
  206. # passwd stele
  207. pacman -S sudo
  208. visudo
  209. decommentare l'impostazione desiderata
  210.  
  211. TASTIERA E MOUSE CONDIVISI con Synergy
  212. installare synergy su client e server (stessa versione!)
  213. verificare gli indirizzi su /etc/hosts
  214. configurare il server (pc che ha connessi mouse e tastiera)
  215. sudo nano /etc/synergy.conf
  216. section: screens
  217. lety:
  218. berry:
  219. end
  220. section: links
  221. lety:
  222. left = berry
  223. berry:
  224. right = lety
  225. end
  226. far partire il server
  227. synergys (oppure synergyd da arch)
  228. e metterlo in avvio automatico
  229. poi collegare il client
  230. synergyc lety
  231. per la mappatura della tastiera
  232. setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')
  233. per far partire in automatico il client synergy aggiungere il comando in .xinitrc prima di exec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement