The officially official Devuan Forum!

You are not logged in.

#1 2018-11-19 08:37:21

guidol
Member
From: Mudanya - Turkey
Registered: 2018-11-06
Posts: 5  

Slightly modified install-guide for embedded (SBC) systems

Some days ago I did try devuan on a Raspberry Pi, which wasnt a problem because of the complete Image-file.

Now I want to try it on a  sunxi-system (like my Orange Pi Zero H2+) and there you have to "assemble" the image on the sdcard,
because for every supported sunxi-system there is a own uboot .bin-file.

At first I was I was confused about to dd to the device /dev/mmcblk0, because mostly when I did see this device then its the local boot device of my SBC sad

(the name mmcblk0 is the name of the card WHEN I will boot from it LATER)

So when I would try to create the "assembled" image on /dev/mmcblk0 I would destroy (from my mind) the root/boot-system.
Additionally I wouldnt call if "to flash" the u-boot to the mmcblk0/sdcard

After re-reading the instructions I realized that /dev/mmcblk0 could also be /dev/sdb if I use my single-slot MicroS-Card-Reader/Writer while assembling the image on my NanoPi Neo2 (which is running with armbian).

So I inserted the MicroSDCard with my USB-Reader/Writer to my NanoPi Neo2 and did get (via "dmesg -w"):

[29637.841118] usb 3-1: New USB device found, idVendor=8564, idProduct=4000
[29637.841137] usb 3-1: New USB device strings: Mfr=3, Product=4, SerialNumber=5
[29637.841149] usb 3-1: Product: Transcend
[29637.841160] usb 3-1: Manufacturer: TS-RDF5
[29639.230277] sd 1:0:0:0: [sdb] Attached SCSI removable disk

The get a "clean" card is did delete the partitions with fdisk:

----------------------------------------------
fdisk /dev/sdb
----------------------------------------------
p - for printing partition table
Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1        8192 61896127 61887936 29,5G 83 Linux

d - for deleting a partition
Selected partition 1
Partition 1 has been deleted.

w - for write & exit

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
----------------------------------------------

After that the installation is mostly like on http://devuan.ksx4system.net/devuan_asc … README.txt
BUT firstly I created a own directory (/home/guido/devuan) and did a cd into it - AND I did use here the device /dev/sdb
of my USB-Reader/Writer:

INSTALLATION
------------

(Path /home/guido/devuan here as example for my system):
mkdir /home/guido/devuan
cd /home/guido/devuan

1.
--
	Download the image you want:
	; curl -O https://files.devuan.org/devuan_ascii/embedded/devuan_ascii_2.0.0_armhf_sunxi.img.xz

2.
--
	Download the shasums and the signature:
	; curl -O https://files.devuan.org/devuan_ascii/embedded/SHA256SUMS
	; curl -O https://files.devuan.org/devuan_ascii/embedded/SHA256SUMS.asc

3.
--
	Verify:
	; gpg --verify SHA256SUMS.asc && sha256sum -c SHA256SUMS

4.
--
	dd the raw image to a medium of your choice (little less than 2GB):
        ; sudo xzcat ./devuan_ascii_2.0.0_armhf_sunxi.img.xz  | sudo dd of=/dev/sdb bs=2M status=progress && sync

5.
--
	In case it's a sunxi image (here the Opi Zero), grab your respective u-boot blob, and flash (dd) it to the sdcard:
	; curl -O https://files.devuan.org/devuan_ascii/embedded/u-boot/orangepi_zero_defconfig.bin	
	; sudo dd if=./orangepi_zero_defconfig.bin of=/dev/sdb bs=1024 seek=8 status=progress && sync

After booting the Orange Pi Zero from this card the former /dev/sdb at the NanoPi Neo2 gets now /dev/mmcblk0
BUT on the Orange Pi Zero
:

mount:
/dev/mmcblk0p1 on /boot type ext4 (rw,relatime)

or fdisk:
fdisk /dev/mmcblk0
Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        2048   264191   262144  128M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      264192 29560473 29296282   14G 83 Linux

uname -a:
Linux devuan 4.17.0 #1 SMP Tue Jun 5 16:49:29 CEST 2018 armv7l GNU/Linux

BTW: Keep in mind to (manually) expand the filesystem later for /dev/mmcblk0p2 wink

Last edited by guidol (2018-11-19 08:56:33)

Offline

#2 2018-11-19 21:26:58

kuleszdl
Member
Registered: 2018-11-03
Posts: 107  

Re: Slightly modified install-guide for embedded (SBC) systems

Imo, on SBC like the Orange Pi Zero it does not make much sense to have a separate boot partition. The only advantage I see here is that you fire the "saveenv" command directly in uboot if you want to change something persistently. Apart from that - why a separate boot partition and especially - why fat32?

Offline

#3 2018-11-20 10:42:58

guidol
Member
From: Mudanya - Turkey
Registered: 2018-11-06
Posts: 5  

Re: Slightly modified install-guide for embedded (SBC) systems

The partition is in the image. I didnt created it myself.
armbian does work without a fat32 boot partition.
I know the fat32 boot partition only from Raspberry Pi images.

Offline

Board footer