Wednesday, July 26, 2023

Expand storage for Openwrt router

If he router has very low storage, in my case router is DIR-842.

Here is tutorial to expend storage using USB flash drive.

 Original guide is from HERE.


Plug in flash drive into USB port.

Open terminal and excute following commands via SSH.


Step 1: Install the required packages

opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs parted

Step 2: Configure rootfs_data

Configure /etc/config/fstab to mount the rootfs_data in another directory in case you need to access the original root overlay to change your extroot settings:

DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
uci set fstab.rwm="mount"
uci set fstab.rwm.device="${DEVICE}"
uci set fstab.rwm.target="/rwm"
uci commit fstab

Or, you can identify the rootfs_data partition manually, if it is in an MTD partition:

grep -e rootfs_data /proc/mtd

If your rootfs_data is a UBIFS volume, the above will not work. However, the sed command at the start of the section should pick up the correct device.

The /rwm mount will not mount via block until you've already successfully booted into your extroot configuration. This is because block has a restriction to only mount from devices that are not currently mounted. And /rwm should already be mounted at /overlay. Once booted into your extroot, you can edit /rwm/upper/etc/config/fstab to change your extroot configuration (or temporarily disable it) should you ever need to.


Step 3: Configure exroot

First command is to define the DEVICE. B'coz the following command will be using DEVICE instead of /dev/sd*.

Second command is (OPTIONAL!) to format the flashdrive to ext4 format and name it as extroot. 

DEVICE="/dev/sda1"
mkfs.ext4 -L extroot ${DEVICE}


Now we configure the selected partition as new overlay via fstab UCI subsystem:

eval $(block info ${DEVICE} | grep -o -e "UUID=\S*")
uci -q delete fstab.overlay
uci set fstab.overlay="mount"
uci set fstab.overlay.uuid="${UUID}"
uci set fstab.overlay.target="/overlay"
uci commit fstab


Step 4: Transferring data

mount ${DEVICE} /mnt
tar -C /overlay -cvf - . | tar -C /mnt -xf -
reboot


Video tutorial:




Config OpenWRT for UNIFI ISP (Malaysia)

 This tutorial only guide for setup an internet connection. Not for IPTV.


Step 1:

 Login into your Openwrt router.


Step 2: Create VLAN

Navigate to Network =>Swtich. Press add VLAN and type 500 into VLAN ID. Then select "tagged" for CPU and WAN. Press save and apply.


Navigate to to Network => Interface. Press edit on WAN then change to protocol PPPOE and eth0.500 as device. Key in your unifi username and password. Press SAVE and SAVE & APPLY.
Within 1 minutes, you should have your internet connection working. 





Step 3: Incase wifi connected but no internet
Navigate to to Network => Wireless, press edit on wifi adaptor. In the Genenal Setup, select lan and wan as a network. Press save and apply.








How to flash Openwrt firmware into DIR-842 (std UNIFI router)

This tutorial valid for router DIR-842 C1, DIR-842-C2 and DIR-842-C3.

Original source is from HERE. You need to download factory firmware and sysupgrade firmware.

Rename the downloaded files into shortest name eg factory and sysupgrade, or else the flash might have error.


Step 1:

Connect your laptop/pc into lan port and the other side plug into any lan port on router. NOT PLUG INTO WAN PORT! Set laptop/pc ip address to 192.168.0.10, 255.255.255.0

Turn router power off. Then press and hold reset button underneath the router.

Then power on, wait until the led blink about 1 second on 1 send off repetedly.


Step 2 :  How to flash factory firmware:

Go to your web browser and type ip address of the router which is 192.168.0.1.

Press browse and select the downloaded factory firmware and press flash.

The flashing start and countdown timer will display in the browser. Wait until timer completed.

DO NOT POWER OFF OR RESET THE ROUTER!


Step 3 :  How to flash sysupgrade firmware:

Change laptop/pc ip address to 192.168.1.10, 255.255.255.0 and open powershell terminal then execute following command.

scp sysupgrade.bin root@192.168.1.1:/tmp/
ssh root@192.168.1.1
sysupgrade -v /tmp/sysupgrade.bin
ssh root@192.168.1.1
opkg update
opkg install luci
reboot

The below video you show you step by step (good for beginner who is new to OpenWrt)



Monday, March 21, 2022

Cara Setup Transmission Server di Raspberry

 Assalamualaikum dan salam sejahtera. Tujuan saya buat posting ni adalah untuk simpanan peribadi di samping berkongsi ilmu. Setiap kali saya nak setup semula, setiap kali tu lah terpaksa membelek blog & forum forum di internet.

