Fsck.swap Error 2
Contents |
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us
Fsck Error 2 While Executing Fsck.swap For /dev/sda2
Learn more about Stack Overflow the company Business Learn more about hiring developers or fsck swap partition posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer fsck error 2 no such file or directory site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Strange behavior of fsck up vote 0 down vote favorite I am using Debian 7 with two HDDs: 500Gb PATA and 750Gb SATA. blkid shows me the following: root@intel:/etc# blkid /dev/sda1: UUID="b6350c6b-5fbd-4e07-9a4b-10b600fbb64c" TYPE="swap" /dev/sda2: UUID="2f852e13-38ee-4b56-a474-d675c22d5f28" TYPE="ext4" /dev/sda3: UUID="78e34fe3-365c-4c4d-86b8-51615641f9ec" TYPE="ext4" /dev/sdb1: LABEL="data" UUID="03c3f01f-d390-49de-a570-3de4b73a9fea" TYPE="ext4" content of fstab: root@intel:/etc# cat /etc/fstab #
08:03 AMWhenever i boot up, since i last modified with my /etc/fstab file, i get an Error at the splash screen saying "could not mount swap, S to skip, M to manually recover." i created this thread because i wasnt getting any replies on the other thread, i thought it was probably because it was labeled SOLVED, so i started this one, excuse any misconception about this topic.. "sudo blkid" produces : /dev/sda1: UUID="2955b4dc-24e6-4da1-b5b4-cc7e5c25944" TYPE="ext4" /dev/sda5: UUID="........." TYPE="swap" "cat /etc/fstab" produces : /. . . . proc /proc proc nodev,noexec,nosuid 0 0 /dev/sda1 / ext4 errors=remount-ro 0 0 #swap was on http://serverfault.com/questions/548627/strange-behavior-of-fsck /dev/sda5 during installation UUID=9d3ad268-d68c-4308-845f-30cc6ada2171 none swap sw 0 0 the repeated dots after one another are commends, talking about how to use blkid when i press M to manually recover, i go to the terminal, and when i try to edit my /etc/fstab (nano /etc/fstab) while i am already logged in as root, i get Cannot write changes to disk, Read-only filesystem..?? thank you very much in advance OdaymJanuary 14th, https://ubuntuforums.org/archive/index.php/t-1666687.html 2011, 08:31 AMthe only restriction i have right now is that i cannot edit /etc/fstab because of "Read-only filesystem"...how is my filesystem read-only? I AM ROOT! please help. OdaymJanuary 14th, 2011, 08:39 AMalso, when i run "fsck /dev/sda1" i get : fsck from util-linux-ng 2.17.2 WARNING: bad format on line 11 of /etc/fstab e2fsck 1.41.11 (14-March-2010) /dev/sda1 : clean, 263674/18989056 files, etc...blocks and when i run "fsck /dev/sda5" which is the swap, i get : fsck from util-linux-ng 2.17.2 WARNING: bad format on line 11 of /etc/fstab fsck: fsck.swap: not found fsck: Error 2 while executing fsck.swap for /dev/sda5 the 11th line of /etc/fstab is : UUID=9d3ad268-d68c-4308-845f-30cc6ada2171 and under it none swap sw 0 0 WthItehJanuary 14th, 2011, 08:40 AMthe only restriction i have right now is that i cannot edit /etc/fstab because of "Read-only filesystem"...how is my filesystem read-only? I AM ROOT! please help. The filesystem could be mounted read-only during boot-up due to errors. You should not be able to write on a read-only mounted filesystem even as root. You could boot in recovery mode instead, (single user mode) and try to change the file there. OdaymJanuary 14th, 2011, 08:42 AMbut how do i do that? i dont have a menu that offers me this
not mounting at boot time.I found that really odd and therefore I decided to find outif the swap partition doesn’t have some problems with the swap filesystem or http://www.pc-freak.net/blog/how-to-check-linux-swap-partition-disk-surface/ the physical hard disk surface. My first try was directly with the fsck linux command, though unsuccesful. The error I came across while trying to run fsck on my /dev/sda6 swap partition was: fsck: fsck.swap: not found
/sbin/fsck: Error 2 while executing fsck.swap for /dev/sda6 What a set back … So I tried next issuing the badblocks command in order to physically check my physical swap partition error 2 state: In short, if you are looking for a way to test some ext2, ext3 or reiserfs or any other linux or unix partition for bad blocks from your linux then you certainly should look at badblocks manual page. I was lucky the result from badblocks has proven I have no physical issues with my hard drive, as you can see in below’s output generated by the badblocks’s command: fsck error 2 Checking blocks 0 to 1950447
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found. After reading some http://linuxquestions.org forums I realized there is another way to approach the problem using few other commands as follows: debian:~# swapoff /dev/sda6
debian:~# mke2fs -c /dev/sda6
# if there are no errors after the above 2 commands are completed then issue:
debian:~# mkswap /dev/sda6
debian:~# swapon /dev/sda6 Well I guess that’s the end of the post 🙂 Share this on