Openwrt Π½Π° Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Π΅
OpenWrt on VMware HowTo
This article describes how to use OpenWrt as a virtual machine with VMware virtualization.
Tested with
Things you need
First of all, you need to download the image from list above on your machine. After that you extract & convert it to a vmdk image:
On Fusion I had to use the IDE drive controller type.
Quick Start
Follow these steps to get an Up to Date VM with the latest code running on ESX in 15 minutes:
Testing
Here are some results from my system:
ToDo List
(Is there a better place to make these requests?)
Disk Size Issues
Disk size and problems with veeam backup and enlarging the disk Veeam backup and VMware will complain about the size of the virtual disk provided by the OpenWrt download because the disk is not multiple of 1KB. (this means: no backups available, and could be crucial in production environments)
VMware won’t let you enlarge the disk in the normal way, so one simple way is:
Community
Please use these images in your home and work labs and provide any feedback you might have.
Feel free to update this wiki page with your results.
There is some feedback that the newer images are not booting properly. Has anyone else run into this issue?
Upgrade to 19.07.5 from ova
Here is an upgraded OVA VM export with version 19.07.5, using ext4 instead of squashfs and an extended /overlay filesystem, with DHCP enabled instead of a static IP for br-lan interface: https://www.dropbox.com/s/4b0dy8d8iqf8a91/OpenWRT_x86_64_19.07.05.ova?dl=0
Upgraded/Updated OVA for OpenWRT21
After import of the previous OVA-file to VMware Sphere, I was able to upgrade to the latest OpenWrt version (21-00-RC3).
OSBoy notes.
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° OpenWrt Π½Π° Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΡ ΠΌΠ°ΡΠΈΠ½Ρ
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ (ΠΠ)
ΠΠ°ΠΏΡΡΠΊΠ°Π΅ΠΌ VirtualBox ΠΈ ΠΆΠΌΡΠΌ «Π‘ΠΎΠ·Π΄Π°ΡΡ». ΠΠ°Π΄Π°ΡΠΌ ΠΈΠΌΡ, ΡΠΈΠΏ ΠΈ Π²Π΅ΡΡΠΈΡ Π³ΠΎΡΡΠ΅Π²ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ:
ΠΠ°ΡΠ΅ΠΌ ΠΡΠ±ΠΈΡΠ°Π΅ΠΌ ΡΠΎΠ·Π΄Π°Π½Π½ΡΡ ΠΠ ΠΈ ΠΆΠΌΡΠΌ «ΠΠ°ΡΡΡΠΎΠΈΡΡ». ΠΠ° Π²ΠΊΠ»Π°Π΄ΠΊΠ΅ «Π‘Π΅ΡΡ» Π½Π°ΡΡΡΠ°ΠΈΠ²Π°Π΅ΠΌ ΡΠ΅ΡΠ΅Π²ΠΎΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ Π΄Π»Ρ ΡΠ²ΡΠ·ΠΈ ΠΠ Ρ Π²Π½Π΅ΡΠ½ΠΈΠΌ ΠΌΠΈΡΠΎΠΌ. ΠΠΎΠΉ Ρ ΠΎΡΡ-ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ ΠΊ Π΄ΠΎΠΌΠ°ΡΠ½Π΅ΠΉ ΡΠ΅ΡΠΈ ΠΈ ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ ΡΠ΅ΡΠ΅Π· ΡΠΎΡΡΠ΅Ρ. ΠΠΎΡΡΠΎΠΌΡ ΡΠ΄ΠΎΠ±Π½Π΅Π΅ Π²ΡΠ΅Π³ΠΎ Π΄Π»Ρ ΠΠ Π±ΡΠ΄Π΅Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ ΡΠΈΠΏ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ «Π‘Π΅ΡΠ΅Π²ΠΎΠΉ ΠΌΠΎΡΡ». Π’Π°ΠΊΠΈΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ ΠΠ Π±ΡΠ΄Π΅Ρ Π²ΡΠ³Π»ΡΠ΄Π΅ΡΡ Π² ΡΠ΅ΡΠΈ ΠΊΠ°ΠΊ ΠΎΡΠ΄Π΅Π»ΡΠ½ΠΎΠ΅ ΡΡΡΡΠΎΠΉΡΡΠ²ΠΎ: Π±ΡΠ΄Π΅Ρ ΠΈΠΌΠ΅ΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΠΎΠ±ΡΠ°ΡΡΡΡ Ρ Π΄ΡΡΠ³ΠΈΠΌΠΈ ΡΡΡΡΠΎΠΉΡΡΠ²Π°ΠΌΠΈ Π² Π΄ΠΎΠΌΠ°ΡΠ½Π΅ΠΉ ΡΠ΅ΡΠΈ (Π²ΠΊΠ»ΡΡΠ°Ρ Ρ ΠΎΡΡ-ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ), Π²ΡΡ ΠΎΠ΄ΠΈΡΡ Π² ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ, ΠΏΠΎΠ»ΡΡΠ°ΡΡ ΠΎΡ ΡΠΎΡΡΠ΅ΡΠ° IP Π°Π΄ΡΠ΅Ρ ΠΏΠΎ DHCP ΠΈ Ρ.Π΄.
ΠΠ° Π²ΠΊΠ»Π°Π΄ΠΊΠ΅ «COM-ΠΏΠΎΡΡΡ» Π½ΡΠΆΠ½ΠΎ ΠΎΠ±ΡΠ·Π°ΡΠ΅Π»ΡΠ½ΠΎ ΠΏΠΎΡΡΠ°Π²ΠΈΡΡ Π³Π°Π»ΠΎΡΠΊΡ «ΠΠΊΠ»ΡΡΠΈΡΡ ΠΏΠΎΡΠ»Π΅Π΄ΠΎΠ²Π°ΡΠ΅Π»ΡΠ½ΡΠΉ ΠΏΠΎΡΡ», ΠΈΠ½Π°ΡΠ΅ OpenWRT Π½Π΅ ΡΠΌΠΎΠΆΠ΅Ρ Π·Π°ΠΏΡΡΡΠΈΡΡΡΡ.
config interface lan
option ifname eth0
option proto dhcp ΠΡΠΈΠΌΠ΅Π½ΡΠ΅ΠΌ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ ΡΠ΅ΡΠΈ: /etc/init.d/network reload Π§ΡΠΎΠ±Ρ ΠΠ ΠΏΠΎΠ»ΡΡΠ°Π»Π° ΠΎΡ ΡΠΎΡΡΠ΅ΡΠ° ΡΠΈΠΊΡΠΈΡΠΎΠ²Π°Π½Π½ΡΠΉ IP Π°Π΄ΡΠ΅Ρ, Π΄ΠΎΠ±Π°Π²Π»ΡΠ΅ΠΌ MAC-Π°Π΄ΡΠ΅Ρ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠ³ΠΎ Π°Π΄Π°ΠΏΡΠ΅ΡΠ° Π² ΡΠΏΠΈΡΠΎΠΊ ΠΏΠΎΡΡΠΎΡΠ½Π½ΡΡ
Π°ΡΠ΅Π½Π΄ Π² Π½Π°ΡΡΡΠΎΠΉΠΊΠ°Ρ
DHCP ΡΠ΅ΡΠ²Π΅ΡΠ° Π½Π° ΡΠΎΡΡΠ΅ΡΠ΅ ΠΈ ΠΏΡΠΈΡΠ²Π°ΠΈΠ²Π°Π΅ΠΌ Π΅ΠΌΡ Π½ΡΠΆΠ½ΡΠΉ IP.
config interface ‘wan’
option ifname ‘eth0’
option type ‘bridge’
option proto ‘static’
option ipaddr ‘192.168.1.10’
option netmask ‘255.255.255.0’
option ip6assign ’60’
config interface ‘lan’
option ifname ‘eth1’
option proto ‘dhcp’
Π VirtualBox Π²Π΅ΡΡΠΈΠΈ 5.0.4 Ρ ΠΌΠ΅Π½Ρ Π½Π°Π±Π»ΡΠ΄Π°Π»ΡΡ ΡΠ°ΠΊΠΎΠΉ Π±Π°Π³: Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΠ΅ (Π³ΠΎΡΡΠ΅Π²ΡΠ΅) ΠΌΠ°ΡΠΈΠ½Ρ Π²ΠΈΠ΄Π΅Π»ΠΈ ΠΏΠΎ ΡΠ΅ΡΠΈ ΡΠΎΡΡΠ΅Ρ, Π΄ΡΡΠ³ Π΄ΡΡΠ³Π°, Π²ΡΡ ΠΎΠ΄ΠΈΠ»ΠΈ Π² ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ, ΠΠ Π½Π΅ Π²ΠΈΠ΄Π΅Π»ΠΈ Ρ ΠΎΡΡ-ΠΌΠ°ΡΠΈΠ½Ρ, ΡΠ°ΠΊ ΠΆΠ΅ ΠΊΠ°ΠΊ ΠΈ Ρ ΠΎΡΡ-ΠΌΠ°ΡΠΈΠ½Π° Π½Π΅ Π²ΠΈΠ΄Π΅Π»Π° Π³ΠΎΡΡΠ΅Π²ΡΠ΅! ΠΠ°Π³ Π²ΡΠ»Π΅ΡΠΈΠ»ΡΡ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ΠΌ VirtualBox Π΄ΠΎ Π²Π΅ΡΡΠΈΠΈ 5.0.6.
Π Π°ΡΡΠΈΡΠ΅Π½ΠΈΠ΅ Π΄ΠΈΡΠΊΠΎΠ²ΠΎΠ³ΠΎ ΠΏΡΠΎΡΡΡΠ°Π½ΡΡΠ²Π°
ΠΡ ΠΈ ΡΠ΅ΠΏΠ΅ΡΡ, ΠΊΠΎΠ³Π΄Π° Ρ Π½Π°ΡΠ΅ΠΉ ΠΠ Π΅ΡΡΡ Π²ΡΡ
ΠΎΠ΄ Π² ΠΈΠ½ΡΠ΅ΡΠ½Π΅Ρ, ΠΌΠΎΠΆΠ½ΠΎ ΡΡΡΠ°Π½Π°Π²Π»ΠΈΠ²Π°ΡΡ Π²ΡΠ΅ Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΡΠ΅ ΠΏΠ°ΠΊΠ΅ΡΡ, Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ: opkg update
opkg install nano mc Π ΡΠΊΠ°ΡΠ°Π½Π½ΠΎΠΌ ΠΎΠ±ΡΠ°Π·Π΅ OpenWRT ΠΊΠΎΡΠ½Π΅Π²ΠΎΠΉ ΡΠ°Π·Π΄Π΅Π» ΡΠ°Π·ΠΌΠ΅ΡΠΎΠΌ ΠΎΠΊΠΎΠ»ΠΎ 48ΠΌΠ. ΠΡΠΎΠ³ΠΎ Π²ΠΏΠΎΠ»Π½Π΅ Π΄ΠΎΡΡΠ°ΡΠΎΡΠ½ΠΎ Π΄Π»Ρ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΏΠ°ΠΊΠ΅ΡΠΎΠ² ΠΏΠ΅ΡΠ²ΠΎΠΉ Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΠΎΡΡΠΈ ΠΈ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΠΌΠ½ΠΎΠ³ΠΈΡ
Π·Π°Π΄Π°Ρ. ΠΠ΄Π½Π°ΠΊΠΎ, Π΅ΡΠ»ΠΈ Π½Π°ΠΌ ΡΡΠΎΠ³ΠΎ Π½Π΅Π΄ΠΎΡΡΠ°ΡΠΎΡΠ½ΠΎ, ΡΠΎ ΡΠ²Π΅Π»ΠΈΡΠΈΠΌ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΠΉ ΠΆΡΡΡΠΊΠΈΠΉ Π΄ΠΈΡΠΊ. Π VirtualBox Π²ΡΠΎΠ΄Π΅ Π±Ρ Π΄Π»Ρ ΡΡΠΎΠ³ΠΎ Π΅ΡΡΡ ΡΠΏΠ΅ΡΠΈΠ°Π»ΡΠ½ΡΠΉ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½Ρ ΠΈ ΠΌΠΎΠΆΠ½ΠΎ Π² ΠΏΡΠΈΠ½ΡΠΈΠΏΠ΅ Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡΡΡ ΠΈΠΌ. ΠΠΎ Ρ ΡΠ΄Π΅Π»Π°Π» ΠΈΠ½Π°ΡΠ΅.
Π Π½Π°ΡΡΡΠΎΠΉΠΊΠ°Ρ
Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠΈΠΌ Π΅ΡΡ ΠΎΠ΄ΠΈΠ½ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΠΉ ΠΆΡΡΡΠΊΠΈΠΉ Π΄ΠΈΡΠΊ. ΠΡΠ±ΠΈΡΠ°Π΅ΠΌ «Π‘ΠΎΠ·Π΄Π°ΡΡ Π½ΠΎΠ²ΡΠΉ Π΄ΠΈΡΠΊ», Π·Π°ΡΠ΅ΠΌ Π·Π°Π΄Π°ΡΠΌ Π΅Π³ΠΎ Π½Π°Π·Π²Π°Π½ΠΈΠ΅, Π²ΡΠ±ΠΈΡΠ°Π΅ΠΌ Π½ΡΠΆΠ½ΡΠΉ ΡΠ°Π·ΠΌΠ΅Ρ ΠΈ ΡΠΎΡΠΌΠ°Ρ Ρ
ΡΠ°Π½Π΅Π½ΠΈΡ:
Π ΡΡΡΠΊΠΈΠ΅ ΠΠ»ΠΎΠ³ΠΈ
Π‘Π±ΠΎΡΠΊΠ° openwrt ΠΏΠΎΠ΄ vmware
Π― Π½Π΅Π΄Π°Π²Π½ΠΎ Π½Π΅ Π±ΡΠ» Π·Π°Π½ΡΡ, ΠΈ Ρ Ρ ΠΎΡΡ ΠΈΠ·ΡΡΠ°ΡΡ openwrt, ΠΏΠΎΡΡΠΎΠΌΡ Ρ ΠΏΠΎΠΏΡΡΠ°Π»ΡΡ ΡΠΎΠ·Π΄Π°ΡΡ Π΅Π³ΠΎ Π΄Π»Ρ ΡΠ΄ΠΎΠ²ΠΎΠ»ΡΡΡΠ²ΠΈΡ. ΠΠΎΠ½Π΅ΡΠ½ΠΎ, ΡΡΠΎ Π½Π΅ Π² ΡΠΎΡΠΌΠ΅ ΠΊΠΎΠΌΠΏΠΈΠ»ΡΡΠΈΠΈ ΠΈΡΡ ΠΎΠ΄Π½ΠΎΠ³ΠΎ ΠΊΠΎΠ΄Π°, ΠΊΠΎΡΠΎΡΠ°Ρ Π·Π°Π½ΠΈΠΌΠ°Π΅Ρ ΡΠ»ΠΈΡΠΊΠΎΠΌ ΠΌΠ½ΠΎΠ³ΠΎ Π²ΡΠ΅ΠΌΠ΅Π½ΠΈ.
Π‘Π½Π°ΡΠ°Π»Π° Π·Π°Π³ΡΡΠ·ΠΈΡΠ΅ ΠΎΠ±ΡΠ°Π· ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠ΅ΠΉ ΡΠΈΡΡΠ΅ΠΌΡ Π½Π° ΠΎΡΠΈΡΠΈΠ°Π»ΡΠ½ΠΎΠΌ ΡΠ°ΠΉΡΠ΅. ΠΡΡΡ ΡΠ»Π΅Π΄ΡΡΡΠΈΠΉ:
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ° Vmware Π½Π΅ Π±ΡΠ΄Π΅Ρ Π³ΠΎΠ²ΠΎΡΠΈΡΡ, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΡΠ²ΠΈΠ΄Π΅ΡΡ ΠΌΠΎΠΉ Π΄ΡΡΠ³ΠΎΠΉ Π±Π»ΠΎΠ³.
ΠΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ ΠΏΡΡΠΌΠΎ ΠΏΠΎΠ΄ Ubuntu:

ΠΠΎΡΠ»Π΅ Π·Π°Π²Π΅ΡΡΠ΅Π½ΠΈΡ ΠΏΠΎΠ΄Π³ΠΎΡΠΎΠ²ΠΊΠΈ Π·Π°ΠΏΡΡΠΊΠ°Π΅ΡΡΡ ΡΡΠ΅Π΄Π° openwrt.
ΠΡΠΊΡΠΎΠΉΡΠ΅ VMware ΠΈ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Β«Π‘ΠΎΠ·Π΄Π°ΡΡ Π½ΠΎΠ²ΡΡ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΡ ΠΌΠ°ΡΠΈΠ½ΡΒ».
1. ΠΡΠ±Π΅ΡΠΈΡΠ΅ Β«Custom (Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΠΎ)Β» Π² ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠΈ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ:
2. ΠΠ°ΠΆΠΌΠΈΡΠ΅ Β«ΠΠ°Π»Π΅Π΅Β», Β«ΠΠΏΠΏΠ°ΡΠ°ΡΠ½Π°Ρ ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΠΌΠΎΡΡΡ ΠΎΠ±ΠΎΡΡΠ΄ΠΎΠ²Π°Π½ΠΈΡ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½ΡΒ».
3. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Β«Π― ΡΡΡΠ°Π½ΠΎΠ²Π»Ρ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΎΠ½Π½ΡΡ ΡΠΈΡΡΠ΅ΠΌΡ ΠΏΠΎΠ·ΠΆΠ΅Β». ΠΠ· ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΎΠ½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΡ:
4. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Β«LinuxΒ» Π² Π³ΠΎΡΡΠ΅Π²ΠΎΠΉ ΠΎΠΏΠ΅ΡΠ°ΡΠΈΠΎΠ½Π½ΠΎΠΉ ΡΠΈΡΡΠ΅ΠΌΠ΅ ΠΈ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Β«Other Linux 3. KernelΒ» Π² Π²Π΅ΡΡΠΈΠΈ:
5. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π·Π°Π΄Π°ΠΉΡΠ΅ ΠΈΠΌΡ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ Π² ΠΏΠΎΠ»Π΅ Β«ΠΠΌΡ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½ΡΒ», ΠΏΡΠΎΡΡΠΎ Π½Π°Π·ΠΎΠ²ΠΈΡΠ΅ Π΅Π³ΠΎ ΡΠ»ΡΡΠ°ΠΉΠ½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ. ΠΠ΄Π΅ΡΡ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½ΠΎ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ Β«openwrt-15.05Β». ΠΡΠ»ΠΈ ΡΠΊΠ°Π·Π°Π½ ΠΏΡΡΡ, ΠΊΠΎΡΠΎΡΡΠΉ Π²Ρ Ρ ΠΎΡΠΈΡΠ΅ ΡΠΎΡ ΡΠ°Π½ΠΈΡΡ, ΡΠΎ Π·Π΄Π΅ΡΡ / home / ΠΠ°Π»Π»Π°ΠΊ / VMware / OpenWRT-15,05 /:
0
6. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, ΠΎΡΡΠ°Π²ΡΡΠ΅ ΠΏΡΠΎΡΠ΅ΡΡΠΎΡΡ ΠΈ ΠΏΠ°ΠΌΡΡΡ Π±Π΅Π· ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ:
8. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ. Π’ΠΈΠΏΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅ΡΠΎΠ² Π²Π²ΠΎΠ΄Π° / Π²ΡΠ²ΠΎΠ΄Π° ΠΌΠΎΠ³ΡΡ ΠΎΡΡΠ°Π²ΠΈΡΡ Π·Π½Π°ΡΠ΅Π½ΠΈΡ ΠΏΠΎ ΡΠΌΠΎΠ»ΡΠ°Π½ΠΈΡ:
9, ΠΏΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ ΡΠΈΠΏ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠ³ΠΎ Π΄ΠΈΡΠΊΠ° IDE, ΠΡ Π΄ΠΎΠ»ΠΆΠ½Ρ Π²ΡΠ±ΡΠ°ΡΡ IDE Π·Π΄Π΅ΡΡ, ΠΈΠ½Π°ΡΠ΅ Π²Ρ Π½Π΅ Π½Π°ΠΉΠ΄Π΅ΡΠ΅ ΡΠ°Π·Π΄Π΅Π» ΠΏΡΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ οΌοΌοΌ
10, ΠΏΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π΄ΠΈΡΠΊ Π²ΡΠ±ΠΈΡΠ°Π΅Ρ Β«Π‘ΠΎΠ·Π΄Π°ΡΡ Π½ΠΎΠ²ΡΠΉ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΠΉ Π΄ΠΈΡΠΊΒ»:
11. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ. Π Π°Π·ΠΌΠ΅Ρ Π΄ΠΈΡΠΊΠ° ΠΎΡΡΠ°Π΅ΡΡΡ Π½Π΅ΠΈΠ·ΠΌΠ΅Π½Π½ΡΠΌ:
12. ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, ΠΏΡΠΎΡΡΠΎ ΠΎΡΡΠ°Π²ΡΡΠ΅ ΡΠ°ΠΉΠ» Π΄ΠΈΡΠΊΠ° Π±Π΅Π· ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ:
13 ΠΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ ΠΊ ΡΠ»Π΅Π΄ΡΡΡΠ΅ΠΌΡ ΡΠ°Π³Ρ, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Β«ΠΠ°ΡΡΡΠΎΠΈΡΡ ΠΎΠ±ΠΎΡΡΠ΄ΠΎΠ²Π°Π½ΠΈΠ΅Β»:

14. ΠΠ·Π²Π»Π΅ΠΊΠΈΡΠ΅ Π½ΠΎΠ²ΡΠΉ CD / DVD (IDE), Π·Π²ΡΠΊΠΎΠ²ΡΡ ΠΊΠ°ΡΡΡ, ΠΏΡΠΈΠ½ΡΠ΅Ρ ΠΈ USB-ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅Ρ, Π° Π·Π°ΡΠ΅ΠΌ Π·Π°ΠΊΡΠΎΠΉΡΠ΅, ΡΡΠΎΠ±Ρ Π²ΡΠΉΡΠΈ.
15, Π½Π°ΠΆΠΌΠΈΡΠ΅ Finish ΠΈ ΡΠ²ΠΈΠ΄ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΠΈΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ, ΡΠΊΠ°Π·ΡΠ²Π°ΡΡΠΈΠΉ, ΡΡΠΎ ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ Π±ΡΠ»ΠΎ ΡΡΠΏΠ΅ΡΠ½ΡΠΌ:
ΠΡΠΏΠΎΠ»Π½ΠΈΠ² ΠΎΠΏΠΈΡΠ°Π½Π½ΡΠ΅ Π²ΡΡΠ΅ Π΄Π΅ΠΉΡΡΠ²ΠΈΡ, Π½Π΅ ΡΠΏΠ΅ΡΠΈΡΠ΅ Π·Π°ΠΏΡΡΠΊΠ°ΡΡ, ΡΠ½Π°ΡΠ°Π»Π° ΡΠΊΠΎΠΏΠΈΡΡΠΉΡΠ΅ ΡΠ°ΠΉΠ» openwrt-15.05.1-x86-generic-ΠΊΠΎΠΌΠ±ΠΈΠ½ΠΈΡΠΎΠ²Π°Π½Π½ΡΠΉ-ext4.vmdk, ΠΏΠΎΠ»ΡΡΠ΅Π½Π½ΡΠΉ Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΠ° qemu-img, Π² ΡΠ°Π±ΠΎΡΠΈΠΉ ΠΊΠ°ΡΠ°Π»ΠΎΠ³ Π²Π½ΠΎΠ²Ρ ΡΠΎΠ·Π΄Π°Π½Π½ΠΎΠΉ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ openwrt
ΠΠ²Π΅Π΄ΠΈΡΠ΅ ΡΠ°Π±ΠΎΡΠΈΠΉ ΠΊΠ°ΡΠ°Π»ΠΎΠ³ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Ρ openwrt ΠΈ ΠΏΡΠΎΡΠΌΠΎΡΡΠΈΡΠ΅ ΡΠ°ΠΉΠ» Ρ ΠΏΠΎΠΌΠΎΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ ls:
ΠΠ·ΠΌΠ΅Π½ΠΈΡΠ΅ 1: 1.fileName = «openwrt-15.05.vmdk» Π½Π°:
ΠΠΎΡΠ»Π΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ Π·Π°ΠΏΡΡΡΠΈΡΠ΅ openwrt:
ΠΠ΄Π½Π°ΠΊΠΎ Π²Ρ ΠΎΠ±Π½Π°ΡΡΠΆΠΈΡΠ΅, ΡΡΠΎ Ρ ΠΎΡΡ Π½Π΅ ΠΈΠΌΠ΅Π΅Ρ Π΄ΠΎΡΡΡΠΏΠ° ΠΊ openwrt ΡΠ΅ΡΠ΅Π· Π²Π΅Π±-ΡΡΡΠ°Π½ΠΈΡΡ, Π·Π΄Π΅ΡΡ Π½ΡΠΆΠ½ΠΎ ΡΠΎΠ»ΡΠΊΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΠ°ΠΉΠ» / etc / config / network:
ΠΠ΅ΡΠ΅ΡΠΌΠΎΡΡΠ΅Π½Π½Π°Ρ Π²Π΅ΡΡΠΈΡ Π²ΡΠ³Π»ΡΠ΄ΠΈΡ ΡΠ»Π΅Π΄ΡΡΡΠΈΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ:
ΠΠ°ΡΠ΅ΠΌ ΡΠΎΡ ΡΠ°Π½ΠΈΡΠ΅, Π²ΡΠΉΠ΄ΠΈΡΠ΅, Π²ΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ /etc/inid.d/network restart, ΡΡΠΎΠ±Ρ ΠΏΠ΅ΡΠ΅Π·Π°ΠΏΡΡΡΠΈΡΡ ΡΠ»ΡΠΆΠ±Ρ.
ΠΠ°ΡΠ΅ΠΌ Ρ ΠΎΡΡ ΠΏΠΈΠ½Π³ΡΠ΅Ρ 192.168.1.4, Π² ΡΡΠΎ Π²ΡΠ΅ΠΌΡ ΠΎΠ½ ΠΌΠΎΠΆΠ΅Ρ ΠΏΡΠΎΠΏΠΈΠ½Π³ΠΎΠ²Π°ΡΡ:
ΠΠ°ΡΠ΅ΠΌ ΠΎΡΠΊΡΠΎΠΉΡΠ΅ Π±ΡΠ°ΡΠ·Π΅Ρ, Π²Π²Π΅Π΄ΠΈΡΠ΅ 192.168.1.4, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΡΠ²ΠΈΠ΄Π΅ΡΡ Π½ΠΎΡΠΌΠ°Π»ΡΠ½ΡΠΉ Π΄ΠΎΡΡΡΠΏ:
ΠΠ°ΠΆΠΌΠΈΡΠ΅ Β«ΠΠΎΠΉΡΠΈΒ», ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠΈΡ Π²Π°ΠΌ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΡΡ ΠΏΠ°ΡΠΎΠ»Ρ:
ΠΠΎΡΠ»Π΅ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΏΠ°ΡΠΎΠ»Ρ ΠΏΡΠΎΡΡΠΎ Π½Π°ΠΆΠΌΠΈΡΠ΅ Β«Π‘ΠΎΡ ΡΠ°Π½ΠΈΡΡ ΠΈ ΠΏΡΠΈΠΌΠ΅Π½ΠΈΡΡΒ».
ΠΠΎΡΠ»Π΅ Π²Ρ ΠΎΠ΄Π° Π² ΡΠΈΡΡΠ΅ΠΌΡ Ρ ΡΡΠ΅ΡΠ½ΠΎΠΉ Π·Π°ΠΏΠΈΡΡΡ root ΠΈ ΠΏΠ°ΡΠΎΠ»Π΅ΠΌ, ΠΊΠΎΡΠΎΡΡΠΉ Π²Ρ ΡΠΎΠ»ΡΠΊΠΎ ΡΡΠΎ ΡΡΡΠ°Π½ΠΎΠ²ΠΈΠ»ΠΈ, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΡΠ²ΠΈΠ΄Π΅ΡΡ Π½Π°ΡΡΠΎΡΡΠΈΠΉ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡ openwrt:
ΠΠ½ΡΠ΅Π»Π»Π΅ΠΊΡΡΠ°Π»ΡΠ½Π°Ρ ΡΠ΅ΠΊΠΎΠΌΠ΅Π½Π΄Π°ΡΠΈΡ
Π Π°Π·ΡΠ°Π±ΠΎΡΠΊΠ° Android NDK (1)
ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ C ++ Π΄Π»Ρ ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΡΠ²Π΅ΡΡΠΊΠΈ ΠΏΡΠΎΡΡΠΎΠ³ΠΎ Π΄Π²ΡΠΌΠ΅ΡΠ½ΠΎΠ³ΠΎ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ
ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ C ++ Π΄Π»Ρ ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΡΠ²Π΅ΡΡΠΊΠΈ Π΄Π²ΡΠΌΠ΅ΡΠ½ΠΎΠ³ΠΎ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ ΠΎΠ³Π»Π°Π²Π»Π΅Π½ΠΈΠ΅ ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ C ++ Π΄Π»Ρ ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΡΠ²Π΅ΡΡΠΊΠΈ Π΄Π²ΡΠΌΠ΅ΡΠ½ΠΎΠ³ΠΎ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ ΠΠ²Π΅Π΄Π΅Π½ΠΈΠ΅ 2. Π’ΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ ΠΊ ΠΏΡΠΎΠ΅ΠΊΡΡ 3. ΠΡΠΎΡΡΡΠ΅ Π·Π½Π°Π½ΠΈΡ, ΡΠ²ΡΠ·Π°Π½Π½.
ΠΡΠΎ Π΄Π΅ΠΉΡΡΠ²ΠΈΡΠ΅Π»ΡΠ½ΠΎ Ρ ΠΎΡΠ΅Ρ ΡΠ·Π½Π°ΡΡ U3D, ΠΏΡΠΈΠ΄ΠΈ, Ρ Π²ΠΎΠ·ΡΠΌΡ ΡΠ΅Π±Ρ
ΠΠ³ΡΠ° FreeShale Game Triver OLED12864 ΠΡΠΎΠ±ΡΠ°ΠΆΠ°Π΅Ρ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π΄Π»Ρ ΡΡΠ΅ΠΊΠ°, ΡΠΎΠ²ΠΌΠ΅ΡΡΠ½ΠΎΠ΅ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ ΠΊΠΎΠ΄Π°
Π‘Π½Π°ΡΠ°Π»Π° ΡΠ½Π°ΡΠ°Π»Π° ΡΠΎΠ±ΠΈΡΠ°ΠΉΡΠ΅ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ ΠΊΠ°ΠΌΠ΅ΡΡ, ΠΏΠΎΡΠΎΠΌΡ ΡΡΠΎ ΠΎΠ±ΠΎΡΡΠ΄ΠΎΠ²Π°Π½ΠΈΠ΅ ΠΎΡΠ»ΠΈΡΠ°Π΅ΡΡΡ, Ρ Π½Π΅ Π±ΡΠ΄Ρ ΠΎΠ±ΡΡΡΠ½ΡΡΡ ΡΡΠΎ. ΠΠΎ-Π²ΡΠΎΡΡΡ , Π±ΠΈΠ½Π°ΡΠΈΠ·Π°ΡΠΈΡ ΡΠΎΠ±ΡΠ°Π½Π½ΠΎΠ³ΠΎ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ Π-ΡΡΠ΅ΡΡΠΈΡ , Π²ΡΠ·ΠΎΠ²ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΡΡΠ½ΠΊΡΠΈΡ, ΡΡΠΎΠ±Ρ ΠΎΡ.
OpenWrt on x86 hardware (PC / VM / server)
OpenWrt can run in normal PC, VM, or server hardware, and take advantage of the much more powerful hardware the x86 (Intel/AMD) architecture can offer.
Download disk images
Go here, choose the release version, then click on target and then on x86. You will see different targets.
There are multiple targets for x86 OpenWrt, some are targeted at old or specific hardware and their build defaults may not be suit modern x86 hardware:
Now you will see different files offered, the following two are disk images you can download and use:
Hardware support
All images support basic video output (screen text terminal), so you can connect a screen to the device’s video ports and see it boot up.
Some images support keyboard input which can be used to configure OpenWrt.
To communicate through a PC serial port you will need a βnull-modemβ aka βcrossedβ serial cable to connect the device’s serial port to your PC’s serial port.
To be able to connect to your device, the image must support the Ethernet hardware.
NVMe SSD support is available since OpenWrt 21.02.
Installation
The installation consists of writing a raw disk image on the drive which will boot OpenWrt system. It may be a USB flash drive, USB SDcard reader with SDcard or in a SATA hard drive or SSD (recommended). You can do it either on a secondary PC, or booting the router machine with a Live CD/USB.
WARNING: writing raw image files DELETES the content of the drive you write them on, be sure that you are not deleting anything important, and that you have selected the right drive.
Windows / macOS
If you are using a Windows / macOS, you will need a program to extract the raw disk image from the compressed archive you downloaded. Then you will need to open the raw image file with a program that can write it on the drive you want to install OpenWrt on.
A good free and opensource archiver program you can use is 7zip, or Keka.
A good free and opensource raw disk image writer program you can use is Win32 Disk Imager, or Etcher.
Linux
Extract the image file from the archive. Most sane distros will let you do so by right click and then select βextractβ, or you will have to open up your graphical archive manager and do it from there. Then write the image file you extracted to the drive you want to install OpenWrt in. Many distros include a disk image writer application such as GNOME Disks. Identify the disk you want to write the image on, e.g. sda, sdb, sdc, etc., and write the image with dd tool where using the previously identified drive name. Note you have to gain administrative privileges with sudo and write to the drive (sda, sdb), not to a partition (sda1, sdb3).
Installing OpenWrt in an internal drive
If you want to write OpenWrt in Sata or IDE drives or CF Cards or SD cards, you can just remove them from the device and flash the image raw from your PC. Also sometimes eMMC is removable or can be put in βusb write modeβ in some devices.
But if you cannot remove the storage from the device (or do not have an adapter to connect them to the PC), you can write OpenWrt on a USB drive (or another removable storage device), then you can then insert it in a USB port or slot. When booting select the drive where you installed OpenWrt.
Then you need to identify how is the internal storage device called with lsblk or dmesg:
Be aware that you will also see the USB drive or the storage device you have temporarily installed OpenWrt on.
This for example is the output of a 4GB USB drive with 2 partitions on it that was assigned the name /dev/sda:
After you have identified the onboard storage you want to install OpenWrt in, you can follow the Linux install instructions above. Then power off the system, unplug the removable storage device you used to install OpenWrt, and power on again. Now it should boot from the internal storage.
Partition layout
The x86 image is using the following partition layout (as seen from inside of the device):
Any additional space in the device is unallocated.
Resizing partitions
An example fdisk operation on a 8GB flash drive:
Be sure to update the GPT partition UUID in the GRUB configuration when using efi.img.gz:
Resizing filesystem
Resizing F2FS overlay
Resize F2FS overlay for squashfs-combined.img.gz:
Resizing Ext4 rootfs
Resize Ext4 rootfs for ext4-combined.img.gz:
Adding extra partitions
When OpenWrt is installed on a x86 machine using generic-ext4-combined.img.gz, the drive’s partition table is overwritten, which means that any existing partition is deleted. Any remaining space will be unallocated and the drive will have a normal MBR partition table.
Any partition management tool that supports MBR and ext4 can be used to create extra partitions on the drive, in example fdisk, GParted.
But attention must be taken for future upgrades. If extra partitions are added, you cannot use -combined.img.gz images anymore, because writing this type of image will override the drive’s partition table and delete any existing extra partition, and also revert boot and rootfs partitions back to default size.
Upgrading
On most embedded devices, upgrading OpenWrt is much simpler than the first installation and consists of simply executing sysupgrade. On x86 machines, on the other hand, upgrading is more complex than the first installation.
One of the advantages of x86 is the easiness to backup and restore drives, using any normal backup tool that supports MBR and ext4. Always make a proper backup of the whole drive and test its restore before any upgrade procedure. It’s also recommended to restore the backup on a virtual machine and execute the upgrade on it prior to upgrading the real router, to learn and experiment the procedures without risking the real thing.
On all procedures on this section, we must either connect the drive on a secondary PC running Linux, or boot the router with a Linux Live CD/USB.
If you had used a ext4-combined.img.gz type of image to install, there are 4 options for upgrading:
The 2 last options require more steps to execute, but have the advantage of leaving MBR partition intact, therefore keeping boot and rootfs partitions sizes (in case of having resized them) and any extra partitions. At this time they are the most recommended methods of upgrading. The only exception is when new OpenWrt image brings a newer version of GRUB2. Part of GRUB2 is stored close to MBR and outside of partitions area, so we need to write a full ext4-combined.img.gz to update it.
Extracting boot partition image
The boot partition contains part of GRUB2 software, Linux kernel and grub.cfg with boot options. rootfs partition contains OpenWrt files, packages and configs.
At the moment, it’s not built a separated image file with boot partition, as it’s available for rootfs. To be able to upgrade boot partition without overriding the whole drive, we must extract it from ext4-combined.img.gz, this requires a spare empty drive or a virtual machine.
Upgrading rootfs partition
As said above, there are 2 options for upgrading rootfs partition, when we are using the ext4 file system and not squashfs: writing ext4-rootfs.img.gz image or uncompressing rootfs.tar.gz into existing partition.
For uncompressing rootfs.tar.gz, we must mount rootfs partition, delete all files from it, then uncompress updated files.
It may be tempting to not delete config files, but the risk isn’t worth it, because some file may conflict and not be properly upgraded. It’s safer to backup config files (as we should also backup whole drive before upgrading) and copy them back after upgrading. I suggest going further and having a Subversion repository on another computer where all config files are saved and their changes are tracked, and use rsync to sync between the repository working copy and production files on the router.
Building your own image with larger partition size
Anyone can compile OpenWrt from source, but it’s a complex procedure with many options which require some experience, specially for using it on a production router.
Different from compiling, we can build our own custom image using the Image Builder. This doesn’t compile the whole software, instead it downloads required packages from the same repository used by OpenWrt to install them. Image Builder builds the same image files used for installing and upgrading OpenWrt.
Due to that it’s much simpler than compiling and offers great advantages, like adding directly to the image all packages we need, removing those we don’t need, and also adding to it our config files. Having packages on the image, we don’t need to reinstall all of them after an upgrade. And having our config files directly on the image, we don’t need to reconfigure everything or copy all files from backup, which is specially difficult when default network configs don’t work with our router’s interfaces or it doesn’t start with correct IP address. In many cases, OpenWrt will be back fully working on first boot after upgrading.
Another advantage for building a custom image is when the default rootfs partition size is too small to store all packages and we need to resize it. Note that, when following above procedures of installing then resizing partition and upgrading by writing partition image or extracting rootfs.tar.gz, we don’t need to build the image with the final size of the partition. Doing so would result in the too large image file and would require enough RAM to store the whole file during building. It’s recommended to use on the image just enough size to store all packages plus a small amount of free space.
Follow the Image Builder tutorial to setup the building environment using the x86/64 target. Once the building environment is setup, we use the make image command to build an image, which results on a set of files with the types of images described on this page. They are saved on bin/targets/x86/64 inside the building folder.
Because x86 hardware doesn’t have profiles, we don’t need to use the PROFILE parameter. With PACKAGES parameter we set all packages we want to add to or remove from default list. The command make info lists default packages list. FILES parameter is used to add custom config and script files to be added to the image, it points to a folder which represents root folder when OpenWrt is running.
VirtualBox Advanced
Work in Progress!
This page is a continuous work in progress. You can edit this page to contribute information.
Overview
This guide extends the basic VirtualBox HowTo with broader setup recommendations, samples and common βgotcha-sβ.
NOTE: Use a wired virtualbox host (unless you are really confident with virtualbox i.e. 80211 bridging issues ).
Prerequisite Concepts
x86_64 Basics
As the operating system within VirtualBox is basically an x86_64 host, having a general grasp of the hard drive partition setup, bootloader operation et. al. is beneficial. Particularly, when you need to undertake more advanced network interface setup within the VM and then translate that to VBox nics. In other words, lack of confidence performing bare metal config will compound troubleshooting if you are unable to clearly differentiate what is physical and what is virtual. In this case perhaps using an old pc or spare usb disk to test on real hardware first is a good first step.
squashfs vs ext4
Where is my router?
Using squashfs:
Squashfs images are neat when you are using the Imagebuilder to integrate all packages you want in a single re-settable image. You can install with sysupgrade, and not lose any of your βinstalled packagesβ as you have integrated them in the base firmware image.
Since you have Virtualbox anyway, why not have a Debian or Ubuntu VM and use the Imagebuilder too. It’s a very convenient way of tracking snapshot(master) to have the latest and greatest, and the only practical way to do so for most other devices supported by OpenWrt, so this is more or less the best βchoiceβ for OpenWrt veterans that have deployed many devices and are using the imagebuilder already.
NB: With Imagebuilder, the size of the read-write partition is irrelevant as all packages are embedded in the squashfs read-only partition that is enlarged as needed, so 128MB is available for config only.
Using ext4:
This type of image mimics a more conventional Linux distro like Debian or Ubuntu, where you have packages and you keep updating or installing them as needed. But afaik this is a bit of a pain to do if you try to follow snapshot, as OpenWrt does not implement the ability to have multiple ( non-identical ) kernels with kernel modules (the Linux βdevice driversβ) installed at the same time, and select what kernel to boot when you reboot. Although it is possible to manually edit grub.cfg to support this manually using differing rootfs partitions for each kernel ( without sysupgrade support )
Therefore, using sysupgrade to flash a new combined-ext.bin will typically zap the βbootβ and βrootfsβ partitions, config is migratable, packages are not.
VirtualBox Networking Basics
Knowledge of the basic network types offered by VirtualBox will help you immenselyβ¦
























