SD card

Installation can be done via SD card.

FIXME Provide an outline of the procedure here

  1. Download the correct image for your device. Probably named similar to openwrt-*-sysupgrade.img.gz.
  2. Decompress it:
    gzip -d openwrt-*-sysupgrade.img.gz
  3. Connect sdcard to your computer and look at lsblk or dmesg to identify it. In most cases, it would be something like /dev/sdX. 1)
  4. Double check that you have identified your sdcard correctly. If the /dev/sdX you have chosen, corresponds to your harddrive, the next step would destroy your system
  5. copy the image to the sdcard with:
    dd if=openwrt-*-sysupgrade.img of=/dev/sdX

Examples:

Often, different images are available for a device. The differ in the filesystem used.

ext4-sdcard.img.gz

  • not optimized for flash memory (journaling speed up flash wear)
  • sdcard can be easyly mounted externally for modification
  • desktop linux standard

squashfs-sdcard.img.gz

  • newer images include a hidden f2fs filesystem, which is optimized for flash memory
  • compressed
  • needs special mount procedure, to externally modify it
  • all changes are done in an overlay partition
other images
  • ubifs-sdcard.img.gz
see also

To use the whole available space of your sdcard, you probably have to resize your partition.

squashfs image

To resize the squashfs-image one has to know the offset of the hidden f2fs filesystem. In this example, the squashfs partiton is /dev/sde2.

  1. You can find the offset, by running losetup on your openwrt device.
  2. On your computer, resize the squashfs partition, for example with cfdisk.
  3. Loop mount the underlying f2fs partition 2)
    losetup -d -o <offset> /dev/loop0 /dev/sde2
  4. Run filesystem checks
    fsck.f2fs /dev/loop0
  5. Resize f2fs filesystem
    resize.f2fs /dev/loop0

Now your filesystem should be recognized with the correct size.

ext4 image

You can us gparted to resize and extend the partitions. To do it online, follow the procedure in link or link.

mount -o remount,ro /                  #Remount root as Read Only
tune2fs -O^resize_inode /dev/device    #Remove reserved GDT blocks
fsck.ext4 /dev/device                  #Fix part, answer yes to remove GDT blocks remnants

#reboot
resize2fs /dev/device

Examples:

Howto:

  1. Partition and format the SD card. Details devicespecific? → Devicepage
  2. Copy bootloader, kernel, rootfs (and if necessary other data) to SD card. Details devicespecific? → Devicepage
  3. Possibly resize filesystem in order to use the complete available space on the SD card
BrandModelVersionSupported Current RelInstallation method(s)Comment installationDevice PageDevice Techdata
FriendlyARMNanoPi NEO Plus221.02.0SD card, Sunxi installationSimilar to install method for Raspberry Pinanopi_neo_plus2View/Edit data
FriendlyARMNanoPi NEO Core221.02.0Sysupgrade, SD card, U-Boot USB recoverySimilar to install method for Raspberry Pinanopi_neo_core2View/Edit data
FriendlyARMNanoPi R2Sv121.02.0SD cardwrite image to microSD/TFnanopi_r2sView/Edit data
FriendlyARMNanoPi R121.02.0SD card, Sunxi installation, see git-commitView/Edit data
FriendlyARMZeroPi21.02.0SD card, Sunxi installation, see git-commitView/Edit data
FriendlyARMNanoPi R4SsnapshotSD card, see git-commitView/Edit data
KobolHelios421.02.0SD card, see git-commitView/Edit data
Libre ComputerALL-H3-CC H521.02.0SD card, Sunxi installation, see git-commitView/Edit data
MarvellDB-88F3720-DDR321.02.0SD card, see git-commitView/Edit data
MarvellMACCHIATObin Single Shot21.02.0SD card, see git-commitmarvell_macchiatobinView/Edit data
NXPLS1088A-RDB18.06.4SD card, U-Boot TFTP recoverytest image on non default boot drivels1088a-rdbView/Edit data
OlimexiMX233-OLinuXino-MAXI15.05SD card, see devicepageimx233-olinuxinoView/Edit data
OlimexiMX233-OLinuXino-MICRO15.05SD card, see devicepageimx233-olinuxinoView/Edit data
OlimexiMX233-OLinuXino-MINI-WiFi15.05SD card, see devicepageimx233-olinuxinoView/Edit data
OlimexiMX233-OLinuXino-MINI15.05SD card, see devicepageimx233-olinuxinoView/Edit data
OlimexiMX233-OLinuXino-NANO15.05SD card, see devicepageimx233-olinuxinoView/Edit data
PC EnginesAPU1C21.02.0SD card, see devicepageapuView/Edit data
PC EnginesAPU1C421.02.0SD card, see devicepageapuView/Edit data
PC EnginesAPU3C421.02.0SD card, see devicepageapu3View/Edit data
PC EnginesAPU3C221.02.0SD card, see devicepageapu3View/Edit data
PC EnginesAPU3A221.02.0SD card, see devicepageapu3View/Edit data
PC EnginesAPU2C421.02.0SD card, see devicepageapu2View/Edit data
PC EnginesAPU2C221.02.0SD card, see devicepageapu2View/Edit data
PC EnginesAPU2C021.02.0SD card, see devicepageapu2View/Edit data
PC EnginesAPU1D21.02.0SD card, see devicepageapuView/Edit data
 

1)
You want to specify the device and not the partition, meaning, you have to use /dev/sdX and not /dev/sdX1
2)
If you are already using a loop device, you may have to use another number that loop0
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2021/08/05 14:33
  • by vgaetera