OPENWRT X86 Installation Tutorial (not completed)

Source: Internet
Author: User
Tags ftp client win32diskimager

Catalogue 

Download the Openwrt image file

Two write the image file to the target disk

2.1 Write Disk Tool

2.2 Physdiskwrite Writing Disk

2.3 Win32diskimager Writing Disk

Three management interface

3.1 OpenWrt's console

3.1.1 Native Console

3.1.2 Remote Console (TELNET/SSH)

3.1.3 SSH Login

Use of 3.1.4 WinSCP

3.2 OpenWrt Web Management interface

Four basic network settings

4.1 Web management interface setting up the network interface

4.2 Setting up a network interface using the console

4.3 Setting up the network interface via WinSCP

4.4 Network settings for various internet ways

Five Software Installation

5.1 Web Interface installation software

5.2 Install the software in the command line mode

5.3 Trunk version Luci interface installation

5.4 Luci Chinese

Installation and use of six N-wan

Installation of 6.1 N-wan

Settings for 6.2 N-wan

6.2.1 Multi-WAN port access settings

6.2.2 Multi-dial settings for single WAN

Seven-mount HDD

7.1 Automatically mount USB removable hard drive, USB drive

7.2 Manually mounting the IDE (SATA) hard drive

===========================================================================================

Description: For convenience, this tutorial is a related operation under VMware. The virtual machine setup process does not repeat.

(Some of the physical machine installed when the NIC driver is not good, you need to compile the driver into the IMG file, is not discussed in this article.) )

Download the Openwrt image file

Download the official compiled X86 img file on the OPENWRT website. Address: http://downloads.openwrt.org/snapshots/

Openwrt officially provides backfire and trunk two non-pass compiled versions. The difference is that the backfire is relatively more formal and stable, while the trunk is relative to the newer beta version

In addition: Backfire default integrated Luci management interface, and trunk version is not Luci Web management interface, you need to manually install.

At the same time, each version provides a mirror below the different disk formats. Includes EXT2/EXT4,JFFS2,SQUASHFS three formats, respectively. For convenience, here we select the image file in the EXT2/EXT4 format.

Version Backfire:

Http://downloads.openwrt.org/snapshots/backfire/10.03.1-RC5-testing/x86/generic/openwrt-x86-generic-combined-e Xt2.img.gz

Trunk version:

Http://downloads.openwrt.org/snapshots/trunk/x86/openwrt-x86-generic-combined-ext4.img.gz

Two write the image file to the target disk

2.1 Write Disk Tool

It is recommended to use CF card, electronic disk, etc. as OPENWRT system disk. Small, quiet, power-saving.

The IMG write disk tool usually uses Physdiskwrite or Win32diskimager to download the address: physdiskwrite:http://m0n0.ch/wall/downloads/physdiskwrite-0.5.2. Zip Win32diskimager:

Http://launchpad.net/win32-image-writer/0.2/0.2/+download/win32diskimager-RELEASE-0.2-r23-win32.zip

For Openwrt, the use of any of the above writing tools does not have much effect, but for some soft routes, Win32diskimager writes can cause a failure to start. We recommend that you use Physdiskwrite to write a disk.

2.2 Physdiskwrite Writing Disk

Physdiskwrite is a DOS-based write disk tool that needs to be operated under CMD.

(1) Place the Physdiskwrite.exe and image files in the same directory

(2) Enter the directory under CMD and enter the command Physdiskwrite.exe–u backfire.img to write the disk. where the-u parameter is required to be attached when the target disk is greater than 800M.

(3) Next you will be prompted to select a disk to write to. Please pay attention to the choice, do not choose the wrong.

"For ease of input, you can rename Physdiskwrite.exe to Pdw.exe, command input PD w.exe–u backfire.img."

Determine the correct disk, according to the disk model, disk capacity size and other factors to determine. Where the disk information inside: cyl represents the cylinder, TPC represents the head, SPT represents the sector disk capacity = (cylinder x head x Sector x 512) bytes.