Jadi saya kumpulkan di sini cara-caranya untuk rujukan saya di kemudian hari. Untuk menjalankan Transmission server, ada 3 bab yang diperlukan (saya tidak cover cara nak setup RasPi).

1- Mount external storage pada RasPi

2- Setup transmission 

3- Setup samba


Bab 1: Mount external storage

Oleh kerana sistem Raspi yang saya gunakan ini tanpa GUI, adalah penting untuk kita mount external storage supaya mounting point adalah tetap dan tidak berubah apabila setiap kali reboot.

Setiap device ada unik UUID, jadi saya akan gunakan UUDI device tersebut untuk di daftarkan pada mounting point. Cucuk sahaja external device pada RasPi, kemudian dari terminal taip df -h.

Kemudian akan keluar list storage yang ada di RasPi. Storage yang akan saya gunakan adalah /dev/sdb1


Saya taip pula sudo blkid /dev/sdb1 untuk dapatkan UUID storage tersebut. UUID storage adalah fe5b1c8a-cc66-d701-f048-1c8acc66d701. Copy tanpa " ". Dan jenis storage adalah ext4. Sekiranya storage adalah jenis NTFS atau exFAT, kene install program tambahan untuk baca storage tersebut sudo apt install ntfs-3g atau sudo apt install exfat-fuse .



Langkah seterusnya adalah create folder dalam RasPi OS untuk saya mount external storage  sudo mkdir -p /mnt/NAS1 dah sudo chown -R pi:pi /mnt/NAS1 untuk tukar ownership folder berkenaan. 



Seterusnya saya perlu edit fail fstab untuk daftarkan UUID pada folder /mnt/NAS1 yang saya buat tadi. 
sudo nano /etc/fstab dan tambahkan ayat seperti berikut. Edit UUDI dan TYPE seperti yang saya dapatkan pada langkah sebelum ini. UUID=fe5b1c8a-cc66-d701-f048-1c8acc66d701 /mnt/NAS1 ext4 defaults,auto,users,rw,nofail,noatime 0 0

Kemudian untuk mengaktifkan proses mounting point, taip sudo umount /dev/sdb1 , (ubah sdb1 berdasarkan storage yang digunakan) untuk remove storage dan  sudo mount -a untuk masukkan kembali storage di mounting point yang telah di buat tadi.

Selesai Bab 1.


Bab 2: Setup Transmission

Bab 3: Setup Samba



Monday, March 18, 2019

Alternative drive belt for Yamaha Nouvo S, Nouvo Z, Nouvo MX, Ego, Mio

Bismillah.

It's been a while since scooterist start using this type of belt. It was not meant for scooter.

But, I like alternatif item. So I decide to try it. 

The belt is BANDO 5320. It had narrower width, 17mm and length 785mm.

Orignal drive belt is 18mm width and 828mm length.

Bearings for Yamaha Nouvo S, Nouvo Z, Nouvo MX, Ego, Mio gearbox and wheel

Bismillah. 


Few days ago, my nouvo had a rough sound from rear section. I also can felt abnormal vibration.


I suspect the real wheel bearing had worn out. 

So I decide to replace the wheel bearing. Instead of replacing wheel bearing only, I'll change all bearing inside gearbox as well.


The bearings code as per picture below. I choose bearing with C3 clearance, NTN brand and of course Made In Japan. 


It felt a lot smoother now after replaced all the bearings.


By the way, it's good to replace wheel shaft oil seal together with wheel bearing. Oil seal measurement as below.

Friday, November 23, 2018

Skuter Starter Diagram

Assalamualaikum guys.

Bismillah.  Untuk pengguna skuter, elektrik starter amatlah penting. Kerosakan starter ibarat kerosakan major pada skuter tersebut.


Kalau pengguna skuter yang ade masalah dengar elektrik starter, korang boleh rujuk diagram starter ni. Tak perlu lah tanya kat online @ media social. Bukan semua ade kuasa magik @ ilmu hitam untuk meneka kerosakan pada sistem elektrik starter.


Common problem pada sistem starter ialah:

1- bateri

2- relay starter

3- suis tangan (boleh servis)


Boleh cek 1 persatu part mana yang rosak. Kalau tak tau nak cek, hantar jer kedai. Biar pomen jer yang cek.




Expand storage for Openwrt router

If he router has very low storage, in my case router is DIR-842. Here is tutorial to expend storage using USB flash drive.  Original guide i...