LINUX - Arch Installation with BTRFS root and EFI Grub boot - Snapshots as well

LINUX - Arch Installation with BTRFS root and EFI Grub boot - Snapshots as well
###############################################################################
###############################################################################

Arch Installation with BTRFS root and EFI Grub boot
###################################################

UPDATE 12/6/2013: Below main article - bonus at the end I show how to make hourly snapshots!!!
UPDATE 12/9/2013: Below the snapshot article - doing the post installation to get a gui

This can be read and done from top to bottom - if you have an EFI supported pc this should just work with these exact command (hopefully, but we all know arch its very complexingly [<--not a word] amazing)

BTRFS ROOT ON ARCH WITH EFI GRUB
#################################

* These are gold in the linux community. Also I used the articles below to help me with this:

I take this Installation to the Post-installation (and none of Post-install) in the Beginners Guide. THis is an adjustment on the guide on how to do it with btrfs root partition (boot partition is still vfat for EFI and grub to work). Also I update the pacman repos on the system with reflector (it downloads fastest latest and closest list of mirrors for pacman to use). I recommend reading thru all of these before doing these steps:

https://wiki.archlinux.org/index.php/Installation_Guide
https://wiki.archlinux.org/index.php/Beginners%27_Guide
https://wiki.archlinux.org/index.php/Mkinitcpio
http://linuxgeek1.wordpress.com/archlinux/archlinux-btrfs/
http://pcavdisor.blogspot.com/2012/11/beginners-guide-to-installing-archlinux.html
https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface
https://wiki.archlinux.org/index.php/Pacman
https://wiki.archlinux.org/index.php/Reflector

--------------

First off Boot off USB of Arch on the PC where you want to install this to get to command line.
This computer has the ability to boot off EFI and BIOS, infact in the BIOS I can set it too boot off EFI or BIOS and I choose EFI, make sure you boot off EFI so that you have EFI support.

Double check if you have efi support:
# mount | egrep efi
If you have this output then its good to go:
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)

--------------

Update repos:
# pacman -Syy

--------------

OPTIONAL AMAZING STEP - dont like working on a linux cli and would rather do it through Putty on windows? Well as long as you have a network connection (via ethernet, if you want wireless research "wifi arch" on google) - first we will install openssh, then start it, then check the ip so we can login with putty:

# pacman -S openssh
# systemctl start sshd

NOTE: systemctl enable sshd is not needed here as that will enable it to come up on boot, but this is a temp environment so we only want to start it and not enable it (start it on every boot). REMEBER THIS: Enable = start on every boot.

# ifconfig -a

Check the IP of your ethernet adapter (note they are not called eth0 or eth1 but more like enp0s20u2)
Then connect with your windows pc's putty to that ip on port 22, now you can do all of the commands from putty :-)

--------------

Install best repo finder:
# pacman -S reflector

Install VIM for fun:
# pacman -S vim

Backup Repo (we are about to get newer list of faster repos with reflector):
# cd /etc/pacman.d/
# cp mirrorlist mirrorlist.bak


# reflector --verbose --country 'United States' -l 200 --sort rate --save /etc/pacman.d/mirrorlist
or
# reflector --verbose -l 200 --sort rate --save /etc/pacman.d/mirrorlist

Upgrade system (this might take a second and it might ask some confirmation steps where you have to press Y or y enter):

Update the repos:
# pacman -Syy

-------------------------
-    DONT DO THIS       -
- SKIP THIS IT     -
- Upgrade the system: -
- # pacman -Syu -
-                       -
- We are missing vfat   -
- and btrfs after this  -
- -
-------------------------

In this case I have 1 drive that I will purpose as the main drive. Most likely it will have some garbage partitions on it from another operating system, since we are doign a full clean install lets get rid of them and put the correct GPT partitions (GPT is needed for EFI)

--------------

CLEARING OUT THE PARTITIONS AND OTHER STUFF ON SDA (note data destroyed on sda):

# cat /proc/partitions

Note sda might have 3 partitions

Clear out by writing zeros over GPT and MBR data:

# dd if=/dev/zero of=/dev/sda bs=1M count=5000

Reread partition table:
# hdparm -z /dev/sda

Now sda should not have partitions
# cat /proc/partitions

--------------

CREATE GPT PARTITIONS (NOT MBR):

# gdisk /dev/sda

NOTE: with gdisk /dev/sda, pressing "?" the question mark at anytime will bring up all of the possible options and what buttons do what
If asks about existing MBR or GPTs like this:

Found invalid MBR and corrupt GPT. What do you want to do? (Using the
GPT MAY permit recovery of GPT data.)
 1 - Use current GPT
 2 - Create blank GPT

Then press 2 to create a blank GPT and start fresh

ZAP:
press x - to go to extended menu
press z - to zap
press Y - to confirm
press Y - to delete MBR

It might now kick us out of gdisk, so get back into it
# gdisk /dev/sda

This time you will not get ask about existing MBR or GPT as we cleared them.

NOTE: when asked where each partition should start "Start Sector" just hit enter, let it autoalign them next to each other

--------------

CREATE 1st PARTITION FOR BOOT:
If you didnt get kicked out gdisk, press "m" to get back to main main menu from the extended menu
press n - to create new partition
First Sector - just leave defaults so hit enter
Last Sector - just put "300M" without quotes and hit enter, this makes a 300M partition
Hex code: type "ef00" and hit enter - this is necessary for EFI
It should now take you back to main menu


OUTPUT SHOULD LOOK LIKE THIS FOR 1st PARTITION:
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-500118158, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-500118158, default = 500118158) or {+-}size{KMGTP}: 300M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI System'

--------------

CREATE 2nd PARTITION FOR SWAP:
press n - to create new partition
First Sector - just leave defaults so hit enter
Last Sector - just put "8G" - Im creating a swap thats two times size of RAM
Hex code: type "8200" and hit enter - this is for swap
It should now take you back to main menu

OUTPUT SHOULD LOOK LIKE THIS FOR 2nd PARTITION:
Command (? for help): n
Partition number (2-128, default 2):
First sector (34-500118158, default = 616448) or {+-}size{KMGTP}:
Last sector (616448-500118158, default = 500118158) or {+-}size{KMGTP}: 8G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8200
Changed type of partition to 'Linux swap'

--------------

CREATE 3rd PARTITION FOR ROOT/DATA:
press n - to create new partition
First Sector - just leave defaults so hit enter
Last Sector - just leave default so hit enter - this will select the remaining space for data
Hex code: type "8300" and hit enter (or just hit enter as 8300 is the default) - this is for data

OUTPUT SHOULD LOOK LIKE THIS FOR 3rd PARTITION:
Partition number (3-128, default 3):
First sector (34-500118158, default = 16779264) or {+-}size{KMGTP}:
Last sector (16779264-500118158, default = 500118158) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'

--------------

CONFIRM
Confirm you have 3 partitions without about the same settings as this (if your swap or data are different sizes thats cool)
After creating the 3rd partition it should of brought you to main menu, at the main menu press "p" to see the current pending partition table (its not written to disk just yet)

OUTPUT SHOULD LOOK LIKE THIS:
Command (? for help): p
Disk /dev/sda: 500118192 sectors, 238.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8E8C0F70-22D8-4FE6-A5AB-E20A0483C2F5
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 6108 sectors (3.0 MiB)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          614400   299.0 MiB   EF00  EFI System
   2          616448        16777216   7.7 GiB     8200  Linux swap
   3        16779264       500118158   230.5 GiB   8300  Linux filesystem

SAVE
Save everything after confirmation
Press w to write to disk
Press Y to confirm

REREAD THE PARTITION TABLE (this is semi-optional just so that 'cat /proc/partitions' shows the correct output for us)
# hdparm -z /dev/sda
# cat /proc/partitions

Now you should have your 3 partitions sda1, sda2 and sda3

--------------

Make the FAT 32 system for EFI boot:
# mkfs.vfat -F32 /dev/sda1

Make the swap partition (extra memory) and load it up (so we have extra memory to work with):
# mkswap /dev/sda2
# swapon /dev/sda2

Make out btrfs filesystem on our data partition (Note I called the filesystems label here "arch" but you can call it whatever you want):
# mkfs.btrfs -L arch /dev/sda3

If it complains about existing filesystems:
# mkfs.btrfs -L arch -f /dev/sda3

--------------

OPTIONAL:

If you want to be hardcore with your label you can put the hostid into it, you can choose a different value in NAME1 instead of arch.. Why did I use NAME1 instead of NAME :/ I dont know NAME sounds like a common system variable I dont want to interfere.

NAME1="karch"
LABEL1=`hostid`:$NAME1
echo The label will be: $LABEL1

mkfs.btrfs -L $LABEL1 -f /dev/sda3

