Skip to main content

[OpenWRT] Instalasi exRoot TPLINK-MR3020

TPLink MR3020 (WhiteBox) yang saya miliki memiliki spesifikasi CPU 400MHz, RAM sebesar 32 MB, dan Flash memory sebesar 4MB (lihat selengkapnya). Memory sebesar 4MB ? mau buat apa? Semua paket - paket yang terunduh akan dimasukkan ke memory tersebut, tentu saja akan membutuhkan space yang lebih besar. Ya memang karena ini adalah sebuah router memang tidak ditujukan untuk keperluan memory besar. Keterbatasan tidak bisanya mengganti memory internal membuat kita harus membuat sebuah memory external untuk minicomputer ini.

Memory External bisa berbentuk USB Flashdisk, MemoryCard didalam CardReader, HardDisk Portable, dsb. Caranya adalah memindah posisi /root yang mulanya berada pada memory internal router, dipindah menjadi berada pada memory external router. Teknik ini dalam openWRT disebut dengan exRoot.
HowTo ?
Caranya cukup mudah, siapkan memory external yang ingin anda pakai, dan siapkan sebuah partisi ext3 atau ext4 pada memory external tersebut. Anda juga bisa membuat partisi swap sebagai tambahan memory virtual pada minicomputer ini.

Setelah siap, pastikan router anda terhubung dengan internet, bisa dengan melakukan ping atau hal lain. Hal ini dikarenakan kita akan mengunduh beberapa library untuk mendukung bekerjanya pengenalan filesystem, maupun usb storage. Tulis perintah dibawah ini
opkg update
opkg install kmod-usb-storage kmod-fs-ext4 block-mount
Jangan khawatir, memory 4 MB (fresh install OpenWRT) tadi masih mampu menampung library yang  akan kita unduh tersebut :)

Colokan memory external dan lakukan perintah ls /dev untuk melihat semua device yang terhubung, jika device anda tidak terhubung, coba lakukan debugging dengan menggunakan dmesg. Carilah device milik anda dengan nama awal sdaX, dimana X adalah nomor dari device anda. Kemudian lakukan mounting seperti biasa
mkdir -p /mnt/sdaX ( jika folder sdaX belum ada )
mount /dev/sdaX /mnt/sdaX ( jika belum dimount, cek dengan df -al )
Sudah berhasil dimount partisinya ? Lanjut ke penyalinan root
mkdir -p /tmp/exroot
mount --bind / /tmp/exroot  ( binding root dengan folder exroot )
tar -C /tmp/exroot -cvf - . | tar -C /mnt/sdaX -xf -   ( mulai kopikan ke external )
Sudah berhasil ? sekarang tinggal aktivasi dari exRoot tersebut setiap startup berjalan.
umount /tmp/exroot    ( sudah selesai copotin dulu )
umount /mnt/sdaX
/etc/init.d/fstab enable   ( simpan agar setiap booting langsung masuk ke external )
/etc/init.d/fstab start
Oke, sekarang tinggal kita setting fstabnya sehingga setiap booting bisa langsung masuk ke external memory. Kita tinggal melakukan pengeditan pada file fstab yang dapat ditemui pada /etc/config/fstab dan edit menggunakan editor bawaan yaitu vi.
vi /etc/config/fstab
Perhatikan dan gantilah baris - baris berikut dengan menekan tombol "i" dan lakukan edit.
option target /home dirubah menjadi option target /option device /dev/sda1 dirubah menjadi option device /dev/sdaX ( X nomor device sda )option enabled 0 dirubah menjadi option enabled 1
Sudah ? jika sudah, anda tinggal pencet tombol Escape dan ketik ":wq" untuk melakukan save file.
Mari kita coba dengan melakukan reboot terhadap perangkat router dan setelah menyala kembali dicek menggunakan df. 

Lihatlah hasil df apakah ada device /sdaX yang otomatis ter-mount ? lihat besarnya ? Lihat ukuran root sekarang berapa ?

GOOD LUCK!

Comments

  1. IMHO sangat berbeda antara android root dengan exroot pada openwrt. Pada OS android root (rooting) mengacu pada proses untuk mendapatkan akses ke super user (biasa di sebut root) sehingga dapat leluasa melakukan modifikasi sistem, sementara exroot pada openwrt lebih pada memindahkan mounting file system dari memori internal yang (biasanya) kecil ke external yang lebih besar.

    ReplyDelete
  2. option target /home dirubah menjadi option target /option device /dev/sda1 dirubah menjadi option device /dev/sdaX ( X nomor device sda )option enabled 0 dirubah menjadi option enabled 1.

    saya agak saru melihat dalam paragraf, bisa di tulis kembali gan dalam bentuk point2. Terimakasih banget atas sharing hasil oprekan dan tulisannnya.

    ReplyDelete
  3. gan setelah saya ketik opkg update kemudian opkg install kmod-usb-storage kmod-fs-ext4 block-mount kok gk bisa di instal gan tulisane can'not install block mount gimana solusinya gan
    mohon pencerahannya

    ReplyDelete

Post a Comment

Popular posts from this blog

HackRF Mayhem Failed to Update - M0 Guru Meditation Hard

I was on Mayhem Portapack v2.0.1 and want to upgrade to the latest stable release v2.1.0. The update went okay using the web upgrade https://hackrf.app/. But then I saw the latest nightly update and want to try it, since it has many new tools that are not yet included in the stable release. But then the update failed :( Disclaimer: I didn't take any photos of the errors, since I was focused on googling the solution. So the error was " Bad Firmware or Failed W/R error" during the upgrade process, and it was stuck. So I had to restart the device, and it was booting to the Mayhem menu, but on the bottom left, which should show the current firmware version, it was showing a  "FLASH ERR"  message. I think I should go back to the stable release, but I can't. Every time I want to flash the stable release version, the portapack will shows an error M0 Guru Meditation - Hard Fault.  There's an issue that was closed on the Mayhem GIT repo that has the same issue a...

Fiberhome HG6145D2 Superadmin Login

Maybe some of you are using In**ehome ISP as your home internet and found out that using the provided login has minimal options to configure the router: user  user1234 I know it’s not the admin login, and that must be a full-control user account that can be used to control this router fully. So I searched and found some posts on the net and most of them are telling me to use: admin %0|F?H@f!berhO3e I tested it and it doesn’t work! But there’s more to it, you need to reset the router first by pressing the reset button on the side of the router. Then after resetting, you can log in using the admin superaccount! But keep in mind, never use the user log in again, because it will lock the super admin login until you reset the router again. Cheers 🍺

Macintosh Classic II Brightness Issue

The Problem My Macintosh Classic II suffers from an issue where the display CRT goes dim after a few minutes on a cold boot. Every time it happens, I need to crank up the cut-off and brightness  pot behind the machine to show the image. The Analyze At first, I thought it must be the brightness issue, so I searched for the Macintosh Classic analog board schematic to check the brightness line. I found the schematic from Bomarc, and the schematic is suitable with my board, since there are two analog board versions.  I started to suspect the resistors and potentiometer on the brightness line. This Macintosh version has software-controlled brightness, so the analog board will get a 22.25 kHz square wave PBM signal from the logic board to control the brightness. I checked and replaced some resistors and cleaned the potentiometer, but nothing seems to work. The signal is there, and no sign of degradation that makes the screen dim after a few minutes.  Brightness Line So I suspec...