User Tools

Site Tools


docs:guide-user:installation:openwrt_x86

OpenWrt on x86 compatible systems

Disclaimer: A search on the wiki was done for generic installation and information of OpenWrt on x86 systems, but the results returned nothing specific. In the case please verify if this page should be merged.

:!: 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.

  • Legacy is for very old PC hardware, pre-Pentium 4, what is called i386 in Linux architecture support. It will miss a lot of features you want/need on modern hardware like multi-core support and support for more than 1GB of RAM.
  • Geode is a custom Legacy target customized for Geode SoCs, which are still in-use in many networking devices, like the older Alix boards from PCEngines.
  • Generic is for relatively modern 32-bit hardware, should be i586 Linux architecture, will work on Pentium 4 and later, use this only if your hardware isn't 64-bit for some reason.
  • 64 is for modern PC hardware (anything from around 2007 onward), it is built for 64bit-capable computers and has support for modern CPU features.

If in doubt, try 64 first, then Generic, and then lastly the Legacy. Geode is for specific hardware and you should be able to tell if it is the case by googling about the device you have.

This is the page where you can choose the target, and proceed to download the one you want

Requirements

  • A x86 (intel ISA) compatible PC, most intel/amd/via based PC satisfy this condition
    • the system should have an internal HD (normal IDE/SATA HD, IDE CFcards, IDE SDcards)
    • the system should allow to connect and boot cd-roms or usb sticks or similar removable storage

Installation

There are several possibilities, slowly all will be mentioned.

Using usb sticks with no internet

  1. We need 2 usb sticks
    1. one with a linux rescue image (debian, gparted, parted magic, etc…)
    2. and one with the OpenWrt image (see for example http://downloads.openwrt.org/releases/17.01.4/targets/x86/generic/). Actually if you know how to save additional data on the linux rescue usb stick you don't need 2 sticks.
  2. First we start the linux rescue system (could be that the BIOS boot options need to be modified) _WITHOUT_ connecting the other usb stick.
  3. Once the rescue system is started, we connect the other usb stick and we write on the internal disk the OpenWrt image. If the internal disk is recognized as /dev/sda (and we don't want to save any data) this means:
    1. clean the internal disk from partition (fdisk /dev/sda and then delete all the partitions and after that write the new partition table)
    2. mounting the second usb stick with the OpenWrt image (for example mount /dev/sdc1 /mnt/)
    3. writing the image on the disk (for example: dd if=/mnt/openwrt-x86-generic-combined-squashfs.img of=/dev/sda)
    4. eventually resizing the owrt partition created transferring the image (not difficult to do if the image use an ext file system and not a squasfs [compressed]).

Using usb sticks with internet

  1. We need 2 usb sticks
    1. one with a linux rescue image (debian, gparted, parted magic, etc…)
    2. and one with the OpenWrt image (see for example http://downloads.openwrt.org/releases/17.01.4/targets/x86/generic/). Actually if you know how to save additional data on the linux rescue usb stick you don't need 2 sticks.
  2. First we start the linux rescue system (could be that the BIOS boot options need to be modified) _WITHOUT_ connecting the other usb stick.
  3. Once the rescue system is started, we connect the other usb stick and we write on the internal disk the OpenWrt image. If the internal disk is recognized as /dev/sda (and we don't want to save any data) this means:
    1. clean the internal disk from partition (fdisk /dev/sda and then delete all the partitions and after that write the new partition table)
    2. mounting the second usb stick with the OpenWrt image (for example mount /dev/sdc1 /mnt/)
    3. Getting the image on the /tmp/ directory of the linux rescue system and writing it on the internal disk. (this is the annoying part because if there is no browser you need to type a long url, and two sticks avoid problems). For example cd /tmp/ ; wget http://downloads.openwrt.org/backfire/10.03.1/x86_generic/openwrt-x86-generic-rootfs-ext2.img.gz
    4. In the case work on the downloaded image (that yould require to be unzipped, for example)
    5. writing the image on the disk (for example: dd if=/mnt/openwrt-x86-generic-combined-squashfs.img of=/dev/sda)
    6. eventually resizing the owrt partition created transferring the image (not difficult to do if the image use an ext file system and not a squasfs [compressed]).

Drivers

Could be possible that you need intel drivers (or not only) for NIC adapters, so be prepared to download (manually) a lot of kmod-* packages to be sure that your system will run. You can install then with opkg install <filename>.

Resizing partitions

Resizing ext partitions

  1. using a rescue linux system
  2. identify the partition to resize, assuming that after it there are free blocks.
  3. with fdisk delete the partition and create another one, of the same type (normally primary and type 83 Linux), *starting at the same sector/block number* and ending on the last free contiguous sector. Then write the partition table.
  4. use resize2fs on the partition created to let it use all the new space.
  5. use 'fsck -f' on the partition created to check that everything is ok.
docs/guide-user/installation/openwrt_x86.txt · Last modified: 2018/05/13 10:20 by bobafetthotmail