Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - SCHEDA SD
- Scaricare immagine e scrivere sulla scheda sd con il comando:
- dd bs=1M if=archlinux-hf-2012-09-18.img of=/dev/mmcblk0
- - backup
- dd if=/dev/mmcblk0 of=archlinuxarm.img bs=1M
- - AMPLIARE SCHEDA SD
- 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.
- 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:
- /dev/mmcblk0p1 1 195312 97656 c W95 FAT32 (LBA)
- /dev/mmcblk0p2 197265 15544319 7673527+ 83 Linux
- 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.
- - AGGIORNARE
- 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.
- - SWAP (sconsigliato su una sd)
- 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):
- fallocate -l 128M /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- swapon /swapfile
- and add "/swapfile none swap defaults 0 0" to /etc/fstab.
- - LOCALE
- # nano /etc/locale.gen
- decommentare
- it_IT.UTF-8 UTF-8
- poi
- # locale-gen
- poi
- echo LANG=it_IT.UTF-8 > /etc/locale.conf
- e
- export LANG=it_IT.UTF-8
- - tastiera italiana in console
- loadkeys it
- # nano /etc/vconsole.conf
- KEYMAP=it
- - TIMEZONE
- # ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
- - AUDIO
- 1. Install software
- sudo pacman -S alsa-utils alsa-firmware alsa-plugins
- 2. Turn sound device on
- sudo modprobe snd-bcm2835
- 3. create /etc/modules-load.d/snd-bcm2835.conf
- sudo echo "snd-bcm2835" >> /etc/modules-load.d/snd-bcm2835.conf
- 4. unmute and adjust volume with alsamixer (mine is already unmuted at this point)
- sudo alsamixer
- 5. test sound
- speaker-test -c 2
- 6. save adjustments
- sudo alsactl store
- - AMBIENTE GRAFICO
- pacman -S xorg-server xorg-xinit xorg-server-utils
- pacman -S mesa
- pacman -Sy xf86-video-fbdev xf86-video-vesa
- - Per la Tastiera italiana in ambiente grafico
- create a number-*.conf file (e.g. 10-keyboard.conf) with the following content:
- nano /etc/X11/xorg.conf.d/10-keyboard.conf
- Section "InputClass"
- Identifier "Keyboard Defaults"
- MatchIsKeyboard "yes"
- Option "XkbLayout" "it"
- #Option "XkbVariant" "colemak"
- EndSection
- - test dell'ambiente grafico
- pacman -S xorg-twm xorg-xclock xterm
- echo 'exec /usr/bin/X -nolisten tcp vt$XDG_VTNR "$@"' > ~/.xserverrc
- startx
- exit
- - FONTS
- pacman -S ttf-dejavu
- - DE
- pacman -S lxde
- mkdir -p ~/.config/openbox
- cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart ~/.config/openbox
- pacman -S gamin
- pacman -S leafpad obconf
- LOGIN AUTOMATICO SU CONSOLE
- cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
- 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:
- nano /etc/systemd/system/autologin@.service
- [Service]
- [...]
- ExecStart=-/sbin/agetty --noclear -a USERNAME %I 38400
- [...]
- [Install]
- Alias=getty.target.wants/getty@tty1.service
- 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.
- Note: Type=simple can cause systemd boot-up messages to pollute the login prompt.
- Finally, you need to disable the old getty@.service for the specified tty and enable the new autologin@.service for the same tty:
- # systemctl daemon-reload
- # systemctl disable getty@tty1
- # systemctl enable autologin@tty1
- # systemctl start autologin@tty1
- 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.
- To avoid errors related to display-manager.service in dmesg, you should set the default target to multi-user instead of graphical:
- # systemctl enable multi-user.target
- - AVVIO AUTOMATICO X
- nano .bash_profile
- e aggiungere
- [[ -f ~/.bashrc ]] && . ~/.bashrc
- export DESKTOP_SESSION=LXDE
- per far funzionare xdg-open
- poi aggiungere
- [[ $(fgconsole 2>/dev/null) == 1 ]] && exec startx -- vt1
- per far partire startx all'avvio
- prima configurare xinitrc
- cp /etc/skel/.xinitrc ~
- e aggiungere
- exec startlxde
- AVVIO AUTOMATICO LXDE
- 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:
- ~/.config/lxsession/LXDE/autostart
- @conky
- @xbmc
- Note: The commands do not end with a & symbol.
- 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.
- IP STATICO
- Install ifplugd, which is required for net-auto-wired:
- # pacman -S netcfg ifplugd
- Copy a sample profile from /etc/network.d/examples to /etc/network.d:
- # cp /etc/network.d/examples/ethernet-static /etc/network.d/ethernet-static
- Edit the profile as needed:
- # nano ethernet-static
- Edit the NETWORKS array in /etc/conf.d/netcfg to refer to the network config file /etc/network.d/ethernet-static.
- nano /etc/conf.d/netcfg
- NETWORKS=(ethernet-static)
- Disabilitiamo il dhcp all'avvio
- systemctl disable dhcpcd@eth0.service
- rm '/etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service'
- e abilitiamo netcfg di partire in avvio
- systemctl enable netcfg.service
- ln -s '/usr/lib/systemd/system/netcfg.service' '/etc/systemd/system/multi-user.target.wants/netcfg.service'
- aggiungiamo?
- systemctl enable netcfg@ethernet-static
- e in fine questo?
- systemctl enable net-auto-wired.service
- per connettere
- netcfg ethernet-static
- per disconnettere il profilo
- netcfg down ethernet-static
- editare /etc/hosts e /etc/hostname
- NFS
- pacman -s nfs-utils
- metterlo in fstab
- 192.168.1.2:/nfs/stele /media/terry nfs rsize=8192,wsize=8192,timeo=14,intr 0 0
- e abilitare i servizi (demoni) all'avvio
- systemctl enable nfsd.service rpc-idmapd.service
- - BORDI NERI
- nano /boot/config.txt
- or if your display has some overscan:
- overscan_left=-50
- overscan_right=-50
- overscan_top=-50
- overscan_bottom=-50
- -PACCHETTI LOCALI
- Per sapere i pacchetti installati localmente
- yaourt -Qm
- -MEMORIA GPU
- Edit /boot/config.txt and add or edit the following line:
- gpu_mem=128
- The value can be 16, 64, 128 or 256 and represents the amount of RAM available to the GPU.
- CODECs e VIDEO
- pacman -S libdvdcss gstreamer0.10-ffmpeg gstreamer0.10-bad gstreamer0.10-bad-plugins gstreamer0.10-ugly gstreamer0.10-ugly-plugins
- compilare omxplayer-git da aur
- wget https://aur.archlinux.org/packages/om/omxplayer-git/omxplayer-git.tar.gz
- tar zxvf omxplayer-git.tar.gz
- cd omxplayer-git
- makepkg -s
- pacman -U omxplayer-git
- - XBMC (La compilazione richiede circa 11 ore)
- Controllare se hai bisogno di spazio libero sulla scheda. Se hai bisogno libera spazio es.
- pacman -Scc
- assegnare il massimo della memoria alla cpu dal /boot/config.txt e riavviare (senza entrare in x) per liberarla
- wget http://aur.archlinux.org/packages/xbmc-rbp-git/xbmc-rbp-git.tar.gz
- tar zxvf xbmc-rbp-git.tar.gz
- cd xbmc-rbp-git
- makepkg -si
- TAR
- tar cvzf directory.tar.gz directory/
- USER, SUDO
- # useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash stele
- Next, add a password for your new user using /usr/bin/passwd.
- # passwd stele
- pacman -S sudo
- visudo
- decommentare l'impostazione desiderata
- TASTIERA E MOUSE CONDIVISI con Synergy
- installare synergy su client e server (stessa versione!)
- verificare gli indirizzi su /etc/hosts
- configurare il server (pc che ha connessi mouse e tastiera)
- sudo nano /etc/synergy.conf
- section: screens
- lety:
- berry:
- end
- section: links
- lety:
- left = berry
- berry:
- right = lety
- end
- far partire il server
- synergys (oppure synergyd da arch)
- e metterlo in avvio automatico
- poi collegare il client
- synergyc lety
- per la mappatura della tastiera
- setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')
- 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