博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Installation of arch

Posted on 2012-12-16 16:32  hebi  阅读(295)  评论(0)    收藏  举报

Generally follow the newer guider and installation guild, the steps are:

1.Partition

I use gpt instead of mbr, so the part work is a bit of difficult.

swap partition: Swap partition can be considered at the begining of the installation or at any time of the use of the system later. The method to do this later:

  gparted a partition: /dev/sda6 for example.

  mkswap /dev/sda6  //set up a swap area

  swapon /dev/sda6  //use the swap

 To make the swap partition swap to be used at boot, add this line to /etc/fstab

  /dev/sda2 none swap defaults 0 0

 To check swap partition, type:

  swapon -s

  or

  free -m  //check swap and ram

commands:   parted and gdisk

  remember to create a 2mb no-filesystem partition for bios_boot. This is what are written in wiki:"If planning to use the GPT partitioned SSD as a boot-disk on a BIOS based system (most systems except Apple computers and some very rare motherboard models with Intel chipset) one may have to create, preferably at the disk's beginning, a 2 MiB partition with no filesystem and with the partition type as BIOS boot or bios_grub partition (gdisk type code EF02) for booting from the disk using GRUB"

Ok, lets go to the essay:

  First, convert the disk from MBR to GPT.

  Than use parted or gdisk to generate a no-filesystem 2MB partition with a bios_grub flag.

  Following, parted a /boot, /var, /, /home partition.

  Format partition:

    mkfs.ext /dev/sda1

  see what we have done: lsblk

Partition end.

2.Install base

  mount partitions on the cdbased system:

    mount /dev/sda1 /mnt  //boot

    cd /mnt

    mkdir home, var, boot

    mount the other three at these folders.

  vi /etc/pacman.d/mirrorlist

  pacstrap -i /mnt base base-devel

  genfstab -p /mnt >> /mnt/etc/fstab

3.chroot to new system:

  arch-chroot /mnt

  vi /etc/hostname  //write your host name in it. For example, hebi_host  //can also be like this: #echo hebi_hostname > /etc/hostname

  ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

  vi /etc/locate.gen

    remove '#' before eu-US.UTF-8 UTF-8 and the one before de-DE.UTF-8 UTF-8

  echo LANG=en_US.UTF-8 > /etc/locale.conf

  export LANG=en_US.UTF-8

  hwclock --systohc --utc

  /*this maybe the auto wired and auto dhcp service:

    pacman -S ifplugd

    cd /etc/network.d

    ln -s examples/ethernet_dhcp

    systemctl enable net-auto-wired.service*/

  /*this maybe the auto wifi

    pacman -S wireless_tools wpa_supplicant wpa_actiond dialog

    wifi-menu

    systemctl enable net-auto-wireless.service

    vi /etc/conf.d netcfg*/

  vi /etc/mkinitcpio.conf  add usb to hook"xxx,xxx,xxx"  //optional for install on flash disk.

  mkinitcpio -p linux

  passwd

  useradd -m -g users -G wheel ,storage,power -s /bin/bash hebi

  passwd hebi

  /*install grub2*/

    # pacman -S grub-bios

    # grub-install --target=i386-pc --recheck /dev/sda

    # cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

    to search for other OS:

    # grub-mkconfig -o /boot/grub/grub.cfg

  /*install syslinux*/

    # pacman -S syslinux ]

    # syslinux-install_update -i -a -m

    vi /boot/syslinux/syslinux.cfg

      modefy: LABEL arch ... APPEND root=/dev/sda3 ro

4.umount /var, /home, /boot, /mnt and restart. OK.