It is important to note that when converting bytes into MB units, the hard disk manufacturer is binary 1000, and the Windo WS system is 1024.

(4) After determining the specific disk, enter the relevant numerical sequence number. The system prompts for confirmation information and selects Y.

2.3

Win32diskimager Writing Disk

Win32diskimager is a graphical disk-writing tool. Win7 The following is recommended to use "Run as Administrator"

Select the img file, and the disk serial number. Click the Write button

Three management interface

Once the mirror is written to disk, it is possible to install the disk or CF on the machine used to do the soft route. Boot. BIOS setup for hard drive boot

OPENWRT management system can be divided into console and web management. (Web management We mainly apply the Luci management interface, in addition to the X-wrt management interface.) Favorite friends can install by themselves)

3.1 OpenWrt's console

3.1.1 Native Console

Start the Finish screen and press ENTER here to access the OPENWRT console. This can be done in the command line way.

3.1.2 Remote Console (TELNET/SSH)

The OPENWRT can manage the system over a LAN or WAN. Supports Telnet and SSH login. Note: SSH login must first set the root account password (system default password is empty)

System account Root Password modification method:

(1) Enter passwd root under the console and set the password

(2) Log in using Telnet method

Use Telnet to change the password under SECURECRT (or other tools that support Telnet)

command is the same as the local console. PASSWD Root

Once you've set your password, you can sign in with SSH.

3.1.3 SSH Login

Typically we use the SECURECRT or Putty two tools for login management.

The SECURECRT is a terminal emulator that supports SSH (SSH1 and SSH2), while supporting the Telnet and RL Ogin protocols. SECURECRT is a

Ideal for connecting running remote systems including Windows, UNIX, and VMS. : Http://9.duote.com.cn/securecrt.zip

Steps to use:

(1) SECURECRT login, login protocol selected as SSH2

(2) in the next Reply option, the protocol is selected as SSH2 and the default IP address (192.168.1) is entered. 1) and then keep the next step.

(3) Return to the Connection tab and click Connect. You will be prompted to save the security key and save it directly.

(4) Then follow the prompts to enter the user name and password, that is, to enter the SSH remote system.

You can also use Putty to log in, and Putty is a free, Telnet, rlogin, and SSH client under the Windows 32 platform, but with no less functional thread than the Business Telnet class tool.

The use is also very simple. Specific settings will not be discussed.

Putty:http://code.google.com/p/puttycn/downloads/detail?name=putty_0. 60cn2.zip

Use of 3.1.4 WinSCP

WinSCP is an open-source graphical SFTP client that uses SSH in a Windows environment. The SC P protocol is also supported. Its main function is to copy files securely between local and remote computers.

With WinSCP we can directly copy some files into the OpenWrt system directory, or even edit the files directly. : Http://winscp.net/download/winscp433setup.exe

(1) Open WinSCP, Login dialog box, enter address, protocol selected as SCP

(2) Click on the Scp/shell option on the left to remove the check in front of the Find user group.

(3) Click Login, enter the user name and password, you can enter the WinSCP main interface.

(4) The operation after landing is similar to the FTP client.

3.2

OpenWrt's web Management interface

Of course, the simpler and more intuitive is to go directly to the Web management interface to set up.

OPENWRT's web management interface is mainly Luci and X-wrt. At present, more than Luci is used, the latest version is 1.0. This tutorial is based on the Luci interface.

After the installation of version backfire, no additional setup is required to enter the Web management interface.

When you first sign in to the Web interface, you are prompted to set a password.

The root password is empty at this time. Click Login directly to enter.

After entering, click System-administration to set the admin password at Router Password. This is necessary in order to use SSH connection for control.

and the trunk version of the default is no Luci management interface, we need to install manually. Specific installation See the following article

Four basic network settings

Now, though, you can open the OpenWrt Web management interface or Telnet to the console. However, it is not possible to surf the Internet through OpenWrt at this time.

Because there is only one LAN port for the network interface, the WAN port is not set. There are two main methods to set up:

1: Set the changes directly in the Web management interface.

