Full New Users Installation guide

From Manjaro-Arm
Revision as of 18:44, 13 January 2016 by Maparillo (Talk | contribs) (Mounting the filesystems)

Jump to: navigation, search

Installation made easy Installing something without a graphical installer can be difficult or overwhelming. With Manjaro-Arm it is important to know that most of the hard work has been done. The overall process is simple and straight forward. You will essentially extract an archive of files known as a tarball to the MicroSD card for the Raspberry-Pi 2, and move some things around.

Overview

The way to install Manjaro is to copy an archive to a device, called a MicroSD Card, and then modify its contents, but before you do that, you need to prepare your Environment and your MicroSD Card

  1. Make the partitions
  2. Make the filesystems
  3. Mount the filesystems

Then you can extract the archive, and finally clean up and boot.

Obtaining the Device

Your MicroSD Card should be at least 4GB and a class 4 or better.

Preparing your Environment

Create root and boot directories in your $HOME on your Linux machine

$ cd ~
$ mkdir root
$ mkdir boot
 

These are going to be the directories you will later use for mounting.

Making the Partitions

Finding the device

The first step is to find the device.

Insert your MicroSD card into an adapter on your Linux computer. Execute lsblk to see if the device is registered. The output should look something like this:

$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1    4K  0 disk 
sda      8:0    0   30G  0 disk 
├─sda1   8:1    0 25.7G  0 part /
└─sda2   8:2    0  4.3G  0 part [SWAP]
sr0     11:0    1  1.8G  0 rom  
 

Typically the device will show up as /dev/mmcblkXX. If for some reason, it shows up as /dev/sdX, it is fine and everything will work as expected.

The device number is XXXX???? Note the device number; you will need it later.

What happens if neither happens???

Using fdisk to make partitions

Once you have found the device, it is time to set up the card for the two required partitions:

  1. /boot
  2. / (root).

These commands will need to be done as root.

$ sudo su
# fdisk /dev/mmcblkX (replace X with the device number, not the partition number)
  type 'o' to clear the partition table
  type 'p' to ensure there is no partition listed
  type 'n' to create a new partition
  type 'p' to select primary partition
  type '1' to make it partition one
  press enter to set the default first sector
  type '+100M' to make the partition 100 MBytes
  type 't' and then 'c' to change the partition type to W95 FAT32
  type 'n' then 'p' to create a new primary partition
  press enter to select the default partition 2
  press enter twice to select the default start and end sectors (it will take up the space left on the device)
  type 'w' to write the partition table and exit

Making the filesystems

Now that the partitions are made on your device, you need to create filesystems in them to hold your data. These commands will need to be done as root (not using sudo):

# mkfs.vfat /dev/mmcblkXp1 (replace the X with device number, the p1 stands for partition 1 [the 100MB partition we made for /boot])
# mkfs.ext4 /dev/mmcblkXp2 (replace the X with device number, the p2 stands for partition 2 [the / or root partition we will be using])

If the last command gives you any kind of message saying that the partition already has a filesystem on it, go ahead and overwrite it.

Mounting the filesystems

You are almost finished. Now that you have made the filesystems, you need to mount them to the boot and root directories you made before you can copy the data over.

You will need to continue to run as root (not using sudo):

# mount /dev/mmcblkXp1 boot (change the X to the device number for your card)
# mount /dev/mmcblkXp2 root

Downloading and Extracting the Archive

Download the archive, stored as a tarball.

It looks as if you are continuing to run as root. Is that OK; will that cause files to be owned by root? Is that OK????

Use the BSD tar command to extract the tarball to the root/ (mmcblkXp2):

# bsdtar -xpf ManjaroArm.tar.gz -C root/

Cleaning up and booting

It looks as if you are continuing to run as root. Is that OK; will that cause files to be owned by root? Is that OK????

After the Tarball is extracted, you need to move the boot files over to the boot partition

# mv root/boot/* boot/

You can go ahead and unmount the sdcard and remove it.

# umount boot/ root/

Once the MicroSD is inserted into your Raspberry Pi 2, apply the power and let it boot. If you are using it with a display, keyboard, and mouse, you will find that it will boot automatically into a desktop ready to go. The desktop is built with XFCE and the Menda theme from Manjaro.

If you are using it headless (no display, mouse, or keyboard) the ssh server is already started on boot (same with VNC) you can access your device by ssh

$ ssh manjaro@<ip>
password is manjaro

or as root

$ ssh root@<ip>
password is root

If you want to use VNC you need to be sure the device is hooked up to at least a display (TV, or computer monitor) so that X can start. Then you can VNC into the device and control it from there.

I have set up an autostart .desktop for VNC to make sure it is manageable. It contains a scaling line that you can use to scale the VNC to be able to use VNC from a smaller screen easily. This .desktop is located:

/home/manjaro/.config/autostart/x11vnc.desktop

Just comment out (#) the line with no scaling and uncomment (remove the #) the line with it, be sure to adjust the sizes to your requirements.