Home‎ > ‎Beelink SEA I‎ > ‎

Fedora

If you run the command uname -a in a shell, you recevie the result hereunder:

root@OpenWrt:~# uname -a
Linux OpenWrt 4.1.17-ge602b33-dirty #1 SMP PREEMPT Tue May 9 11:15:51 CST 2017 aarch64 GNU/Linux

The box is an aarch64 architecture, this means you can run a Fedora aarch64 distribution. A good starting point could be:

The download of the fedora package is currently available here:

Fedora was installed in a single file, stored in the internal sata 2,5" SSD.

After the download, hereunder a sample installation:

#unzip image file
unxz Fedora-Server-aarch64-28-1.1-sda.raw.xz

#rename
mv Fedora-Server-aarch64-28-1.1-sda.raw.xz F28.raw

#check offset & partition data 
fdisk -l F28.raw

#link to /dev/loop
busybox losetup -o 799014912 /dev/loop1 F28.raw

#copy form dev loop to file
dd if=/dev/loop1 of=fedora_28.img

#unlink dev loop
losetup -d /dev/loop1

#mount
busybox mount -o loop /storage/udisk0/linux/fedora_28.img /data/local/linux

Description:
  • unzip the downloaded compressed image using unxz
  • rename just for fun
  • use fdisk to determine disk/sector size of the main partition (es. 799014912)
  • link partition to a device (/dev/loop1)
  • copy the whole partition content to a file (es. fedora28.img) in the SSD location (fast access).
  • unlink device /dev/loop1
  • mount the image with the proper options and enjoy!

The mounting instructions can be summarized in the bash script:

#!/bin/sh

#define variables
export mntpt=/mnt/linux
export imgpt=/mnt/sda1/linux/fedora_28.img

# mount image on loop device
if mountpoint -q "$mntpt"; then
    echo "Info: $mntpt already mounted - SKIP"
else
    mount -o loop $imgpt $mntpt;
fi

#bind all kernel directories
for f in dev dev/pts proc sys ; do
    if mountpoint -q "$mntpt/$f"; then
        echo "Info: $mntpt/$f already mounted - SKIP";
    else
        mount -o bind /$f $mntpt/$f ;
    fi
done

# mount hard disk
if mountpoint -q "$mntpt/mnt"; then
    echo "Info: $mntpt/mnt already mounted - SKIP"
else
    mount -o bind /mnt/sda1 $mntpt/mnt
fi

#export PATH
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
export HOME=/root

#CHROOT & create shell
chroot $mntpt /bin/bash -l

Comments