Swap for LFS LiveCD 6.1.1

Angel Tsankov fn42551 at fmi.uni-sofia.bg
Wed Jan 14 00:56:16 PST 2009


cedric.dewijs at telfort.nl wrote:
> Hi,
> 
> If you have a harddisk, you have 2 options:
> 1) Swapfile. First create a file for the swapspace. the command is
> something like this: (I don't have a linux box here to test. Please
> correct me) 
> dd if=/dev/null of=/some/where/swapfile count=512MB
> mkswap /some/where/swapfile
> swapon /some/where/swapfile
> 
I tried this:
mke2fs -jq /dev/hda1 (j=journal, q=quiet)
mount /dev/hda1 /mnt/hda1
  EXT3 FS on hda1, internal journal
  EXT3-fs: mounted filesystem with ordered data mode.
dd if=/dev/null of=/mnt/hda1/swapf count=512MB
  0+0 records in
  0+0 records out
mkswap /mnt/hda1/swapf
  mkswap: error: swap area needs to be at least 40kB
"ls /mnt/hda1/swapf -al" shows that swapf is 0 bytes long
  

> 2) Swappartition. First create a partition of type swap.
> mkswap /dev/hda1 <= replace with actual swappartition
> swapon /dev/hda1 <= replace with actual swappartition
> 
> Please let me know if it has worked.
> 
This works.

--Angel



More information about the lfs-chat mailing list