[SOLVED] Swap Partition keeps being automounted, but it shouldn't.

Hi,
I created a swap partition as part of setting up a Linux From Scratch installation, and it was intended for that system only. However it is automounted every time I boot my arch.
It is neither mentioned in my fstab or my mtab. I tried # swapoff , and that disables it for that instance, but after boot it's mounted again. Tried giving it an fstab entry with the noauto option.
Last edited by krork (2015-01-05 18:11:24)

Thanks Guys!
I have not yet found a way to stop systemd from automounting the swap partition. I'm a bit busy this January. However, as a workaround I created a swapoff.service file in /etc/systemd/system with this content:
[Unit]
Description=Turns off Swap Partition
DefaultDependencies=no
After=getty.target
[Service]
ExecStart=/usr/bin/swapoff /dev/sdaX
[Install]
WantedBy=multi-user.target
Replace the /dev/sdaX with your according partition, of course.
Edit: Also you'll want to enable it: # systemctl enable swapoff.service
So in case anyone else is having this problem and just wants a dirty fix, this worked for me, for now. If I find out how to keep systemd from automounting in the first place I'll let you know.
Last edited by krork (2015-01-05 16:50:33)

Similar Messages

  • I've got my scroll blocked for the Mail only. The Mail keeps being updated but i can not touch it, as if the screen wad locked...

    I have my Mail blocked for scrolling. I am a new user of ipad2, started the Mail this morning and nos it is blocked. It keeps being updated, but i cannot touch it. And i can touch normally other applications. Any heló appreciated.

    Quit the mail app and restart the iPad.
    Go to the home screen first by tapping the home button. Quit/close open apps by double tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • My apple password keeps being reset, but not by me

    My i tunes password keeps being reset, but not by me,  please help

    If you have never shared your password with anyone then your account was hacked. NOT your iPhone, your Apple ID. If you use the same password for other accounts any of them could have been hacked, and your password obtained from that other account. If your password was simple it could have been hacked by brute force. If it is a word found in any dictionary especially. Or if there is anything personally identifiable about it (nickname, pets name, address, name of someone you know).
    The really important thing is to get it resolved QUICKLY with Apple Security, and to change all passwords that might have been stored in an iCloud backup of your phone.

  • [SOLVED] I don't think my swap partition is being mounted?

    My top command never indicates any of the swap being used, could it be because I don't use over a gig of ram?
    Swap: 2048280k total, 0k used, 2048280k free, 380392k cached
    and when I booted my machine I once saw it saying swap mount - Failed
    not entirely sure now  as it doesn't mention it.
    Here is my fstab
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    UUID=01f2ea1e-7166-4081-949b-9df766c80ae9 / ext4 defaults 0 1
    UUID=81478b57-9b58-4d2f-a814-30461720b6e0 /home ext4 defaults 0 1
    UUID=84e46ff4-dd90-483d-a4a3-dda3b48c17de /boot ext2 defaults 0 1
    #UUID=bf2f66e9-fcdc-4698-82b1-05249f2ee999 swap swap defaults 0 0
    /dev/sda2 swap swap defaults 0 0
    UUID=86C05EF4C05EEA47 /home/dalesalter/Desktop/Storage ntfs-3g gid=users,fmask=113,dmask=002 0 0
    UUID=303361C774412966 /home/dalesalter/Desktop/Windows ntfs-3g gid=users,fmask=113,dmask=002 0 0
    and my fdisk
    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 208844 104391 83 Linux
    /dev/sda2 208845 4305419 2048287+ 82 Linux swap / Solaris
    /dev/sda3 4305420 65754044 30724312+ 83 Linux
    /dev/sda4 65754045 488392064 211319010 83 Linux
    Thanks in advance!
    Last edited by Compulsed (2011-10-05 14:15:52)

    What does free say?
    ewaller@odin:~ 1001 %free
    total used free shared buffers cached
    Mem: 3961932 2518136 1443796 0 290204 1197880
    -/+ buffers/cache: 1030052 2931880
    Swap: 4000148 104 4000044
    ewaller@odin:~ 1002 %

  • [SOLVED]Partitions not getting automounted at boot

    Hi,
    After I while I wasn't using my laptop I've made a full update (ofc I've checked for announcement for any manual intervention needed but there was nothing new). On reboot slim failed to autologin so I've switched to console to check the .Xinitrc file but, as soon as I logged in, the terminal output said it couldn't get to the user home directory because it's not there , and in fact the /home directory is actually empty. Since I didn't deleted anything of course I guess my home is probably not getting automounted or something...can this be the problem? how can I solve this ?
    Thanks in advance
    Last edited by Eit (2013-10-21 14:54:26)

    I've found in the boot log the message exactly reported in this thread.
    https://bbs.archlinux.org/viewtopic.php?id=170898
    And I've seen the guy fixed the error message warning about the root device not being rw, message which I've never sorted out becuase I wasn't getting any real problem out of that. I've read further in the topic and I've found the link to another topic related to the RW root partition problem
    https://bbs.archlinux.org/viewtopic.php?id=167153&p=4
    However, modifying the default grub config and regenerating that (as in post #95, even if post #96 says it shouldn't be necessary anymore) does not fix the problem of the root partition not being mounted as read write and neither the problem of partitions not getting automounted.
    I'm getting a bit confused.
    Edit: changing topic title to clarify
    Last edited by Eit (2013-10-17 21:12:01)

  • SWAP partition (Hibernate Failure)[SOLVED]

    Hi Folks,
    My suspend to disk (Hibernate) is not working. When I boot up my pc, it starts processing. In meanwhile, I can see the output on my screen. At some point, it starts checking mounted filesystems
    "Checking Filesystems"
    /dev/sda1
    dev/sda3
    /dev/sda4
    I do not know why this skips /dev/sda2 which is my swap partition actually.
    After three or four lines, I can see from the output saying "Activating Swap". Does it mean that my swap partition is configured correctly or not?
    There is one more thing. I use gnome. In gnome, when I open System Monitor (from the panel) > and under File Systems, I also can not see my swap partition which is /dev/sda2 while I can see all other partitions which are /,  /boot, /home.
    Does it mean that the partition can not be mounted correctly.
    I really appreciate any kind of help.
    Thanks in advance.
    Last edited by Archie_Enthusiasm (2010-11-28 15:49:30)

    Here is the output:
    cat /proc/swaps
    Filename                Type        Size    Used    Priority
    /dev/sda2                               partition    6297476    0    -1
    free -m
                 total       used       free     shared    buffers     cached
    Mem:          3013       1182       1830          0         58        532
    -/+ buffers/cache:        591       2421
    Swap:         6149          0       6149
    It says that the swap is being used. But when I hibernate my pc, it correctly shuts itself down. But when I wake up the pc again, it says at the boot time that my / , /root, /boot mount file systems were not unmounted correctly and starts checking the filesystems (Some kind of journaling process starts). When it boots up, the stored session is no more there or existent anymore. It is like as I forced the system to shutdown and start it again (Just like as there were a system freeze and then I did shutdown the system by pressing the power button for more than 10 secs and then restarted). So I suspect that the system did not shutdown correctly even if there were no strange occurrence happening when I did the hibernate.
    I hope someone can help me. If you need some more information about the configuration on my pc, please tell me command and I will post the output.
    Thanks in advance
    Last edited by Archie_Enthusiasm (2010-10-28 21:41:58)

  • [Solved] Do I need a swap partition /swap file?

    Hello Arch Community.
    I want to install Arch Linux on my Aspire V5-573G Notebook with 8GB RAM and a 120GB 840 Evo SSD from Samsung. So my question is, do I actually need a swap partition / swap file? I read the arch-wiki pages about swap and suspend-to-disk / suspend-to-ram, and the only thing thats obviously profiting from / needing a swap partition is suspend-to-disk, no other things are mentioned in this regard. Is a swap partition in any other way important?
    Thanks in advance.
    Last edited by Oedner (2013-12-21 12:41:19)

    headkase wrote:Another question to ask is what will happen if you don't have a swap file and run out of memory?  In that case the Linux kernel will randomly kill process' until there is enough memory again.  Obviously that isn't very stable but that is what it will do.
    No. The OOM killer is pretty darn tweaked these days and usually(!) kills the actual perpetrator. The alternative—disabling memory overcommitting and answering memory requests with an out-of-memory error—can result in unforeseen problems as well: What if it  a system process is trying to allocate a few bytes for some random string, and what if said system process isn't equipped to handle ENOMEM gracefully and crashes, because the default policy on Linux is to overcommit and never answer with out-of-memory errors?
    Just trying to play devil's advocate here. I'm not happy with the OOM killer either and I'd rather have a deterministic solution to out-of-memory situations, but I realize that it's probably not an easy problem to solve.

  • I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    I keep being asked to update my Safari but when I do a Software update it scans but never gives me a list and just says no new updates. Help please!

    There are no updates to either OS 10.5.8 or Safari 5.0.6.
    If you need a later version of Safari you must first upgrade your operating system to a later version of OS X.

  • HT1420 Keep being asked for my audible account id, but i do not know it. It is not the same as my Apple ID as I have tried this

    Keep being asked for my audible account id, but i do not know it. It is not the same as my Apple ID as I have tried this

    If you've forgetten the details for an Audible.com account, see:
    http://audible.custhelp.com/app/answers/detail/a_id/3270
    Regards.

  • [SOLVED] Virtual Memory Exhausted with unused 16g Swap Partition.

    Hello all, long time reader, first time poster. So basically what I'm running into is that I'm having Virtual Memory Exhausted errors with various programs even though I have a 16g swap partition mounted. I've manually enabled it to try it as well. Here's some outputs to give you an idea of how my system is set up. It's a UEFI fresh install, only a couple days old.
    fstab:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    # /dev/sdb3
    UUID=ea7a0311-6314-4215-b98d-7360552b28c4 / ext4 rw,relatime,data=ordered 0 1
    # /dev/sdc3
    UUID=8f6f2006-3a9c-4563-a149-547d758e2af1 /home ext4 rw,relatime,data=ordered 0 2
    # /dev/sdb2
    UUID=baf1ba80-ddf3-4cbb-a13e-b81a0af0a9e7 /boot ext4 rw,relatime,data=ordered 0 2
    # /dev/sdb1
    UUID=2B46-5340 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
    # /dev/sdc1
    UUID=4336d783-c289-4fbf-8c59-f1a1da782130 /var ext4 rw,relatime,data=ordered 0 2
    # /dev/sdc2
    UUID=96a60f08-a57f-42f1-80ff-846d02a29199 /var/log ext4 rw,relatime,data=ordered 0 2
    # /dev/sda2
    UUID=c5d5879a-b0e8-4976-8057-2f95975a1251 /share ext4 rw,relatime,data=ordered 0 2
    # /dev/sdb4
    UUID=6e6277c4-a69a-4838-83cd-c206959acf0e /store ext4 rw,relatime,data=ordered 0 2
    #swap
    UUID=21a56b10-85e5-48a1-91e5-995eae0dfba4 none swap defaults 0 0
    lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 931.5G 0 disk
    ├─sda1 8:1 0 16G 0 part [SWAP]
    └─sda2 8:2 0 915.5G 0 part /share
    sdb 8:16 0 931.5G 0 disk
    ├─sdb1 8:17 0 1G 0 part /boot/efi
    ├─sdb2 8:18 0 1G 0 part /boot
    ├─sdb3 8:19 0 50G 0 part /
    └─sdb4 8:20 0 879.5G 0 part /store
    sdc 8:32 0 931.5G 0 disk
    ├─sdc1 8:33 0 20G 0 part /var
    ├─sdc2 8:34 0 2G 0 part /var/log
    └─sdc3 8:35 0 909.5G 0 part /home
    sr0 11:0 1 1024M 0 rom
    cat /proc/meminfo
    MemTotal: 12256600 kB
    MemFree: 9926584 kB
    Buffers: 212588 kB
    Cached: 774636 kB
    SwapCached: 0 kB
    Active: 1179860 kB
    Inactive: 638584 kB
    Active(anon): 831604 kB
    Inactive(anon): 14480 kB
    Active(file): 348256 kB
    Inactive(file): 624104 kB
    Unevictable: 4 kB
    Mlocked: 4 kB
    SwapTotal: 16777212 kB
    SwapFree: 16777212 kB
    Dirty: 32 kB
    Writeback: 0 kB
    AnonPages: 831320 kB
    Mapped: 196008 kB
    Shmem: 14892 kB
    Slab: 345008 kB
    SReclaimable: 316620 kB
    SUnreclaim: 28388 kB
    KernelStack: 2616 kB
    PageTables: 27032 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 22905512 kB
    Committed_AS: 3365808 kB
    VmallocTotal: 34359738367 kB
    VmallocUsed: 357936 kB
    VmallocChunk: 34359373819 kB
    HardwareCorrupted: 0 kB
    AnonHugePages: 86016 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
    DirectMap4k: 117756 kB
    DirectMap2M: 4059136 kB
    DirectMap1G: 8388608 kB
    swapon -s
    Filename Type Size Used Priority
    /dev/sda1 partition 16777212 0 -1
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 20
    file size (blocks, -f) unlimited
    pending signals (-i) 94832
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 1024
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 94832
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
    I did just notice that it's showing 4gb less RAM than there should be (12 instead of 16, I'll be checking into that about the same time I hit submit) but as far as I can tell the system shouldn't even be worried about swap 99.99% of the time. Any ideas?
    Edit: On reboot system show the full 16gb of RAM.
    Last edited by inquisitorthreefive (2012-11-19 07:44:32)

    inquisitorthreefive wrote:
    I did just notice that it's showing 4gb less RAM than there should be (12 instead of 16, I'll be checking into that about the same time I hit submit) but as far as I can tell the system shouldn't even be worried about swap 99.99% of the time. Any ideas?
    Edit: On reboot system show the full 16gb of RAM.
    Could it be a hardware problem with RAM? Is there a 4 GB RAM chip in the machine that may have failed?

  • Currently using Photoshop CS5, but with a replacement computer and upgrade to Yosemite, keep being told I need to install the legacy Java 6. Currently, Photoshop won't even open. I absolutely do not want to subscribe, don't want to mess with the cloud, ju

    Currently using Photoshop CS5, but with a replacement computer and upgrade to Yosemite, keep being told I need to install the legacy Java 6. Currently, Photoshop won't even open. I absolutely do not want to subscribe, don't want to mess with the cloud, just want to buy an upgrade to something that will run for a while longer. I don't care about Lightroom, Bridge, Illustrator, etc.; most of those I've deleted over the years. But I do use Photoshop - or would if it would still run. What options do I have?

    This is the java you need for photoshop cs5 to work on mac os x 10.10 Yosemite
    https://support.apple.com/kb/DL1572?locale=en_US
    It's also possible you may have to reinstall photoshop cs5 even after installing the above java, because sometimes the upgrade to mac os x 10.10 messes up the photoshop cs5 installation.
    You can download photoshop cs5 from here if you don't already have the install media.
    https://helpx.adobe.com/creative-suite/kb/cs5-product-downloads.html

  • [SOLVED] Please verify: swap partition needed for dm-crypt/LUKS??

    Hi,
    Can anyone confirm whether or not the following is accurate (from http://wiki.archlinux.org/index.php/Sys … artitions)
    There are 3 required partitions for any encrypted system:
    - The root file system: /
    - The initial boot partition: /boot
    - The swap partition: swap
    Do I need a swap partition if I encrypt? I can't seem to find reference to swap being mandatory anywhere else.
    Last edited by jwhendy (2010-10-12 13:27:12)

    You don't need swap. The minimal required setup is having two partitions: boot and root, where /boot must not be encrypted and / can be encrypted.
    Last edited by stfn (2010-10-12 12:45:22)

  • I made a windows partition on my mac but now i cant swap back to the mac part so is there any way that i can delete the windows partition whilst running windows 7 so i can go back to the mac part

    i made a windows partition on my mac but now i cant swap back to the mac part so is there any way that i can delete the windows partition whilst running windows 7 so i can go back to the mac part

    You are telling us you read and tried the normal methods?
    Boot Camp or Taskbar. Option on restart. "x" on startup. And none of those work.

  • TS3899 I keep trying to update my mail inbox but keep being told connection to the server has failed.

    I keep trying to update my mail inbox but keep being told connection to the server has failed.

    Quit the maill app completely and restart the iPad. Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Or go to Settings>Mail, Contacts, Calendars>Your email account >Mail>Off. Restart the iPad and go back to settings and turn mail on again and see if that works.
    Or try this as well ....Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • [Solved]Can I install arch without a swap partition ?

    I only have one primary partition free to install arch, with 3 primary partition and 1 extend partition, I have no other choice except install without swap partition.
    Is there any suggestion? I will try it until I get a U storage to write .img in.
    Last edited by sailor (2009-03-17 00:47:31)

    Sure, it's perfectly possible to use any linux system without swap. including arch.
    There are 2 ways to do disk partitioning in /arch/setup:
    1) autoprepare. with this method, you pick a disk (a disk you want to use entirely). you will be asked some questions (including how big swap should be). this method will create the partitions with the sizes you mention (/boot, swap, / and /home) optionally you can add additional fs'es
    2) manual. the installer can launch cfdisk for you if you need to alter partitions (if you want this), and after that you can define pretty much your stuff the way you like it (eg no swap) iirc. i'm not 100% sure though.
    Frankly I don't understand why you say "I have no choice", if you don't have enough partitions, you can always create additional ones.