--------------

We will make out ROOT subvolume for sda3, this will be a folder called ROOT located at the root of sda3. The way we will design this is that When the system boots we will not see /ROOT, we will be inside ROOT. Inside ROOT you will have all of your etc,sys,proc,whatever folders etc.

# mount /dev/sda3 /mnt
# cd /mnt
# btrfs subvolume create /mnt/ROOT

This should show you your ROOT 
# btrfs subvolume list -a /mnt
Something like this: ID 256 gen 5 top level 5 path ROOT

# cd /
# umount /dev/sda3

Now we will mount sda3 ROOT subvolume as /mnt and we will dump the arch system into there with pacman. We will also enable compress to utilize btrfs compress feature.
# mount -o defaults,compress,subvol=ROOT /dev/sda3 /mnt

NOTE: the command "mount" will not show which subvolume is mounted, to see how subvolumes are mounted you need to look inside proc (cat /proc/self/mountinfo): 
# cat /proc/self/mountinfo | egrep sda3
The line for the mount of sda3 looks like this:
43 21 0:34 /ROOT /mnt rw,relatime shared:30 - btrfs /dev/sda3 rw,compress=zlib,ssd,space_cache
We can see that the subvolume /ROOT is mounted to /mnt from the device /dev/sda3
Notice how with regular mount command its missing:
# mount | egrep sda3
/dev/sda3 on /mnt type btrfs (rw,relatime,compress=zlib,ssd,space_cache)

Pacman will dump stuff into a boot folder, so we better mount our sda1 EFI boot partition to it. Or else all of the boot stuff will go to sda3 instead of sda1:

# cd /mnt
# mkdir /mnt/boot
# mount /dev/sda1 /mnt/boot

--------------

# cd /
# pacstrap -i /mnt base base-devel

Note it might ask confirmation steps requiring either to press "enter" to accept all selections or Y and enter. Just select whichever option downloads everything.

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

--------------

By default fstab for vfat thats generated by genfstab picks a value that makes the filesystem check too often for vfat, in fact we need to change it to never doing a filesystem check because vfat (or else it will complain later, so in there we change the value from 2 to 0, meaning never doing filesystem check)

# vim /mnt/etc/fstab
NOTE: this is not a lesson on vim

Change this: 
# /dev/sda1
UUID=C218-8694          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

To this:
# /dev/sda1
UUID=C218-8694          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 0

--------------

Finally make sure in that fstab file you see: "defaults,compress,subvol=ROOT" on /mnt. Also make sure you see "swap"

Lets chroot into the /mnt folder (HERE IS MY CRUMMY TRY AT EXPLAINING CHROOT: previously our world was /, now everything within /mnt will be our world, for example we used programs from /bin and /usr/bin and librarys from /lib.. well now that we will chroot we will use the system /mnt/, so we will use files from /mnt/bin and /mnt/lib etc... to us it will look like /mnt - in fact the prompt will change, because chroot in a way 'pretends' to boot into the folder that you select, chroot only works into a folder that has all of the right folders and files to have a full system - unlike a real boot, chroot doesnt require the /mnt folder to have things like GRUB or whatever, for our real boot we will install GRUB into sda1 later - also note this is arch-chroot not regular chroot, regular chroot is usually accompanied with mount commands that mount proc for example into mount proc, so we prepare the system to switch over into the new environemnt - in this case arch-chroot takes care of all that - so arch-chroot /mnt /bin/bash means chroot into /mnt and when you load up instead of launching /bin/sh launch /bin/bash, I believe /bin/sh is the default shell. The /bin/bash is actaully launched from /mnt/bin/bash - FINAL NOTE everything after you chroot will be relative to /mnt, so going to cd / actually goes to /mnt)

# arch-chroot /mnt /bin/bash

--------------

Lets install all of the same apps

Update repos:
# pacman -Syy

Install the apps:
# pacman -S vim openssh reflector

NOTE: luckily our awesome mirrorlist from before we chrooted in /etc/pacman.d/mirrorlist has been copied over by the pacstrap command to /mnt/pacman.d/mirrorlist, so we dont need to run reflector anymore - However I installed it just incase we need to later generate a newer list

--------------

Lets configure Locale gen:

# vim /etc/locale.gen

uncomment en_US.UTF-8 UTF-8 (or whatever your locale is)

So change this:
#  en_US.UTF-8 UTF-8

To this:
en_US.UTF-8 UTF-8

