PDA

Bekijk de volledige versie : How is /tmp created



Iceman71
11-08-2008, 21:20
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

wpte
11-08-2008, 22:33
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:rolleyes:

Iceman71
12-08-2008, 07:18
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

Iceman71
12-08-2008, 20:41
$ 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

wpte
12-08-2008, 23:36
$ 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?:D

Iceman71
13-08-2008, 09:41
> 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? :confused: