Raspberry Pi
Gentoo Installation auf dem Raspberry Pi ohne Monitor
Dieses HowTo ist als Gedankenstütze geschrieben worden und ist aus diesem Grund nicht unbedingt für Einsteiger gedacht.
Laden aller benötigten Dateien
mkdir /tmp/RasPi
cd /tmp/RasPi
Stage 3 Image
wget ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/releases/arm/autobuilds/current-stage3-armv6j_hardfp/stage3-armv6j_hardfp-*.tar.bz2 -Ostage3-armv6j_hardfp.tar.bz2
Portage
wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2 -Oportage-latest.tar.bz2
Kernel
git clone --depth 1 git://github.com/raspberrypi/firmware/
Vorbereiten der SD-Karte
Beispielpartitionierung
Disk /dev/sdb: 31.9 GB, 31914983424 bytes 64 Köpfe, 32 Sektoren/Spur, 30436 Zylinder, zusammen 62333952 Sektoren Einheiten = Sektoren von 1 × 512 = 512 Bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xae2700f6 Gerät boot. Anfang Ende Blöcke Id System /dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA) /dev/sdb2 411648 673791 131072 82 Linux Swap / Solaris /dev/sdb3 673792 62333951 30830080 83 Linux
Formatieren der Partitionen
mkfs.vfat -F 16 -n RasPiBot /dev/sdb1
mkswap /dev/sdb2
mkfs.ext4 -L RasPiRoot /dev/sdb3
tune2fs -i6M -c 200 /dev/sdb3
Installation
Mounten
mkdir /mnt/gentoo
mount /dev/sdb3 /mnt/gentoo
mkdir /mnt/gentoo/boot/
mount /dev/sdb1 /mnt/gentoo/boot
System kopieren
cd /tmp/RasPi
tar xvfpj stage3-armv6j_hardfp.tar.bz2 -C /mnt/gentoo/
tar xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr
cd firmware/boot
cp * /mnt/gentoo/boot/ -v
cp ../modules /mnt/gentoo/lib/ -vr
System vorbereiten
cd /mnt/gentoo/
vim etc/fstab
/dev/mmcblk0p1 /boot auto noauto,noatime 1 2 /dev/mmcblk0p3 / ext4 noatime 0 1 /dev/mmcblk0p2 none swap sw 0 0
vim boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait
vim etc/portage/make.conf
vim etc/portage/make.conf CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard" CXXFLAGS="${CFLAGS}" CHOST="armv6j-hardfloat-linux-gnueabi" INPUT_DEVICES="keyboard mouse evdev" LINGUAS="de" ACCEPT_LICENSE="*" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo " SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="bindist v4l v4l2 pam ssl alsa matroska exif jpg bash-completion jpeg tif gif png dts rar mp3 xvid mp4 x264 ffmpeg vlc -yahoo -msn -ipv6 -gnome -kde -gstreamer -branding -ppp "
cp usr/share/zoneinfo/Europe/Berlin etc/localtime
echo "Europe/Berlin" >etc/timezone
vim etc/shadow
root::10770:0::::: ... ...
vim etc/conf.d/hostname
vim etc/rc.conf
... ... rc_sys="" ... ...
vim etc/inittab
... ... # SERIAL CONSOLES #s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100 #s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100 ... ...
vim etc/locale.gen
vim etc/conf.d/net
dns_domain_lo="Arbeitsgruppe" config_eth0="dhcp"
cd etc/init.d
ln -s net.lo net.eth0
cd /mnt/gentoo
vim etc/ssh/sshd_config
... ... PermitEmptyPasswords yes ... ...
cd etc/runlevels/boot/
ln -s /etc/init.d/net.eth0 net.eth0
rm hwclock
ln -s /etc/init.d/swclock swclock
ln -s /etc/init.d/sshd sshd
cd /
umount /mnt/gentoo/boot/ /mnt/gentoo/
Systemboot
locale-gen
env-update && source /etc/profile
passwd
eselect profile set default/linux/arm/13.0/armv6j
eselect locale set de_DE@euro
. /etc/profile
nano /etc/ssh/sshd_config
... ... #PermitEmptyPasswords no ... ...
emerge --sync
emerge -v app-misc/screen mirrorselect mlocate lafilefixer gentoolkit -j2 -a
etc-update
screen
emerge -v vim sshfs-fuse dosfstools mtools xfsprogs netplug openvpn netkit-telnetd traceroute imagemagick zip unzip unrar lighttpd apache-tools alsa-utils mplayer subversion syslog-ng vixie-cron dhcpcd htop -j2
rc-update add syslog-ng default
rc-update add vixie-cron default
emerge -uDNve system -j2
updatedb
Quellen:
http://wiki.gentoo.org/wiki/Raspberry_Pi_Quick_Install_Guide, 13.02.2013
http://www.gentoo.de/doc/de/handbook/handbook-amd64.xml?full=1, 13.02.2013