PYSDM corrupted...cannot fix SOLVED...sort of.

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

PYSDM corrupted...cannot fix SOLVED...sort of.

Post by Neville »

I recently installed PYSDM so that I can access some Windows partition files via links on the desktop.
Unfortunately the mounting process corrupted. When I start Mint 13 I get the following message:
"An error occurred while mounting /Media/sda2
Press S to skip or M for manual recovery"
PYSDM cannot unmount the partition. I cannot find any reference to this problem on the forum. (Perhaps it's there but I can't see it!)
Does anyone have an answer? I hope I don't have to reinstall Mint13.

Cheers
Nev
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
passerby

Re: PYSDM corrupted...cannot fix

Post by passerby »

It's probably just a problem with the new fstab file pysdm created. You shouldn't need to reinstall.
Can you post the contents of /etc/fstab for us?
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix

Post by Neville »

Thanks passerby,
Using the file browser, I find that the etc/fstab.d file is empty.
What next?

Nev
passerby

Re: PYSDM corrupted...cannot fix

Post by passerby »

Not fstab.d the directory, fstab the file. It should be a file in /etc, one without an extension.
It's opened with whatever your default text editor is.
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix

Post by Neville »

passerby,
Thanks for your help. Here is a copy of the file:


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda6 during installation
UUID=f5521aab-fdb7-436d-9793-97939a2feeb7 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
UUID=61dd68c9-2e12-4312-b645-0ea722c234da none swap sw 0 0
/dev/sda2 /media/sda2 Windows ntfs nls=iso8859-1,users,umask=000,user,owner,noatime,nodiratime 0 0
/dev/sda2 /media/sda2 Windows ntfs nls=iso8859-1,users,umask=000,user,owner,noatime,nodiratime 0 0
/dev/sda2 /media/sda2 Windows ntfs defaults 0 0

Cheers
Nev
EDIT There is an fstab.BAK file next to it. I wonder if it is possible to restore it.
passerby

Re: PYSDM corrupted...cannot fix

Post by passerby »

It is, but before that... it looks like you have 3 entries for the same partition.
Try commenting out two of them.
eg.

Code: Select all

/dev/sda2 /media/sda2 Windows ntfs nls=iso8859-1,users,umask=000,user,owner,noatime,nodiratime 0 0 
#/dev/sda2 /media/sda2 Windows ntfs nls=iso8859-1,users,umask=000,user,owner,noatime,nodiratime 0 0 
#/dev/sda2 /media/sda2 Windows ntfs defaults 0 0
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix

Post by Neville »

Tried that. Still the same error.

Nev
passerby

Re: PYSDM corrupted...cannot fix

Post by passerby »

Alright, let's try restoring the backup instead.
Just rename fstab to something else (eg. fstab.old), then rename fstab.bak to fstab.
eg.

Code: Select all

sudo mv /etc/fstab /etc/fstab.old
sudo mv /etc/fstab.bak /etc/fstab
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix

Post by Neville »

I tried that. Had problems with permission at terminal.
Now I can't boot into Mint13!.
I think I will sleep on it and maybe reinstall tomorrow.
Perhaps.
I will have to find another way of mounting a partition at boot.

Nev
EDIT I even tried booting in recovery mode but to no avail.
The trouble is I don't know enough.
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by Neville »

passerby
Solved the problem.
Re-installed Mint13! And learned a bit more by doing so.
I will do more research on auto mounting on boot.

Cheers and thanks.
Nev
passerby

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by passerby »

Glad you got it fixed. Shame you had to re-install though.
Pysdm is a great tool, one I used to use myself, but once you've familiarized yourself with fstab a little it can be easier & faster to do it manually.
Not sure what pysdm ended up doing to your system :lol:
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by altair4 »

If it makes you feel any better PySDM was removed from the Ubuntu 12.10 repositories ( and therefore Mint14 ) because they finally figured out it was written by children.

The next target for removal should be gnome-disk-utilty ( aka palimpsest, aka gnome-disks, aka Disks ). This one will take longer to purge from the repos since it was just rewritten by RedHat ( note: always avoid things that were "just rewritten" ) but clearly it never had a code review or any kind of adult supervision before it was released because it already has a slew of bug reports filed against it.

Mountmanager is another one that should go, and then there's ntfs-config, and don't forget about .....

I find templates is a better way to go. Here's a template for an NTFS partition:

Code: Select all

UUID=DA9056C19056A3B3 /media/WinD ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
** If you have mounted the partition manually unmount it.

** Find the correct UUID number for your partition:

Code: Select all

sudo blkid -c /dev/null
** Create the mount point:

Code: Select all

sudo mkdir /media/WinD
** Add the template to /etc/fstab with the correct UUID and mountpoint.

** Run the following command to test for syntax errors and if there are none silently mount the partition ( better to find out if there is a problem before you reboot ):

Code: Select all

sudo mount -a
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by Neville »

Thanks Altair4,
I do not feel confident enough yet to start fiddling with terminal commands that I don't fully understand.
I will have a long hard look at what you have suggested and try to understand it fully before I start.
Perhaps you could explain the meaning of each command.

Nev
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by altair4 »

Neville wrote:Perhaps you could explain the meaning of each command.
I fear you will regret this :wink:

Code: Select all

sudo blkid -c /dev/null
That will list all of your partitions mounted or not that are connected to your machine. A sample line would look something like this:
/dev/sda3: LABEL="Common" UUID="DA9056C19056A3B3" TYPE="ntfs"

Code: Select all

sudo mkdir /media/WinD
mkdir = make directory. It's the command to create a directory at that given location. Since the location is within /media you need to be sudo to do that.
UUID=DA9056C19056A3B3 /media/WinD ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
The general syntax of a line in fstab is as follows: [device] [mountpoint] [filesystem] [options]

So in the line above:
device = UUID=DA9056C19056A3B3: a unique identifying number for that partition.
mountpoint = /media/WinD: It's the location where your partition can be accessed.
filesystem = ntfs
options = defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0

defaults : A general set of default mount parameters that determines if the partition will automount, is executable, root controlled, etc..
nls=utf8 : has to do with character encoding so that it can handle all the characters in the file name.
uid : The id number of the user that you want to have as owner of the mounted partition. "1000" is you so uid=1000 makes you the owner of the mounted partition.
windows_names : You can create in Linux a file with a name that has characters Windows does not recognize ( special characters ). This option prevents you from doing that.
umask:

From a Linux perspective an NTFS partition in it's raw state has permissions of 777 - drwxrwxrwx. Umask represents the permissions that you want to mask or remove from the "view" you create when you mount it. Each position represents a type of user:

1st position: The owning user of the partition
2nd position: The group that you want to allow access.
3rd position: All other users.

Each number represents a type of permission that you want to remove:

0 = nothing is masked or removed
1 = execute is removed ( you do not want ot remove execute on a directory )
2 = removes write
4 = removes read

They are additive so a 7 ( 1+2+4 ) removes all access for example.

So the line I suggest as a template will mount the partition to /media/WinD with you as owner, root as group ( the default unless you specify otherwise ), and permissions allowing everyone to access it.

Code: Select all

sudo mount -a
That command does 2 things. It will mount any partition that is not currently mounted by following the instructions in fstab. But in doing so it will uncover any mistakes you have made ( typo in the UUID, there is no /media/WinD, it's not really ntfs, etc... ). It's easier to correct any mistakes before you reboot than to find out at boot.

Note: This template is for NTFS partitions. The template for an ext3/4 partition is a lot simpler since you don't ( can't ) specify owner, group, or permissions in fstab for Linux filesystems.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Neville
Level 1
Level 1
Posts: 35
Joined: Mon Nov 26, 2012 6:21 pm

Re: PYSDM corrupted...cannot fix SOLVED...sort of.

Post by Neville »

Thanks altair4,
I will study and try your info when I get time.It seems a lot safer.
Another method I have fount is NTFSconfig. The only problem with that is it is permanent; once set you can't undo, or so the article says.
It's a real pity there is no reliable GUI method.

Thanks for your help and patience.
Cheers
Nev.
Locked

Return to “Software & Applications”