Warning: session_start(): open(/opt/alt/php74/var/lib/php/session/sess_543635515c35b19e5b39da3eefb2dc99, O_RDWR) failed: Disk quota exceeded (122) in /home/bdoldco1/itsupport.com.bd/wp-content/plugins/WPQA/functions/actions.php on line 23

Warning: session_start(): Failed to read session data: files (path: /opt/alt/php74/var/lib/php/session) in /home/bdoldco1/itsupport.com.bd/wp-content/plugins/WPQA/functions/actions.php on line 23

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_nlist() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: ftp_pwd() expects parameter 1 to be resource, null given in /home/bdoldco1/itsupport.com.bd/wp-admin/includes/class-wp-filesystem-ftpext.php on line 230

Warning: session_start(): open(/opt/alt/php74/var/lib/php/session/sess_543635515c35b19e5b39da3eefb2dc99, O_RDWR) failed: Disk quota exceeded (122) in /home/bdoldco1/itsupport.com.bd/wp-content/plugins/easy-appointments/src/frontend.php on line 73

Warning: session_start(): Failed to read session data: files (path: /opt/alt/php74/var/lib/php/session) in /home/bdoldco1/itsupport.com.bd/wp-content/plugins/easy-appointments/src/frontend.php on line 73
How Can I Use a USB External Drive in My OpenWRT Router as Software Installation Storage? - IT Support BD

Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In
Continue with Facebook
Continue with Google
or use

Browse


Have an account? Sign In Now

Sign In

Login to our ITSupportBD questions & Answers Engine to ask questions answer people’s questions & connect with other IT people.

Sign Up Here
Continue with Facebook
Continue with Google
or use


Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

You must login to ask a question.

Continue with Facebook
Continue with Google
or use


Forgot Password?

Need An Account, Sign Up Here

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the post.

Please choose the appropriate section so your post can be easily searched.

Please choose suitable Keywords Ex: post, video.

Browse

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

IT Support BD Logo IT Support BD Logo
Sign InSign Up

IT Support BD

IT Support BD Navigation

  • Home
  • Blog
  • Download
  • Support Hour Booking
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Terms and Conditions
  • Privacy Policy
  • Cookie Policy
Home/ Questions/Q 9738
In Process

IT Support BD Latest Questions

Asked: April 13, 20252025-04-13T10:03:14+06:00 2025-04-13T10:03:14+06:00In: Router

How Can I Use a USB External Drive in My OpenWRT Router as Software Installation Storage?

Anonymous
Anonymous
How Can I Use a USB External Drive in My OpenWRT Router as Software Installation Storage?

💡 How Can I Use a USB External Drive in My OpenWRT Router as Software Installation Storage?

I run OpenWRT on a router with limited internal storage, and using a USB external drive (like an SSD or flash drive) as the main software installation path can be a lifesaver. I like to guide us through using Extroot to mount external storage for installing packages and storing data — even after a reboot.