Note: "en_US.UTF-8 UTF-8"  located in 2 places in the file, uncomment either one, just make sure you only have 1 uncommented

Confirm you only have uncommented like this (this looks for every line without #, so we should only see one line of output):

# cat /etc/locale.gen | egrep -v "#"
en_US.UTF-8 UTF-8

--------------

Run this command to configure your locale using the settings above:
# locale-gen

--------------

Finale Locale settings (everywhere you see en_US.UTF-8 change to your Locale, if your in the USA just leave it alone)

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

Confirm it worked (The output should be en_US.UTF-8)
# echo $LANG
en_US.UTF-8

--------------

Find your time zone in /usr/share/zoneinfo:

# cd /usr/share/zoneinfo
# find

--------------

Then pick the right one like this and associate it with a link to /etc/localtime

# ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime 

# hwclock --systohc --utc

--------------

NETWORK CONFIGURATION (part 1):

Let make it so dhcp is enabled by default on eth0. (Enable meaning start on boot)

# systemctl enable dhcpcd@eth0.service

--------------

SET THE ROOT PASSWORD:
# passwd
 
-------------- 
 
NETWORK CONFIGURATION (part 2):

We will have netctl manage our network
 
# cd /etc/netctl

We will copy from /etc/netctl/examples the ethernet-dhcp profile and call it my_network (however you save it in /etc/netctl is the name of the profile:

# cp examples/ethernet-dhcp my_network

Enable my_network (Enable meaning start on boot):
# netctl enable my_network

--------------

NETWORK CONFIGURATION (part 3):

IF YOU WANT ifconfig, BY DEFAULT ITS NOT INSTALLED:

# pacman -S net-tools
# ifconfig -a

Now you can see your IP address with ifconfig

--------------

SETTING UP THE INITCPIO FILE NECESSARY FOR BOOT:

# cd /root
# pacman -S wget

We need to have the right modules for mkinitcpio btrfs:
# wget https://aur.archlinux.org/packages/mk/mkinitcpio-btrfs/mkinitcpio-btrfs.tar.gz
# tar -xzvf mkinitcpio-btrfs*
# cd mkinitcpio-btrfs*
# makepkg -s --asroot

Since we are root user it will complain about being root so we need to do it asroot with --asroot, also -s installs any missing programs with pacman.

the '-s' will download the necessary missing packages with pacman automatically, which are needed for the 'mkinitcpio' and all of the btrfs commands. it will download 'btrfs-progs' and one more package that I cant remember the name of

to generate the mkinitcpio file there is a config file that needs to be configured, we need to let it know that our main filesystem is btrfs and not ext(default):

# vim /etc/mkinitcpio.conf
HOOKS="base udev autodetect modcocat nf block filesystems keyboard btrfs"

All you need to do is change the last word within the quotes from fsck to btrfs

FINALLY GENERATE THE INITCPIO FILE:
mkinitcpio -p linux

--------------

CURIOSITY:

sidenote the only options set in my /etc/mkinitcpio.conf file are (note: egrep -v "^#" leaves out lines that begin wtih #):

[root@archiso mkinitcpio-btrfs]# cat /etc/mkinitcpio.conf | egrep -v "^#"
MODULES=""
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block filesystems keyboard btrfs"

--------------

SETTING UP THE EFI BOOTLOADER GRUB:

Grub exists for BIOS mbr and gpt boots, but also for EFI. Efi supports many more bootloaders, infact it supports no bootloader (and it will load your OS) thats called EFISTUB.

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
# pacman -S grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck

We are hoping for output like this from the grub-install command:
Installation finished. No error reported.

Exit from the chroot environment:
# exit
Since the partitions are mounted under /mnt, we use the following command to unmount them:

We mounted a few things into mnt, lets unmount all of them recursively:
# umount -R /mnt

Lets reboot, in my case it comes right up :-)
# reboot

############################################################################################################
############################################################################################################
############################################################################################################
############################################################################################################

Take out the USB of arch and it boots right up for me. Now you can continue on to 'Post Installation'

UPDATE 12/6/2013: BONUS STUFF - Snapshots!
All of this from: http://linuxgeek1.wordpress.com/archlinux/archlinux-btrfs/

########################
# SNAPSHOT HOURLY TIME #
########################

With btrfs there are 2 filesyetms to worry about the main one that your witnessing at / (aka the virtual filesystem), you know the one where you have /dev and /proc, you main slash location start the virtual filesystem. Then there is the other filesystem, the btrfs hierarchy, for us it starts at /ROOT and so when you do "cd /etc/" in the main system (virtual filesystem hierarchy) your actually going into the /ROOT subvolume and the full path is "/ROOT/etc" (in the btrfs filesystem hierarchy). So when we are sitting at / (in btrfs its /ROOT) and we tell it to make a snapshot called /SNAP/today, then the btrfs hierarchy name for that snapshot is /ROOT/SNAP/today :-)... Within that /ROOT/SNAP/today/ exists the ROOT filesystem as it was at the time you took the snapshot (and it will keep existing until the snapshot becomes invalidated - research btrfs snapshots for more info). So in that /ROOT/SNAP/today (btrfs filesystem hierarchy - in main/virtual fs they are /SNAP/today/) you will have a folder called /ROOT/SNAP/today/etc/ (btrfs filesystem hierarchy - in main/virtual fs they are /SNAP/today/etc/).

Taking the snapshots of btrfs /ROOT volume to the folder /SNAP/D<date>-T<time> 

Note when a snapshot is made they get automounted to /SNAP folder as well. The /SNAP folder must exist.

First make this folder:
# mkdir /SNAP

You can also mount the SNAPSHOTS else where. The mount commands look like this:
mount -o subvol=/PARENTVOLUME/SNAPSHOTVOLUME DEVICE MOUNTPOINT

#!/bin/bash
####################
# Snapshots Script #
####################

# BEFORE CONTINUING:
# 1) Make sure the Parent Subvolume/Volume is /ROOT
# (It is in this article) /ROOT subvol is mounted to /
# 2) mkdir /SNAP (but its okay I do it in the script either way)

# Snapshots are made and are auto mounted to /SNAP/D<date>-T<time>
# We are in /ROOT so every snap is /ROOT/here, so full name is /ROOT/SNAP/D<date>-T<time>
# mount -o subvol=/ROOT/SNAP/D<date>-T<time> /dev/sda3 /mnt
# NOTE TO DELETE ALL SNAPS:  btrfs subvolume delete /SNAP/*
#
# Going to run this once per hour with cron jobs:
# crontab -e (TO OPEN CRONTAB EDITOR)
# @hourly /root/scripts/kossboss-snaps.sh
# crontab -l (TO VERIFY)
#
# systemctl status cronie (MAKE SURE ENABLED AND STARTED)
# systemctl start cronie (THIS STARTS IT)
# systemctl enable cronie (THIS ENSURES IT ALWAYS RUNS ON BOOT)

mkdir /SNAP 2> /dev/null

D8=`date +D%D-T%T | tr /: -`
DEST=/SNAP/$D8

LOG1=/var/log/kossboss-snaps.log
MSG1="Making a Snapshot into subvolume/path: $DEST"
MOUNT1="mount -o rw,relatime,compress=zlib,ssd,space_cache,subvol=/ROOT$DEST /dev/sda3 /mnt"
MOUNT2="mount -o subvol=/ROOT$DEST /dev/sda3 /mnt"

echo "===== START: `date` =====" >> $LOG1
echo $MSG1 | tee -a $LOG1
echo "* Mount Command: $MOUNT1"  | tee -a $LOG1
echo "* Simpler Mount: $MOUNT2"  | tee -a $LOG1
echo "Taking Snap (Hopefully no Error):" | tee -a $LOG1

logger "====== kossboss-snaps START /ROOT$DEST ======"
logger "kossboss-snaps: $MSG1"
logger "kossboss-snaps: Mount Command: $MOUNT1"
logger "kossboss-snaps: Simpler Mount: $MOUNT2"

# Make a temp file to store output for a second of the btrfs commands output
TMP1=`mktemp`

# MAIN COMMAND:
btrfs subvolume snapshot / $DEST | tee -a $TMP1

logger "kossboss-snaps OUTPUT of btrfs command:"
logger "$TMP1"

logger "====== kossboss-snaps END /ROOT$DEST ======"

cat $TMP1 >> $LOG1
echo "===== END: `date` =====" >> $LOG1

rm $TMP1


TO ROLLBACK TEMP METHOD
########################

First find out the the snapshot you want to use

ls -l /SNAP

Since we are using grub, at the grub menu type "e" and then edit the kernel line and change to the snapshot you want to use

Change the rootflags=subvol
i.e .......rootflags=subvol=ROOT
...........rootflags=subvol=subvolROT/SNAP/<snapshotname>....

Then press F10 to boot up


TO ROLLBACK PERMANENT METHOD
#############################

This can be done from a live environment.

First find out the the snapshot you want to use 

# ls -l /SNAP

Now lets move make the move (no turning back after this, however you can continue to go further back - if that makes sense)

# mount /dev/sda3 /mnt

Notice how in mnt now you have a ROOT folder and nothing else, inside of ROOT is your whole system, like the etc folder and the SNAPfolder which has all of our snapshots.
# cd /mnt
# ls -lisah

# mv /mnt/ROOT /mnt/ROOT-old
# mv /mnt/ROOT-old/SNAP/<snapshotname> /mnt/ROOT

Need to move the snapshots back to ROOT
# mv /mnt/ROOT-old/SNAP/* /mnt/ROOT/SNAP/

# sync
# cd /
# umount /mnt
# systemctl reboot

So if you have a snapshot from yesterday (1 day ago),2 days ago and 6 days ago.. you can go back to 2 days ago snapshot, and then after that you cannot proceed forward to yesterdays, but you can go back 4 more day to 6 days ago.

The main steps to commit to memory:

# mount /dev/sda1 /mnt
# mv /mnt/ROOT /mnt/ROOT-old
# mv /mnt/ROOT-old/SNAP/11-3-2013 /mnt/ROOT

Clean up:

There is still that ROOT-old lets get rid of it
mount /dev/sda3 /mnt
cd /mnt/
ls -lisah

You should only have ROOT and ROOT-old

btrfs subvolume delete /mnt/ROOT-old
ls -lisah

Now you should only have ROOT

Test the setup:
# reboot

or

# systemctl reboot

TROUBLESHOOTING EMERGENCY BOOT AFTER SNAPSHOT RECOVERY
######################################################

The Problem:

If you get launched into a recovery emergency environment complaining about /bin/plymouth not launching. Note you can view current boot logs with:

# journalctl -b
# journalctl -b --no-pager
# journalctl -xb 
# journalctl -xb --no-pager

To see the very first boot where everything was okay:

# journalctl -b1

You can see any boot like that, just progress the number

You will notice in the logs something about /bin/plymouth and you will also notice things mounting a couple times over

The solution:

Comment everyout in fstab

# vim /etc/fstab

and put a # in front of every line (or at least every UUID line, some site mentioned it might be something only with the UUID lines, I couldn't confirm if it was okay with normal type of lines since everything for me is a UUID line)


UPDATE 12/9/2013: This is what I did after those steps to get a GUI up (I didnt install gnome or kde, i installed unity because I like compiz)

############################################################################################################
############################################################################################################
############################################################################################################
############################################################################################################

ARCH COMMANDS AFTER INIT INSTALL
################################

Note just following the basic steps after "Post Installation" after:
https://wiki.archlinux.org/index.php/Beginners'_Guide
Followed steps all the way until "Configure X" and "Test X" where then I decided to install Unity which will use X to make a Desktop Environment.

Change kossbossto match your username:
useradd -m -g users -G wheel -s /bin/bash kossboss
chfn kossboss
passwd kossboss
passwd root

Install also for all sound drivers:
pacman -S alsa-utils
pacman -Syy
pacman -S xorg-server xorg-server-utils xorg-xinit

Install mesa for 3d support
pacman -S mesa

Find your video card name:
lspci
lspci | egrep -i vga

I see its intel but not more info, so with -v, I can see its i915 video card
lspci -v | less

Look for that video card thru xf86-video drivers (these cover almost every video card):
pacman -Ss xf86-video | less

Found my video card in the list (i915 fits with xf86-video-intel):
pacman -S xf86-video-intel

Install this on laptop for touchpad:
pacman -S xf86-input-synaptics

Then to install a user environment:
https://wiki.archlinux.org/index.php/Desktop_Environment

To install Unity
################

vim /etc/pacman.conf

[Unity-for-Arch]
SigLevel = Optional TrustAll
Server = http://dl.dropbox.com/u/486665/Repos/Unity-for-Arch/$arch

[Unity-for-Arch-Extra]
SigLevel = Optional TrustAll
Server = http://dl.dropbox.com/u/486665/Repos/Unity-for-Arch-Extra/$arch

pacman -Suy
pacman -Slq Unity-for-Arch
pacman -S $(pacman -Slq Unity-for-Arch)
SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser
Comments