Register
Page 1 of 4 1234 LastLast
Results 1 to 15 of 60

Hybrid View

  1. #1
    Administrator
    Devilfish's Avatar
    Join Date
    Feb 2008
    Location
    /cdk
    Posts
    7,845
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    2,573
    Thanked in
    204 Posts

    Default Editing the read-only parts of an image

    Enigma images are created in such a way that there is a read-only section of the image and read/write section. The /var folder and /tmp folder is the old folders in an image that you can edit. If, for any reason, you want to edit the read-only folders, i.e. /bin, /etc, /lib, /share, etc. this is what you'll need to do.

    First of all, you'll need a linux platform to make your changes. This could be a PC with a linux OS, i.e. Ubuntu, or you could have a program called VMWare which is a virtual machine that allows you to run a different OS from within an existing OS. It's up to you which one you choose and I will not go into setting it up in this thread.

    Telnet to the dreambox...
    username: root
    password: dreambox

    Follow these commands...

    Code:
     mkdir /var/tmp/root
    Code:
     mount -t squashfs -o ro /dev/mtdblock/5 /var/tmp/root
    Code:
     cd /var/tmp
    Code:
     tar -cf root.tar root
    FTP the root.tar to your linux desktop and open a terminal.
    Code:
    cd Desktop
    Code:
     tar -xf root.tar
    Leave the terminal window open.

    Treat the root folder on the desktop as the box itself but don't add or change anything in /var because that is a different location.

    When you have finished go back to the terminal window and...

    Code:
     ./mksquashfs root mtd5.img -be
    Then ftp the mtd5.img back to the box. You will need a copy of mksquashfs on the Desktop to be able to perform this command.

    Telnet back to the box and...

    Code:
     cd /tmp && eraseall /dev/mtd/5 && cp mtd5.img /dev/mtd/5 && reboot
    Done.

    To check what mtd# ...
    Code:
    more /proc/mtd
    ...but most squashfs are mtd5.

    Njoy!
    Last edited by Devilfish; 27th December, 2008 at 05:02 AM.
    Get Digital Kaos on your Apple or Android device with Tapatalk

  2. #2
    Newbie
    Join Date
    Aug 2008
    Posts
    4
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    is there anyway to do this from a Pc running on windows

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    27
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    is there anyway to do this from a Pc running on windows
    No, but you can install a virtual linux machine, using e.g. vmware, and do it from there. It's fairly easy to set up, and there's plenty of guides on the interweb.

  4. #4
    Member
    Join Date
    May 2008
    Posts
    74
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    can anyone please tell me if this method works? I have tested so many times but not working. I have done and follow devilfish's instruction. I am able to produce mtd5.img but when I flash back to the box, the box dont work at all. Can someone please advise me?

    Thanks

  5. #5
    Top Poster
    Join Date
    May 2008
    Posts
    117
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    will this method work for neutrino on the dbox as well?

  6. #6
    V.I.P. Member
    Join Date
    Jul 2008
    Posts
    109
    Thanks Thanks Given 
    9
    Thanks Thanks Received 
    10
    Thanked in
    3 Posts

    Default

    Quote Originally Posted by ronlkh View Post
    can anyone please tell me if this method works? I have tested so many times but not working. I have done and follow devilfish's instruction. I am able to produce mtd5.img but when I flash back to the box, the box dont work at all. Can someone please advise me?

    Thanks
    Yes of course it works - This is the exact method I used to make the moddified jade image I posted in here.

  7. #7
    Member
    Join Date
    May 2008
    Posts
    74
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    must I umount the root and delete the root.tar before I flash the new mtd5.img?

    Thanks

  8. #8
    Member
    Join Date
    May 2008
    Posts
    74
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    What I am running is vmware + ubuntu 8.04.

    First I telnet to the dm500 from ubuntu terminal
    then I make directory
    root@dm500 ~ #mkdir /var/tmp/root
    root@dm500 ~ #mount -t squashfs -o ro /dev/mtdblock/5 /var/tmp/root
    root@dm500 ~#cd /var/tmp
    root@dm500 /tmp #tar -cf root.tar root
    root@dm500 /tmp #
    then I open another terminal to ftp to dm500
    root@ubuntu8041:/home/user/Desktop# ftp 192.168.0.112
    Connected to 192.168.0.112.
    220 Welcome to the PLi dreambox FTP server
    Name (192.168.0.112:user): root
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> cd /tmp
    250 Directory successfully changed.
    ftp> get root.tar
    ftp>bye
    root@ubuntu8041:/home/user/Desktop# tar -xf root.tar
    root@ubuntu8041:/home/user/Desktop# ./mksquashfs root mtd5.img
    I mksquashfs back the original root and a new mtd5.img is created.
    then I ftp back to dm500
    root@ubuntu8041:/home/user/Desktop# ftp 192.168.0.112
    Connected to 192.168.0.112.
    220 Welcome to the PLi dreambox FTP server
    Name (192.168.0.112:user): root
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> cd /tmp
    250 Directory successfully changed.
    ftp> put mtd5.img
    ftp>bye
    exit back to Desktop and telnet back to the box
    i change the directory to /tmp
    root@ubuntu8041:/home/user/Desktop# telnet 192.168.0.112
    Trying 192.168.0.112...
    Connected to 192.168.0.112.
    Escape character is '^]'.

    PLi dm500 Jade 20080718 (based on 1.09)
    welcome on your dreambox! - Kernel 2.6.9 (13:08:41).
    dm500 login: root
    Password:


    BusyBox v1.01 (2008.07.11-10:44+0000) Built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    root@dm500 ~ # cd /tmp && eraseall /dev/mtd/5 && cp mtd5.img /dev/mtd/5 && reboot

    after image flashed dm500 reboot but dm500 is dead

    I did not umount the root directory in the /var/tmp nor I have deleted the root.tar

    Have I done anything wrong?

  9. #9
    Administrator
    Devilfish's Avatar
    Join Date
    Feb 2008
    Location
    /cdk
    Posts
    7,845
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    2,573
    Thanked in
    204 Posts

    Default

    On a working image, do a 'more /proc/mtd' in telnet and see what it says.
    Get Digital Kaos on your Apple or Android device with Tapatalk

  10. #10
    Member
    Join Date
    May 2008
    Posts
    74
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi Devilfish,
    What I got is :-

    root@dm500 ~ # more /proc/mtd
    dev: size erasesize name
    mtd0: 00600000 00020000 "DreamBOX cramfs+squashfs"
    mtd1: 001c0000 00020000 "DreamBOX jffs2"
    mtd2: 00040000 00020000 "DreamBOX OpenBIOS"
    mtd3: 007c0000 00020000 "DreamBOX (w/o bootloader)"
    mtd4: 00800000 00020000 "DreamBOX (w/ bootloader)"
    mtd5: 004e0000 00020000 "DreamBOX SquashedFS"
    mtd6: 00120000 00020000 "DreamBOX Cramfs"

    thanks

  11. #11
    Administrator
    Devilfish's Avatar
    Join Date
    Feb 2008
    Location
    /cdk
    Posts
    7,845
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    2,573
    Thanked in
    204 Posts

    Default

    That looks right, was just checking that the squashfs part was indeed mtd5. Not sure what else to suggest. Maybe try a totally different image.
    Get Digital Kaos on your Apple or Android device with Tapatalk

  12. #12
    Newbie
    Join Date
    Sep 2008
    Posts
    1
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hello there! I've just found this forum and have to say that i'm impress with it

    Continuing with the thread, I'm having the same problem as ronlkh here. I followed the steps explained by Devilfish except from the part of using a mksquashfs binnary copied on the Desktop. I used the mksquashfs binnary from ubuntu instead. Then, after rebooting, the dreambox does not respond and i get a black screen...

    I've read that squashfs-lzm is used for building most of the dreambox images, shouldn't will be using that program? Thanks in advance!

  13. #13
    Newbie
    Join Date
    Jan 2009
    Posts
    12
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    @Devilfish hi
    maybe this cause the problem? to get it works?

    Code:
    root@dreambox:/tmp> tar -cf root.tar root       
    tar: Names longer than 100 chars not supported
    tar: Names longer than 100 chars not supported. 
    tar: Names longer than 100 chars not supported.
    br

  14. #14
    Newbie
    Join Date
    Jan 2009
    Posts
    13
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Devil: I have some questions.

    1. What is /dev/mtdblock/5? There is also /dev/mtdblock/6 in the rcS file.

    2. If I am going to replace the "bild" file, does that mean i need to apply your method, but instead of mounting /dev/mtdblock/5 in read-only-mode, i shall mount /dev/mtdblock/6 ?

    3. In summary what you did is this:
    • Dreambox: Backup the section you want to edit
    • Dreambox: Transfer the backup file to your linux box
    • Linux Box: Extract the backup file and edit the files
    • Linux Box: Generate the squashfs file and transfer the file to the dreambox
    • Linux Box: Replace the old section with the updated file and reboot the dreambox "How is this going to work? You are still in read-only mode?!! I shall try it first!"




    thnx...
    Last edited by mat989; 19th January, 2009 at 04:49 AM.

  15. #15
    Administrator
    Devilfish's Avatar
    Join Date
    Feb 2008
    Location
    /cdk
    Posts
    7,845
    Thanks Thanks Given 
    71
    Thanks Thanks Received 
    2,573
    Thanked in
    204 Posts

    Default

    If you type more /proc/mtd it will show you the different memory locations on the dreambox.

    mtd5 is the SquashFS section that we want to edit. This is all the folders that you see when you ftp to the box, except /var and /tmp.

    So we extract mtd5 from the box, transfer it to our linux PC, edit it as you like and then recompile it back into an mtd5.img. Transfer the mtd5.img back to the box and flash it again. You are not flashing the complete image, only the mtd5 memory location. So now the complete image on the dreambox should have your edits.

    In the DK images, the bild file is in /bin so you can easily edit it using this method.

    @ajeeb, I completed that command without any problems on my dreambox. (see pic)
    Attached Images Attached Images
    Last edited by Devilfish; 19th January, 2009 at 03:12 PM.
    Get Digital Kaos on your Apple or Android device with Tapatalk

 

 
Page 1 of 4 1234 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.