usb external drive in my openwrt
1
  • 1
  • 1
  • 1 1 Answer
  • 421 Views
  • 1 Follower
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Facebook
    Continue with Google
    or use


    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Facebook
    Continue with Google

    1 Answer

    • Voted
    • Oldest
    • Recent
    • Random
    1. admin
      admin IT Partner
      2025-04-13T10:05:20+06:00Added an answer on April 13, 2025 at 10:05 am

      If you’re running OpenWRT on a router with limited internal storage, using a USB external drive (like an SSD or flash drive) as the main software installation path can be a lifesaver. This guide walks you through using Extroot to mount external storage for installing packages and storing data — even after a reboot.


      ✅ Step-by-Step: Setting Up USB Drive as Software Storage on OpenWRT


      🔄 1. Update the Package List

      Before doing anything, log in to your router via SSH (using tools like PuTTY or Terminal), and update the available package list:

      opkg update
      

      📦 2. Install Required USB and Filesystem Support Packages

      Since OpenWRT often resets packages on reboot, make sure to (re)install all required packages:

      opkg install block-mount kmod-fs-ext4 kmod-usb-storage kmod-usb-storage-uas
      opkg install fdisk
      

      🔍 3. Check If Your USB Drive Is Detected

      Run the following commands:

      lsblk
      block info
      

      You should see something like /dev/sda1 (for swap) and /dev/sda2 (main storage). If you don’t, try unplugging and replugging the drive.


      💽 4. Format the Drive (If Needed)

      If /dev/sda2 isn’t formatted properly, format it with ext4:

      mkfs.ext4 /dev/sda2
      

      ⚠️ Warning: This will erase all existing data on /dev/sda2.


      📁 5. Mount the USB Drive Manually

      Create a directory and mount the drive:

      mkdir -p /mnt/sda2
      mount -t ext4 /dev/sda2 /mnt/sda2
      

      Now verify it:

      df -h
      

      You should see /dev/sda2 mounted on /mnt/sda2.


      📤 6. Copy Existing System Data to the SSD

      Copy the overlay data to your SSD:

      tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xvf -
      

      This step ensures that your system data moves to the SSD.


      ⚙️ 7. Configure Extroot in /etc/config/fstab

      Tell OpenWRT to use the USB SSD as the overlay (installation path) on boot:

      uci set fstab.@global[0].anon_mount='0'
      uci set fstab.@global[0].auto_mount='1'
      uci set fstab.@global[0].auto_swap='1'
      
      uci set fstab.@mount[0]=mount
      uci set fstab.@mount[0].target='/overlay'
      uci set fstab.@mount[0].device='/dev/sda2'
      uci set fstab.@mount[0].fstype='ext4'
      uci set fstab.@mount[0].options='rw,sync'
      uci set fstab.@mount[0].enabled='1'
      
      uci set fstab.@swap[0]=swap
      uci set fstab.@swap[0].device='/dev/sda1'
      uci set fstab.@swap[0].enabled='1'
      
      uci commit fstab
      

      🔁 8. Reboot and Verify

      Now, reboot your router:

      reboot
      

      After the reboot, run:

      df -h
      

      You should now see /overlay mounted on /dev/sda2 — congratulations, your OpenWRT router is now using the USB drive as the main storage!


      👨‍🔧 Final Tips

      • Make sure your drive stays plugged in all the time.
      • If the router fails to boot properly, remove the USB and reboot.
      • Using a quality SSD or high-speed USB drive helps with performance and longevity.

      Got questions? Drop them in the comments or reach out to us at ITSupport.com.bd — we’re always happy to help!

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Sidebar

    Ask A Question

    Stats

    • Questions 162
    • Answers 164
    • Best Answers 79
    • Users 17k
    • Popular
    • Answers
    • Jaylon S

      When I turn my Pc in a Server with Ehcp ...

      • 5 Answers
    • Abak

      ক্রিপ্টোকারেন্সি কি?

      • 4 Answers
    • admin

      Which is the first website of Bangladesh?

      • 3 Answers
    • admin
      admin added an answer If you're running OpenWRT on a router with limited internal… April 13, 2025 at 10:05 am
    • Support
      Support added an answer 10 Best Methods on How to Use IDM for Torrent… November 14, 2024 at 1:27 pm
    • admin
      admin added an answer When choosing a printer for book printing in Dubai, consider… October 30, 2024 at 3:31 pm

    Related Questions

    • Mikrotik hAP ac2 এই রাউটার দিয়ে কি ২০০ এমবিপিএস ...

      • 2 Answers
    • ওয়াইফাইয়ের গতি বাড়ানোর উপায় কি?

      • 1 Answer

    Top Members

    admin

    admin

    • 14 Questions
    • 1k Points
    IT Partner
    Arif

    Arif

    • 35 Questions
    • 790 Points
    IT Moderator
    Support

    Support

    • 29 Questions
    • 477 Points
    IT Senior Coordinator

    Trending Tags

    bd movie 365 computer custom pvc patches custom rom hosting mobile nas network online movies online pvc patches uk os pvc patches question server sim storage website windows 11 wordpress xrp price prediction

    Explore

    • Home
    • Add group
    • Groups page
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges
    • Users
    • Help
    • Shop

    Footer

    IT Support BD

    We hope you enjoy our blog as much as We enjoy offering them to you. If you have any questions or comments, please don't hesitate to contact us.

    About Us

    • Meet The Team
    • Blog
    • About Us
    • Contact Us

    Legal Stuff

    • Terms and Conditions
    • Privacy Policy
    • Cookie Policy

    Help

    • Knowledge Base
    • Support

    Follow

    © 2018-2025 IT Support BD. All Rights Reserved

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.