fstab on Potchan - HD partition

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

fstab on Potchan - HD partition

#1 Post by potchan »

Hi all,

This post regards /etc/fstav on my potchan onHD.

Potchan ??
=======
Potchan is a TmxxineDF pup_save placed inside potchan.folder on HD ("C" or "D", doesn't matter) containing also some pup_save.2fs and some swappie files and goodies. Booting is from CD/DVD.

Main goal of the Potchan Simplify Team is to unbothering users with nothing. Just put n' go.

"Soggy", Puppy is still afar from it in my POV.

More about (yet unreleased) at:

http://www.murga-linux.com/puppy/viewtopic.php?t=36098

So ...
===

Let's take a look on my /etc/fstab, accompanied by two questions:


#start

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


#
# MODIFIED 2009-01-03-0110 by: Potchan Simplify Team http://potchan.org
#

/mnt/home/potchan.folder/.Lungs/.Lung-512M-01 swap swap defaults 0 0
/mnt/home/potchan.folder/.Lungs/.Lung-512M-02 swap swap defaults 0 0
#These 2 lines researches swap influence on weak videocards. team@potchan.org

# wawa-1 to wawa-N
#--------------------
none /tmpfs/wawa-1 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0
none /var/tmp/wawa-2 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0

dd if=/dev/zero of=/var/swap/wawa-3 bs=1024 count=16777216
# creates a 2GB file

mkswap /var/swap/wawa-3
# create swap fs on the file

swapon /var/swap/wawa-3
# add the swap file as swap device

/var/swap/wawa-3 swap swap defaults 0 0

#end



2 Questions:
========

Is "wawa-1" to "wawa-3" workable, since I don't see any indication on conky ? maybe it's ahead of my system's limits and I'm a "ZERO" in coding and found it s'where.

How I swap a OLD OLD OLD DELL Inspiron 2600 videoeocard directly (since all the xorg.conf'ies did not solve it permannently) ?
I need it to be forced into 1024x768x24

Thanks.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Few Clarifications

#2 Post by potchan »

pup_411.sfs is inside folder too.

wawa-1 to wawa-3 R placed on external fs inside potchan folder and linked relatively to places on main system fs.

Thanks.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#3 Post by amigo »

You can't put these commands in the fstab file:
dd if=/dev/zero of=/var/swap/wawa-3 bs=1024 count=16777216
# creates a 2GB file

mkswap /var/swap/wawa-3
# create swap fs on the file

swapon /var/swap/wawa-3
# add the swap file as swap device

/var/swap/wawa-3 swap swap defaults 0 0

They need to be put into the init scripts.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

YES WE CAN.

#4 Post by potchan »

1. Link on tnpfs on fstab:

http://www.uno-code.com/?q=node/58

2. Link about swap (did not find the one you can make swap up to 100G)

http://www.linux.com/feature/113956

So, it is possible.

Look, I am not after fstab as ultimate solution, however I simply look for a solution. Why not with an init file (like autostart) ? because it usually comes up seconds AFTER X is started, and I need a remedy BEFORE X starts.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#5 Post by amigo »

Sorry, I pasted one line too many. this is a valid line for fstab:
/var/swap/wawa-3 swap swap defaults 0 0

But the others are *commands* not fstab entries. Depending on what you are trying to do, the'd need to be run before or after any fstab entry which refers to them or uses them. On normal linux systems you can add init commands to the file /etc/rc.d/rc.local to have them executed just before login. But, some of the stuff you have may need to be run much sooner tha that during the boot process.

Actually I just read through it again it would be okay to put that in rc.local, but I suspect that you need to create the dir /var/swap first before you can create a file there. But you can do without the fstab entry for that swap as you are manually running swapon for it -although that probaly leaves it out of conky. If you want to use the fstab entry, then you need to do all the tmpfs mounts, file creation and mkswap before swapon is run during bootup -which *should* be one of the first things to happen.
You can find where these commands are being run by doing this:
cd /etc/rc.d
grep -nrH swapon *

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

If i get U right ...

#6 Post by potchan »

As I get it now (don't take it hardway, this quiz is for ME, not U):

1. The dd.. stuffs and commands should be located on /etc/rc.d/rc.local

yes - or - no ?

2. The line /var/swap/wawa-3 swap swap defaults 0 0
- can be added to rc.local INSTEAD of fstab in order to
mount swap or tmpfs much earlier than X starts

yes - or - no ?

3. "2" with .Lung-512M-XX (swapfile) inside wawa-3 and so it's like -
/var/swap/wawa-3/.Lung-512M-XX swap swap defaults 0 0

yes - or - no ?

4. Do "2" and/or "3" on rc.local reflect weak videocards to be enforced to
higher resolution before X/xorgwizard/ fstav/autostart mount its
contents ?

yes - or - no ?

5. If I put /var/swap/wawa-3 swap swap defaults 0 0 (- or -)
/var/swap/wawa-3/.Lung-512M-XX swap swap defaults 0 0
in rc.local, should I put things like "start"/"swapon" prior to it ?

yes - or - no ?

6. Is the last line on last post is a check only or essential s'where ?

check yes - or - no ?
essential for functionning yes - or - no ?

I googled every word up there, still I need clarifications on this. The bonus to innocent users if I succeed is too high for giving it up now.

Thanks.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#7 Post by amigo »

1. yes
2. no - a valid line for fstab is not the same as a valid line of shell code
3. Huh?
4. no

If you are going to use a swap *file*, then it must be located on a partition or whatever which is already mounted. All swap files and swap partitions which are in the fstab are activated with a single command during bootup, but they can't be found or activated unles they are on already-mounted partitions or images.


# fstab:
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

# these lines assume that /mnt/home/potchan.folder/.Lungs/ is either already
# mounted ot is part of the root file system.
/mnt/home/potchan.folder/.Lungs/.Lung-512M-01 swap swap defaults 0 0
/mnt/home/potchan.folder/.Lungs/.Lung-512M-02 swap swap defaults 0 0
#These 2 lines researches swap influence on weak videocards. team@potchan.org

# make sure /tmpfs/wawa-1 and /var/tmp/wawa-2 exist first. If not then put:
# mkdir -p /tmpfs/wawa-1 /tmpfs/wawa-2
none /tmpfs/wawa-1 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0
none /var/tmp/wawa-2 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0



# rc.local:
########## wawa-3
# these three lines are valid to put in rc.local
dd if=/dev/zero of=/var/swap/wawa-3 bs=1024 count=16777216
mkswap /var/swap/wawa-3
swapon /var/swap/wawa-3
# but you ned to make sure that the directory /var/swap already exists.
# if it does not then add 'mkdir -p /var/swap' before the above three commands

# you don't need this line because you just activated this swapfile with the line above
# this line is an fstab entry anyway
# /var/swap/wawa-3 swap swap defaults 0 0
# if the file /var/swap/wawa-3 is persistent bewteen boots then you could simply add the above
# line to fstab and do away with the other three lines. If the file /var/swap/wawa-3 is persistent
# then you'd only need to run the 'dd' and 'mkswap' commands once when it is created

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Thank U so much

#8 Post by potchan »

Hi friend,

I'll try it in a day or two (with some REAL concentrating-ability) and tell you outcomings.

WOW. :D
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

1st. draft of both files.

#9 Post by potchan »

Hi, amigo,
See next one (corrected) :wink:
Last edited by potchan on Fri 16 Jan 2009, 22:41, edited 4 times in total.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

1st. draft of both files.

#10 Post by potchan »

Hi, amigo,

On the beginning I'll clarify myself on "3"
===========================

The wawa's R FOLDERS. Ahead I'll ask specificly if to add inside all/part
of them a swapfile (like .Lung-512M-XX) or not.


# fstab
#=====



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

#
# MODIFIED 2009-01-16-2220 by: Potchan Simplify Team http://potchan.org
# 1st. draft to 'amigo' at http://www.murga-linux.com
#
#++++++++++++++++++++++++++++++++++ START ++++++++++++++++++++++++++++++++++

/var/swap/wawa-3 swap swap defaults 0 0

#
# Well, I didn't get this persistent thing, so - like a blessing wheel -
# it can or it can't help, but no worse ? I move between JWM to XFCE4 a lot
# back and forth during working on Potchan. Is that related to your "boots" say ?
#

/mnt/home/potchan.folder/.Lungs/.Lung-512M-01 swap swap defaults 0 0
/mnt/home/potchan.folder/.Lungs/.Lung-512M-02 swap swap defaults 0 0

# make sure /tmpfs/wawa-1 and /var/tmp/wawa-2 exist first. If not then put:
# mkdir -p /tmpfs/wawa-1 /tmpfs/wawa-2
#
# Timmo': YES, and to save place for pup_save.2fs - these 2 FOLDERS WITH NO SWAPFILES (??) INSIDE
# are placed on external fs and relative links are placed on main fs in proper places.
#
# Should I add ../.lung-512M-XX inside these wawa-1 & wawa-2 FOLDERS (I think not) or
# it's not needed here ?
#

none /tmpfs/wawa-1 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0
none /var/tmp/wawa-2 tmpfs size=2G,nr_inodes=200k,mode=01777 0 0

# Timmo' understands the sizes are changable to 5G or even 1000G ... as defined
# or it's an "endless value limited only by home partition size" ?
#
# (note all files goodies and swaps R inside "potchan.folder" on the
# mounted home partition, except to 7M bootie stuff on CD/DVD).
#
#++++++++++++++++++++++++++++++++++ ENDOS? ++++++++++++++++++++++++++++++++++


# rc-local
#======



#++++++++++++++++++++++++++++++++++ START ++++++++++++++++++++++++++++++++++

#this file called from rc.sysinit
#you can edit this file
#When firewall is installed, will append lines to this file...

## insert by virtualbox_guest_additions-2.0.6 ##
/etc/rc.d/rc.vboxadd start
/etc/rc.d/rc.vboxadd-timesync start
/etc/rc.d/rc.vboxvfs start
##########

## insert by virtualbox_guest_additions-2.0.6 ##
/etc/rc.d/rc.vboxadd start
/etc/rc.d/rc.vboxadd-timesync start
/etc/rc.d/rc.vboxvfs start
##########

#
# MODIFIED 2009-01-16-2220 by: Potchan Simplify Team http://potchan.org
# 1st. draft to 'amigo' at http://www.murga-linux.com
#

dd if=/dev/zero of=/var/swap/wawa-3 bs=1024 count=16777216
mkswap /var/swap/wawa-3
swapon /var/swap/wawa-3

# but you need to make sure that the directory /var/swap already exists.
# if it does not then add 'mkdir -p /var/swap' before the above three commands
#
# Timmo': YES, and to save place for pup_save.2fs this FOLDER WITH NO SWAPFILES (??) INSIDE
# wawa-3 folder is placed on external fs and relative links are placed on main fs in proper places.
#
# Should I add a ../.lung-512M-XX inside wawa-3 FOLDER (I'm unshure) or it's not needed here ?

#++++++++++++++++++++++++++++++++++ ENDOS? ++++++++++++++++++++++++++++++++++

Am I closer now ? :roll:
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#11 Post by amigo »

Yeah

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Hmmm ...

#12 Post by potchan »

with or without wawa-X/.Lung-512M-XXs inside who ? 1,2, and/or 3 ?? :roll:
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#13 Post by amigo »

What is that:
.Lung-512M-XX
A file which you have created to act as a swapfile?

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Yes

#14 Post by potchan »

So -

wawa-X is a FOLDER (or a link to one placed at external fs to pup_save.2fs)
the 'Lungs' R swap FILES, and I asked should I need them inside those folders. I just want to make shure. My conclusion after afternoon reading is perhaps I do not need those files there. Do I ?

Meantime I put it as-is with no troubles so far, but is it effective and how I check it from console ?

By the way - these lungs work fine on -

/mnt/home/potchan.folder/.Lungs/.Lung-512M-01 swap swap defaults 0 0
/mnt/home/potchan.folder/.Lungs/.Lung-512M-02 swap swap defaults 0 0

as conky shows.
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#15 Post by amigo »

The command 'swapon -s' will list all active swapfiles or swap partitions.

I'm not really sure what you want to do with all these swaps. Unless you are doing heavy sound or video editing or remasteing iso images you are unlikely to ever need much swap at all as long as you have a fair amount of real RAM on your machine.
An ordinary hard-disk installation of comething slackware can run with as little as 32MB of total memory -even if only 16MB is real RAM and 16 is swap space. Of course, Puppy needs much more than that -I think 256-384 is recommended.
if you have as much as 128MB of free RAM, you are unlikely to see performance differences by adding more memory -RAM or virtual.
On an oridnary installation even with KDE, you would probably see no difference between running with 256MB RAM and 512MB RAM.

If your 'LUNGS' are meant to be swap files, then the directory where the go must be created on a mounted partition first. Then mkswap is used to 'format' them as swap space. Then swapon is used to activate them. Once they have been created and had mkswap run on them, you can add an entry in fstab for them, but the entry must be located *after* the entry for whatever partition they are on.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

The need for swaps is because ...

#16 Post by potchan »

Hi amigo,

Potchan is planned for three stages an 'innocent user' does in order to use PC "on and off" level, with no 'configuration' in the middle (see on unfinished website). Linux as it should be in my user-POV.

On the way I try to relate to caches and peaks. For example I put /root/.opera as a file on external FS, that way my 165M mail doesn't influence my pup_save.2fs. With Firefox it's even tougher because it can earn up to 50M on cache easily on regular use. Not to talk about /root/.pburn if you want to copy a full DVD to another. Virtual machines? - wwwoooooffffssss!!!! ... see my point ?

Ah. and I don't know what limpware my imaginary-user is with. No, I do not want to ask him/her or confront it (lack of means to support? maybe)... users, they're so poor and molested for years now. Let a user open a computer as a TV. Manufacturers will not save us on that point, as they're interesants and fixated to where $ comes from. Need a proof ? here: PC's organs haven't changed basically for two decades now.

After awhile probably I get the right measure. Potchan tries to be around 3G potchan.folder on /mnt/home (all already mounted there as U know) + 7M bootdisk.

Cheers, and keep in touch :D .
Attachments
Potchan2amigo1.jpg
(143.68 KiB) Downloaded 355 times
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

Video test

#17 Post by potchan »

This is a screenshot of my conky after two hours of two video tabs working. The swap was reduced by me to one file of 512M. Other scripts R placed as U showed me. During a similar test at night it was stucked.

It demos a situation I watch movie on the net, or a video conversation, and in the meantime zip to the other tab for news as I hear somethin' interesting (some countries split their life between normalities and elses ...). Why can't it be like zipzapping a TV ?

Enjoy.
Attachments
potchan2amigo-2.jpg
(131.97 KiB) Downloaded 322 times
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

Post Reply