[SHR-Unstable] swapon: swapfile has holes

Joachim Ott jo.omsl at googlemail.com
Sat Sep 5 13:32:59 CEST 2009


2009/9/5 Matthias Huber <matthias.huber at wollishausen.de>:
> Greg Bonett schrieb:
>> Hi there,
>> I just installed SHR unstable and I'm impressed at how usable and
>> responsive it is.  However, while I was performing a opkg operation I
>> ran out of memory so I tried to add a swap file.
>> When following the instructions at:
>> http://wiki.openmoko.org/wiki/SHR_User_Manual#SwapSpace
>> I get the error:
>> "swapon: /swapfile: Invalid argument"
>> and dmesg shows:
>> "swapon: swapfile has holes"
>>
>> I've tried files on the sd card and also on the internal memory.
>> Any suggestions?
>>
>>
> i could imagine, it must be at one extent, so you should try two things:
>
> * format your sdcard and make the swapfile on the newly created fs.
> *** but if you are formatting the card, you can make a real swap
> _partition_ also.

I wonder if "dd" (which is just busybox) has created a sparse file (in
order to optimize for speed and space). I cannot check this, because
"du", which is busybox too, lacks the --apperent-size option.

Anyway, I'm using a swap partition on the SD-card rather than a swapfile.



More information about the support mailing list