Maybe you are looking for

  • Can we have a Family Data Package, Please?

    I have 4 people on our wireless service with Verizon.  Until recently, only I had a data plan.  Then I got my kids new phones and they got data plans.  Now my husband wants a data plan when he is eligible for a new phone in January.  All these plans

  • How to develop a group above report in mailing lable style

    i want to know the method to develop a group above report (multi level groups) in mailing lable style like yellow pages on reports 6i e.g. group 1: country group 2: province group 3: Industry group 4: product or service mailing lable: Company Name Ad

  • Oracle10gR2 indexing changes the block ?

    DB: Oracle 10g R2 x864 OS: SUSE Linux x864 DR Product/Tool: Novell Platespin(http://www.novell.com/products/forge/) We are using a block based replication tool(Platespin) to maintain a DR of our customer's Database Server(oracle 10g R2 atop SUSE Linu

  • Wad report

    hi Report requirement in WAD: actual currency ( USD) and local currency has to display in the report,.. any easy way to achieve this. regards,

  • Illustrator CS5 Rotate Tool Anchor Point Bug

    Summary: I can reproduce this bug consistently, every single time.  I am unable to set a new anchor point for the rotate tool in Illustrator CS5. Steps to reproduce the bug: 1.  Create a new shape, doesn't matter what 2.  Press R or just select the r