01.05.2025, 14:48 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
Autor Nachricht
Debian_Disciple
Titel: fstab help  BeitragVerfasst am: 15.10.2006, 18:57 Uhr



Anmeldung: 17. Jul 2006
Beiträge: 23

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/hdd1 / reiserfs defaults 0 1
/dev/sda1 /media/sda1 reiserfs defaults 0 0
/dev/sda2 /media/sda2 reiserfs defaults 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hda /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

What do I need to add to the fstab so I can read and write to /dev/sda1
/dev/sda2? Thanks
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
jbs1136
Titel:   BeitragVerfasst am: 15.10.2006, 19:15 Uhr



Anmeldung: 15. Jul 2006
Beiträge: 136
Wohnort: Spanaway, Wa
This is what I have for mine. My sda1 is vfat for windows stuff. I am new to linux and I am sure someone will correct me if I am wrong but this works.

Code:
/dev/sda2       /media/sda2     xfs     defaults        0       0
/dev/sda3       /media/sda3     xfs     defaults        0       0


John
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
h2
Titel:   BeitragVerfasst am: 15.10.2006, 19:23 Uhr



Anmeldung: 12. Mar 2005
Beiträge: 1005

This depends on if it's a removable drive or not. If it is, you don't need to do anything, kde handles it automatically.

If it's an internal drive, then the above is correct.

And, if I remember right, if you add fstab items for removable drives using the old standard methods you may actually run into problems with the automount features.

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 15.10.2006, 19:42 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2133

Zitat:
/dev/sda1 /media/sda1 reiserfs defaults 0 0
/dev/sda2 /media/sda2 reiserfs defaults 0 0
Both partitions are mounted read/write, but only root has write permission for the mount points. Try putting the mount points inside your home directory instead (replace "your_username" with your username): Open Konsole and type (as user, not root)
Code:
mkdir /home/your_username/sda1
mkdir /home/your_username/sda2
Then become root and edit fstab:
Code:
sux
mcedit /etc/fstab
Replace
Code:
/dev/sda1 /media/sda1 reiserfs defaults 0 0
/dev/sda2 /media/sda2 reiserfs defaults 0 0
with
Code:
/dev/sda1 /home/your_username/sda1 reiserfs defaults 0 0
/dev/sda2 /home/your_username/sda2 reiserfs defaults 0 0
Finally unmout and mount the drives:
Code:
umount /media/sda1
umount /media/sda2
mount -a

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Debian_Disciple
Titel:   BeitragVerfasst am: 15.10.2006, 20:35 Uhr



Anmeldung: 17. Jul 2006
Beiträge: 23

Thanks for all the help guys I really appricate it.

This is my new fstab according to the directions given by ockham23

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/hdd1 / reiserfs defaults 0 1
/dev/sda1 /home/tyler/sda1 reiserfs defaults 0 0
/dev/sda2 /home/tyler/sda2 reiserfs defaults 0 0 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hda /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

I am still uanble to write to sda1 or sda2
Geschockt

What did I do wrong thanks
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 15.10.2006, 21:53 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2133

Zitat:
/dev/sda2 /home/tyler/sda2 reiserfs defaults 0 0 0 0
Delete the last two zeros. Did you enter mount -a?

Please post the output of
Code:
ls -l /home/tyler
mount -l
su
fdisk -l

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Debian_Disciple
Titel:   BeitragVerfasst am: 15.10.2006, 22:32 Uhr



Anmeldung: 17. Jul 2006
Beiträge: 23

output from ls -l /home/tyler

Zitat:
drwxr-xr-x 3 tyler tyler 360 2006-10-15 15:21 Desktop
drwxr-xr-x 4 root root 80 2006-10-14 22:28 sda1
drwxr-xr-x 4 root root 80 2006-10-14 22:28 sda2
drwxr-xr-x 2 tyler tyler 48 2006-08-29 07:23 tmp


output of mount -l

Zitat:
mount -l
/dev/hdd1 on / type reiserfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /home/tyler/sda1 type reiserfs (rw)
/dev/sda2 on /home/tyler/sda2 type reiserfs (rw)


output of fdisk -l

Zitat:
Device Boot Start End Blocks Id System
/dev/hdd1 * 1 30401 244196001 83 Linux

Disk /dev/sda: 120.0 GB, 120060444672 bytes
255 heads, 63 sectors/track, 14596 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 6528 14596 64814242+ 83 Linux
/dev/sda2 1 6527 52428096 83 Linux


Device Boot Start End Blocks Id System
/dev/hdd1 * 1 30401 244196001 83 Linux

Disk /dev/sda: 120.0 GB, 120060444672 bytes
255 heads, 63 sectors/track, 14596 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 6528 14596 64814242+ 83 Linux
/dev/sda2 1 6527 52428096 83 Linux





yes I used mount -a

Thanks for your help Sehr glücklich
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
danone
Titel:   BeitragVerfasst am: 15.10.2006, 22:43 Uhr



Anmeldung: 13. Feb 2004
Beiträge: 373

Code:
drwxr-xr-x 4 root root 80 2006-10-14 22:28 sda1
drwxr-xr-x 4 root root 80 2006-10-14 22:28 sda2

You have to make these 2 directories to be owned by ytourself (as root 'chown tyler:tyler /home/tyler/sda1', same with sda2). Then you're allowed to write in there!

danone
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Debian_Disciple
Titel:   BeitragVerfasst am: 15.10.2006, 23:00 Uhr



Anmeldung: 17. Jul 2006
Beiträge: 23

Thanks danone that took care of it I think I'm set Smilie Thanks again all I hope to contribute more as I learn
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
jbs1136
Titel:   BeitragVerfasst am: 16.10.2006, 01:38 Uhr



Anmeldung: 15. Jul 2006
Beiträge: 136
Wohnort: Spanaway, Wa
ockham23,

That was one of the reasons that I did my sda2 & 3 as I did. I use those drives to store all of my photos, music, documents, firefox profile, and backups to. I have gone in and done chown on a couple of folders but left the rest. Now it is a real problem to delete or alter them by accident. I have learned over the years that I have a tendency to do that. Just an extra precaution for me. Smilie

john
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
ockham23
Titel:   BeitragVerfasst am: 16.10.2006, 10:07 Uhr



Anmeldung: 25. Mar 2005
Beiträge: 2133

John, there are two things to consider: Mounting the partition with rw option and actually having permission to write data to the mount directory. Mount option "defaults" in /etc/fstab makes the partition writable, but only root has permission to write to directories outside of the users' home folders. This is why I recommended to create mount points inside /home/tyler. chown is not needed if you do it this way.

Tyler, however, created the folders /home/tyler/sda1 and /home/tyler/sda2 when he was logged in as root so these folders belong to root and user tyler cannot write to them. If he had followed my instructions to create these folders as user tyler, he would have had write permission from the start.

_________________
And I ain't got no worries 'cause I ain't in no hurry at all (Doobie Brothers, "Black Water").
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
jbs1136
Titel:   BeitragVerfasst am: 16.10.2006, 16:41 Uhr



Anmeldung: 15. Jul 2006
Beiträge: 136
Wohnort: Spanaway, Wa
ockham23,

Thanks for the explanation. I did not understand about needing root outside the home directory. One more thing I have learned. Also, I had believed that you had to mount in the /media. I did not know I could change this.

john
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
mzilikazi
Titel:   BeitragVerfasst am: 16.10.2006, 22:41 Uhr
Team Member
Team Member


Anmeldung: 17. Dez 2003
Beiträge: 1109
Wohnort: Ganymede
jbs1136 hat folgendes geschrieben::
ockham23,

Thanks for the explanation. I did not understand about needing root outside the home directory. One more thing I have learned. Also, I had believed that you had to mount in the /media. I did not know I could change this.

john


You can mount any drive anywhere you want. I use something more informative than plain ol sda1 like so:
Code:
/dev/sda13      /home/mzilikazi/Music reiserfs auto,rw,users    0       0
/dev/sda3       /home/mzilikazi/Photos reiserfs auto,rw,users   0       0

_________________
Ubuntu - An ancient African word for "Can't install Debian"
 
 Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen  
Antworten mit Zitat Nach oben
jbs1136
Titel:   BeitragVerfasst am: 17.10.2006, 03:06 Uhr



Anmeldung: 15. Jul 2006
Beiträge: 136
Wohnort: Spanaway, Wa
mzilikazi,

Thanks for more info. I did something like that one time and had problems so I just let it go. I think I tried to mount two different partitions to the same name or something else like that. Thanks, I am going to have to go back and look at doing that again.

john
 
 Benutzer-Profile anzeigen Private Nachricht senden  
Antworten mit Zitat Nach oben
Beiträge vom vorherigen Thema anzeigen:     
Gehe zu:  
Alle Zeiten sind GMT + 1 Stunde
Neues Thema eröffnen   Neue Antwort erstellen
Vorheriges Thema anzeigen Druckerfreundliche Version Einloggen, um private Nachrichten zu lesen Nächstes Thema anzeigen
PNphpBB2 © 2003-2007 
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.