Opensuse by default installs with `ntfs-3g`, which allows reading from and writing to ntfs partitions. But usually, you will need to provide permission to mount, read and write. It will ask for the root password everytime you want to mount the partition.
The filesystem permissions are provided by the file /etc/fstab. To see its contents, use:
Note that [abbrev1] stands for WD1600AAJS-75M0A0_WD-WMAV3C623442 and [abbrev2] stands for WD1600AAJS-75M0A0_WD-WMAV3C623442. I shortened it to fit into the table.
The meaning of this is, line by line-
Line 1:
The partition number 5 of the first disk is the swap partition.
The second column is the mount point- here it is swap.
The third column is the filesystem type. Here it is swap.
The fourth column is the mount options.
Let's explain the mount options. Here are some options.
auto : automatically mounts at boot
noauto : doesn't automatically mount at boot
owner : only root or the owner of the device file can mount this file system
user : allows any user to mount a file system, only root or the user who mounted the file system can unmount it
users : same as user except any user can unmount it
ro : mounts the file system as read only
defaults : mounts the file system with the default options
uid=x : mounts the file system as user with id x (ownership)
gid=x : mounts the file system as group with id x (ownership)
noexec : prevents the execution of files on specified device
The fifth column is dump frequency (fs_freq), used for these filesystems by the dump command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.
The sixth column is pass number (fs_passno), used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
A value of zero in either of the last 2 columns disables the corresponding feature.
Line 2:
The partition number 6 of the first disk is the root partition. The second column is the mount point- here it is root (/). The third column is the filesystem type. Here it is ext4. The rest is explained above.
Line 3 and onwards: These are system devices.
While fstab can have /dev/disk/by-id/, it can also have by partitioner block id. It would then look like this:
One command to see or check block id is blkid which must be run as superuser.
The result may be like this:
/dev/sda1: LABEL="System Reserved" UUID="E63A1EF13A1EBF0D" TYPE="ntfs"
/dev/sda2: UUID="CAA626D8A626C533" TYPE="ntfs"
/dev/sda5: UUID="b2fda9bd-dc8c-426d-bc5e-55991bc4d972" TYPE="swap"
/dev/sda6: UUID="42d749c6-e98e-4112-b850-8d2047c47bf5" TYPE="ext4"
/dev/sdb1: LABEL="WORKAREA" UUID="1ABA3617BA35EFBD" TYPE="ntfs"
/dev/sdc1: LABEL="New Volume" UUID="648AD06E8AD03E6C" TYPE="ntfs"
But if we were to use the "by-id" method, we need to see the device names and labels. Use the following command:
Results would be something like this:
total 0
drwxr-xr-x 2 root root 660 Mar 2 20:27 .
drwxr-xr-x 8 root root 160 Mar 2 20:27 ..
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-ST3500320AS_5QM2D6NC -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-ST3500320AS_5QM2D6NC-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-ST3500413AS_Z2A73G2X -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-ST3500413AS_Z2A73G2X-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-TSSTcorp_DVD+_-RW_TS-H653G_R4576GMZ21801500 -> ../../sr0
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SATA_ST3500413AS_Z2A73G2X -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_ST3500413AS_Z2A73G2X-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SSeagate_FreeAgent_XTrem_5QM2D6NC -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SSeagate_FreeAgent_XTrem_5QM2D6NC-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x5000c5000e8b0037 -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x5000c5000e8b0037-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x5000c500356a72c4 -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x5000c500356a72c4-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x50014ee05776cf2f -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part6 -> ../../sda6
Note this line:
This is the partition I want to add to fstab.
I'm interested in only this bit, the `by-id` bit:
So lets fire up gedit as superuser. Run:
As gedit is gnome (non-terminal) it will not run from a su terminal, so this special command.
Now edit in the third line as shown below to make the changes.
Again, I have abbreviated the disk numbers. The ata drive (partition 1) is of course ata-ST3500413AS_Z2A73G2X-part1.
Note that the mountpoint is under /windows/. This is a requirement.
Save fstab.
At the next boot, the partiton will automount with full read write permission under the /windows/ folder.
Open the partition and simply add to bookmarks for easy access.
The filesystem permissions are provided by the file /etc/fstab. To see its contents, use:
cat /etc/fstabYou might see something like this:
| /dev/disk/by-id/ata-WDC_[abbrev1]-part5 | swap | swap | defaults | 0 | 0 | |
| /dev/disk/by-id/ata-WDC_[abbrev2]-part6 | / | ext4 | acl,user_xattr | 1 | 1 | |
| proc | / | proc | proc | defaults | 0 | 0 |
| sysfs | / | sys | sysfs | noauto | 0 | 0 |
| debugfs | / | sys/kernel/debug | debugfs | noauto | 0 | 0 |
| usbfs | / | proc/bus/usb | usbfs | noauto | 0 | 0 |
| devpts | /dev/pts | devpts | mode=0620,gid=5 | 0 | 0 |
Note that [abbrev1] stands for WD1600AAJS-75M0A0_WD-WMAV3C623442 and [abbrev2] stands for WD1600AAJS-75M0A0_WD-WMAV3C623442. I shortened it to fit into the table.
The meaning of this is, line by line-
Line 1:
The partition number 5 of the first disk is the swap partition.
The second column is the mount point- here it is swap.
The third column is the filesystem type. Here it is swap.
The fourth column is the mount options.
Let's explain the mount options. Here are some options.
auto : automatically mounts at boot
noauto : doesn't automatically mount at boot
owner : only root or the owner of the device file can mount this file system
user : allows any user to mount a file system, only root or the user who mounted the file system can unmount it
users : same as user except any user can unmount it
ro : mounts the file system as read only
defaults : mounts the file system with the default options
uid=x : mounts the file system as user with id x (ownership)
gid=x : mounts the file system as group with id x (ownership)
noexec : prevents the execution of files on specified device
The fifth column is dump frequency (fs_freq), used for these filesystems by the dump command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.
The sixth column is pass number (fs_passno), used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.
A value of zero in either of the last 2 columns disables the corresponding feature.
Line 2:
The partition number 6 of the first disk is the root partition. The second column is the mount point- here it is root (/). The third column is the filesystem type. Here it is ext4. The rest is explained above.
Line 3 and onwards: These are system devices.
While fstab can have /dev/disk/by-id/, it can also have by partitioner block id. It would then look like this:
| /dev/sda5 | swap | swap | defaults | 0 | 0 |
| /dev/sda6 | ext4 | acl,user_xattr | 1 | 1 | |
| proc | /proc | proc | defaults | 0 | 0 |
| sysfs | /sys | sysfs | noauto | 0 | 0 |
| debugfs | /sys/kernel/debug | debugfs | noauto | 0 | 0 |
| usbfs | /proc/bus/usb | usbfs | noauto | 0 | 0 |
| devpts | /dev/pts | devpts | mode=0620,gid=5 | 0 | 0 |
One command to see or check block id is blkid which must be run as superuser.
su blkid
The result may be like this:
/dev/sda1: LABEL="System Reserved" UUID="E63A1EF13A1EBF0D" TYPE="ntfs"
/dev/sda2: UUID="CAA626D8A626C533" TYPE="ntfs"
/dev/sda5: UUID="b2fda9bd-dc8c-426d-bc5e-55991bc4d972" TYPE="swap"
/dev/sda6: UUID="42d749c6-e98e-4112-b850-8d2047c47bf5" TYPE="ext4"
/dev/sdb1: LABEL="WORKAREA" UUID="1ABA3617BA35EFBD" TYPE="ntfs"
/dev/sdc1: LABEL="New Volume" UUID="648AD06E8AD03E6C" TYPE="ntfs"
But if we were to use the "by-id" method, we need to see the device names and labels. Use the following command:
ls /dev/disk/by-id -lah
Results would be something like this:
total 0
drwxr-xr-x 2 root root 660 Mar 2 20:27 .
drwxr-xr-x 8 root root 160 Mar 2 20:27 ..
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-ST3500320AS_5QM2D6NC -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-ST3500320AS_5QM2D6NC-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-ST3500413AS_Z2A73G2X -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-ST3500413AS_Z2A73G2X-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-TSSTcorp_DVD+_-RW_TS-H653G_R4576GMZ21801500 -> ../../sr0
lrwxrwxrwx 1 root root 9 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-WDC_WD1600AAJS-75M0A0_WD-WMAV3C623442-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SATA_ST3500413AS_Z2A73G2X -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_ST3500413AS_Z2A73G2X-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442 -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SATA_WDC_WD1600AAJS-_WD-WMAV3C623442-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Mar 2 20:27 scsi-SSeagate_FreeAgent_XTrem_5QM2D6NC -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 scsi-SSeagate_FreeAgent_XTrem_5QM2D6NC-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x5000c5000e8b0037 -> ../../sdc
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x5000c5000e8b0037-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x5000c500356a72c4 -> ../../sdb
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x5000c500356a72c4-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Mar 2 20:27 wwn-0x50014ee05776cf2f -> ../../sda
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 2 20:27 wwn-0x50014ee05776cf2f-part6 -> ../../sda6
Note this line:
lrwxrwxrwx 1 root root 10 Mar 2 20:27 ata-ST3500413AS_Z2A73G2X-part1 -> ../../sdb1This corresponds to the sdb1 partition with label "WORKAREA". See the results of blkid earlier--
/dev/sdb1: LABEL="WORKAREA"
This is the partition I want to add to fstab.
I'm interested in only this bit, the `by-id` bit:
ata-ST3500413AS_Z2A73G2X-part1
So lets fire up gedit as superuser. Run:
gnomesu gedit
As gedit is gnome (non-terminal) it will not run from a su terminal, so this special command.
Now edit in the third line as shown below to make the changes.
| /dev/disk/by-id/ata-[abbrev]-part5 | swap | swap | defaults | 0 | 0 | |
| /dev/disk/by-id/ata-[abbrev]-part6 | / | ext4 | acl,user_xattr | 1 | 1 | |
| /dev/disk/by-id/ata-[abbrev]-part1 | /windows/WORKAREA | ntfs-3g | umask=0 | 0 | 0 | |
| proc | / | proc | proc | defaults | 0 | 0 |
| sysfs | / | sys | sysfs | noauto | 0 | 0 |
| debugfs | / | sys/kernel/debug | debugfs | noauto | 0 | 0 |
| usbfs | / | proc/bus/usb | usbfs | noauto | 0 | 0 |
| devpts | /dev/pts | devpts | mode=0620,gid=5 | 0 | 0 |
Again, I have abbreviated the disk numbers. The ata drive (partition 1) is of course ata-ST3500413AS_Z2A73G2X-part1.
Note that the mountpoint is under /windows/. This is a requirement.
Save fstab.
At the next boot, the partiton will automount with full read write permission under the /windows/ folder.
Open the partition and simply add to bookmarks for easy access.
No comments:
Post a Comment