swap file

Thinus Pollard thinusp at gmail.com
Mon Sep 20 02:46:54 PDT 2004


hi to all

This sounds like a kinda cool thing to do. Is there any reason not to
do it? What is the rationale behind a seperate swap partition?

Cheers
T


On Sun, 19 Sep 2004 20:59:05 +0000, LuCKy <lucky at e-neyret.com> wrote:
> > I want to use a swap file instead of swap partition, I found some
> > documentation on how to do that, but mostly out-dated.
> >
> > Is the following procedure correct?
> >
> > 1. Create a file of 256 MB
> >
> > # dd if=/dev/zero of=/swap bs=4096 count=65536
> >
> > 2. Make it a swap file
> >
> > # mkswap /swap
> >
> > 3. Add the following line to /etc/fstab
> >
> > /swap           swap            swap    pri=1           0       0
> >
> > 4. First mount the filesystem read-write, then activate the swap
> >
> > # mv /etc/rc.d/rcsysinit.d/S20swap /etc/rc.d/rcsysinit.d/S45swap
> >
> > Should this work? The file in on a journeling filesystem (ext3), could
> > this cause problems?
> >
> > Sincerly,
> >
> > Laurens
> 
> This works.
> Don't forget to chmod 600 /swap in order to prevent regular users from dumping
> the swap space.
> 
> LuCKy
> 
> 
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
> 



-- 
Thinus Pollard
thinusp at gmail.com

"When Mister Safety Catch Is Not On, Mister Crossbow Is Not Your Friend."

    -- Detritus learns about weapons safety (Terry Pratchett, Night Watch)


Mobile: +31 61 617 2350

Oranjelaan 2
2341CC, Oegstgeest
The Netherlands



More information about the lfs-support mailing list