No swap :( [solved]

following problem:
sometimes swap would be mounted, sometimes not!
but the log says that it is mostely not mounted !
i never get it to mind, all the time!
the log:
                                                http://www.kernel-oops.de/index.php?sit … e&show=558
# /etc/fstab: static file system information
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cd iso9660 ro,user,noauto,unhide 0 0
/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0
/dev/fd0 /mnt/fl vfat user,noauto 0 0
/dev/sda4 / ext3 defaults 0 1
/dev/sda3 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
#/dev/sda2 none swap defaults 0 0
#/dev/sda2 none swap sw 0 0
/dev/sdb1 /mnt/exthdd ntfs noauto,uid=1000
/dev/sda1 /mnt/windows ntfs uid=1000
the two outcommended /dev/sda2 entries, were tests, because i got differend informations from different systems  nothing helped
in the log was a tip, i should test swapon -a:
[root@LinuXanT thecrazylol]# swapon -a
swapon: /dev/sda2: Das Argument ist ungültig
[root@LinuXanT thecrazylol]#
output of cfdisk:
cfdisk 2.12r
Festplatte: /dev/sda
Größe: 80026361856 Bytes, 80,0 GB
Köpfe: 240 Sektoren pro Spur: 63 Zylinder: 10337
Name Flags Part. Typ Dateisystemtyp [Bezeichner] Größe (MB)
sda1 Boot Primäre NTFS ] 70354,21
sda3 Primäre Linux ext3 131,61
sda2 Primäre Linux swap / Solaris 1021,91 *
sda4 Primäre Linux ext3 8515,56 *
oh i forgot:
Linux LinuXanT 2.6.19-ARCH #1 SMP PREEMPT Tue Dec 12 12:47:42 CET 2006 i686 Intel(R) Celeron(R) M processor         1.40GHz GenuineIntel GNU/Linux
edit: ok i have a solution:
mkswap /dev/sda2; swapoff -a && swapon -a
that was it

Rexilion wrote:
I have my swap encrypted by a key that is stored in cleartext on my disk. Everytime I reboot or resume, the key is shredded and the swap is regenerated with another randomly chosen key (if possible).
That should take care of the security issue's. But it's not good for performance.
That is a good idea as well.  I considered that, but with how my system is setup I wanted to avoid that if possible.  My other partition with Kali is setup with full-disk encryption and an encrypted swap file, but that's more-so just because it seems like good practice.  Not sure I want the performance hit on my Arch setup.  However, I may additionally encrypt my swap file as well.  I decided to reduce it in size as I have a fairly good amount of ram (16gb), I really barely use any of it except when using virtualbox and such (which is quite often).
Last edited by thewooster (2014-05-09 16:22:26)

Similar Messages

  • Drives swapping [solved]

    I have been running arch completely reliably on my desktop for about 18months. It's a superb distro - well done - this is what slackware should have been!
    The existing hard drive (SATA) is partitioned:
    sda1 ntfs/xp
    sda2 swap
    sda3 ext3/xarch
    and all was working well...
    I recently added space by dropping a spare IDE drive in - with one big ntfs partition. Now the drive order at boot seems random:
    Grub ALWAYS sees: hd(0,0), (hd0,1), (hd0,2) and (hd1,0), so I can boot the kernel from (hd0,2) as normal. The problem comes with the kernel line, sometimes the line
    kernel /boot/vmlinuz26 root=/dev/sda3
    will boot and sometimes it will hang with a 'waiting 10 secs for sda3' error. In these cases the kernel is seeing the drives swapped - so it actually wanted a root partition in /dev/sdb3.
    The workaround I have in place at the moment is to have two grub entries, one with
    root=/dev/sda3
    and the other
    root=/dev/sdb3
    . Whichever one I choose has a 50% chance of being correct so I can usually boot within 2 or 3 tries. But this is a workaround rather than a solution.
    I have searched the forums and wiki but could not find anything relevant. Surely there must be something that I am overlooking? What could be causing this and how could I solve the problem?
    Thanks in advance, Richard.
    Last edited by r_j_h (2010-03-06 20:42:39)

    You should name the drives by UUID:
    Arch Wiki wrote:If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is random. This may result in device names like /dev/sdX and /dev/sdY switching around randomly on each boot, culminating in an unbootable system or kernel panic. Persistent naming solves these issues.
    http://wiki.archlinux.org/index.php/UUID#by-uuid

  • Tmpfs not using swap [Solved]

    i have set up /tmp as tmpfs for compiling but i get errors when i run out of memory, i was under the assumption that when tmpfs runs out of memory it uses swap space but swap never gets used even when swappiness is set to 100
    df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 19G 729M 18G 4% /
    none 1.9G 1.8M 1.9G 1% /dev/shm
    none 1.9G 864M 983M 47% /tmp
    none 10M 332K 9.7M 4% /var/log
    none 10M 44K 10M 1% /var/run
    none 10M 0 10M 0% /var/lock
    /dev/sda2 19G 1.6G 17G 9% /usr
    /dev/sda3 185G 3.1G 172G 2% /home
    mount
    /dev/sda1 on / type ext4 (rw,noatime)
    none on /dev type ramfs (rw,relatime)
    none on /proc type proc (rw,relatime)
    none on /sys type sysfs (rw,relatime)
    none on /dev/pts type devpts (rw)
    none on /dev/shm type tmpfs (rw)
    none on /tmp type tmpfs (rw)
    none on /var/log type tmpfs (rw,size=10m)
    none on /var/run type tmpfs (rw,size=10m)
    none on /var/lock type tmpfs (rw,size=10m)
    /dev/sda2 on /usr type ext4 (rw,noatime)
    /dev/sda3 on /home type ext4 (rw,noatime)
    free
    total used free shared buffers cached
    Mem: 3780388 1494456 2285932 0 42884 1084512
    -/+ buffers/cache: 367060 3413328
    Swap: 8000360 0 8000360
    Last edited by guzz46 (2009-08-23 23:51:48)

    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    none /tmp tmpfs defaults 0 0
    none /var/log tmpfs defaults,size=10m 0 0
    none /var/run tmpfs defaults,size=10m 0 0
    none /var/lock tmpfs defaults,size=10m 0 0
    #/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
    #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
    #/dev/fd0 /media/fl auto user,noauto 0 0
    /dev/sda1 / ext4 defaults,noatime 0 1
    /dev/sda2 /usr ext4 defaults,noatime 0 2
    /dev/sda3 /home ext4 defaults,noatime 0 2
    /dev/sda4 swap swap defaults 0 0
    do you have to specify tmpfs instead of none under file system?
    Edit: i also tried
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    tmpfs /tmp tmpfs defaults 0 0
    tmpfs /var/log tmpfs defaults,size=10m 0 0
    tmpfs /var/run tmpfs defaults,size=10m 0 0
    tmpfs /var/lock tmpfs defaults,size=10m 0 0
    #/dev/cdrom /media/cd auto ro,user,noauto,unhide 0 0
    #/dev/dvd /media/dvd auto ro,user,noauto,unhide 0 0
    #/dev/fd0 /media/fl auto user,noauto 0 0
    /dev/sda1 / ext4 defaults,noatime 0 1
    /dev/sda2 /usr ext4 defaults,noatime 0 2
    /dev/sda3 /home ext4 defaults,noatime 0 2
    /dev/sda4 swap swap defaults 0 0
    mount
    /dev/sda1 on / type ext4 (rw,noatime)
    none on /dev type ramfs (rw,relatime)
    none on /proc type proc (rw,relatime)
    none on /sys type sysfs (rw,relatime)
    none on /dev/pts type devpts (rw)
    tmpfs on /dev/shm type tmpfs (rw)
    tmpfs on /tmp type tmpfs (rw)
    tmpfs on /var/log type tmpfs (rw,size=10m)
    tmpfs on /var/run type tmpfs (rw,size=10m)
    tmpfs on /var/lock type tmpfs (rw,size=10m)
    /dev/sda2 on /usr type ext4 (rw,noatime)
    /dev/sda3 on /home type ext4 (rw,noatime)
    but nothings changed, i'm sure it's a tmpfs because /tmp reads 1.9gb and everythings in there is gone after a reboot but it still doesn't use swap as backup
    Last edited by guzz46 (2009-08-23 12:38:43)

  • Distortion Nightmare. Jack swap solved! --- Elat

    [SB Audigy EX SB0090] This is how to workaruond distortion due to a faulty line out jack if you don't need surround. After using my Audigy fine for almost three years, the audio output became distorted. I tryed everything including formatting and reinstalling xp to no avail. I tested the [rear out] jack by telling my card to use four speakers and plugging my headphones into the [rear out] jack instead of the [line out] jack. The audio quality was totally fine. The only problem with leaving it in four speaker mode and only listening out of the [rear out] jack was that I wouldn't get correct audio with some games and winamp plugins. As a last resort before shattering my card and buying a new one, I decided to remove the [line out] jack from the top of the card and solder the [rear out] and [line out] jacks together on the back of the card. Here are the steps:
    Step - Remove the [line out] jack from the top of the card by prying off the side of the plastic jack cover with a flat head screw driver. Then slide the plastic cover laterally freeing it (mostly) form the metal pieces inside. Use pliers to carefully cut the final metal contact to free the plastic housing. Now use your fingers and remove the four remaining metal pirces from the top of the card by bending them back and forth. There should be nothing on the card where the [line out] jack was.
    Step 2 - Flip the card over and locate where the [line out] and [rear out] jacks are soldered through. Note that the jacks must be next to eachother. You will notice fi've metal contacts for each jack. Lets label them one through fi've, one being the contact closest to the edge of the card where you plug in your speakers and fi've being furthest back (about a centimeter). The only contacts that we will be concerned with are 2, 3, and 4. Contact I am guessing is card ground and is already connected on the [rear out] jack. Contact 5 I am guessing just helps hold the housing in place as it doesn't seem to connect anywhere on the top or bottom. Contacts 2, 3, and 4 must be left, right and ground in an unknown order but that doesn't matter because the contacts are parallel to eachother. [line out] and [rear out] contacts (2||2, 3||3, 4||4). Fortunately there is nothing on the card that would interfere with taking a metal pin and connecting contact 2 of the [line out] jack with contact 2 of the [rear out] jack and so on for contacts 3 and 4. Cleen on and around the contacts with acetone or alcohol and a lint free cloth to remove all dust etc.
    Step 3 - Acquire 3 Cleen metal pins (small sewing pins) and cut them to the proper length for connecting the contacts. Make sure to cut off the head and tip so you just have 3 pin sized lengths of metal about a half inch long.
    Step 4 - This step can be skipped if you are good at soldering. To hold the pins in place while soldering, I used a glue gun to glue down the pins. Connect contact 2 of the [line out] jack with contact 2 of the [rear out] Jack and so on. Since the glue is hot and I wanted to make sure to get a good connection, I put on a rubber glove and dabbed my index finger in some cornstarch (just light dusting to keep the glue from sticking to the glove). Next, put a dop of glue on your finger and put the pin in the middle of this drop. Then press the pin down on the card in the exact spot to connect the contacts. Make sure not to get any glue on the contacts or allow the pin to touch any other contacts than the ones you are connecting. Do this for the remaining two pins.
    Step 5 - Now that the pins are held in place, heat up a soldering iron and solder a drop where each contact and pin touch (6 points). Make sure not to drip or allow solder to touch any other contact or board component. It helps to file down the tip of your soldering iron first so it is cleen.
    Step 6 - Now that everything is connected, boot up and configure your card for headphones or two speakers. Mine sounded perfect but just to be sure, download this program RMAA 5.5 from http://audio.rightmark.org to benchmark your card's performance and make sure you are getting a good connection at the contacts. If there is a problem, check that the pins are making good contact and that solder is not touching where it shouldn't. That's it, hope this helps someone. If you have any questions you can email me - [email][email protected]][email protected][/url] My computer is infinitely better now that I have audio back!Message Edited by Navecko on 09-2-2005 08:57 AM

  • Problems with car charger

    I dont think i have read anything like this on the forums yet. Im on my second torch and although i like it a lot being (personal opinion) best blackberry yet (functionwide) , I feel it has some issues that are making me think a lot. I had a problem with the first one, i was charging it in my car (original BB charger) and some times i would see the lighting icon with the phone charging and sometimes not. I wanted to know if it was charging or not, so i tested for minutes looking at the battery % and nothing. Then the phone started to overheat and was not charging anymore, i took it to best buy mobile where i purchased it and they gave me different car chargers to test it. I did test it but i told them that my charger was orgiunal blackberry accesory and that i charge a 9700 and a 8520 from my wife. Nothing happened, they gave me a new phone. With the new one i noticed the b atter life was superb, was way better. but after 4-5 days (yesterday) the battery went dead at 5pm with slight use on the day, i tried charging the cellphone while eating, so i left it charging in the car and when i returned the phone was hot and not charging. Im really confused
    Things i know>
    1. its not the car charger, its charging other BB fine and its original accesory
    2. Its not the lighter in my car cause i also charge other phones
    please advice

    I too am on my second torch in 8 days. I am also having a problem with the car charger. The lightning bolt goes off while charging, especially when I am using AT&T Navigator. The second phone is not as bad as the first one was, but I don't know how well it will do in the weeks to come.
    I had this same problem with my original AT&T Blackberry, the 8900. In that case, a battery swap solved the problem. With the Torch, I really don't know what is going on, but this is a serious problem because I use the AT&T Navigator all the time in my business and I have to keep my battery charged.
    I hope Blackberry recognizes that there IS a problem and fixes it.

  • (solved) T61 swap cpu? (everything you need to know about swapping a T61 or T61p CPU)

    Edit: I've summerized everything I've learned in a week long search and added it to this topic, so scroll down and read. You'll save yourself many hours of reading and research. 
    I asked this as part of a prior topic but never got a definite answer, so I'll ask this specific question.
    Can I swap a cpu from one t61 to another?
    Donor system: T61 15.4widescreen with T9300 cpu (2.5ghz, 6mb cache)
    New System: T61 15.4 widescreen with T8100 cpu (2.1ghz, 3mb cache)
    I'd like to know for sure before I begin. Best answer I got so far is "I think so".
    ps. I also have a 14" (non-widescreen) t61 with a T7300 cpu (2.0ghz 4mb cache). I'm thinking the larger cache makes this superior to the T8100 even though it's slightly slower, do you agree? and if not, should I put the leftover T8100 in it? will it fit? more trouble then it's worth? (secondary question, but non-urgent)
    ThinkPad W-510 i7-820QM(1.73-3.06GHz) Quad Core... ThinkPad T500, T9900, 8gb SSD...FrankNpad T-60p/61p (X9000 2.8ghz) 8gb SSD ips FlexView...ThinkPad T-61p (T9300 2.5ghz) 8gb ram...Thinkpad X-61 Tablet 4gb ram...ThinkPad A-31 (1.9ghz P4 1.5gb ram)
    Solved!
    Go to Solution.

    I'm going to add some additional info to this post to help anyone who reads it.
    The T61 / T61p was manufactured with one of two different types of CPUs
    Merom (older)
    Penryn (newer)
    If your system board came with a Merom and you install a Penryn, you'll get a false "thermal error" on boot. There is a 3rd party bios to block that error from posting, but it's unauthorized by Lenovo and should be considered experimental.
    If your system board came with a Penryn, you can install either of the two CPUs.
    If your not sure of which CPU you have, load your bios and it will show you it's intel number. Mine is T9300 (which is a 2.5GB Penryn CPU with 6MB of cache). Go to Intel's website and search that number and towards the top of the page it will say something like "formerly Penryn" (I believe "formerly" is used because they are out of production). 
    Example: http://ark.intel.com/products/33917/Intel-Core2-Duo-Processor-T9300-(6M-Cache-2_50-GHz-800-MHz-FSB)
    Since Penryn is newer, your Merom boards won't be able to run the faster CPUs, so you can either try to find the fastest Merom CPU, or if you want to be daring you can reflash your bios with an unoffical firmware and run the Penryn. Although this has been done successfully with thinkpad enthousiats world-wide, it still won't give you full Penryn support. 
    The fastest Merom processor I know of is that a T61 will run is the T7800 It runs at 2.6ghz and has 4MB cache (note that this is slightly faster ten my 2.5gz Penryn, but my 6MB of cache more then makes up for the slight difference in speed.
    The fastest Penryn processor I know of is that the T61 will run is the T9500 It runs at 2.6ghz and has 6MB cache (some day I'll get one of these when the price in the used parts market drops low enough.
    There are faster processors, but I believe the T61 will not support one with a front size buss rate above 800mhz. *note, if anyone knows if this is possible please contact me and I'll edit this information.
    This should fully explain all the technical details I've discovered during my investigation, but to make this topic more complete, I'll hare a photographic guide showing how to remove and replace your CPU and cooling fan, and also addresses replacing your thermal paste (proper use of thermal paste is a MUST, to much and you could end up with a T61 paperweight, to little and you got the same problem. Basically when the heatsink is tightened down onto your CPU and GPU, it should spread to cover all the chip, with as little as possible overspread. I recommend Artic Silver #5, which is made of 99.9% silver filings. They also make a less expensive version that uses alumimum instead of silver, but given that T61 is known for thermal problems, you don't want to get cheap paste to save yourself all of $5. 
    Buying a new fan should be considered too. You can buy the fan alone for $12 includinng shipping from many ebay sellers. The heatsink and fan can also be purchased as a unit, but your heat sink should last the life of the Laptop. There is also a conductive "pad" that transfers heat from your systemboard chipset. This can be reused, just make sure it is intact and don't allow it to get any dust or finger prints on it. I'd also recommend a can of compressed air to blow out the inside of the laptop. Do this before you remove your cpu, you don't want to be blowing crap into the socket.
    Also be very careful not to bend any pins on the CPU, and inspect the new CPU carefully, a slightly bent pin could miss being detected and if you insert the cpu carelessly, you'll crush it.
    Online guide to replace CPU
    PDF guide (better guide in my opinion)
    If anyone has a suggestion for improving this guide, send me a P.M.
    If you found this information useful, click me some "kudos" so I'll know the time spent in sharing the info I learned is appriciated.
    ThinkPad W-510 i7-820QM(1.73-3.06GHz) Quad Core... ThinkPad T500, T9900, 8gb SSD...FrankNpad T-60p/61p (X9000 2.8ghz) 8gb SSD ips FlexView...ThinkPad T-61p (T9300 2.5ghz) 8gb ram...Thinkpad X-61 Tablet 4gb ram...ThinkPad A-31 (1.9ghz P4 1.5gb ram)

  • I've swapped to i5c so my hubby has my i4s with pay as u go but now it won't load or sent e-mails! I've tried tech support suggested by Talkmobile for 'fix' but it hasn't solved problem,any ideas?..

    I've swapped to i5c (great phone) so my hubby has my i4s with pay as u go but now it won't load or sent e-mails! I've tried tech support suggested by Talkmobile for 'fix' but it hasn't solved problem,any ideas?..

    Try this from MacFixIt as well:
    In the case of drive directory damage or problems with permissions, the solution is usually to use Apple's Disk Utility to repair the disk. Of course, you won't be able to perform this operation normally (simply launching the Disk Utility application, located in Applications/Utilities, and initiating a disk repair) if your system will not startup. So two options exist:
    * Insert your Mac OS X 10.4.x (Tiger) media (DVD or CD) and restart the computer while holding down the "C" key. Once the computer has booted from the installation disc, select "Utilities" from the menubar and open Disk Utility. Repair the disk, then quit Disk Utility and restart your system.
    * Alternatively, you can repair the disk while booted in single user mode if you do not have access to a retail Mac OS X 10.4.x (Tiger) DVD/CD. To startup in single user mode, hold down the "Command" and "S" keys simultaneously at startup. Once properly booted, type the command fsck at the prompt. Repeat these process until no errors appear.

  • Trouble swapping Ctrl/Alt [SOLVED]

    When I go to KDE's System Settings > Input Devices > Keyboard > Advanced, I try "Ctrl key position: Swap Left Alt Key With Left Ctrl Key". Nothing happens, Ctrl and Alt still do the same thing as before. This is a fresh Arch/KDE install so I may have neglected to install/configure something, but I haven't had any other keyboard problems.
    EDIT: This problem seems to have gone away on its own. I guess an update fixed it?
    Last edited by YAOMTC (2014-10-18 20:21:35)

    Solved! Someone in #kde linked me to this:
    http://superuser.com/questions/116376/c … alt-in-kde
    Run setxkbmap -print | xkbcomp -xkb -o original.xkb -
    Then copy original.xkb to switch-LALT-LCTL.xkb. Keep the file original.xkb as a backup, better remove write permission.
    Edit switch-LALT-LCTL.xkb in the block xkb_keycodes and exchange the keycodes for LALT and LCTL.
    Run xkbcomp switch-LALT-LCTL.xkb $DISPLAY to active your new layout. Run xkbcomp original.xkb $DISPLAY to restore the old one.
    These instructions suffice for modification on any level of sophistication. The keyboard description file is just structured text, after all.
    It worked for me! Not sure why System Settings couldn't do it but oh well.
    EDIT: This resets every startup for some reason, so put that last line of code in a shell script and told KDE to run that script on startup.
    Last edited by YAOMTC (2014-09-26 21:02:04)

  • [Solved] swap in RAM

    Long time ago I saw an advertisement of a window$ program which was allowing to use a part of RAM something like a SWAP partition. I've been thinking about moving to a 32bit OS, as I've heard that everything uses less RAM than on a 64bit one. Is there any linux equivalent to that program?
    Last edited by isitsaturday (2013-06-25 20:38:44)

    ANOKNUSA wrote:
    No offense intended,  but thinking doesn't get anymore backward than this.  Everything may use up to 20% less RAM system-wide, but you'll only be able to efficiently utilize 1Gb of that RAM anyway.  With RAM modules for brand new machines being dirt-cheap (I spent $20 USD on a 4Gb stick after my last laptop purchase), and RAM being far more abundant than any current operating system could possibly need or even use under typical conditions, you're attempting to solve a non-existent problem.
    Anyhoo, this thread is marked as "solved" despite no solution being posted; what's with that?
    I wanted to move to 32-bit because it uses less RAM. I've seen a windows program advertisement, didn't even see the program itself. The ad was saying it lets >4GB RAM be used as swap on 32-bit systems. I marked the thread as [Solved] 'cause zramswap does what I've wanted to achieve (using less RAM without having less RAM available) and as Arch is going to drop 32-bit support, I'm not going to move to 32-bit anymore.

  • [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.

  • Activating Swap fails [solved]

    I'm in the process of doing my very first archlinux install.. so far things are going ok. Ran into one snag that I'd like to solve before going any further though.  During the boot process it tries to activate the swap partition but then it says 'fails'. I'm not sure why since I set the swap during the install /hda2. 
    When I do cfdisk it shows that a swap partition is set up (82) and I can type mkswap dev/hda2 at the command line but is there some way I can remedy this so that swap gets set up automatically at boot?  Shouldn't this be default behavior?
    thx

    I didn't really mess with fstab.. poking inside I find it looks like:
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    tmpfs /tmp tmpfs defaults 0 0
    usbfs /proc/bus/usb usbfs defaults 0 0
    /devcdroms/cdrom0 /mnt/cd iso9660 ro,user,noauto,unhide 0 0
    /dev/cdroms/cdrom0 /mnt/dvd udf ro,user,noauto,unhide 0 0
    /dev/floppy/0 /mnt/fl vfat user,noauto 0 0
    /dev/discs/disc0/part2 swap swap defaults 0 0
    /dev/discs/disc0/part3 / ext3 defaults 0 1
    /dev/discs/disc0/part1 /boot ext2 0 1
    /dev/discs/disc0/part2 swap swap defaults 0 0
    /dev/discs/disc0/part3 / ext3 defaults 0 1
    /dev/discs/disc0/part1 /boot ext2 0 1
    I wonder why all the /dev/discs show up twice?  Could that be it?

  • FN - CTRL swap on ThinkPad T400 / T500 keyboard [SOLVED]

    Hi guys.
    I've disassembled T500 firmware and found the place where possible to make a patch for FN-CTRL swap.
    Now I need testers. If you are interested, then send me request via email ([email protected]).
    Just for your information: I've already made such a BIOS mod for the following Lenovo laptops:
    IdeaPad Y550: http://forums.lenovo.com/t5/IdeaPad-Y-and-U-series-Laptops/FN-CTRL-swap-on-Lenovo-Y550-keyboard-SOLV...
    IdeaPad Y450: http://forums.lenovo.com/t5/IdeaPad-Y-and-U-series-Laptops/FN-CTRL-swap-on-Lenovo-Y450-keyboard-SOLV...

    It wasn't so easy to make CTRL-FN patch for ThinkPads as for IdeaPad laptops. But after three weeks of hard work I place here the final versions for the following ThinkPads:
    R400, T400
    R500
    T400s
    T500, W500
    W700, W700ds
    X61, X61s
    You can download these and other CTRL-FN BIOS mods in my topic at notebookreview.com. Also you can post your requests on CTRL-FN BIOS modifications there (http://forum.notebookreview.com/showthread.php?t=474396).
    Disclaimer: 
    Lenovo has no relation to these BIOS-es. These patches are completely unofficial. They provided "as is" without any warranties from Lenovo. Lenovo has never tested or approved these patches and don't support them. You will be solely responsible for any damage to your computer system or loss of data that results from flashing or using of the patched BIOS.
    Use it at your own risk.

  • [SOLVED] Init - Activating Swap (Failed)

    I just updated my system,
    and after a recent reboot i noticed the init trying to activate swap, and failing.
    Thing is, i don't use a swap partition, and hasn't since i installed Arch on this machine,
    But i don't remember it  (init, udev or the recent kernel?) trying anyways.
    This is not causing any problems from what i can see,
    but for sake of tidiness, what has changed,
    and shouldn't it - not even try - activating a swap partition when one is not set and/or existing at all?
    /etc/fstab:
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    tmpfs /tmp tmpfs nodev,nosuid 0 0
    UUID=02709134-c074-4e66-8aa6-ed2d43a1cdf4 / ext4 defaults,noatime 0 1
    UUID=d4b8ac62-9fb2-4798-9ff3-d3e179ff253e /home ext4 defaults,noatime 0 1
    /dev/sda2 /mnt/win7 ntfs-3g defaults 0 0
    /dev/sda4 /mnt/wind ntfs-3g defaults 0 0
    /dev/sdb2 /mnt/winf ntfs-3g defaults 0 0
    /dev/sdc1 /mnt/wine ntfs-3g defaults 0 0
    /dev/sdc2 /mnt/wint ntfs-3g defaults 0 0
    /dev/sdd1 /mnt/wing ntfs-3g defaults,noauto,nofail 0 0
    Last edited by PReP (2012-03-10 11:22:30)

    It might actually be.
    I just found that a few of my non-UUID mounted partitions had switched around,
    Probably because of my switch to AHCI instead of Legacy-IDE in the BIOS yesterday.
    When i fixed them, "Activating Swap" went "[DONE]" again, though i still have no swap partition
    - but that is what it might have said before aswell, thus it was just the "[FAILED]" that caught my eye.
    I found this quote in the thread skunktrader linked, that might explain this partially:
    "TomeGun: There was recently a bug report about this (against util-linux-2.21-1). It turned out that the problem was actually that mounting local filesystems mistakenly printed FAILED, even though it succeeded. "
    I should probably leave this as solved at this time,
    Thanks to the community for sharing ideas, as usual

  • [Solved] Failing to initialize swap?

    I have been rebooting alot recently when I noticed that on boot up it was failing to initialize swap!
    I used the command free and it returned that swap had zero space! what is going on?
    here is my fstab for reference.
    # /etc/fstab: static file system information
    # <file system> <dir> <type> <options> <dump> <pass>
    none /dev/pts devpts defaults 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0
    /dev/sda1 /boot ext3 defaults 0 1
    /dev/sda2 / ext3 defaults 0 1
    /dev/sda3 /home ext3 defaults 0 1
    /dev/sda5 swap swap defaults 0 0
    did it not get formatted properly in the install or something?
    Last edited by semperfiguy (2007-12-28 14:52:28)

    Since this is coming up in the Google results concerning this message, I thought I'd mention a solution to a related problem. In my case, Linux seemed to be renumbering the drives at some point before initializing swap so the swap partition was renamed from /dev/sda2 to /dev/sdc2 and /dev/sda2 became an NTFS partition on another drive. Since /etc/fstab listed /dev/sda2 as swap, and /dev/sda2 now pointed to a partition on another drive, the OS failed to initialize swap.
    What seemed to work for me was to change the line in /etc/fstab
    /dev/sda2             none            swap            defaults        0 0
    to
    UUID=50e1a18a-d1d5-452b-99cb-69408befc029       none            swap            defaults        0 0
    You'll need to figure out the UUID of your swap partition (it may be listed in /etc/fstab). These are randomly generated when you do mkswap. Just make sure you don't mkswap on the wrong drive because of this renumbering!

  • [Solved] encryption of swap with cryptsetup doesn't work

    Hi,
    I reinstalled my because of new hardware with EFI and GPT, and now I can't get work my swap partition encrypted.
    /etc/cryptsetup:
    cryptswap /dev/sda1 /dev/urandom swap
    Also with more options (key-length, etc) doesn't change the behavior.
    /etc/fstab:
    ABEL=system / ext4 rw,relatime,data=ordered 0 1
    /dev/sda128 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2
    /dev/mapper/cryptswap none swap sw 0 0
    I tried also without any swap-entry in the /etc/fstab, because my pam_mounted LUKS-encrypted Partitions are working well, without a fstab-entry
    Here is the journald-output that might be relevant:
    Feb 09 01:25:41 dixi-arch systemd[1]: Found device Hitachi_HDP725025GLA380.
    Feb 09 01:25:41 dixi-arch systemd[1]: Activating swap /dev/sda1...
    Feb 09 01:25:41 dixi-arch systemd[1]: Starting Cryptography Setup for cryptswap...
    Feb 09 01:25:41 dixi-arch kernel: tda829x 0-004b: type set to tda8290+75a
    Feb 09 01:25:41 dixi-arch systemd[1]: Activated swap /dev/sda1.
    Feb 09 01:25:41 dixi-arch kernel: Adding 2097148k swap on /dev/sda1. Priority:-1 extents:1 across:2097148k FS
    Feb 09 01:25:42 dixi-arch kernel: device-mapper: uevent: version 1.0.3
    Feb 09 01:25:42 dixi-arch kernel: device-mapper: ioctl: 4.26.0-ioctl (2013-08-15) initialised: [email protected]
    Feb 09 01:25:42 dixi-arch systemd-cryptsetup[251]: Set cipher aes, mode cbc-essiv:sha256, key size 256 bits for device /dev/sda1.
    Feb 09 01:25:42 dixi-arch systemd-cryptsetup[251]: Failed to activate with key file '/dev/urandom': Device or resource busy
    Feb 09 01:26:16 dixi-arch systemd-cryptsetup[251]: Loading of cryptographic parameters failed: Invalid argument
    Feb 09 01:26:16 dixi-arch systemd-cryptsetup[251]: Failed to activate: Invalid argument
    Feb 09 01:26:16 dixi-arch systemd[1]: [email protected]: main process exited, code=exited, status=1/FAILURE
    Feb 09 01:26:16 dixi-arch systemd[1]: Failed to start Cryptography Setup for cryptswap.
    Feb 09 01:26:16 dixi-arch systemd[1]: Dependency failed for Encrypted Volumes.
    Feb 09 01:26:16 dixi-arch systemd[1]: Dependency failed for dev-mapper-cryptswap.device.
    Feb 09 01:26:16 dixi-arch systemd[1]: Dependency failed for /dev/mapper/cryptswap.
    Feb 09 01:26:16 dixi-arch systemd[1]: Dependency failed for Swap.
    Feb 09 01:26:16 dixi-arch systemd[1]: Unit [email protected] entered failed state.
    Feb 09 01:26:16 dixi-arch systemd[1]: Starting System Initialization.
    Feb 09 01:26:35 dixi-arch systemd-cryptsetup[602]: Key file /dev/urandom is world-readable. This is not a good idea!
    Feb 09 01:26:35 dixi-arch systemd-cryptsetup[602]: Set cipher aes, mode cbc-essiv:sha256, key size 256 bits for device /dev/sda1.
    Feb 09 01:26:35 dixi-arch systemd-cryptsetup[602]: Failed to activate with key file '/dev/urandom': Device or resource busy
    During the boot sequence the PC stops working and I have to press enter to keep going. Finally i have these errors and a non-encrypted Swap-Device.
    blkid:
    /dev/sda1: LABEL="swap" UUID="6013541f-7809-4b5f-9702-e630e25fd144" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="9849ee0b-e0d7-4d28-866c-fb7d0134a182"
    /dev/sda2: LABEL="system" UUID="4bf8a95c-bf43-4980-92dd-b0eb6dc07093" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="6fc2bd3d-7241-4a88-8137-9985a333e3de"
    /dev/sda3: UUID="445eba44-3536-4b99-a0a6-e3629cf90654" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="6b84a546-9873-496c-a7e1-721824023d07"
    /dev/sda4: UUID="466b5d04-7b81-4914-b5af-7e2426b801bf" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="dfdf5217-7028-4a10-ae18-3a63450c3231"
    /dev/sda128: UUID="9D36-7245" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="9df97a9a-3f5e-487b-a3d1-60825031b537"
    /dev/mapper/_dev_sda3: LABEL="dixi-home" UUID="23548045-1c6f-4640-8c62-0f3c48c05f38" TYPE="ext4"
    /dev/mapper/_dev_sda4: LABEL="backup" UUID="cbed9ef3-db0b-4750-bf6c-8c42a67ad080" TYPE="ext4"
    and theres is no /dev/mapper/cryptswab, what I had expexted
    swapon:
    NAME TYPE SIZE USED PRIO
    /dev/sda1 partition 2G 0B -1
    fdisk -l:
    Gerät Start Ende Größe Typ
    /dev/sda1 2048 4196351 2G Linux swap
    /dev/sda2 4196352 109053951 50G Linux filesystem
    /dev/sda3 109053952 381683711 130G Linux filesystem
    /dev/sda4 381683712 486299982 49,9G Linux filesystem
    /dev/sda128 486301696 488397134 1023,2M EFI System
    There are some Bug-Reports for fedora, I don't understand, but maybe the problem is, that cryptsetup can't read /dev/urandom.
    But this works with my old mbr-partition; therefore I hope for a configuration error
    Thanks
    Last edited by midixinga (2014-02-09 23:46:06)

    falconindy wrote:
    Looks to me like /dev/sda1 is already a swap device. Since the underlying disk is GPT formatted, systemd finds this and activates it. Your logs and swapon show exactly this.
    Feb 09 01:25:41 dixi-arch systemd[1]: Activating swap /dev/sda1...
    So, of course, systemd-cryptsetup is going to fail when it tries to encrypt a device which is already in use. Get rid of the swap signature on /dev/sda1.
    Wow, thank you very much !
    I formatted the partition /dev/sda1 with gparted  as "deleted", it's now code 0700 in gdisk
    fdisk -l
    Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: 27980DF8-22E1-4F25-9388-711D1EDE11A9
    Device Start End Size Type
    /dev/sda1 2048 4196351 2G Microsoft basic data
    /dev/sda2 4196352 109053951 50G Linux filesystem
    /dev/sda3 109053952 381683711 130G Linux filesystem
    /dev/sda4 381683712 486299982 49.9G Linux filesystem
    /dev/sda128 486301696 488397134 1023.2M EFI System
    Disk /dev/mapper/cryptswap: 2 GiB, 2147483648 bytes, 4194304 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    swapon -s
    Filename Type Size Used Priority
    /dev/dm-0 partition 2097148 0 -1
    journalctl:
    Feb 09 16:54:09 dixi-arch systemd[1]: Starting Cryptography Setup for cryptswap...
    Feb 09 16:54:09 dixi-arch systemd-cryptsetup[271]: Key file /dev/urandom is world-readable. This is not a good idea!
    Feb 09 16:54:09 dixi-arch systemd-cryptsetup[271]: Set cipher aes, mode cbc-essiv:sha256, key size 256 bits for device /dev/sda1.
    Feb 09 16:54:10 dixi-arch systemd[1]: Started Cryptography Setup for cryptswap.
    Feb 09 16:54:10 dixi-arch systemd[1]: Starting Encrypted Volumes.
    Feb 09 16:54:10 dixi-arch systemd[1]: Reached target Encrypted Volumes.
    Feb 09 16:54:10 dixi-arch systemd[1]: Found device /dev/mapper/cryptswap.
    Feb 09 16:54:10 dixi-arch systemd[1]: Activating swap /dev/mapper/cryptswap...
    Feb 09 16:54:10 dixi-arch systemd[1]: Activated swap /dev/mapper/cryptswap.
    Feb 09 16:54:10 dixi-arch systemd[1]: Starting Swap.
    Feb 09 16:54:10 dixi-arch systemd[1]: Reached target Swap.
    I think everything is fine now
    Thanks again

Maybe you are looking for