How to use HD only for tempfs? (Slacko 5.6 Full Install)

Booting, installing, newbie
Post Reply
Message
Author
JordanRieger
Posts: 5
Joined: Mon 02 Sep 2013, 21:49

How to use HD only for tempfs? (Slacko 5.6 Full Install)

#1 Post by JordanRieger »

Hello,

I'm new to Puppy and have only basic knowledge of Linux administration. I have successfully setup a full install of Slacko 5.6 to my 160G HD, and it is booting and running (fast!). Problem is I have only 750M free in /tmp, and this is causing issues with Firefox downloads, unpacking LibreOffice, and other things. So I would like to have /tmp just be a regular directory on the HD. (If it's possible to have it stay as a 750M RAM drive but automatically use extra space from swap area, as described in some documentation, that might work for me too. The only thing is that I can foresee /tmp filling up over time for a user that never reboots their machine. I read somewhere that Puppy might periodically wipe it? How often is that, and how can I verify that watchdog is running?) I think it would be easier overall to have it just use a normal HD directory, as the system is relatively fast in Puppy terms: Athlon 64 3500+ 3G RAM, 160G HD.

What config files do I need to edit to make this happen (permanently on every boot)?

Here is some output that might help you help me:

Code: Select all

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       144G  2.5G  135G   2% /
devtmpfs        1.5G     0  1.5G   0% /dev
shmfs           726M     0  726M   0% /dev/shm
tmpfs           726M  726M     0 100% /tmp

# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1491292k,nr_inodes=219581,mode=755)
none on /proc type proc (rw,relatime)
none on /dev/pts type devpts (rw,relatime,gid=2,mode=620)
none on /sys type sysfs (rw,relatime)
shmfs on /dev/shm type tmpfs (rw,relatime,size=742708k)
tmpfs on /tmp type tmpfs (rw,relatime,size=742708k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

# cat /etc/fstab
/dev/sda1     /            ext4     defaults               0 1
none          /proc        proc     defaults               0 0
none          /sys         sysfs    defaults               0 0
none          /dev/pts     devpts   gid=2,mode=620         0 0
/dev/fd0      /mnt/floppy  auto     noauto,rw              0 0

Thanks!

Jordan Rieger

User avatar
Galbi
Posts: 1098
Joined: Wed 21 Sep 2011, 22:32
Location: Bs.As. - Argentina.

#2 Post by Galbi »

Hi, Jordan. Welcome.

Why are you so sure that those issues are due to /tmp lack of space?

I always used Puppy frugally installed, but never had to deal with /tmp.

Please can you start the problematic app from a console and post here if appears some error.

Bye.

JordanRieger
Posts: 5
Joined: Mon 02 Sep 2013, 21:49

#3 Post by JordanRieger »

Firefox seems to want to download to /tmp by default, and it runs out of space really quickly.

And using the GetLibreOffice script, "extracting to RAM" fails because the compressed version is already 150M and there is other stuff taking up the rest of the 750M.

So I'm hoping someone can give me steps to move tempfs to my HD as it will be more reliable for a non-frugal install.

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#4 Post by rjbrewer »

JordanRieger wrote:Firefox seems to want to download to /tmp by default, and it runs out of space really quickly.

And using the GetLibreOffice script, "extracting to RAM" fails because the compressed version is already 150M and there is other stuff taking up the rest of the 750M.

So I'm hoping someone can give me steps to move tempfs to my HD as it will be more reliable for a non-frugal install.
Looks like you actually have a "frugal" install with a 750mb
pup-save file.
Try menu-utility-resize personal storage.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#5 Post by Karl Godt »

Hi Jordan !

tmpfs /tmp mount is not a default in puppy running PUPMODE=2 as normal full installation on conventional harddrives .

The tmpfs thing might be the case if it is a SSD HD , so it is PUPMODE=3 that you are running .

The PUPMODE value is written into the important /etc/rc.d/PUPSTATE file .

How much SWAP partition and RAM do you have ?

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#6 Post by rjbrewer »

Karl Godt wrote:Hi Jordan !

tmpfs /tmp mount is not a default in puppy running PUPMODE=2 as normal full installation on conventional harddrives .

The tmpfs thing might be the case if it is a SSD HD , so it is PUPMODE=3 that you are running .

The PUPMODE value is written into the important /etc/rc.d/PUPSTATE file .

How much SWAP partition and RAM do you have ?
The full install on the internal SSD (solid state drive) in my
netbook, is PUPMODE=2; same as a regular full install to hd.

You probably meant "13" not "3"?
That would only apply to frugal.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#7 Post by Karl Godt »

Nope , that should boot with initrd.gz :

Code: Select all

#Unionfs layers setup by this script...
#unionfs layers:            RW (top)      RO1             RO2              PUPMODE
#full install, flash drive: tmpfs         PDEV1                            3
The Puppy installer has several options for installing - most of these I had not the hardware to try out ( and find bugos :wink: ) .

Me has no SSD .

Of course no-one uses the installer to copy an existent partition to a new hard drive .
One would partition , make file systems , mount , copy and run grubconfig to install new MBR bootloader .

:wink:

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#8 Post by rjbrewer »

Karl Godt wrote: PUPMODE
#full install, flash drive: tmpfs PDEV1 3[/code]
The Puppy installer has several options for installing - most of these I had not the hardware to try out ( and find bugos :wink: ) .
A "full" install to a flash drive is not and has never been a Puppy option!

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

JordanRieger
Posts: 5
Joined: Mon 02 Sep 2013, 21:49

#9 Post by JordanRieger »

I confirmed PUPMODE=2 in /etc/rc.d/PUPSTATE. Hence I was unable to use the Resize personal storage file tool.

I have 3G RAM and, according to GParted, 3G swap. But I can't tell if the swap is actually being used. I don't have an SSD, just a 160G HD.

Does anyone know where the tempfs configuration file is?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#10 Post by Karl Godt »

Then we probably need the grub menu.lst lines,
and the output of
# cat /proc/swaps

.

If there is no initrd.gz involved, the only possibility I could think of would be
/etc/rc.d/rc.sysinit
that does all the mounting of /proc, /sys , etcetc .

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

rjbrewer wrote:
Karl Godt wrote: PUPMODE
#full install, flash drive: tmpfs PDEV1 3[/code]
The Puppy installer has several options for installing - most of these I had not the hardware to try out ( and find bugos :wink: ) .
A "full" install to a flash drive is not and has never been a Puppy option!
Attachments
puppyinstaller-ssd.jpg
(50.94 KiB) Downloaded 370 times
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#12 Post by Peterm321 »

JordanRieger, On Mon 02 Sep 2013, 17:59 wrote:
Problem is I have only 750M free in /tmp, and this is causing issues
with Firefox downloads, unpacking LibreOffice, and other things. So
I would like to have /tmp just be a regular directory on the HD. (If
it's possible to have it stay as a 750M RAM drive but automatically
use extra space from swap area, as described in some documentation,
that might work for me too.
I use a ram based tmpfs to store not /tmp but also to remap root via mount --bind to the tmpfs. Though that may mean having to manually copy settings back to the HD if settings are to survive reboot. I am surprised to read the above comment as my 300 M/Byte ramdrive may have an issue with LibreOffice, increasing to 500M/Byte solves the issue. (NB the Windows version of LibreOffice, run via WINE).

Increasing the size of the /tmp tmpfs can be effected by

Code: Select all

mount /tmp -o remount,size=500m

After expanding the ramdrive to 500 MB, LibreOffice can then be copied to it, the usage increase is then reflected in the output of df-FULL -h & df-FULL -i:

Code: Select all

df-FULL -h
 
Filesystem            Size  Used Avail Use% Mounted on

/dev/shm              500M  325M  176M  65% /tmp
/dev/shm              500M  325M  176M  65% /root


df-FULL -i

Filesystem            Inodes   IUsed   IFree IUse% Mounted on

/dev/shm               40960    7797   33163   20% /tmp
/dev/shm               40960    7797   33163   20% /root
I think LibreOffice requires circa 300MB of ram space and 3400 inodes. Perhaps the copying process may use temp files which may use additional transient space and or inodes. If you cant copy LibreOffice to the tmpfs folders it may be worth increasing the number of inodes as well as the tmpfs size if via default setup there are not enough inodes.

On a general point remapping /tmp to a HD might be a good idea for a magnetic based HD, but maybe not a flash based one. Also on a side issue users of Raring and other kernels that support f2fs may want to consider trying f2fs out, I have and am so far quite impressed.

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#13 Post by rjbrewer »

Karl Godt wrote:
rjbrewer wrote:
Karl Godt wrote: PUPMODE
#full install, flash drive: tmpfs PDEV1 3[/code]
The Puppy installer has several options for installing - most of these I had not the hardware to try out ( and find bugos :wink: ) .
A "full" install to a flash drive is not and has never been a Puppy option!
That part of the installer refers to "removable" media.
What you highlighted doesn't.
Try doing a full install to usb drives and see how far you get!

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

JordanRieger
Posts: 5
Joined: Mon 02 Sep 2013, 21:49

#14 Post by JordanRieger »

@Karl Godt:

Code: Select all

# cat /proc/swaps
Filename				Type		Size	Used	Priority
/dev/sda5                               partition	3109884	0	-1
I don't have a initrd.gz file anywhere on my HD (seached with find.)

But in rc.sysinit, I did find the following little nugget:

Code: Select all

#130630 bring back tmpfs on /tmp for full HD installation.
It's the very last changelog in the file, so this must be a recent (and unwelcome, from my point of view) change :)

And here is the relevant code. Do you think I can just remove the lines that mount tmpfs? I will try later tonight when I have time.

Code: Select all

##v2.20 some apps need shm (shared memory) (ex: xfdiff)... 100319 do this always...
FREERAM=`free | grep -o 'Mem: .*' | tr -s ' ' | cut -f 4 -d ' '` #w481 110405
QTRFREERAM=`expr $FREERAM \/ 4`
mkdir -p /dev/shm #120503 if kernel mounts a f.s. on /dev, removes my skeleton /dev
mount -t tmpfs -o size=${QTRFREERAM}k shmfs /dev/shm ;STATUS=$((STATUS+$?))

if [ ! -d /initrd ];then
 #130630 restore tmpfs on /tmp...
 #120717 this is not so good on raspi with only 256MB RAM, but saves flash writes and faster...
 mount -t tmpfs -o size=${QTRFREERAM}k tmpfs /tmp ;STATUS=$((STATUS+$?))
 #120716 /sbin/init needs to know ramdisk size, before /sys mounted...
 [ ! -f /var/local/ram_size_bytes ] && [ -e /sys/block/ram0/size ] && cat /sys/block/ram0/size > /var/local/ram_size_bytes
 #120717 log maximal mount counts, potentially rc.shutdown can then not delete /fsckme.flg...
 #dmesg | grep -o 'EXT[2,3,4]-fs.*running e2fsck is recommended' > /tmp/dmesg_e2fsck_warnings1
 dmesg | grep -o 'EXT[2,3,4]-fs.*maximal mount count reached' > /tmp/dmesg_e2fsck_warnings1
 #example lines:
 #EXT3-fs (sda9): warning: mounting fs with errors, running e2fsck is recommended
 #EXT3-fs (sda10): warning: maximal mount count reached, running e2fsck is recommended
fi

JordanRieger
Posts: 5
Joined: Mon 02 Sep 2013, 21:49

#15 Post by JordanRieger »

I commented out the following line (placed a # at the start of the line, for any newbies reading this thread in the future) in /etc/rc.d/rc.sysinit:

Code: Select all

mount -t tmpfs -o size=${QTRFREERAM}k tmpfs /tmp ;STATUS=$((STATUS+$?)) 
And that seemed to do the trick. No more tempfs mount at /tmp, and I can save whatever I want there, whatever the size, persistently. Thanks everyone, and especially Karl Godt!

This system is going to be sold, or given away, if I can't get any money for it. That's why I wanted something quick and reliable. The original license sticker on the case is for Windows XP, but I couldn't in good conscience install XP, given that MS will cease providing security updates in a few months. And I didn't feel like pirating Windows 7. I tried Linux Mint 15 XFCE and Lubuntu, but both of them had problems with the USB mouse and keyboard freezing within a few seconds of use, as well as poor performance with the integrated nVidia MCP51 GeForce 6150 on this proprietary Gateway motherboard. Being Slackware based, I guess Puppy 5.6 uses a different set of drivers, and everything is much more reliable.

Thanks again,

Jordan Rieger

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#16 Post by mikeb »

t's the very last changelog in the file, so this must be a recent (and unwelcome, from my point of view) change Smile
too right.... Not all computer users sit there gawping at long you tube videos and as the comment says its only supposed to be for usb flash.... Amazing what can be removed from rc.sysinit .:)
The original license sticker on the case is for Windows XP, but I couldn't in good conscience install XP, given that MS will cease providing security updates in a few months.
look at XPlite and Nlite... remove internet explorer / outlook express/ wmp 7+ , anything else you might not feel needed...and most of all windows updates...... then pass the machine on with a good conciense and a reliable, faster , safer XP.

mike

Post Reply