Saturday 19 October 2013

Using Haskell in Arch Linux (virtualbox machine under ubuntu 13.04)

1. Install U13.04
2. Install virtualbox
3. Install Arch 13.10 under virtual box
guide: https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide
guide2: https://wiki.archlinux.org/index.php/Beginners%27_Guide

once arch.live is loaded,
# loadkeys us
# setfont Lat2-Terminus16
# nano /etc/locale.gen
uncomment en_US.UTF-8 UTF-8
# locale-gen
# export LANG=en_US.UTF-8
run dhcp service to get ip
# systemctl enable dhcpcd.service
# ping www.google.com -c 3
check if ip is received
GPT did not work smoothly, so using MBR
# fdisk /dev/sda
enter o
enter p
enter 1
enter 2048
enter xxxxxxxx length of partition
    and so on until all partitions created
enter p to preview
type w to write
enter q to quit
# mkfs.ext4 /dev/sda1
# lsblk /dev/sda
shows partition
# mount /dev/sda1 /mnt
# nano /etc/pacman.d/mirrorlist
find an appropriate mirror, Alt+6 to copy line, Ctrl+U to paste line, Ctrl+X, save and exit
# pacstrap -i /mnt base
# genfstab -U -p /mnt >> /mnt/etc/fstab
# nano /mnt/etc/fstab
check if the last field is 1

# arch-chroot /mnt
or arch-chroot /mnt /bin/bash
# nano /etc/locale.gen
uncomment en_US.UTF-8 UTF-8
# locale-gen
# echo LANG=en_US.UTF8 UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF8
# loadkeys us
# setfont Lat2-Terminus16
# nano /etc/vconsole.conf
 KEYMAP=us
 FONT=Lat2-Terminus16
# ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime
# hwclock --systohc --utc
# echo archTest > /etc/hostname
# systemctl enable dhcpcd.service
# cd /etc/netctl
# cp examples/ethernet-dhcp my_network
# nano my_network
configure accordingly
# netctl enable my_network
for wireless, AFTER reboot not as a chroot, OR just configure as above
# pacman -S iw wpa_supplicant
# pacman -S dialog
# wifi-menu  wlan0
# mkinitcpio -p linux
# nano /etc/mkinitcipo.conf
 MODULES="virtio virtio_blk virtio_pci virtio_net"
# passwd
set root passwd
# pacman -S grub
# grub-install --target=i386-pc --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
# exit

# umount -R /mnt
# reboot

4. Install Haskell
guide:https://wiki.archlinux.org/index.php/Haskell_package_guidelines

# nano /etc/pacman.conf
add following lines before [extra]
 [haskell-core]
 Server = http://xsounds.org/~haskell/core/$arch
 [haskell-happstack]
 Server = ftp://noaxiom.org/$repo/$arch
 [haskell-web]
 Server = http://archhaskell.mynerdside.com/$repo/$arch
save and exit to add keys
# pacman-key -r 4209170B
# pacman-key --lsign-key 4209170B
# pacman-key -r B0544167
# pacman-key --lsign-key B0544167
# pacman -Syy
force refresh all package list



No comments:

Post a Comment