2: Modify by command line (or WINSCP),/etc/config/network file

4.1

Web management interface set up network interface

(1) Login Web Admin Interface

(2) Click Network-interface, select Add New interface below. Go to the following page

Name of the new interface set interface name--(set to WAN, or WAN1, etc.)

Cover the following interface select the Nic-(here we choose eth1) Click Submit

(3) Click Submit, then enter the interface edit page.

In the General Setup tab, set up according to your own network conditions. (Static ip,dhcp,pp Poe, where we select DHCP)

Firewall The Setting tab, select the firewall zone, set to WAN. (If you don't set a firewall zone, you won't be able to surf)

When the settings are complete, click Save and apply to apply the settings. If everything is OK. This time will be able to surf the internet normally.

4.2 Setting up a network interface using the console

(1) SSH login, input vi/etc/config/network

A similar screen appears as follows

(2) Move the cursor, in accordance with your WAN access method, press the shortcut key A, insert content (set content See 3.4), add the relevant content later.

(3) After setting, press ESC, then enter: W (save), enter. Press ESC, and then enter: Q (Leave)

(4) Restart.

4.3 Setting up the network interface via WinSCP

It is not easy and intuitive to modify the network configuration file via SSH. We can make changes directly using the WinSCP login OpenWrt.

Network file.

(1) Login with WinSCP OpenWrt

(2) Open the/etc/config directory directly in WinSCP, double-click Open Network File

(3) in the WinSCP text editing interface, add the relevant network settings content.

(4) Save, you will be prompted to enter the password during the save process.

4.4 Network settings for various internet ways

The VI command does not need to enter ' quotation marks

DHCP mode:

Config ' interface ' WAN ' option ' ifname ' eth1′option ' proto ' DHCP '

Static mode:

Config ' interface ' WAN ' option ' ifname ' eth1′option ' proto ' static '

Option ' ipaddr ' 192.168.2.222′option ' netmask ' 255.255.255.0′option ' Gateway ' 192.168.2.1′option ' DNS ' 192.168.2.1 ′

PPPoE mode:

Config ' interface ' WAN ' option ' ifname ' eth1′option ' Proto ' PPPoE '

Option ' username ' 02312345678′option ' password ' 02312345678′

Five Software Installation

OPENWRT provides a variety of ways to install packages. This includes installation via the Web management interface, as well as command-line installation.

5.1 Web Interface installation software

OPENWRT Software Management interface can directly update the relevant software, download and install new software, very convenient. Click System--software (software source) to enter OpenWrt's software management interface. Here you can (1) Set the software source address of the system. (2) Update package list (3) download and install the package (4) Remove the installed software

Pieces (4) software installed in the software source

Note: The official compiled OpenWrt backfire 10.03 RC5 version of the software source address is set incorrectly. Causes the software not to update and install normally, we need to modify it manually.

(1) In the Admin interface click Edit Package lists and installation targets into OPKG Configurati on interface

(2) The URL in the first line

Http://downloads.openwrt.org/backfire/10.03.1-rc5/x86/packages

Replaced by

Http://downloads.openwrt.org/snapshots/backfire/10.03.1-RC5-testing/x86/generic/pa ckages/

(3) Click Submit to confirm

5.1.1 Install the software provided by the official source

(1) Confirm that the WAN port is connected, openwrt the Internet is normal.

(2) Click on the Software management interface, update package lists List

(3) After the package lists Updated:ok is displayed below the capacity display bar, the update is successful.

(4) Select the packages you need in Available packages, followed by a brief introduction to each package. Click Install.

5.1.2 download and install via URL

Sometimes IPK packages are not available on official sources. This is the time to install it by downloading and installing it.

(1) Find the address of the software IPK package you need, such as Nwan:http://sutuo.tk/nwan_1.3i_all_lu CI1.0.IPK

(2) in Download and install package: Enter the IPK address. Click OK.

(3) After success, you will be prompted to Install ' ****.ipk ': OK

5.2

Install the software in the command line mode

4.2.1 Direct Download Installation

