Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GOAL? Install Arch Linux on a 512 MB hdd.
- PURPOSE? Thin client.
- WHAT ARE THE MAIN EXPECTATIONS?
- - network
- - ssh server for remote access
- - sshfs for mounting ssh share / large HDD
- - tmux for "window" management
- - mc for file management
- - alsa-utils for sound
- - mpg123 as a mp3 codec
- - moc as a mp3 / radio / streams player
- - all has to fit in on a 512 card...
- MISSION ACCOMPLISHED ;D (so far only in VBox but this will do as a proof of concept).
- http://postimage.org/image/ab1maucnh/
- HOW?
- 0) BOOT FROM CD and open this link: https://wiki.archlinux.org/index.php/Beginners%27_Guide
- Follow the guide for the beginners and look at steps below. Make sure You understand what You're doing... Some steps are identical like in beginners guide. SOME are different. SOME will vary for You (locale, network setup). Have fun and good luck.
- 1) LOCALE:
- loadkeys uk
- nano /etc/locale.gen
- --- # the en_US locale un# the one You want (UTF-8 preffered)
- locale-gen
- 2) NETWORK:
- ip link set eth0 up
- ip addr add 192.168.0.201/24 dev eth0
- ip route add default via 192.168.0.1
- nano /etc/resolv.conf
- --- Add:
- nameserver 192.168.0.1
- ping -c 3 google.com
- 3) PARTITIONING:
- cfdisk /dev/sda
- --- Setup the whole disk as primary partition, Bootable, Linux (83) write the partition table and quit.
- mkfs.ext4 /dev/sda1
- --- Formatting as ext4
- mount /dev/sda1 /mnt
- --- mounting
- 4) INSTALL PACKAGES TO NEW ROOT:
- pacstrap -i /mnt linux e2fsprogs
- --- 102.62 DOWNLOAD
- --- 334.33 INSTALL SIZE
- rm -f /mnt/var/cache/pacman/pkg/*.tar.xz
- pacstrap -i /mnt device-mapper gettext inetutils iproute2 iputils licenses lvm2 mdadm pacman pciutils procps-ng sysfsutils systemd-sysvcompat usbutils which xfsprogs jfsutils ifplugd mc netcfg grub-bios
- --- IF You have pcmcia device / port and you're planning on using it add pcmciautils to the list
- --- 17.36 DOWNLOAD
- --- 77.39 INSTALL SIZE
- rm -f /mnt/var/cache/pacman/pkg/*.tar.xz
- --- FREE SPACE ~67 MB
- pacstrap -i /mnt net-tools
- --- 0.11 DOWNLOAD
- --- 0.49 INSTALL SIZE
- rm -f /mnt/var/cache/pacman/pkg/*.tar.xz
- pacstrap -i /mnt alsa-utils openssh mpg123 tmux moc sshfs
- --- 7.01 DOWNLOAD
- --- 33.86 INSTALL SIZE
- rm -f /mnt/var/cache/pacman/pkg/*.tar.xz
- 5) FSTAB
- genfstab -U -p /mnt >> /mnt/etc/fstab
- nano /mnt/etc/fstab
- -- Change this entry:
- # /dev/sda1
- UUID=xxxxxxxx-yyyy-aaaa-cccc-rrrrrrrrrrrr / ext4 rw,relatime,data=orderered 0 1
- to
- # /dev/sda1
- UUID=xxxxxxxx-yyyy-aaaa-cccc-rrrrrrrrrrrr / ext4 defaults 1 1
- 6) CHROOT TO NEW INSTALL
- arch-chroot /mnt
- A) LOCALE:
- mcedit /etc/locale.gen
- --- # the en_US locale un# the one You want (UTF-8 preffered)
- locale-gen
- echo LANG=en_IE.UTF-8 > /etc/locale.conf
- export LANG=en_IE.UTF-8
- loadkeys uk
- mcedit /etc/vconsole.conf
- --- add:
- KEYMAP=uk
- FONT=Lat2-Terminus16
- --- and save
- B) TIMEZONE
- ln -s /usr/share/zoneinfo/Europe/Dublin > /etc/localtime
- C) CLOCK
- hwclock --systohc --utc
- D) HOSTNAME
- echo 512mb_arch_install > /etc/hostname
- E) NETWORK
- cd /etc/network.d
- cp examples/ethernet-static .
- mcedit ./ethernet-static
- EXAMPLE:
- --- CONNECTION='ethernet'
- --- DESCRIPTION='A basic static ethernet connection using iproute'
- --- INTERFACE='eth0'
- --- IP='static'
- --- ADDR='192.168.0.201'
- --- #ROUTES=('192.168.0.0/24 via 192.168.0.1')
- --- GATEWAY='192.168.0.1'
- --- DNS=('192.168.0.1')
- --- ## For IPv6 autoconfiguration
- --- #IP6=stateless
- --- ## For IPv6 static address configuration
- --- #IP6='static'
- --- #ADDR6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
- --- #ROUTES6=('abcd::1234')
- --- #GATEWAY6='1234:0:123::abcd'
- systemctl enable net-auto-wired.service
- F) KERNEL:
- mkinitcpio -p linux
- G) PASSWORDS / USERS
- passwd
- --- change root's password
- groupadd andrzejl
- --- add andrzejl group
- useradd -m -g andrzejl -G wheel -s /bin/bash andrzejl
- --- add andrzejl user with main group = andrzejl also member of wheel group, creating a home and with /bin/bash shell
- passwd andrzejl
- --- change andrzejl's password
- H) BOOTLOADER = GRUB2
- grub-install --target=i386-pc --recheck /dev/sda
- cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
- grub-mkconfig -o /boot/grub/grub.cfg
- I) SSHD ENABLING:
- sysctemctl enable sshd.service
- J) FINISHING:
- exit
- umount -a
- reboot
- [andrzejl@wishmacer ~]$ nmap -p 22 192.168.0.201
- Starting Nmap 6.25 ( http://nmap.org ) at 2013-02-05 15:39 GMT
- Nmap scan report for 192.168.0.201
- Host is up (0.010s latency).
- PORT STATE SERVICE
- 22/tcp open ssh
- Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds
- [andrzejl@wishmacer ~]$ ssh 192.168.0.201
- The authenticity of host '192.168.0.201 (192.168.0.201)' can't be established.
- ECDSA key fingerprint is c9:d5:e6:81:ab:66:cf:ec:50:10:09:05:84:91:a3:a8.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added '192.168.0.201' (ECDSA) to the list of known hosts.
- andrzejl@192.168.0.201's password:
- X11 forwarding request failed on channel 0
- Last login: Tue Feb 5 15:38:44 2013
- [andrzejl@512mb_arch_install ~]$ ping google.com
- PING google.com (173.194.70.139) 56(84) bytes of data.
- 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=1 ttl=49 time=203 ms
- 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=2 ttl=49 time=402 ms
- 64 bytes from fa-in-f139.1e100.net (173.194.70.139): icmp_seq=3 ttl=49 time=192 ms
- ^C
- --- google.com ping statistics ---
- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms
- rtt min/avg/max/mdev = 192.511/266.170/402.582/96.560 ms
- [andrzejl@512mb_arch_install ~]$ df -h
- Filesystem Size Used Avail Use% Mounted on
- rootfs 496M 446M 25M 95% /
- dev 249M 0 249M 0% /dev
- run 250M 308K 250M 1% /run
- /dev/sda1 496M 446M 25M 95% /
- tmpfs 250M 0 250M 0% /dev/shm
- tmpfs 250M 0 250M 0% /sys/fs/cgroup
- tmpfs 250M 0 250M 0% /tmp
- [andrzejl@512mb_arch_install ~]$ mocp
- Can't load plugin libaac_decoder: file not found
- Can't load plugin libffmpeg_decoder: file not found
- Can't load plugin libmodplug_decoder: file not found
- Can't load plugin libmusepack_decoder: file not found
- Can't load plugin libspeex_decoder: file not found
- Can't load plugin libwavpack_decoder: file not found
- Running the server...
- Trying JACK...
- Trying ALSA...
- --- additional packages that could be installed:
- - inxi
- - lm_sensors
- - acpi
- - htop
- - lsof
- - screen - remove tmux and install screen for alternative "window" management
- - gpm - enables mouse in terminal
- pacman -S gpm
- systemctl enable gpm
- systemctl start gpm
- --- additional fixes that could added:
- --- edit sysctl.conf
- mcedit /etc/sysctl.conf
- --- add this:
- # Added by AndrzejL
- #disable ipv6
- net.ipv6.conf.all.disable_ipv6=1
- #less caching less swap use max ram
- vm.swappiness=0
- --- to almost disable caching and to disable ipv6
- --- change root prompt to red and add some aliases DONT FORGET TO CHANGE andrzejl TO YOUR LOGIN
- mcedit /root/.bashrc
- --- modify
- PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/kde4/libexec
- ENV=$HOME/.bashrc
- USERNAME="root"
- export XAUTHORITY=/home/andrzejl/.Xauthority
- export USERNAME ENV PATH
- # User specific aliases and functions
- alias ssh='ssh -Y'
- alias procesy='ps -A -o pid,stat,pmem,pcpu,start,etime,comm,user --sort=-pcpu'
- alias konq='konqueror --profile filemanagement&'
- # Source global definitions
- if [ -f /etc/bashrc ]; then
- . /etc/bashrc
- fi
- export PS1='\[\033[01;31m\][\u@\h \W]\$\[\033[00m\] '
- --- to look like this ^^^
- [root@512mb_arch_install andrzejl]# inxi -v7
- System: Host: 512mb_arch_install Kernel: 3.7.5-1-ARCH i686 (32 bit, gcc: 4.7.2) Console: tty 0 Distro: Arch Linux
- Machine: System: innotek product: VirtualBox version: 1.2 serial: 0 Chassis: Oracle type: 1
- Mobo: Oracle model: VirtualBox version: 1.2 serial: 0 Bios: innotek version: VirtualBox date: 12/01/2006
- CPU: Single core Intel Celeron M (-UP-) cache: 1024 KB flags: (sse sse2) bmips: 2998.46 clocked at 1498.783 MHz
- Graphics: Card: InnoTek Systemberatung VirtualBox Graphics Adapter bus-ID: 00:02.0 chip-ID: 80ee:beef
- X-Vendor: N/A driver: tty size: 116x32 Advanced Data: N/A for root out of X
- Audio: Card: Intel 82801AA AC'97 Audio Controller
- driver: snd_intel8x0 ports: d100 d200 bus-ID: 00:05.0 chip-ID: 8086:2415
- Sound: Advanced Linux Sound Architecture ver: k3.7.5-1-ARCH
- Network: Card: Intel 82540EM Gigabit Ethernet Controller
- driver: e1000 ver: 7.3.21-k8-NAPI port: d010 bus-ID: 00:03.0 chip-ID: 8086:100e
- IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 08:00:27:e6:ea:69
- WAN IP: None Detected! IF: eth0 ip: 192.168.0.201 ip-v6: N/A
- Drives: HDD Total Size: 0.5GB (87.8% used)
- 1: id: /dev/sda model: VBOX_HARDDISK size: 0.5GB serial: VB8af86596-5056c6e9
- Optical: /dev/sr0 model: N/A rev: N/A dev-links: cdrom
- Features: speed: 32x multisession: yes audio: yes dvd: yes rw: none state: N/A
- Partition: ID: / size: 496M used: 450M (96%) fs: ext4 dev: /dev/sda1
- label: N/A uuid: a4fe56bc-2297-4ade-bc4d-3d80cc00a550
- RAID: No RAID data available - /proc/mdstat is missing - is md_mod kernel module loaded?
- Unmounted: ID: /dev/sr0 size: 1.07G label: N/A uuid: N/A
- Sensors: None detected - is lm-sensors installed and configured?
- Info: Processes: 58 Uptime: 4 min Memory: 18.8/499.5MB Runlevel: 5 Gcc sys: N/A
- Client: Shell (bash 4.2.42 running in tty 0) inxi: 1.8.34
- [root@512mb_arch_install andrzejl]#
- all is peachy... sound, network and so on...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement