Ubuntu Linux Fstab ile otomatik disk mount etmek.( auto mount linux)

Paylaş.

Merhaba arkadaşlar linux çuların hep uğraştığı mount işlemlerini manual yapmak yerine otomatize etmek için.Fstab kullanılır .

/etc/fstab

sudo nano /etc/fstab  yada sudo gedit /etc/fstab

şimdi aşama aşama mount fstab da mountu inceleyelim .

fsidk -l ile sidklerimize bakalım

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2db72db6
Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       11574    92857344    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3           11574       24322   102398977    5  Extended
/dev/sda5           11574       23798    98190336   83  Linux
/dev/sda6           23798       24322     4207616   82  Linux swap / Solaris
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x655af7be
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121602   976759808    7  HPFS/NTFS
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f318

Disk /dev/sda: 200.0 GB, 200049647616 bytes255 heads, 63 sectors/track, 24321 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x2db72db6
Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1          13      102400    7  HPFS/NTFSPartition 1 does not end on cylinder boundary./dev/sda2              13       11574    92857344    7  HPFS/NTFSPartition 2 does not end on cylinder boundary./dev/sda3           11574       24322   102398977    5  Extended/dev/sda5           11574       23798    98190336   83  Linux/dev/sda6           23798       24322     4207616   82  Linux swap / Solaris
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x655af7be
Device Boot      Start         End      Blocks   Id  System/dev/sdb1               1      121602   976759808    7  HPFS/NTFS
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0001f318

benim hdd lerimde çıktı bu şekilde

/dev/sdb1               1      121602   976759808    7  HPFS/NTFS

1 tb luk bu disk ntfs windows formatında bu diski mount etmek için kullanmam gereken komut ise

ilk once /media altina mount edecegim folder ‘i oluşturuyorum

sudo mkdir /media/1tbntfs

sudo mount /dev/sdb1   -t ntfs /media/1tbntfs

iştte bukadar ama bu mount işleminde restart edildikten sonra gidecektir yani geçici bir erişim sağladık işte kalıcı olması için ise FSTAB dosyasını configure etmemiz gerekiyor .

sudo gedit  /etc/fstab

dosyasına

UUID=burayada uuid yazilacak   /media/1tbntfs  ntfs-3g auto,users,uid=1000,gid=100,utf8,dmask=027,fmask=1 37 0 0

uuid ise
ls /dev/disk/by-uuid -lah
komutu ile buluyoruz 1211213dsdsds
UUID=1211213dsdsds /media/1tbntfs  ntfs-3g auto,users,uid=1000,gid=100,utf8,dmask=027,fmask=1 37 0 0

son hali busekilde fstab ekliyoruz

reboot ettigimiz de otomatik mount olacaktir.

daha fazlası için  paylaş ve incele : http://ubuntuforums.org/showthread.php?t=283131

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Ubuntu Linux Fstab ile otomatik disk mount etmek.( auto mount linux), 10.0 out of 10 based on 2 ratings