Results 1 to 2 of 2

Thread: swap on a regular file

  1. #1
    Junior Member registered user
    Join Date
    Apr 2005
    Posts
    16

    swap on a regular file

    I'm trying to set up swap on a regular file.

    I created the file using dd, initialised it with mkswap, and tried to mount it with swapon.

    On the 3.8 knoppix, swapon reports simply "invalid argument" and fails.

    On the 3.7 knoppix, swapon says the swapfile doesn't have a signature. I checked with od, and sure enough, there is no signature.

    Any advice?

  2. #2
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    22
    Where are you trying to make the file?
    On a NTFS partition perhaps?
    Or maybe on the ramdisk?

    I did a quick test on this (Debian sid) machine and it worked OK:

    Code:
    wander:/tmp# dd if=/dev/zero of=./swapfile bs=1M count=100
    100+0 records in
    100+0 records out
    104857600 bytes transferred in 0.437670 seconds (239581359 bytes/sec)
    wander:/tmp# mkswap ./swapfile 
    Setting up swapspace version 1, size = 104853 kB
    no label, UUID=9dccb944-ed87-465f-bbbe-a37df2517ca8
    wander:/tmp# swapon ./swapfile 
    wander:/tmp# free -m
                 total       used       free     shared    buffers     cached
    Mem:          1011        966         45          0         72        705
    -/+ buffers/cache:        188        823
    Swap:          100          0        100
    wander:/tmp#
    Perhaps this is of any use?

Similar Threads

  1. set swap file on boot up
    By fr3dt3ch in forum Hardware & Booting
    Replies: 1
    Last Post: 06-05-2006, 11:30 PM
  2. swap file configuration
    By aad in forum Hdd Install / Debian / Apt
    Replies: 3
    Last Post: 01-25-2006, 07:55 PM
  3. swap file question
    By herbyweed in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 02-07-2005, 06:31 PM
  4. swap file is gone after reboot
    By lothario in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 08-17-2004, 08:46 AM
  5. Hdd Install of swap file
    By fjon13 in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 04-29-2003, 06:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1299.99



IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU picture

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU

$200.00



Lot of 2 IBM blade center Type H chassis 8852 picture

Lot of 2 IBM blade center Type H chassis 8852

$559.00



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$149.99



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$108.92



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



Compaq ProLiant 1500R 5/100 rack server, Series 3155, with IBM 2.1GB HD, VINTAGE picture

Compaq ProLiant 1500R 5/100 rack server, Series 3155, with IBM 2.1GB HD, VINTAGE

$295.00



IBM 02YC027 Seagate ST2400MM0129 2.4TB 10K SAS 12Gb/s 2.5

IBM 02YC027 Seagate ST2400MM0129 2.4TB 10K SAS 12Gb/s 2.5" Server Hard Drive

$200.00



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99