Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
load mmc 0:1 0xa4000000 ubuntu-core.imgmmcimg
mmc dev 1
1mmcmmc write 0xa4000000 0 0xd2000

...

Code Block
load mmc 0:1 0xa4000000 ubuntu-core.img
mmc dev 1
mmc write 0xa4000000 0 0xd2000

...

 To flash the image into SATA drive run the following commands (it will wipe your data) –

...

Boot the machine by running ‘boot’ in u-boot.

Info

Ubuntu username and password are ‘root’ and ‘root’.

...

Warning

Please note

If you are willing to use a similar image in production you must change this password, or completely disable root login.

The following stages needs to be done in order to finalize the imaging :

  1. Run ‘fdisk /dev/nvme0n1’ if using NVME M.2 or ‘fdisk /dev/sda’ if using a SATA drive or ‘fdisk /dev/mmcblk1’ if using eMMC.

  2. Recreate the first partition by deleting it and then creating a new partition that starts at block 131072 and extends to the end of the drive (or less depending on your needs).

  3. Write the new partition, when prompt about ‘Do you want to remove the signature?’ then answer with yes.

  4. Run ‘resize2fs /dev/nvme0n1p1’ if using NVME M.2 or ‘resize2fs /dev/sda1’ if using a SATA drive or ‘resize2fs  /dev/mmcblk1p1’ if using eMMC.

  5. In this stage the root partition should be big enough to start populating it; but first update the RTC clock.

  6. Connect the RJ45 to your network with internet access (and DHCP server); and then run ‘dhclient’

  7. Update the RTC clock by running ‘ntpdate http://pool.ntp.org ’ and then ‘hwclock -w’.

  8. Run ‘apt update’ and then populate the root filesystem as you wish

...

Gentoo is a free and open-source distribution with a rolling-release model.
The bootloader and kernel provided are recent enough to install Gentoo from the eMMC Ubuntu to the NVMe or SATA device.

Code Block
languagebash
 apt install btrfs-progs
 mkfs.btrfs /dev/nvme0n1p1
 mount /dev/nvme0n1p1 /mnt
 cd /mnt
# change 20200609 with what's available here http://distfiles.gentoo.org/experimental/arm64/
 wget http://distfiles.gentoo.org/experimental/arm64/stage3-arm64-20200609.tar.bz2
 mount --rbind /dev dev
 mount --make-rslave dev
 mount -t proc /proc proc
 mount --rbind /sys sys
 mount --make-rslave sys
 mount --rbind /tmp tmp
 cp /etc/resolv.conf etc
 chroot . /bin/bash
 env-update && . /etc/profile
 emerge-webrsync
 emerge superadduser openssh vim
# Set the root password
 passwd 
# enable root login
 vim /etc/ssh/sshd_config 
# or create your user
 superadduser your_user
 ln -s /etc/init.d/net.{lo,eth0}
 rc-update add sshd default
 reboot

...