More Linux questions

I’ve been using Ubuntu Linux the last couple of weeks, and have a few more questions.

Per the last thread, I have my Thunderbird mail files on a common FAT partition, so I can read all my mail from either Linux or XP. The only hiccup is that I need to remember to access that partition from Places first, or else the partition isn’t mounted. Is there a way to mount this partition automatically when I boot?

Is there a way to get Suspend and/or Hibernate to work with Linux? I Googled a bit, and didn’t find a clear solution. This page, though, explains why it’s not as simple as under Windows. When I try to Hibernate, I don’t think it completes, as the laptop never turns off, and seems to heat up. I have to press and hold power to turn it off, and next time it just does a full boot. Similarly for Suspend, and there’s no way to get it to unsuspend. Anyone know how to do this?

I’ve got a graphics problem where in some windows, especially Firefox (which I use the most), the display gets scrambled. I can clear the scramble by switching between fullscreen and window, but it’s irritating.

FWIW, I have a Compaq Presario 2200, about four years old, with 768 MB RAM. I’m running Ubuntu 9.something.

Do you have a line in /etc/fstab that looks something like:

/dev/sda3 /mnt/WindowsFAT32 vfat quiet,defaults,rw 0 0

(sda3 would be replaced by your actual partition id, WindowsFAT32 would be your label of choice.)

See here for more info.

Thanks. I added a line (but haven’t rebooted yet).

You don’t need to reboot unless you want to test it. To mount it, open a console and type “mount /dev/sda3” (without quotes and change /dev/sda3 to whatever it is on your system). It will stay mounted until you turn the computer off.

It’s already been mounted manually. I just want it to do so automatically.

With that added line, the drive still doesn’t show up. I added the following as the last line of fstab:
/dev/sda5 /mnt/FAT32 vfat quiet,defaults,rw 0 0

If I manually select Places -> 60.0 GB Media, Ubuntu mounts it, and it shows up using df as
/dev/sda5 58582720 39596224 18986496 68% /media/disk-1

(and doesn’t show up at all under df if I haven’t selected Places -> 60.0 GB Media). Any ideas?

Does /mnt/FAT32 exist? It won’t work unless the mount point exists.

Also, rebooting isn’t necessary, you can try the added fstab line by running mount -a, which will mount everything in fstab.

I thought that /mnt/FAT32 was where the disk would mounted at, that FAT32 would be its name, in place of the default “60.0 GB Media”. FAT32 was said to be my choice.

/mnt exists, but is empty. What would I write in place of /mnt/FAT32?

You’d either want an empty directory named “/mnt/FAT32” or you’d want to change the vfstab line to mount it at “/mnt” (and leave it empty) and then the contents of the disk would be right under there. Some unixes let you mount a disk as a directory that does have files in it; if you can, that’s good way to hide files (I mean, if running a non-consumer OS isn’t enough).

OK, I made the directory /media/disk2, and then added the line
/dev/sda5 /media/disk2 vfat quiet,defaults,rw 0 0
to fstab, and that seems to work.

Except that when I start Thunderbird now, it can’t show the messages in Inbox, Sent, drafts, etc. I changed the Account Settings so that Local Folders points to /media/disk2/… instead of /media/disk-1/… where disk-1 was the default name the disk had been given. It knows that there are folders I had created there, but it won’t show the messages in them either. It just sits there with its spinning circle.

Perhaps the partition is mounting with all the files belonging to root, so that Thunderbird running under a user can’t access them? You can tell by going to the partition and using ls -l to see who owns the files.

There’s a way to change permissions on windows directories mounted with in fstab, but I can’t remember the option name, I’ll check my home computer later tonight if it turns out that’s what the problem is.

I suspect it’s a permissions problem. I can’t make a new directory in /media/disk2

ETA: Yeah, what Simplicio said. They are all owned by root. (I didn’t think this would happen on FAT partitions.)

Looking around on mounting with fstab, it sounds like the rw means read-write, but only for the mounter (which is root). To let anyone write, AFAICT, the line should be something like
/dev/sda5 /media/disk-4 vfat quiet,defaults,rw,exec,umask=0000 0 0

but that stiil doesn’t let me make directories.

Umask sets the permissions for newly-made files. You don’t want to set it to 000. You can either set uid=n where n is your uid (found in /etc/passwd) or do the same with gid=n but using a gid instead, obviously. See here under “Mount options for fat”.

You should be able to change ownership of /media/disk2 to your own user:

sudo chown youruser.youruser /media/disk2

…replacing youruser with your user name, of course. Then you can read and write it.

That won’t work because the disk is formatted as FAT. FAT has no concept of groups or owners. That’s why the OP has to use the mount options to set the owner and group.

Shoot, didn’t think of that. Not that it helps this situation at its current point, but Ubuntu can read/write NTFS now.

For the graphics problems, are you using Compiz (desktop effects)? What video card and hardware driver?

You usually don’t need too many options in /etc/fstab for something this simple.

This should work:

/dev/sda5 /media/disk-4 vfat defaults 1 2

but the defaults are set by the file system and I don’t know what vfat defaults are, so I would use this:

/dev/sda5 /media/disk-4 vfat auto,users,rw 1 2

That auto mounts it, allows users to mount it, and mounts it read/write. That’s all I’ve ever used on my vfat drives.

Are any of these going to work if my wife logs in instead of me? Can I ensure that my wife and I are in the same group? In /etc/passwd, we’re listed like
me:x:1000:1000:Me,:/home/me:/bin/bash
wife:x:1001:1001:Wife,:/home/wife:/bin/bash

Does that mean we’re in two different groups, me with uid and gid = 1000 and hers being 1001?

Isn’t there some way to make the partition behave as if it was all set using “chmod 777” or “chmod 770”? Alternatively, can I set it so that all users can mount the disk, and then put the mount command in … something equivalent to .cshrc? (I apparently have the bash shell under Linux, but we use the C shell at work.)

On Preview: Fubaya, I tried
/dev/sda5 /media/disk-4 vfat auto,users,rw 1 2

but still can’t write or make directories in /media/disk-4.

Wow, I read a little on it and never realized it was this difficult, but the only windows vfat drives I’ve had for years are cameras and usb sticks.

Try adding gid=100, which is the id for users group.

/dev/sda5 /media/disk-4 vfat auto,users,rw,gid=100 1 2