Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Arch Linux off a flash drive. /dev/sdb1 is mounted as /, /dev/sdb2 is mounted as /home.

/dev/sda3 is the main NTFS partition on the internal hard drive of my laptop. I have it mounted, and I'm trying to create a swapfile on it. The intended resullt is that when it's booted from this particular laptop, it'll mount the main partition and start using the swapfile. I'm following this guide on the Arch Wiki.

However, when I try to fallocate or dd, I get "[fallocate/dd]: failed to open swapfile: permission denied". Why does this happen?

I'm attaching the log below, including uname -a, lsblk, etc. at the bottom. (Note that I'm in a root shell.)

[root@alex-arch /]# mount /mnt/xps13/
[root@alex-arch /]# cd /mnt/xps13/
[root@alex-arch xps13]# fallocate -l 2G swapfile
fallocate: cannot open swapfile: Permission denied
[root@alex-arch xps13]# dd if=/dev/zero of=swapfile bs=1G count=2
dd: failed to open ‘swapfile’: Permission denied
[root@alex-arch xps13]# uname -a
Linux alex-arch 3.9.4-1-ARCH #1 SMP PREEMPT Sat May 25 16:14:55 CEST 2013 x86_64 GNU/Linux
[root@alex-arch xps13]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 119.2G  0 disk 
├─sda1   8:1    0  39.2M  0 part 
├─sda2   8:2    0  12.3G  0 part 
├─sda3   8:3    0    99G  0 part /mnt/xps13
└─sda4   8:4    0     8G  0 part 
sdb      8:16   1   7.3G  0 disk 
├─sdb1   8:17   1   4.3G  0 part /
└─sdb2   8:18   1     3G  0 part /home
[root@alex-arch xps13]# cat /etc/fstab 
# 
# /etc/fstab: static file system information
#
# <file system> <dir>   <type>  <options>   <dump>  <pass>
# /dev/sdb1
UUID=3c38780b-7f24-4564-aa9c-ad8a31f226c9   /           ext4        rw,relatime 0 1

# /dev/sdb2
UUID=4e044617-654f-4eef-a73d-1db9f74e7660   /home       ext4        rw,relatime 0 2

UUID=44AE893EAE89298E                           /mnt/xps13  ntfs            rw,users,nofail,auto    0 0
[root@alex-arch xps13]# 
share|improve this question
1  
It's not recommended to put swapfiles on a NTFS partition. The kernel ntfs driver is incomplete, and the FUSE ntfs-3g driver...well, what would happen if ntfs-3g got swapped out? –  grawity May 31 '13 at 18:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.