Does puppy write to NTFS system disk without asking?[Solved]
Does puppy write to NTFS system disk without asking?[Solved]
"Unfortunately Puppy requires a swap file or volume while booting; if a linux swap partition is not available it will CREATE a swap file WITHOUT ASKING."
http://www.murga-linux.com/puppy/viewtopic.php?t=36856
I just came across this in an old thread and wondered if it is still true. And if true, where the swap file is created - on the system disk (NTFS in my case) or on the USB drive where the pup save file is located..
http://www.murga-linux.com/puppy/viewtopic.php?t=36856
I just came across this in an old thread and wondered if it is still true. And if true, where the swap file is created - on the system disk (NTFS in my case) or on the USB drive where the pup save file is located..
Last edited by carolus on Sat 08 Jan 2011, 16:01, edited 1 time in total.
- linuxsansdisquedur
- Posts: 248
- Joined: Tue 13 Jan 2009, 21:17
- Location: South of France
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
carolus, You should have read the whole thread.
Barry has stopped creating a swap file automatically, somewhere around the 2.x
So there is no need to worry about it.
Barry has stopped creating a swap file automatically, somewhere around the 2.x
So there is no need to worry about it.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Beem wrote:
Barry has stopped creating a swap file automatically, somewhere around the 2.x
Barry wrote:
Note also, this automatic creation of a swapfile, named 'pupswap.swp', existed in the 'rc.sysinit' script in the Puppy 3.x series (I don't recall about the 2.x series), and I removed it for the 4.x series. Now I have brought it back, but now creating it at the first shutdown.
http://bkhome.org/blog/?viewDetailed=00863
Barry has stopped creating a swap file automatically, somewhere around the 2.x
Barry wrote:
Note also, this automatic creation of a swapfile, named 'pupswap.swp', existed in the 'rc.sysinit' script in the Puppy 3.x series (I don't recall about the 2.x series), and I removed it for the 4.x series. Now I have brought it back, but now creating it at the first shutdown.
http://bkhome.org/blog/?viewDetailed=00863
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
Thanks for the reference.
So indeed on systems with 256MB or less, it is created.
All I can say is to ask Barry to make this an option.
Also I saw a lot of posts from people with 128MB and they didn't have a swap file altho they had a save file. Some had even be persuaded to create one.
But if you create the save file on your ntfs partition, why are you upset about the swap file?
So indeed on systems with 256MB or less, it is created.
All I can say is to ask Barry to make this an option.
Also I saw a lot of posts from people with 128MB and they didn't have a swap file altho they had a save file. Some had even be persuaded to create one.
But if you create the save file on your ntfs partition, why are you upset about the swap file?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
I don't write anything to my NTFS system disk. I only (knowingly) write to a FAT flash drive. For a while I was using a swap file on the flash drive with Puppy 2.16, so I know that can be done. I would have no complaint about an automatic swap file as long as that is where it is placed and not on my NTFS system disk.Béèm wrote:
But if you create the save file on your ntfs partition, why are you upset about the swap file?
When I ran puppy on all the display laptops at the local Best Buy, to find one that played well with puppy, I did not think there was any risk of writing to their hard drives except by blunder. I suppose there was indeed no risk, since no new computer has 256 MB or less. My present computers all have at least 512 MB, and "free" shows no swap memory.
Nevertheless, I think a warning and an option are appropriate before writing to an NTFS file system. Or at least a conspicuous README that describes exactly when this can occur, where the file is created, and whether it is permanent or deleted on poweroff.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
You know now that a wap file can be automatically created when you create a save file.
So if you don't want it to be written to a ntfs partition, don't create your save file on it.
Now if you want some warning, you have to convince Barry Kauler of this.
You can also PM this.
But bear in mind that writing to ntfs is considered save now.
I do write to ntfs on which my windows still is, but only the necessary files to boot from. The partition is not mounted then, which is what I want also.
My save file and swap is on a vfat partition.
I have another ntfs partition, which I use to share data. I have no problems running this.
So if you don't want it to be written to a ntfs partition, don't create your save file on it.
Now if you want some warning, you have to convince Barry Kauler of this.
You can also PM this.
But bear in mind that writing to ntfs is considered save now.
I do write to ntfs on which my windows still is, but only the necessary files to boot from. The partition is not mounted then, which is what I want also.
My save file and swap is on a vfat partition.
I have another ntfs partition, which I use to share data. I have no problems running this.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
I agree with Béèm, that writing to NTFS from Puppy is perfectly safe. I've been sharing a NTFS partition between various versions of Puppy, and Windows XP and 2000 for over 5 years. The only problem I ever had, which may have been caused by Windows (Windows could still tell a deleted file was there but couldn't do anything with it) was quickly fixed by Puppy if I remember right, and no data was lost or corrupted. That happened twice when I first started using Puppy.
That is a lot to infer from what little documentation I have found so far. You mean the automatic swap file is available only after rebooting? Then the swap file must not be necessary to boot puppy, so why make it automatic? If it is only to improve performance on a low-memory system, then make it an option, with a choice of where to put it. I don't understand Barry''s comment "Now I have brought it back, but now creating it at the first shutdown."Béèm wrote:You know now that a swap file can be automatically created when you create a save file. So if you don't want it to be written to a ntfs partition, don't create your save file on it.
My chief concern now is about booting Puppy on someone else's computer. Can I tell them there is no risk? How can I ensure there is no risk?
If I understand correctly, using the "puppy pfix=ram" boot option forces Puppy to load entirely into RAM without looking for save files and the like. Puppy will still look for swap partitions, and will use them if it finds them, but will not create them.
That's my understanding of how the pfix=ram boot option works. Try it on a low-RAM computer to see what happens. I don't have one handy.
That's my understanding of how the pfix=ram boot option works. Try it on a low-RAM computer to see what happens. I don't have one handy.
- linuxsansdisquedur
- Posts: 248
- Joined: Tue 13 Jan 2009, 21:17
- Location: South of France
running pizzapup (with really puppy 2.14 inside ) i find in /etc/rc.sysinit
so serie 2 use after 2.02 seem to use swap file but not to create it...
Code: Select all
if [ "$PUPMODE" = "12" ];then
if [ -f /initrd/mnt/dev_save/pupswap.swp ];then
echo -n "Activating swap file /initrd/mnt/dev_save/pupswap.swp..." >/dev/console
swapon /initrd/mnt/dev_save/pupswap.swp;check_status $?
else
#only create a swap file if no swap partition...
if [ "`free | grep 'Swap:' | tr -s " " | cut -f 3 -d " "`" = "0" ];then
#v2.02final for now, no auto creation of swap on ntfs partition...
if [ ! "`echo -n "$PUPSAVE" | cut -f 1 -d ',' | grep --extended-regexp 'msdos|vfat|ext2|ext3|reiserfs|minix'`" = "" ];then
le max avec le min
In 5.1.1 there is no /etc/rc.sysinit. In init, I don't recognize code that creates a swapfile, only code that detects a swapfile, and grepping on comment lines that contain the word "swap" did not reveal anything. But I'm not very good at reading big scripts, and maybe there are other relevant scripts hidden somewhere.
I'm sure I read recently that a swap file would not be created unless an ext? partition was available?
In Puppy 4 Barry copied the .sfs file to NTFS partitions without asking, unless it was already there. This was only recently removed from his woof system so it no longer applies to anything built from the latest woof (Quirky 1.4, Wary 5, Lucid 5.2 when it appears).
In Puppy 4 Barry copied the .sfs file to NTFS partitions without asking, unless it was already there. This was only recently removed from his woof system so it no longer applies to anything built from the latest woof (Quirky 1.4, Wary 5, Lucid 5.2 when it appears).
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
There is probably a typo of linuxsandisquedur. Without a rc.sysinit your system would not come to the desktop. rc.sysinit is somwhere in the /etc/.... hierarchy.carolus wrote:In 5.1.1 there is no /etc/rc.sysinit. In init, I don't recognize code that creates a swapfile, only code that detects a swapfile, and grepping on comment lines that contain the word "swap" did not reveal anything. But I'm not very good at reading big scripts, and maybe there are other relevant scripts hidden somewhere.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
- linuxsansdisquedur
- Posts: 248
- Joined: Tue 13 Jan 2009, 21:17
- Location: South of France
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
There are differences between versions.
Following is code in the rc.shutdown script in the same directory as rc.init in Lucid 519. BTW rc.init here doesn't have code to create a swap file/partition.
Following is code in the rc.shutdown script in the same directory as rc.init in Lucid 519. BTW rc.init here doesn't have code to create a swap file/partition.
Code: Select all
#w481 if low-ram, save-file is on a fast media, and no swap file/partition, then create one...
#note, rc.sysinit in puppy 3.01 had code to create a pupswap.swp, not in 4.x series.
swapfile_func() {
localSMNTPT="$1"
localSAVEPART="$2"
if [ ! -f ${localSMNTPT}/pupswap.swp ];then
if [ "$ATADRIVES" ];then #see /etc/rc.d/PUPSTATE 100912
TOTALRAM=`free | grep 'Mem:' | tr -s ' ' | cut -f 3 -d ' '`
if [ $TOTALRAM -lt 262145 ];then #was 128000, bump up <=256MB.
TOTALSWAP=`free | grep 'Swap:' | tr -s ' ' | cut -f 3 -d ' '`
if [ $TOTALSWAP -eq 0 ];then
spPATTERN="`echo -n "$localSAVEPART" | sed -e 's/[0-9]*$//'` " #100912 ex: 'sda '
if [ "`echo "$ATADRIVES" | grep "$spPATTERN"`" != "" ];then #100912
smPATTERN=' '"$localSMNTPT"'$'
FREESAVEM=`df -m | grep "$smPATTERN" | tr -s ' ' | cut -f 4 -d ' '`
SWPSIZE=""
[ $FREESAVEM -gt 100 ] && SWPSIZE="50"
[ $FREESAVEM -gt 200 ] && SWPSIZE="100"
[ $FREESAVEM -gt 500 ] && SWPSIZE="200"
if [ "$SWPSIZE" ];then
echo >/dev/console
echo "A swapfile named 'pupswap.swp' is being created in partition ${localSAVEPART}," >/dev/console
echo "of size ${SWPSIZE}MB. This will be loaded at next boot, to ease the low-RAM" >/dev/console
echo "situation of your PC. Creating now..." >/dev/console
dd if=/dev/zero of=${localSMNTPT}/pupswap.swp bs=1048576 count=$SWPSIZE
if [ $? -eq 0 ];then
sync
mkswap ${localSMNTPT}/pupswap.swp
fi
if [ $? -ne 0 ];then
rm -f ${localSMNTPT}/pupswap.swp 2>/dev/null
echo "...error, unable to create swapfile." >/dev/console
fi
sync
fi
fi
fi
fi
fi
fi
} #end swapfile_func
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Thanks. I interpret this as showing that there no risk of creating an automatic swap file whenever memory > 256MB.Béèm wrote: Following is code in the rc.shutdown script in the same directory as rc.init in Lucid 519.]
But why not ask permission before proceeding? It should be no big nuisance since this condition occurs only on first boot.
- Béèm
- Posts: 11763
- Joined: Wed 22 Nov 2006, 00:47
- Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
carolus, you should ask that to the person who developed the script, which is Barry Kauler.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch