Description of problem: swapon fails during boot and also when run manually in rawhide at least. Not sure when this started happening: [root@localhost libbonobo]# cat /etc/fstab LABEL=/1 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda4 swap swap defaults 0 0 [root@localhost libbonobo]# LC_ALL=C swapon -a -v swapon on /dev/sda4 swapon: /dev/sda4: Invalid argument Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Please, provide more information. For example outputs from: # blkid # fdisk -l /dev/sda # cat /proc/swaps <-- before swapon # LC_ALL=C swapon -a -v # cat /proc/swaps <-- after swapon
[kmaraas@localhost ~]$ blkid /dev/sda4: TYPE="swap" LABEL="SWAP-sda4" /dev/sda3: LABEL="/1" UUID="c3436114-c0b6-4875-a42e-f3314ee8c145" SEC_TYPE="ext2" TYPE="ext3" /dev/sda1: TYPE="ntfs" /dev/sda2: LABEL="/boot" UUID="cc7b83fc-9fad-42eb-8ef4-cbc641be4ee5" SEC_TYPE="ext2" TYPE="ext3" [root@localhost kmaraas]# fdisk -l /dev/sda Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2705 21727881 7 HPFS/NTFS /dev/sda2 2706 2720 120487+ 83 Linux /dev/sda3 2721 9500 54460350 83 Linux /dev/sda4 9501 9729 1838970 82 Linux swap / Solaris Partition 4 does not end on cylinder boundary. [root@localhost kmaraas]# cat /proc/swaps Filename Type Size Used Priority [root@localhost kmaraas]# LC_ALL=C swapon -a -v swapon on /dev/sda4 swapon: /dev/sda4: Invalid argument [root@localhost kmaraas]# cat /proc/swaps Filename Type Size Used Priority
(In reply to comment #2) > [root@localhost kmaraas]# fdisk -l /dev/sda > Partition 4 does not end on cylinder boundary. Hmm.. the disk has been partitioned by any non-linux tool, right? You can try to fix it: fdisk /dev/sda option : x (expert mode) option : f (fix partition order) option : v to verify partition if it is ok: option : w (to write table to disk) option : q to quit but be **VERY CAREFUL** -- you can lost your data or possibility to boot your Windows...
It was resized/partitioned using gparted from a live iso image. Command (m for help): x Expert command (m for help): f Nothing to do. Ordering is correct already. Expert command (m for help): v Partition 4 does not end on cylinder boundary. 6110 unallocated sectors Expert command (m for help): p Disk /dev/sda: 255 heads, 63 sectors, 9729 cylinders Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID 1 80 1 1 0 254 63 1023 63 43455762 07 2 00 254 63 1023 254 63 1023 43455825 240975 83 3 00 254 63 1023 254 63 1023 43696800 108920700 83 4 00 239 63 1023 239 63 1023 152617500 3677940 82 Partition 4 does not end on cylinder boundary. Expert command (m for help): q Any other tips on how to fix this?
Moving this to devel since it's still a problem for me in rawhide
So, it doesn't seem that the partition itself was the problem. I tried resizing it a few times in gparted without success. After reading the fstab(5) manual page it struck me that the fstab entry was wrong? The second column should have had "none" intstead of "swap" in it according to the man page. I also dropped the label and just put the /dev/sda4 entry in there and now it works just fine. Maybe the tools have problems with labels or at least some variants of labels?
It doesn't seem like a problem with labels (if blkid works as expected). The "Invalid argument" is very probably error from swapon(2) syscall. Try strace, you will see more.
Based on the date this bug was created, it appears to have been reported during the development of Fedora 8. In order to refocus our efforts as a project we are changing the version of this bug to '8'. If this bug still exists in rawhide, please change the version back to rawhide. (If you're unable to change the bug's version, add a comment to the bug and someone will change it for you.) Thanks for your help and we apologize for the interruption. The process we're following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again.
Created attachment 302513 [details] Output of commands requested in previous comments I get a similar error on latest rawhide. I'm using an LVM partition scheme though. I have attached the output of the following commands: cat /etc/fstab lvm lvs blkid swapon -av strace swapon -av HTH
The problem is that F9 swapon(8) checks for "suspend" instead for "swsuspend". That's bug. /dev/VolGroup00/LogVol01: TYPE="swsuspend" ^^^^^^^^^ # swapon -av swapon on /dev/mapper/VolGroup00-LogVol01 swapon: /dev/mapper/VolGroup00-LogVol01: Invalid argument Thanks for your report!