LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   FSTAB In mandriva (https://www.linuxquestions.org/questions/mandriva-30/fstab-in-mandriva-794572/)

siawash 03-10-2010 09:00 PM

FSTAB In mandriva
 
I am not used to the Mandriva fstab version with all the user id;

Code:


UUID=7898705f-4acc-4780-8172-f8f32e6cee75 / ext3 noatime 1 1
/dev/cdrom /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
# Entry for /dev/sda1 :
UUID=96DCBA28DCBA0313 /media/win_c ntfs-3g defaults,umask=000 0 0
# Entry for /dev/sda2 :
UUID=5CA6BBFDA6BBD5AC /media/win_d ntfs-3g defaults,umask=000 0 0
none /proc proc defaults 0 0
# Entry for /dev/sdb1 :
UUID=c8f52c9a-ae3a-4b8f-a086-c9d63afaf5b3 swap swap defaults 0 0

~

I want to add my cowon music player to the file. The external drive shows up in df as /dev/sdd;

Code:


Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb2              91G  3.9G  82G  5% /
/dev/sda1            200M  29M  172M  15% /media/win_c
/dev/sda2            233G  43G  191G  19% /media/win_d
/dev/mmcblk0p1        487M  229M  258M  48% /media/disk
/dev/sdc1            294G  136G  144G  49% /media/disk-1
/dev/sdc1            294G  136G  144G  49% /home/siawacsh/myhome
/dev/sdd              16G  14G  2.0G  88% /media/I AUDIO7

Here is fdisk output

Code:


sudo /sbin/fdisk -l

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x06abc06d

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        262    2104483+  82  Linux swap / Solaris
/dev/sdb2  *        263      12238    96197220  83  Linux

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x20f86de2

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          26      204800    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              26      30402  243991552    7  HPFS/NTFS

Disk /dev/mmcblk0: 510 MB, 510132224 bytes
8 heads, 7 sectors/track, 17792 cylinders
Units = cylinders of 56 * 512 = 28672 bytes
Disk identifier: 0x00000000

        Device Boot      Start        End      Blocks  Id  System
/dev/mmcblk0p1              5      17792      498058+  6  FAT16

Disk /dev/sdc: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b20bc

  Device Boot      Start        End      Blocks  Id  System
/dev/sdc1  *          1      38913  312568641  83  Linux

Disk /dev/sdd: 16.5 GB, 16542334976 bytes
64 heads, 32 sectors/track, 15776 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x69737369

This doesn't look like a partition table
Probably you selected the wrong device.

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1  ?      912975      995343    84344761  69  Unknown
Partition 1 does not end on cylinder boundary.
/dev/sdd2  ?      830821    1743849  934940732+  73  Unknown
Partition 2 does not end on cylinder boundary.
/dev/sdd3  ?          2          2          0  74  Unknown
Partition 3 does not end on cylinder boundary.
/dev/sdd4        1409025    1409050      26207+  0  Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
[siawacsh@localhost ~]$


jdmcdaniel3 03-10-2010 10:00 PM

I don't think I would add a Music Player to FSTAB
 
If we can assume your player shows up when you plug it in, this is the best way to deal with it. Otherwise it must be plugged in when you boot or reboot your computer. Further, it should be unmounted to be removed.

To automatically place it in the FSTAB for you, bring up your partitioner software with the player plugged in, find the audio drive in the list and elect to edit it. However, the only thing you do is set a mount point, a folder you have created beforehand in your home folder like /home/<username>/AUDIO7. It will be mounted and FSTAB is edited for you.

Be careful using the partitioner program, but as long as only the mounting point is set, you should be OK.

Thank You,

siawash 03-11-2010 10:04 AM

Yes, I have created a folder for the cowon and called it cowon. The reason I want to add it to fstab is for permission issues. I can access the drive without doing any of this. The problem is that each file I create in the drive cannot be deleted due to permission issues and I am fast running out space.

When I had Debian setup I simply added /dev/sdd to cowon ( my own folder ). I then made sure NOT have the music player plugged in on boot because I have another external drive

/dev/sdc1 * 1 38913 312568641 83 Linux

which I dont want to confuse the naming with.

But the Mandriva fstab is using all sorts of user id's which I don't understand.

With any other drive I would simply delete files using rm from the command line. But the cowon drive is using naming with spaces. i.e.

Code:


ls -l
total 1128
drwxr-xr-x  2 root    root    4096 2010-03-10 00:43 cdrom/
drwxr-xr-x 13 siawacsh root  16384 1970-01-01 01:00 disk/
drwxrwxrwx 16 siawacsh root 1110016 2010-03-10 22:55 disk-1/
drwxr-xr-x 13 siawacsh root    8192 1970-01-01 01:00 I AUDIO7/
drwxrwxrwx  1 root    root    4096 2009-10-26 18:52 win_c/
drwxrwxrwx  1 root    root    8192 2010-03-10 17:19 win_d

when I try to cd into I AUDIO7 i get an "directory does not exist error.

Can anyone tell me how to get the shell to deal with spaces?

jdmcdaniel3 03-11-2010 06:25 PM

Do you have Access to your Drive Partition Software?
 
I use openSUSE so I don't know if you have the same ability I have or not. To test this process I plugged in a USB key drive, which is auto mounted as /media/JDM2GB where JDM2GB was the name of the partition. I can browse the folder using the Dolphin file manager. In SuSE, the drive comes up as device /dev/sdd1. I then started Yast, went to the Software category then selected Partitioner. When I start Partitioner I get a warning that I need to know what I am doing and I answer Yes. I open up the hard disk folder on the left and select sdd. Under sdd is the partition sdd1. On the right I right click on the sdd1 partition and elect to edit the partition. By default "Do Not Format is selected" which is good and the mount point is set for /media/JDM2GB. I changed the mount point to /home/james/Test where Test is a folder I had already created in my home folder. I select the fstab options button where another windown pops up. I leave mount by device name set and change the
arbitrary option value to "rw,defaults" and select OK. I next select finish then I select Next and finally select finish again. Now the disk is mounted in my home folder where I can do anything with the disk that I want. What I got in FSTAB was the following entry:

/dev/disk/by-id/usb-_USB_FLASH_DRIVE_19730B000360-0:0-part1 fat32 /home/james/Test rw,defaults 0 0

You could also use your Partitioner to look up the Device ID and create a manual entry in FSTAB that looks like above, but inserting the name for your target folder and the device ID from your drive. By using the Device ID, you do not care about the /dev/sdd stuff. Hope this is helpful.


Thank You,

ongte 03-13-2010 06:19 AM

Mandriva uses UUID to identify partitions but you don't have to. Just put in the fstab line like you would on any linux system & should work exactly the same.

UUIDs or Labels are a good idea because your device may not always be recognized as sdd. So using a better method to identify the drive is a good idea. With your device plugged in you can find put it's UUID by using:
Quote:

# blkid
Once you know the UUID, you can now use it in your fstab like this:
Quote:

UUID=XXXX-XXXX /mnt/cowon vfat defaults,umask=000 0 0
As for how to cd into I AUDIO7. You can use either one of these:
Quote:

$ cd I\ AUDIO7
$ cd "I AUDIO7"


All times are GMT -5. The time now is 07:12 PM.