Results 1 to 6 of 6

Thread: How is /tmp created

  1. #1

    How is /tmp created

    Hi,

    Can anyone explain how /tmp is created? I would like to change the harddisk link as it points to the wrong device (I use both a harddisk and a usb stick) but I don't know how to do it (I guess it's some kind of tar archive that's restored every time the device boot).

    /Iceman71

  2. #2
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    can you do this:
    cat /tmp/etc/fstab
    and show the output to us?

    also try switching the usb drive and hdd in different usb ports, it might help

  3. #3
    I've tried to switch USB ports but it doesn't help. Isn't there a way to modify the harddisk link so that it points to the drive and partition that suits a particular user?

    I guess that one way could be to remove the old link and create a new one in one of the post_xxxxx files but I think it would be better to find out the source for how /tmp is generated. I guess it's stored somewhere in the flash memory and extracted to the /tmp ramdisk.

    /Iceman71

  4. #4
    $ cat /tmp/etc/fstab
    # Device Mountpoint FStype Options Dump
    #/dev/discs/disc0/part1 none swap sw 0
    #/dev/discs/disc0/part2 /opt ext3 rw,noatime 1
    #/dev/discs/disc0/part3 /tmp/harddisk ext3 rw,noatime 1

    /dev/discs/disc0/part1 /opt ext3 rw,noatime 1
    /dev/discs/disc1/part1 none swap sw 0
    /dev/discs/disc1/part3 /tmp/harddisk ext3 rw,noatime 1

  5. #5
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Iceman71 View Post
    $ cat /tmp/etc/fstab
    # Device Mountpoint FStype Options Dump
    #/dev/discs/disc0/part1 none swap sw 0
    #/dev/discs/disc0/part2 /opt ext3 rw,noatime 1
    #/dev/discs/disc0/part3 /tmp/harddisk ext3 rw,noatime 1

    /dev/discs/disc0/part1 /opt ext3 rw,noatime 1
    /dev/discs/disc1/part1 none swap sw 0
    /dev/discs/disc1/part3 /tmp/harddisk ext3 rw,noatime 1
    ah, here you go
    you mount /tmp/harddisk on the second disc found by your router
    In this case I think thats your usb stick...
    you also placed the swap on ur usb stick, I''m not sure how long it'll hold that, for some reason it breaks after a while

    so I suggest you edit the fstab and do it like this:
    /dev/discs/disc0/part1 /opt ext3 rw,noatime 1
    /dev/discs/disc1/part1 none swap sw 0
    /dev/discs/disc0/part3 /tmp/harddisk ext3 rw,noatime 1
    I've made it bold what is changed

    then save everything and reboot:
    flashfs save && flashfs commit && flashfs enable && reboot
    does that change something?

  6. #6
    > In this case I think thats your usb stick...
    No, it's the harddisk.

    > you also placed the swap on ur usb stick, I''m not sure how long it'll hold
    > that, for some reason it breaks after a while
    It wouldn't be a good idea to constantly write to flash memory because, as you say, it breaks after a certain number of write operations. That's something I'm well aware of , but in this case the swap is on the harddisk.

    BTW: Yesterday when I retrieved the fstab information I discovered that the link /tmp/harddisk wasn't there. I have temporarily disconnected the harddisk as I need it for another purpose at home (/opt is the most important mount which is always available on the dedicated usb stick) and that apparently affected this link. That brings me back to my original question: How is the ramdisk /tmp (which includes the link harddisk) created by the firmware?

Similar Threads

  1. Replies: 300
    Last Post: 02-04-2011, 16:24
  2. Replies: 3
    Last Post: 06-01-2008, 21:56
  3. Как переместить /tmp из ramfs на USB HDD?
    By s0Va in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 7
    Last Post: 04-11-2007, 16:51
  4. question about wl700gE booting (and passwd file)
    By MoD in forum WL-700g Firmware Discussion
    Replies: 4
    Last Post: 30-10-2006, 05:56

Posting Permissions

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