Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
08-06-2014, 07:34 PM
|
#1
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Rep:
|
Can no remove symlinks, Busybox SSH shell
Can no remove symlinks: after rebooting device, symlinks appears again.
BusyBox SSH shell. These symlinks already existed, created by firmware.
Code:
login as: root
cd /nvram/1/security/
ls
ab_cd.cer mk_ehce.cer efg_hr.cer zooe_lsu.bin
download fr_lkoy.bin bkm_lua.bin
ls -la
total 4
drwxr-xr-x 3 root 0 0 Jan 1 00:00 .
drwxr-xr-x 5 root 0 0 Jan 1 00:00 ..
-rwxrwxrwx 1 root 0 905 Jan 1 00:02 ab_cd.cer
drwxr-xr-x 2 root 0 0 Jan 1 00:00 download
lrwxrwxrwx 1 root 0 25 Jan 1 00:00 mk_ehce.cer -> /nvram/fw/bdm/mk_ehce.cer
lrwxrwxrwx 1 root 0 28 Jan 1 00:00 fr_lkoy.bin -> /nvram/fw/bdm/fr_lkoy.bin
-rwxrwxrwx 1 root 0 1052 Jan 1 00:02 efg_hr.cer
-rwxrwxrwx 1 root 0 140 Jan 1 00:02 bkm_lua.bin
lrwxrwxrwx 1 root 0 37 Jan 1 00:00 zooe_lsu.bin -> /etc/docsis/security/zooe_lsu.bin
rm mk_ehce.cer
rm fr_lkoy.bin
cd /nvram/fw/bdm/
ls -la
total 0
drwxr-xr-x 2 root 0 0 Jan 1 00:10 .
drwxr-xr-x 4 root 0 0 Aug 5 2014 ..
cd /nvram/1/security/
ls -la
total 4
drwxr-xr-x 3 root 0 0 Jan 1 00:07 .
drwxr-xr-x 5 root 0 0 Jan 1 00:00 ..
-rwxrwxrwx 1 root 0 905 Jan 1 00:02 ab_cd.cer
drwxr-xr-x 2 root 0 0 Jan 1 00:00 download
-rwxrwxrwx 1 root 0 1052 Jan 1 00:02 efg_hr.cer
-rwxrwxrwx 1 root 0 140 Jan 1 00:02 bkm_lua.bin
lrwxrwxrwx 1 root 0 37 Jan 1 00:00 zooe_lsu.bin -> /etc/docsis/security/zooe_lsu.bin
After rebooting:
cd /nvram/1/security/
ls -la
total 4
drwxr-xr-x 3 root 0 0 Jan 1 00:00 .
drwxr-xr-x 5 root 0 0 Jan 1 00:00 ..
-rwxrwxrwx 1 root 0 905 Jan 1 00:02 ab_cd.cer
drwxr-xr-x 2 root 0 0 Jan 1 00:00 download
lrwxrwxrwx 1 root 0 25 Jan 1 00:00 mk_ehce.cer -> /nvram/fw/bdm/mk_ehce.cer
lrwxrwxrwx 1 root 0 28 Jan 1 00:00 fr_lkoy.bin -> /nvram/fw/bdm/fr_lkoy.bin
-rwxrwxrwx 1 root 0 1052 Jan 1 00:02 efg_hr.cer
-rwxrwxrwx 1 root 0 140 Jan 1 00:02 bkm_lua.bin
lrwxrwxrwx 1 root 0 37 Jan 1 00:00 zooe_lsu.bin -> /etc/docsis/security/zooe_lsu.bin
Last edited by dorsio; 08-06-2014 at 07:49 PM.
|
|
|
08-07-2014, 02:22 PM
|
#2
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
So find what is creating those symlinks..
But.. why are they a problem?
Why do you feel you need to remove them/
|
|
1 members found this post helpful.
|
08-07-2014, 04:17 PM
|
#3
|
Moderator
Registered: Mar 2008
Posts: 22,229
|
My guess is that busybox is a compiled package. You'd have to rebuild it to remove any references.
|
|
|
08-07-2014, 04:52 PM
|
#4
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
They don't look like busybox symlinks
|
|
|
08-07-2014, 04:56 PM
|
#5
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Original Poster
Rep:
|
I think I managed to deal with this issue: this symlinks are actually firmware feature, firmware does not allow to remove or rename them, and file names are predefined. I needed to replace those files (first removing them). When files are properly named, they all are symlinks.
Last edited by dorsio; 08-07-2014 at 05:07 PM.
|
|
|
08-07-2014, 05:54 PM
|
#6
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
You might find that it is some kind of initfs
As an example, an android boot image is the kernel and initfs 'packaged' together
In order to make a permanent adjustment you have to 'unpack', then unpack the initfs,, modify .. recreate initfs and finally repackage
I don't know what your device is..
See if you can work out the boot process
Maybe someone else already has?
|
|
|
08-07-2014, 10:20 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,229
|
This is some kind of modem or router.
|
|
|
08-08-2014, 08:17 AM
|
#8
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Original Poster
Rep:
|
that's cable modem. I have no goal to rewrite the code, I just trying to figure how to replace the files properly. Sometimes I got ready symlinks after uploading new files, sometimes it does not. I have no source code. I can manage boot process via console, and can view file system via SFTP.
|
|
|
08-08-2014, 08:47 AM
|
#9
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
the question is "Why are you trying to modify the symlinks?"
I think if you succeed your cable modem will no longer function correctly
|
|
|
08-08-2014, 11:56 AM
|
#10
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Original Poster
Rep:
|
Quote:
Originally Posted by Firerat
the question is "Why are you trying to modify the symlinks?"
I think if you succeed your cable modem will no longer function correctly
|
I need replace files, that's all. The files intended to be replaceable, I know this. I need to remove old and upload new files. I find that one of the files can not be downoaded. That's strange, is that something related to linux permissions? When I remove files from ssh, I remove only symlinks, not actual files? Where then actual files stored? (as symlinks are restored after reboot).
Last edited by dorsio; 08-08-2014 at 11:59 AM.
|
|
|
08-08-2014, 12:00 PM
|
#11
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
ok, so replace the file which the symlink points to
don't replace
/nvram/1/security/zooe_lsu.bin
instead replace
/etc/docsis/security/zooe_lsu.bin
|
|
|
08-08-2014, 12:32 PM
|
#12
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Original Poster
Rep:
|
To remove files which are symlinks, should I use
rm mk_ehce.cer or
rm /nvram/fw/bdm/mk_ehce.cer?
Last edited by dorsio; 08-08-2014 at 12:34 PM.
|
|
|
08-08-2014, 12:58 PM
|
#13
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
No.
There is no need to remove the symlinks
If you want to change the 'content of a symlink' then change the file the symlink points to
BUT before you go breaking your cable modem , learn the basics first.
As you do not understand what a symlink is I do not believe you are competent enough.,
But hey ... we learn faster from our mistakes .. so feel free to brick that cable modem.
Out of interest, , what is your end goal here (please don't say replace symlinks )
Are you trying to make it faster? More secure?
What is all this effot for?
|
|
|
08-08-2014, 03:38 PM
|
#14
|
Member
Registered: Apr 2014
Distribution: Debian
Posts: 92
Original Poster
Rep:
|
Mainly for testing and researching, for improving it. That's test device. I know what is symlinks. But the Linux isn't what I know well. I flashed device more than once, successfully, and didn't brick it. Removing/replacing symlinks can not brick cable modem.
Last edited by dorsio; 08-08-2014 at 03:39 PM.
|
|
|
08-08-2014, 04:58 PM
|
#15
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
You know this because you removed the symlinks and they reappeared?
You are probably right, no permo-brick, maybe 'soft'brick
If you understand what symlinks are.. why this thread?
Please understand, I don't wish to be combative
I'm not familiar with your device, and your goal is too 'open'
I think you need to seek advice from people experienced with your device
What is the device?
have you searched for forums specifically related to hacking that device?
I've given the answer to your symlink problem, replace the files the symlinks link to.
You say you understand symlinks,
If that is true.. this thread is solved, mark it as such!
|
|
|
All times are GMT -5. The time now is 10:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|