Steps for installing Arch Linux on separate boot and root disk.
Preparation
- Set variable to the name of your SD card.
BOOTDEV=/dev/sdX
- Set variable to the name of your SATA drive.
ROOTDEV=/dev/sdY
Partitioning & formatting
- Create 128 MB boot partition on SD card
parted -s $BOOTDEV mklabel msdos parted -s $BOOTDEV mkpart primary fat32 4096s 128MiB
- Create 10 GB root partition on SATA drive
parted -s $ROOTDEV mklabel msdos parted -s $ROOTDEV mkpart primary ext4 4096s 10GiB
- Create corresponding filesystems
mkfs.vfat -F 32 -n BOOT ${BOOTDEV}1 mkfs.ext4 -L rootfs ${ROOTDEV}1
- Mount boot inside of root filesystem
mkdir /mnt/a mount ${ROOTDEV}1 /mnt/a mkdir /mnt/a/boot mount ${BOOTDEV}1 /mnt/a/boot
Installation
- Download and extract Arch base system
bsdtar -xpf ArchLinuxARM-odroid-xu3-latest.tar.gz -C /mnt/a
Configuration
- Set hostname, localization, time zone, network configuration and filesystem mounting
cd /mnt/a echo server > etc/hostname echo LANG=de_DE.UTF-8 > etc/locale.conf sed -i '/^#de_DE/ s/^#//g' etc/locale.gen ln -sf /usr/share/zoneinfo/Europe/Berlin etc/localtime echo -e "127.0.0.1\tlocalhost.localdomain\tlocalhost" >> etc/hosts echo -e "::1\t\tlocalhost.localdomain\tlocalhost" >> etc/hosts sed -i '/^DHCP=/ s/=.*/=ipv6/' etc/systemd/network/eth0.network echo Address=192.168.1.2/24 >> etc/systemd/network/eth0.network echo Gateway=192.168.1.1 >> etc/systemd/network/eth0.network echo DNS=192.168.1.1 >> etc/systemd/network/eth0.network echo NTP=192.168.1.1 >> etc/systemd/network/eth0.network echo -e "LABEL=BOOT\t\t/boot\t\tvfat\t\tdefaults\t0 2" >> etc/fstab echo -e "LABEL=rootfs\t\t/\t\text4\t\tdefaults,noatime\t0 1" >> etc/fstab
- Update bootloader files
cd boot sed -i '/^part uuid/ s/^/#/' boot.txt sed -i '/^setenv bootargs/ s/PARTUUID=${uuid}/LABEL=rootfs/' boot.txt sed -i '/load/ s/\/boot\//\//g' boot.txt bash mkscr bash sd_fusing.sh ${BOOTDEV}
Clean up
- Unmount filesystems
cd ~ umount /mnt/a/boot /mnt/a rmdir /mnt/a
First boot
Connect both disks to your HC1 and fire it up.
- Generate locales & deploy package signing keyring
locale-gen pacman-key --init pacman-key --populate archlinuxarm