www.mamboteam.com
macsat.com - OpenWrt | Olegs Firmware  
Home arrow Wiki (RDC Based Routers)
Saturday, 06 September 2008
 
 
Main Menu
Home
About
News
Tutorials - OpenWrt (WR)
Tutorials - Oleg
Wiki (RDC Based Routers)
Online Shop
Forum
Downloads
Free Linux eBooks
Links
Search
Contact Us
We have 7 guests online
2616569 Visitors
Login
Welcome Guest.






Lost Password?
No account yet? Register
Old macsat.com
Nokia Unlock (Dansk)
Nokia Unlock (English)
XBins IRC Chat

Temporary modifications to the initrd

This Page describes steps to make safe experiments with your NAS. As long as you don’t mess with /dev/mtd0 you probably won’t be able to screw your box ;-)

Browse the initrd

You have to create a partition on the harddisk, or usb-stick with an ext2 filesystem and create a symbolic link to the root folder (/).

ln -s / /mnt/usb/slash

You can now browse the initrd over a smb mount through the created symlink.

Modify the initrd

You can also modify the files in the initrd. Some files, like /bin/busybox cannot be overwritten from the SMB-share. The new file has to be saved under a different name, or in a different folder. To overwrite the old file cp -f, or mv -f on the NAS have to be used. See the next section how to execute them.

Run commands

You can edit /bin/hotplug.sh and enter any commands you want to execute. You can redirect the output to logfiles, so you can read them for troubleshooting. After you plug in or out any usb device the script will get called.

Limitations
  • All changes to the initrd are gone after a poweroff.
  • Some kernels have no pty support, so it is not possible to start any remote shells, which rely on pty pseudo terminal support.

If you know any remote shell which doesn’t need pty support, please update this article!

 
temporary_modifications_to_the_initrd.txt (820983 views) · Last modified: 2007/10/09 15:35 by firetwister
 
Recent changes RSS feed Creative Commons License Donate Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Powered by Joom Prosolution
Buy Router
Linksys WRTSL54GS
Linksys WRTSL54GS
Recent Forum Topics
Donations

If you appriciate this site, please consider making a small donation.

All donations will be used to cover expenses from running macsat.com.

Sponsored Ads
 
Top! Top!