DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2006-09-30 00:25:05

gmckenzi
Member
Registered: 2006-09-29
Posts: 6

busybox on / versus /mnt/HD_a2?

Hi,

I'm not familiar enough with the bootup process of the G600.  I see that there is a busybox binary in /bin, and I assume that executable lives in the ramdisk by way of the root originating from the ramdisk right? 

After fun_plugging a G600 and putting a new busybox on /mnt/HD_a2, some of the commands originating from the fun_plug get symlinked to the /mnt/HD_a2, and some of the original commands in /bin remain symlinked to the busybox executable in /bin.  Is this arrangement desirable and are there any conflicts?

For instance, after creating a new use through the G600 web interface, I see that by default it assigns /bin/sh as the user's shell.  If I attempt to telnet login as that new user, I can successfully login, but never get a shell prompt -- it hangs.  I'm not sure why sh won't run.

Should I, in my fun_plug, go the effort of symlinking all /bin commands over to my /mnt/HD_a2 busybox?

Is the contents of / rebuilt from the firmware on every reboot?  I don't support, short of building new firmware, that there is any easy way to put a new busybox in the /bin and replace the one that is there by default?

Gavin.

Offline

 

#2 2006-09-30 10:42:48

BertrandB
Member
From: Dijon (France)
Registered: 2006-09-16
Posts: 119
Website

Re: busybox on / versus /mnt/HD_a2?

gmckenzi wrote:

Hi,

Is the contents of / rebuilt from the firmware on every reboot?  I don't support, short of building new firmware, that there is any easy way to put a new busybox in the /bin and replace the one that is there by default?

Gavin.

Yes it is possible (in theory but but i don't recomand it ... unless you know how to connect a serial console on your DSM-G600)

The ramdisk is store in /dev/mtd2 (do a cat /proc/mtd)
It's a u-boot image of a gzipped ramdisk
To change any part of the ramdisk you need to complie (or get) the mkimage tool from u-boot

the steps :
a get the initial ramdisk image on your dsmg600
transfert this image on a real linux box
make a copy skeeping the first 64bytes
gunzip this copy
mount this copy gunziped
do what your need on the ramdisk
compress it with gzip
transform the gzied modified ramdisk to an u-boot image with mkimage
put this new image on your dsm-g600
flash it by copying the new image in /dev/mtdblock2
do reboot

BUT REMEMBER if your busybox doesn't work and if you don't know how to put a console on your DSM-G600 it's definitely dead
it's why fun_pluging is cool ....

(more mater in http://dns323.kood.org/forum/t28-Firmwa … -Plug.html and take a lok at ftp://ftp.dlink.com/GPL/dsmg600_revB/)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB