sda2 is read-only after battery ran out (Solved)

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

sda2 is read-only after battery ran out (Solved)

#1 Post by Blackfish »

Don't know what happened to sda2 directory. I was working on files, then the computer shut down after battery ran out. When I plugged it in and rebooted to go back to work in sda2, all the folders and files are now read only. Some files I can open and save, others I cannot. When try to save a new file in a folder, it says, read only, and file cannot be saved. I go into permissions to try and change them, warning says, read only, cannot be changed. All folders and files ruined. Any way to fix this?

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#2 Post by tallboy »

Depending on what format you have on that partition, you can run fsck.ext2, fsck.ext3 or fsck.ext4 to check and repair the filesystem. You have to unmount the partition before using fsck, and for example run the command fsck.ext3 /dev/sda, or as I just did: fsck.ext3 /dev/sda4, which is one of my 4 partitions on the sda harddrive.
Read man fsck first, to get an idea of what it does. Remember to leave the program to run without disturbance, if it need to rebuild a lot, it may take some time.
True freedom is a live Puppy on a multisession CD/DVD.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

Re: Everything in sda2 is read-only after battery ran out

#3 Post by perdido »

Blackfish wrote:Don't know what happened to sda2 directory. I was working on files, then the computer shut down after battery ran out. When I plugged it in and rebooted to go back to work in sda2, all the folders and files are now read only. Some files I can open and save, others cannot. When try to save a new file in a folder, it says, read only, and file cannot be saved. I go into permissions to try and change them, warning says, read only, cannot be changed. All folders and files ruined. Any way to fix this?
Are you talking about puppy linux programs and save file or are you talking about personal data?
Before you do anything to your data it would be a good idea to back up just in case something goes wrong when trying to fix this.

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#4 Post by Blackfish »

I have three partitions on this drive:

sda1 (fat32) is where bionicpup64--8.0 resides

sda2 (fat32) is where my personal files reside

sda3 is a linux-swap

The problem with the files is on sda2, my personal files. The partition is now corrupted and is read-only!

And wouldn't ya know it? I set the drive up this way so my personal files could never be corrupted! Turns out, they're the only ones to get corrupted! Ugh! What a pain!
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#5 Post by Blackfish »

After backing up all the files from sda2 (copied over to another hard drive with only two errors), and since I can now use then normally... I suppose I could just wipe out and repartition sda2 and copy the files back to sda2. Definitely an option. Dunno if it's the best option, but it's better than no option.

For future reference, is it better to format drives and partitions as ext3 or 4 than to use fat32? I used fat32 because it is perhaps the most common format. But maybe Puppy works best with ext?
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#6 Post by Marv »

Definitely reformat the sda2 data partition to ext. That has both functional (symlink support etc.) and stability advantages over the fat32. ext4 is a journaled file system so much more robust wrt. power outages and clearly the go-to for larger partitions. I still use ext2 for small partitions as it is more space efficient and even it is way better than fat32. There are yet newer filesystems available which better support way huge disks I believe, but for all-around utility at this time my vote is with ext yet.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#7 Post by Flash »

For what it's worth, I believe that copying a partition, then reformatting the partition and copying the original data back to it has the effect of defragmenting the partition. As long as you don't use dd to copy the partition, which I suppose would preserve the original fragmentation.

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#8 Post by Blackfish »

I am switching all partitions back to ext. I used to format all of them like that all the time. I leaned the difference the hard way.

Copying the partition sounds interesting. Never thought of that before. Thanks.
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#9 Post by bigpup »

Yes use ext formats.
I suggest ext3, but ext4 should now work good if you are using Bionicpup64 8.0

If you have the

Code: Select all

pfix=fsck
command, on the kernel line of the boot menu entry that is booting Bionicpup.
It will do a file system check and fix at every bootup.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#10 Post by Blackfish »

Flash wrote:For what it's worth, I believe that copying a partition, then reformatting the partition and copying the original data back to it has the effect of defragmenting the partition. As long as you don't use dd to copy the partition, which I suppose would preserve the original fragmentation.
What is the best way to copy the partition?
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#11 Post by Blackfish »

bigpup wrote:Yes use ext formats.
I suggest ext3, but ext4 should now work good if you are using Bionicpup64 8.0

If you have the

Code: Select all

pfix=fsck
command, on the kernel line of the boot menu entry that is booting Bionicpup.
It will do a file system check and fix at every bootup.
I am doing just that. I've used Puppy a d ext3 or 4 since 2014 and never had a problem ever until someone talked me into using fat32 because it is "the most common and compatible as is just as good as anything else."

Nonsense. Now I know.
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#12 Post by Blackfish »

bigpup wrote:Yes use ext formats.
I suggest ext3, but ext4 should now work good if you are using Bionicpup64 8.0

If you have the

Code: Select all

pfix=fsck
command, on the kernel line of the boot menu entry that is booting Bionicpup.
It will do a file system check and fix at every bootup.
Why ext3?
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#13 Post by bigpup »

Ext3 has been fully bug fixed and had all the problems worked out of it.
Well, as close as it ever will be.
Also, some older Puppy versions may not even be able to use ext4.
If they can they most likely do not have the latest ext4 support files and programs.
Ext4 is still being bug fixed.

Bionicpup64 8.0 should have the latest and up to date ext4 support.
Even it is getting old for latest ext4 stuff.

Bugs ext3
https://bugzilla.kernel.org/buglist.cgi ... e%20System
7 bugs.

Bugs ext4
https://bugzilla.kernel.org/buglist.cgi ... e%20System
99 bugs.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#14 Post by Flash »

Blackfish wrote:...What is the best way to copy the partition?
I'd use rsync. Open a terminal and enter rsync --help for your options. I think there are several programs for Puppy that use rsync to back up partitions. I've never used any of them so you'll have to hunt around if you want to use one of them.

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#15 Post by Blackfish »

I just copied all my files from sda2 to two separate drives, then checked them all. They were 100%. Then I zapped sda2 and turned it back to ext3 and copied the files back to sda2. Everything in perfect working order again. In fact, ext3 is faster and more efficient than fat32. Everything runs better.

Now in the process of zapping every drive and partition I have and turning it to ext3. Never again.

Thanks for your help, Everyone!
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#16 Post by Flash »

How did you copy the partition?

User avatar
Blackfish
Posts: 324
Joined: Wed 26 Feb 2014, 15:36
Location: Brookings, SD

#17 Post by Blackfish »

Flash wrote:How did you copy the partition?
I didn't. I just reformatted a drive back to ext3, then copied all the files to that drive. Then I checked all the files to ensure everything was good, and it was. Then I reformatted the partition in question over to ext3 and copied the files back to it and checked all of them. All good. Everything works. Last, I reformatted two other drives back to ext3 and copied the files over to them. All told, the main partition is perfect again, and three other drives for backup, all working perfectly.
Dell Latitude E5500 w/ Intel Centrino processor-- running bionicpup64-8.0

Post Reply