Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Upgrading OpenWRT to Barrier Breaker 14.07, and getting opkg to work again ...

  1. Home

By Khalid on 2014/10/07 - 20:19, last updated 2022/11/16 - 15:15

Now that OpenWRT has released a new stable version: Barrier Breaker 14.07, it was time to upgrade my D-Link DIR-835 router running snapshots to it.

Do do this, I first did the following:

1. Save a list of the packages, using the command:

opkg list-installed

Then using some scripting on the output to ignore the version numbers.

2. Updating the /etc/sysupgrade.conf file to look like this:

/etc/rc.local
/etc/syslog-ng.conf
/etc/crontabs/
/etc/custom/
/etc/config/

This preserves the above files and directories over the upgrade.

3. I then basically followed the sysupgrade process.

Almost everything came up. The router had LuCI running, WiFi as well as DNS and DHCP came up normally.

Getting opkg to work again with Barrier Breaker

The only glitch was that opkg would refuse to install the packages I had working before the upgrade. This is because the packages were split into categories.

To get this working again, I changed the /etc/opkg.conf file to look like this:

src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

I then issued the command:

opkg update

Followed by installing the packages from the list I created above.

All packages were found and are working fine, including USB storage, LEDs, curl, ncurses, htop, iftop, ...etc. The only packages that are so far not available, are: syslog-ng3, file, and dstat.

Syslog-NG Alternative

To work around the fact that syslog-ng3 is not available, I used the built in logging feature, as follows:

This assumes that you already have USB storage working, as we detailed in this article.

Then you need to change the file /etc/config/system, and add the following under the 'config system' stanza:

config system
        ...
        option log_size '4096'
        option log_type 'file'
        option log_file '/mnt/usb/logs/syslog.log'

Then restart the logging:

/etc/init.d/log restart

Also add the above line to /etc/rc.local, right before the 'exit 0' line.

This will create a daily log file, that gets rotated at 7:23 am every day.

If you want to keep longer, then you can implement a cron script to append the previous day's log to a log file with the year and month in its file name.

I use the following script:

#!/bin/sh

DIR=/mnt/usb1/logs
OLD_LOG=$DIR/syslog.log.old
# The hour that this script will run in
# This must be the after the daily log rotation at 7:23
HOUR=09

if [ `date +%H` != "$HOUR" ]; then
  # We are not at the specified hour
  exit
fi

# Now get the year and month of the previous month
YEAR_MONTH=`date +%Y-%m`

# Stop the log temporarily
/etc/init.d/log stop

# Append the contents of the rotated log to the year-month log
cat $OLD_LOG >> $DIR/syslog-$YEAR_MONTH.log

# Remove the old log
rm $OLD_LOG

/etc/init.d/log start

Add the above to crontab as follows:

30 9 * * * /etc/custom/logrotate.sh
Contents: 
Linux
Tags: 
Router
OpenWRT
  • Add comment

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.