Results 1 to 7 of 7

Thread: /etc file edit

  1. #1
    Member
    Join Date
    Jul 2010
    Location
    Gdynia - Poland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    /etc file edit

    How can I edit files in /etc for example /etc/samba/smb.conf ? ETC is located on read only root filesystem so the problem.

  2. #2
    V.I.P Giga's Avatar
    Join Date
    Feb 2009
    Posts
    4,161
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try with WinSCP
    Code:
    http://winscp.net/eng/index.php
    when you have access with it over ethernet right click on item allows you to change owner properties and has an internal editor to.

  3. #3
    Member
    Join Date
    Jul 2010
    Location
    Gdynia - Poland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The problem is that whole root filesystem is read only. Not particular directory or file. It is included in /etc/fstab:

    # cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    /dev/root / auto defaults,errors=remount-ro 0 0
    proc /proc proc defaults 0 0

    So using winscp, filezilla, telnet console does not solve the problem.

  4. #4
    Member chris217's Avatar
    Join Date
    Apr 2010
    Location
    Southampton
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    One way would be to create a root file system image, mount this (under Linux) using loop back, extract the files, edit to taste, regenerate the image and copy it back into the flash memory. This is a bit tedious and not recommended.

    A possible alternative would be to copy the files from /etc onto another partition (e.g. one created on a USB memory stick) and mount this over the existing /etc. I have not tried this, but the command would be something like: "mount -t ext2 /dev/sdb1 /etc", where the writeable partition is in ext2 format on the first partition of the USB stick. (Using FAT or FAT32 is probably not a good idea for this purpose.) You can create partitions on the USB stick on the receiver using the fdisk command.

  5. #5
    Member
    Join Date
    Jul 2010
    Location
    Gdynia - Poland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am not sure that mounting any type of filesystem to read only filesystem is possible at all. Did You tried it?

  6. #6
    Member chris217's Avatar
    Join Date
    Apr 2010
    Location
    Southampton
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by maciek View Post
    I am not sure that mounting any type of filesystem to read only filesystem is possible at all. Did You tried it?
    /STORAGE/HDD is on the read-only file system and is the mount point for the hard disk. If this were not possible, the system would not be able to mount anything off a read-only root file system.

  7. #7
    Member
    Join Date
    Jul 2010
    Location
    Gdynia - Poland
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    SOLVED!

    First I formated 1 GB USB memory stick in other Linux PC. Then I just copied content of original /etc to rear USB stick and I add new plugin named ETC (with start option as "Auto"/ The plugin is located in /var/bin and the content is:

    CODE

    /var/bin # cat ETC
    mount -t ext2 /dev/sdb /etc

    Now I can edit any config files located in /etc/directory !!!

    We are the champions!!!

Similar Threads

  1. HD recordings - what receiver, file format, can u edit and playback?
    By ManikM in forum HD Satellite Receivers Discussion
    Replies: 4
    Last Post: 15-02-2010, 09:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •