Results 1 to 5 of 5
hi, sorry if this question has already been answered, could not find it.
i'm attempting to redirect the /tmp directory to a partition outside my savefile.
using
Code:
mv /tmp ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-02-2012 #1Just Joined!
- Join Date
- Aug 2011
- Posts
- 10
How To Redirect /tmp Directory
hi, sorry if this question has already been answered, could not find it.
i'm attempting to redirect the /tmp directory to a partition outside my savefile.
using
i tried this after exiting to a command prompt, but still getting "file in use". Any suggestions?Code:mv /tmp /mnt/new/location/tmp ln -s /mnt/new/location/tmp /tmp
thanks
-----------------
update:
/root/Startup/README.txt says:to execute something at bootup and prior to X desktop loading, edit /etc/rc.d/rc.local
so, i put the commands into rc.local. I believe it did not work
suggestions welcomed!
---------
Saluki puppy Linux on Asus pcLast edited by johnywhy; 07-02-2012 at 05:31 AM.
- 07-02-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
there has to be a /tmp directory, you can't move it (or if you can, you shouldn't). you can copy it, though (if you really care about what is in there), and set the new mount point in /etc/fstab. then reboot. but watch out - the /tmp dir is needed early on in the boot process, so you have to make sure the partition you request for /tmp can get mounted by the system during init.
but maybe what you really want is a tmpfs filesystem for /tmp? that way, nothing gets written to disk, when /tmp is used - it goes to memory instead. faster, and more secure. a lot of newer distros are doing this by default, nowadays.
- 07-02-2012 #3Just Joined!
- Join Date
- Aug 2011
- Posts
- 10
would this be correct?
will this create a tmp directory in sda1?Code:/dev/sda1 /tmp ntfs defaults 0 0
how can I test for that? It's all on the same physical disk. Puppy Linux is configured to auto-mount all partitions, but I don't know how early they get mounted.
Sounds cool! But limited by available ram, correct?Last edited by johnywhy; 07-02-2012 at 07:26 AM.
- 07-02-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
well, the format of that line is technically correct, for the fstab file, but I don't think that is what you really want. Surely your /dev/sda1 is not an otherwise empty partition, right? and if it is your windows partition (on a dual-boot system, e.g.), then you SURELY do not want to use that as your /tmp filesystem. are you trying to make your /tmp dir accessible to both OSs (if dual-boot)?
putting it another way, the line you have in /etc/fstab will attempt to mount the /dev/sda1 partition to the mount point /tmp using the ntfs filesystem. it won't "create" any directories itself, but during the course of the OS doing its thing, various processes will attempt to use the /tmp directory, and will likely complain/barf if the filesystem is NTFS.
the problem surfaced for me when certain filesystems were mounted, but modules upon which they relied were not yet inserted by the Linux init process. in my case it was a USB drive (the filesystem drivers were loaded but the USB storage drivers were not).how can I test for that? It's all on the same physical disk. Puppy Linux is configured to auto-mount all partitions, but I don't know how early they get mounted.
anyway, the best way to test is to just try it, as long as it is not a production machine (and as long as you don't care about hosing your Windows OS if sda1 is really Windows). after you make the change to /etc/fstab, you can boot into runlevel 1 and run mount to see if the /tmp filesystem loaded and if everything is happy. but again, i would not be surprised if you encounter errors if using NTFS - if not at first, then later on (when you least expect it)...
yes. but RAM is cheap! and the nice thing about tmpfs is that it will dynamically resize itself, if it is not big enough, provided that there is enough RAM to allocate!Sounds cool! But limited by available ram, correct?
- 07-13-2012 #5Just Joined!
- Join Date
- Mar 2012
- Posts
- 15
You also could just mount the other partition with
where /dev/sda2 is the new partitionCode:mount /dev/sda2 /tmp


Reply With Quote

