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
  •  


USB Type-A Flash Drive Metal Memory Stick High Speed USB Drive 128GB 256GB 512GB picture

USB Type-A Flash Drive Metal Memory Stick High Speed USB Drive 128GB 256GB 512GB

$8.47



Microsoft Windows 11 Pro 64bit - New Sealed – Flash USB 1 PC picture

Microsoft Windows 11 Pro 64bit - New Sealed – Flash USB 1 PC

$49.99



Critical BIOS ROM HPE ProLiant DL60 DL80 Gen9 (U15) U15_3.40_08_29_2024+iLO4 picture

Critical BIOS ROM HPE ProLiant DL60 DL80 Gen9 (U15) U15_3.40_08_29_2024+iLO4

$7.99



Critical BIOS ROM HPE ProLiant DL160 DL180 Gen9 (U20) U20_3.40_08_29_2024+iLO4 picture

Critical BIOS ROM HPE ProLiant DL160 DL180 Gen9 (U20) U20_3.40_08_29_2024+iLO4

$7.99



Microsoft Windows 11 Pro 64-Bit USB Flash Drive (HAV-00162) picture

Microsoft Windows 11 Pro 64-Bit USB Flash Drive (HAV-00162)

$37.99



USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack picture

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack

$391.59



New Samsung DUO Plus 32GB USB 3.1 USB-C Flash Drive Gray MUF-32DB/AM picture

New Samsung DUO Plus 32GB USB 3.1 USB-C Flash Drive Gray MUF-32DB/AM

$19.95



1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive picture

1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive

$86.95



Critical BIOS ROM HPE ProLiant BL460cWS46 Gen9 (I36) I36_3.40_08_29_2024+iLO4 picture

Critical BIOS ROM HPE ProLiant BL460cWS46 Gen9 (I36) I36_3.40_08_29_2024+iLO4

$7.99



Critical BIOS ROM HPE ProLiant DL560 Gen9 (P85) P85_3.40_08_29_2024+iLO4 picture

Critical BIOS ROM HPE ProLiant DL560 Gen9 (P85) P85_3.40_08_29_2024+iLO4

$7.99