Modifying Ramdisk

This hack consists of modifying the firmware ramdisk file of your SE208BW

Since the SE208BW uses a ramdisk as a hard disk, all changes that you have made to it's firmware are lost when it is turned off.

With this hack, you can modify the firmware file that is loaded to the flash memory, and from there, to the ramdisk.

Method 1.

Requirements:

1. Your SE208BW

2. A linux PC.

Steps:

1. Download the latest firmware for your device at

http://www.tsstodd.com/eng/firmware/fwdownload/

2. Extract the .tar.gz file in an accessible folder (your desktop for example)

3. Then, extract the rd.gz file that is inside the extracted folder to another or the same folder.

4. Open up terminal and type:

sudo su -

mkdir /mnt/ram

mount-o loop /path/to/extracted/folder/rd /mnt/ram

5.Open as root in your file manager /mnt/rd and modify away! Just don't forget to set the right permissions to executable files (755 or 777)!

6. When done, open terminal and type

sudo su -

sync

sync

umount /mnt/rd

gzip -9 rd

tar -czf My_firmware.tar.gz ImageInfo rd.gz zImage

7. Turn on your SE208BW, connect your pc to the SE208BW's wifi. Then open up your browser and go to your SE208BW's ip address (can usually be found by going into wifi connection info. The SE208BW's address is the first three numbers of the current device's ip address plus a 1 instead of the final number. Example: 192.168.208.3 is the ip adress of my phone, 192.168.208.1 is the SE208BW's ip adress.)

8. Type your password, if have one, if you haven't just click login without typing in a password.

9. Go to Mainteinance>Firmware Upgrade (see image).

10. Go to manual upgrade and click on select image. When prompted, select your modified firmware tar.gz file.

11. Click on Upgrade and wait until it finshes upgrading. It might take up to ten minutes.

Method 2

Requirements

1. Your SE208BW

2. A phone or a tablet.

3. A USB drive.

Steps:

1. Download the latest firmware for your device at

http://www.tsstodd.com/eng/firmware/fwdownload/

2. Copy the downloaded file to your usb drive by connecting it to your tablet or phone using a USB otg cable or simply by plugging the drive into the SE208BW and uploading the file into the USB drive using the SE208BW's samba or FTP server.

3. Telnet into your SE208BW and type:

cd /mnt/usbs

tar -xzf name of downloaded firmware

gunzip rd.gz

mkdir ram

mount -o loop rd ram

4. By typing the above commands you have extracted the ramdisk file from the firmware and you have mounted it as loop in the USB drive into the folder "ram". Now you can modify whatever file you want from the terminal. You can't do so using samba or FTP due to permissions issues. I suggest that you copy the files you want to modify on your device using samba or FTP server, modify them in your device, reupload them into the root of the USB drive and copy them back to the ram folder using cp on your telnet client.

Or, if you want to edit some system settings that can be edited only from terminal you can chroot into "ram" folder by typing the following commands in telnet (if you are using the SuperHub firmware):

chroot /mnt/usbs/ram /bin/ash

Then type the commands you want. When you have finished type:

exit

rm /mnt/usbs/ram/root/.*history

rm -Rf /mnt/usbs/ram/tmp/*

If you aren't using the SuperHub firmware then first download the aboriginal root filesystem at this url: http://landley.net/aboriginal/downloads/binaries/root-filesystem/root-filesystem-armv4l.tar.bz2, then move it into the root of a ext2 or ext3 USB drive and extract it with the following commands:

cd /mnt/usbs

tar -xjf root-filesystem-armv4l.tar.bz2

Then type in telnet the following commands.

export PATH=/mnt/usbs/root-filesystem-armv4l/usr/sbin:$PATH

chroot /mnt/usbs/ram /bin/ash

Then type the commands you want. When you have finished type:

exit

rm /mnt/usbs/ram/root/.*history

rm -Rf /mnt/usbs/ram/tmp/*

5. When you have finished modifying the ramdisk you can repack your firmware by typing these commands in telnet:

sync

sync

cd /mnt/usbs

umount ram

gzip rd

tar -zcvf 208bwfw.tar.gz ImageInfo zImage rd.gz

mkdir se208bwfwupdir

cp 208bwfw.tar.gz se208bwfwupdir

reboot

6. Wait until your SE208BW reboots and installs modified firmware.

Note:

The SE208BW won't accept a firmware file if you have added too many files in the rd.gz file. It is important that the rd.gz firmware file is not larger than 13 megabytes. If it is larger, instead of using the gzip rd command the firmware file must be compressed using a pc or a phone with maximum compression ratio or delete some unneeded files. On a Android phone or tablet I suggest that you use Zarchiver with ultra compression ratio.

Tip:

If for some reason installation seems stuck resist the temptation of pulling the plug out of your SE208BW because it might in 75% of cases brick your device. If you do pull the plug out of your SE208BW and you bricked it than you will have to fix it using this guide;

Brick recovery

Of course, if the SE208BW is still upgrading after two hours you should definitely power cycle your SE208BW.

Warning:

If you break something in the rd file, you may brick your device. If so happens you can fix it by following this guide:

Brick recovery

Enjoy your modified SE208BW!

P.s. I'm very interested in this hack. If you have modified your ramdisk, could you please Contact me and share your hack with me? Thanks.