General :: External Drive Read Only - WARNING! Running E2fsck On A Mounted Filesystem May Cause SEVERE Filesystem Damage
Mar 24, 2010
I've had a look at some similar threads but as I'm very new to linux they're already a bit technical for me. Sorry, this calls for someone with patience. I gather from other threads that disconnecting an external drive without unmounting is a no-no, and this seems to be the likely cause. Now the disk is read only and I'm unable to change any settings through the usual control panel on ubuntu. I'm just not familiar with the terminal instructions. I tried to cut and past a few command lines from other threads but I got some warnings that proceding could damage data. Like this one: WARNING! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage.
I am very new to linux, and I have a question regarding the filesystem check (fsck). The power recently went out and when I tried to restart linux the following error appears:
*/dev/sda1 contains file system w/errors, check forced it then goes on to say..
*An error occured during the file system check. Dropping you to a shell; the system will reboot when you leave the shell. Give root password for maintenance (or type Control-D to continue) I wasn't sure what to do, but checked some other online forums and they suggested running fsck manually - so I typed in the root password - and used the command, "fsck -A -V ; echo == $? ==" it then gave the following message
*WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage *Would you like to continue (y/n)
Again, I wasn't sure what to do so i just checked no. I then manually turned off the computer and was prompted at the beginning to press Alt-3. I was brought to another screen and it informed me one of the drives was degraded and suggested rebuilding the array. I tried doing this, but it still brings me back to the original error of, "/dev/sda1 contains file system w/errors, check forced," and the process continues.
Also, when I tried to rebuild the array, I didn't backup any of the data on our home directory before doing this (which was probably a big mistake). After being prompted to type the root password, I was able to give the ls command and look at all the directories...the home directory where our data was stored was empty and I am afraid I may have lost some information. Is there a possibility that data was lost when I was trying to rebuild using the old drives?
I was running a somewhat standard install of Ubuntu 9.10, when my drive got pushed into read-only mode, so I switched to tty1, ran /etc/init.d/gdm stop, and then ran fsck -y /. It took an hour or too, but eventually finished. However, now that partition is unbootable, and upon attempting to boot into Ubuntu, it complains about libsepol.so.1 as missing and starts a recovery shell. In this recovery shell, only certain tools work. ls complains about libacl.so.1, and the filesystem is still read-only. When I try mount -rw /dev/sda1, it complains about libsepol.so.1 again. I can however still run fsck. I tried running it with fsck -p -f /, and it completes, much quicker, but the system remains unbootable. I could probably boot into the Ubuntu live-cd to get read-write access, but I wouldn't know what to do. I read an interesting suggestion here, but I don't know how I would go about reinstalling the base Ubuntu packages without write access to the hd, or through the live cd.
I administer a remote server via SSH that runs CentOS 5.5. I have been unsuccessful in all my attempts to write to two different external USB hard drives with a single ext3 partition when logged in as root.
When attempting to create a "test" directory I get one of two messages:
Both drives *appear* to have filesystem issues. When I run an fsck on either drive, I get:
Keep in mind this is a newly-formatted, empty drive.
Not putting stock in the odds that I've had two hard drives (different sizes and brands) with the exact same hardware problem, I'm going to assume this is a software issue, although maybe it isn't. Hence, my post in "Linux - General". I've heard talk elsewhere of controller (chipset) issues coming into play. Is this valid?
Okay, here's the information you'll need to make a diagnosis....
Here's the output of a "df -h" command:
Here's the contents of my /etc/fstab:
Here's the output of "cat /etc/mtab":
Here's the output of a mount command:
Here's the output of fdisk on the device in question:
The number of cylinders for this disk is set to 48641.
There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):
I've got someone with access to the box if necessary. But it might take days to implement solutions since this isn't his full-time job. Remote solutions are, therefore, preferable.
I have a rather large USB drive that I'd like to be able to use across the different machines I own. I'm having a hard time figuring out what would be the best file system to use on it to be able to read/write things from the 3 OSs I'm in contact with: Windows, Linux and Mac.
my external HDD of 750GB bring me an error during mounting!it asks me to get to windows and reboot twice or cmd chkdsk/f of which when i do it only option comes is to format it, i do not wanna format it coz it's with a lot of ma useful data!am using debian just asking if its possible to retrieve ma data from it using commands persay and what are those
I was running a somewhat standard install of Ubuntu 9.10, when my drive got pushed into read-only mode,It took an hour or too, but eventually finished. However, now that partition is unbootable, and upon attempting to boot into Ubuntu, it complains about "libsepol.so.1" as missing and starts a recovery shell. In this recovery shell, only certain tools work. ls complains about "libacl.so.1", and the filesystem is still read-only. It completes, much quicker, but the system remains unbootable. I could probably boot into the Ubuntu live-cd to get read-write access, but I wouldn't know what to do.I don't know how I would go about reinstalling the base Ubuntu packages without write access to the hd, or through the live cd.
Some moments ago, I plugged my drive into a computer with some strange data protection software. It turned my drive's filesystem into read only and now it can neither be formatted nor mounted with write option. I've tried
Code: $ sudo dd if=/dev/zero of=/dev/sdb but it doesn't work.
The problem is, the computer and the software that have caused this problem has lost forever.
I run Windows Vista and Ubuntu 9.10 dual boot. Today while booting windows, it informed me that there was something wrong with my hard disk and it would perform a check, and made some fixes.
Only when I wanted to boot into ubuntu again did I realise that the disk check had corrupted my linux partition. Ubuntu's load screen shows up, but just before the login screen it says that the filesystem could not be mounted.
Is there a way I can fix this? And how do I prevent windows from doing the same in the future?
During the file system check of an ext3 partition at boot I get the following output:
The super-block could not be read or does not describe a correct ext2 filesystem. If the device is still valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate super-block:
I'm then forced to login in as root and given the following prompt:
I'm reluctant to do as advised by the output and run e2fsck -b because it is not an ext2 filesystem.
Although I can still enter runlevel 5, it doesn't seem to recognise mouse and keyboard input in KDE so my system is effectively redundant at the mo. For this reason any short term workarounds are welcome, but a fix is needed. This problem is part of a longer saga to do with recovering a Windows Vista installation which started failing to boot. I have used both Vista and SUSE tools to try and recover my bootloader to no avail, and this has been the result. If more detail about this is needed please ask and I can explain what I have done.
I'm trying to partition/format a new external hard disk for backup and have run into a snag that now prevents my computer from booting. In the description below of what happened please bear with me as I do my best to remember the commands and screen output (which for obvious reasons I don't have in front of me).As root.The disk was subsequently writable. However, I then realized that the default start and end cylinders had resulted in a very small partition apparently occupying some free cyclinders in the beginning of the disk.
So next I ran fdisk again, deleting the sdc4 I had just created and creating a new one instead, this time using the cylinders at the end of the disk. When I exited fdisk I got a message something like that the new tables can only be read upon a subsequent reboot. I ran mkfs again, but not e2label. Indeed using /sbin/fdisk -l, sdc4 still had the small size as defined initially. So I rebooted.
Now when it comes up I get something like "checking filesystems. fchk.ext3: can't resolve 'LABEL=/media/LaCie2TB1'" and am prompted to login as root to correct. I tried to simply delete sdc4 again but that didn't help. I also tried to edit /etc/fstab (using vi, which I don't know at all) but it kept telling me that this is a read only file, even though permissions are rw for root.Can anyone out there help me so that (1) I can boot into my computer, and (2) I can correctly partition and format the hard drive??
I've ran fsck -c on the (unmounted) partition in question a while ago. The process was unattended and results were not stored anywhere (except badblock inode). Now I'd like to get badblock information to know if there are any problems with the harddrive. Unfortunately, partition is used in the production system and can't be unmounted.
I see two ways to get what I want: Run badblocks in read-only mode. This will probably take a lot of time and cause unnecessary bruden on the system. Somehow extract information about badblocks from the filesystem iteself. How can I view known badblocks registered in mounted filesystem?
I am trying to do a fsck on my ext3 partition, but so far failed to let the system come up in single user mode and having the partition mounted read only. It says in the kernel parameter that it is read only (RO) but still mounts it RW. A remount with mount -o remount,ro does not work, since / is always busy. what to do to get a fsck done? I don't want to boot into a rescue system, this should be possible on a running system (like Windows does it, when rebooting)
For example we have a PC with Linux and, let's say, ext4. It is connected to another PC with Linux and Samba-shared dir.First PC mounted shared dir of the second one. So it's in the filesystem, for example in "/mnt/000/". What will happen if I unplug the net cable from first PC? Will ext4 on the first PC crash so I'll have to perform fsck? I know that hot unpluging of mounted HDD probably will make filesystem read-only available and generally damaged.
I am trying to figure out a totally odd behavior of the ext3 filesystem mounted in Ubuntu 9.10. There is a Korn Shell script, part of which does the following in the loop:
while ((1)); do mv dir1/file dir2; if [[ ! -r dir2/file ]]; then echo "ERROR" ls -l dir1/* dir2/* exit 1 elif echo "OK" fi done
Given that dir2/file always exists and that I do not move it asynchronously with "&", my script should never hit the "ERROR" statement. The odd thing is that it does, and quite randomly (no pattern at all). However when it does hit the ERROR case, ls -l prints that file is in dir2 and it is readable! I tried using "-e" instead of "-r" test - no luck. I never seen anything like this in 10 years of my programming experience. Same script worked fine on Fedora 11, and yet it wouldn't work on Ubuntu.
I had installed ubuntu 11.04 on my system along with windows vista. After a few days, i decided to remove ubuntu so i just logged into windows and formatted the ubuntu partition using the windows partitioner, then extended my main c: drive to span the whole disk so that i was left with a single partition with only windows vista on it.Later when trying to restart my system couldn't log back into windows.I kept getting a prompt sayinggrub rescue>After googling around a bit i shrinked and created another partition the disk again and installed ubuntu on it again.still. =/GRUB doesn't show any windows entry.I noticed something strange though that when i tried viewing my partitions using parted i didnt see any filesystem type listed besides my windows partition (/dev/sda3). I doubt that is why GRUB does not show any windows entry.Also i manually tried to boot into windows from the grub prompt using commands...root(hd0,3)chainloader +1bootbut it says 'invalid signature'Did i somehow corrupted my windows partition during resizing and installing/un-installing? Plus i also booted with the windows installation dvd and when i typed bootmgr /fixbootit said something like no valid filesystem found.
I am running a dedicated server with linux cent os 5.5 32 bit with lighttpd, php 5.2.14 and mysql
I am getting problem in my server. The filesystem enters read only mode automatically and then I can't edit any file in my server. This happens by itself. I tried to run fsck command and it gives the following output:
I'm having the following issue on an appliance using uClinux and MTD to access a NAND flash memory: Although the kernel has Yaffs compiled and it seems able to access the NAND, it doesn't create devices (/dev/mtdblock? and /dev/mtd?):
Code: root:~> dmesg Linux version 126.96.36.199-ADI-2007R1.1-svn (root@ubuntu) (gcc version 4.1.1 (ADI 07R1)) #1 Thu Feb 10 15:37:08 CET 2011 Blackfin support (C) 2004-2007 Analog Devices, Inc. Compiled for ADSP-BF532 Rev 0.5
I removed the hard disk from my EeePC and used it with Debian Squeeze on a 16GB SD card. It wasn't fast, but it was all solid-state, and that's important to me. However, lately it had started misbehaving. When recovering from sleep it'd lose all fonts (everything was displayed in squares), files could not be found and programs would stop working, and in a short time the system would become completely useless. Then after a while it started doing it regardless of sleep mode; I'd turn it on, do something, and it would work for a while - or maybe not - and then screw up. As an example, I noticed that unmounting partitions from gparted would do it almost always, but unmounting them from shell wouldn't.
Sometimes simply opening the browser would cause this weird crash. When shutting the system off it'd complain about the ext4 partition, though I don't remember exactly what it said. I thought it was Debian that had somehow screwed itself up (or I had...), so I wiped the card and installed Ubuntu Netbook on it. I was quite surprised to see that that, too, failed in the exact same way. I'd blame the SD card, but the strange thing is, the data on it is perfectly fine. In fact, I temporarily fixed the problem by reinstalling the hard drive, dd-ing the whole SD card on it and then expanding the partition over the unused space. From this setup, the system works perfectly - using the same data from which it used to fail when running from the SD card.
I installed OpenSUSE 11.1 on a friends computer after having a lot of trouble from ubuntu, and because I use it. It was working great when she got it home, but it locked up randomly and wouldn't unfreeze so she turned it off and when she rebooted She got an error about there not being a file system present and that she needed to run a mount command, which didn't work. After that, now it just says that there is no files system present and you ge tthe basic prompt. I had her run a live cd and run Gpartd and check and repair the partitions, but it did nothing.
I am getting a SSD and I'd like it to become my new Linux boot drive. However, it is smaller than my current hard drive's root Linux partition, so I'd like to copy over the filesystem and exclude some directories (which I'll leave on another hard drive). So I can't just clone the partition with parted or similar because it is too big.
I want to make sure all the data, metadata, links and such are preserved. That seems to exclude "cp" because it doesn't preserve all the metadata and link information.
The two basic techniques I've been able to identify seem to be something like:
find / -xdev -print0 | cpio -pa0V /mnt/dst
rsync -avP -H -S --numeric-ids / /mnt/dst
Can anyone chime in with what they've used in the past, whether one of these or a different method, or if they see any flaws in these approaches.