(1) login via SSH tools such as SECURECRT or Putty openwrt

(2) Input opkg update

(3) Install the software provided by the official source, can be entered directly: opkg install software name

Install additional IPK packages, enter: opkg install URL

Example: opkg Install HTTP://SUTUO.TK/NWAN_1.3I_ALL_LUCI1.0.IPK

4.2.2 Manual upload and install after download

(1) Download the IPK package on the website to the local save.

(2) Upload the IPK package to the/tmp directory using WinSCP

(3) Log in using the SSH tool and enter:

OPKG Update

Opkg INSTALL/TMP/***.IPK

5.3 Trunk version Luci interface installation

(1) First, set up the WAN port, so that the openwrt properly connected to the network. (See four basic network Settings)

(2) Install Luci using the OPKG command via the console or SSH. Enter the following command

OPKG Update opkg Install Luci

/ETC/INIT.D/UHTTPD Enable

/ETC/INIT.D/UHTTPD Star

5.4 Luci Chinese

Using the above various software installation methods can easily achieve the Luci of the Chinese. The official supply of a Chinese-made package called Luci-i18n-chinese. After the installation is successful, select Chinese,save and apply in the language option for System-–system-–language and style. After the page is refreshed, it becomes the Chinese interface

Installation and use of six N-wan

N-wan was developed by the flying sky of the OpenWrt Chinese Forum. The N-wan can be stacked and load balanced with single-wire multi-dial, multi-line multi-dial, with specified egress function. The use is relatively simple. Thank you for the flying sky here.

It is important to note that N-wan is an IP-based balancing, not session-based. Concurrent functions of N-wan are limited.

Installation of 6.1 N-wan

N-wan is not available in official sources. therefore need to fly to the sky of the site download. And then proceed with the installation. The installation method can be installed using the method provided in chapter fifth. Web mode or command line mode.

N-wan:http://sutuo.tk/nwan_1.3i_all_luci1.0.ipk

"Create multiple WAN Ports" and "N-wan" in Network options after installation is complete

Settings for 6.2 N-wan

6.2.1 Multi-WAN port access settings

(1) In the network-interface interface to add Wan2,wan3 ... such as (See the 4.1 Web management interface to set up the network interface), the name is set without special restrictions, can be set according to their preferences. Be careful to set up the firewall zone.

(2) Set up the network connection mode of each WAN port respectively.

(3) in the Nwan setting interface. Outside the network interface, add your WAN port to go in. (Enter the WAN port name and click Add)

(4) The meaning of the route weight is the bandwidth ratio of the interface. If the bandwidth is the same. Can be set to the same number, such as 1:1. And for example, two different bandwidth broadband, one for 2M, one for 6M. The load weight can now be set to 2:6 or 1:3.

(5) The specified export rules are usually removed from the configuration of the tick. Of course you need some special configuration when you can specify, such as PT site Tracker

Server.

6.2.2 Multi-dial settings for single WAN

(1) Click "Create multi-WAN port" to enter the following page

(2) Set the OpenWrt X86 in the red area. If we need to make single-wire multi-dial over the WAN port. The number of times to dial is 5. TICK: "On", "use Macvlan to generate virtual WAN port", the number of virtual WAN port is 5. Click "Save & Apply".

(3) At this point, we can see the new production of the virtual machine WAN port on the Network-interface page

Enter each interface separately to set the network connection mode. Single-line multi-dial, we are usually the user name and password to set up PPPoE. If your network environment allows 5 dial, then each of your interfaces will be on the wave number, and get the IP address separately.

(4) Click the Nwan option to enter the Nwan settings page.

After you set up multiple WAN ports, Nwan is turned on by default. We just need to do a little bit of setup.

A. Set up your own carrier at the external network interface

B. Routing weights are not usually set when single-line multi-dial. can be 1. The meaning of the route weight is the bandwidth ratio of the interface. If the bandwidth phase

With. Can be set to the same number, such as 1:1.

C. The check of the specified export rules is usually removed. Of course you need some special configuration when you can specify, such as PT site Tracker

Server.

Special note: Since Nwan is primarily for OPENWRT development of router versions, not X86. So when creating a virtual multi-wan port, be sure to "generate a virtual WAN from which WAN interface." For example, we have 4 network cards and can set up 4 different WAN ports. In order to be able to use the single-line virtual multi-dial. The names of the four WAN ports should be WAN,WAN100,WAN200,WAN30 0, respectively. Otherwise the Nwan will not be recognized properly, and set to other names such as W1, the creation of multi-Wan port Settings page is also not able to provide a WAN interface named W1 option.

Seven-mount HDD

7.1 Automatically mount USB removable hard drive, USB drive

(1) using SSH login OpenWrt, run the following command.

OPKG Update

opkg Install KMOD-USB-OHCI KMOD-USB2 kmod-usb-storage

opkg Install KMOD-FS-EXT3 ntfs-3g kmod-fs-vfat

Opkg Install Mount-utils

Opkg Install Block-mount fdisk usbutils

(2) login in OpenWrt via WinSCP, enter/etc/hotplug.d/block/. Mail new File 10-mount

Double-click 10mount Edit to enter the following:

#!/bin/sh

# Copyright (C) openwrt.org

(C) OpenWrt.org.cn

blkdev= ' DirName $DEVPATH '

If [' basename $blkdev '! = "block"]; Then

Device= ' basename $DEVPATH '

Case ' $ACTION ' in

Add

Mkdir-p/mnt/$device

# VFAT & ntfs-3g Check

If [' which Fdisk ']; Then

Isntfs= ' Fdisk-l | grep $device | grep NTFS '

isvfat= ' Fdisk-l | grep $device | grep FAT '

Isfuse= ' Lsmod | grep Fuse '

isntfs3g= ' which ntfs-3g '

Else

Fi

isntfs= "" isvfat= ""

# mount with ntfs-3g if possible, else with default mount if ["$isntfs"-A "$isfuse"-A "$isntfs 3g"]; Then

Ntfs-3g-o nls=utf8/dev/$device/mnt/$device elif ["$isvfat"]; Then

Mount-t Vfat-o iocharset=utf8,rw,sync,umask=0000,dmask=0000,fmask=0000/dev/$device

/mnt/$device

Else

Fi

mount/dev/$device/mnt/$device

if [-f/dev/${device}/swapfile]; Then Mkswap/dev/${device}/swapfile swapon/dev/${device}/swapfile

Fi

;;

Remove

if [-f/dev/${device}/swapfile]; Then

Swapoff/dev/${device}/swapfile

Fi

Esac

umount/dev/$device

;;

Fi

10-mount file can also be downloaded here: http://dl.dbank.com/c0jx4o6iky

(3) Run command in SSH console: chmod 777/etc/hotplug.d/block/10-mount

(4) After reboot, USB removable hard disk, USB stick can be mounted automatically. At the same time, a "mount point" option will be added to the system options. You can view the Mount status in the "Mount point" option

7.2 Manually mounting the IDE (SATA) hard drive

With the 7.1 setting, the removable hard drive can be mounted directly, but the IDE hard disk attached to the machine is not mounted automatically and requires simple setup.

In addition: NTFS-formatted hard disk mount has some problems for the recent resolution.

(1) Using Disk utility to format the hard disk as EXT3 format

(2) Enter SSH command line mode

(3) Enter the command fdisk–l, view the disk and partition information related to the machine

(4) Enter Mkdir/mnt/test, where test is the name of the hang point you need to set, you can set it yourself.

(5) Enter Mount/dev/sdb1/mnt/test to mount. Which/dev/sdb1/mnt/test according to your actual situation into

Line settings.

Reference diagram:

(6) Open "System-mount point" and refresh to see the newly mounted hard drive.

(7) Finally, after the mount succeeds, open "system-Startup Item" and add a line to the local startup script

Mount/dev/sdb1/mnt/test for automatic mounting after system startup. (You can also edit the/etc/rc.local file directly)

Share:

OPENWRT X86 Installation Tutorial (not completed)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.