EnderUNIX Team.


EnderUNIX İpucu

Arkadaşıma gönder , Ana Sayfa

[ NetBSD ]

"NetBSD ile temel mount (baglama) islemleri" - Baybars Uzunoglu - (2005-11-23 15:37:18)   [2786]

cdrom:

Sistemimizin cdrom'umuzu taniyip tanimadigini yoklayalim,

# dmesg |grep cd
cd0 at atapibus0 drive 1: cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:1:1): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
#

tanidigina gore cd'mizi /cdrom dizinine baglayalim (mount).

# mkdir /cdrom

# mount -t cd9660 -o ro /dev/cd0a /cdrom

cikarmak icin (umount),

# umount /cdrom

diger yontemde /etc/fstab dosyasina

/dev/cd0a /cdrom cd9660 ro,noauto 0 0

satirini ekleyip,

# mount /cdrom

komutu ile baglayabiliriz.

disket:

# mount -t msdos /dev/fd0a /mnt

DOS/WINDOWS:

once bolumlerimizin nasil konumlandigina bakalim.

# disklabel wd0
...
# size offset fstype [fsize bsize cpg/sgs]
a: 2097648 81915435 4.2BSD 2048 16384 21872 # (Cyl. 81265*- 83346*)
b: 2097648 84013083 swap # (Cyl. 83346*- 85427*)
c: 40965750 81915435 unused 0 0 # (Cyl. 81265*- 121905*)
d: 156301488 0 unused 0 0 # (Cyl. 0 - 155060)
e: 34672176 86110731 4.2BSD 2048 16384 28688 # (Cyl. 85427*- 119824*)
f: 2098278 120782907 4.2BSD 2048 16384 21896 # (Cyl. 119824*- 121905*)
g: 40965687 63 MSDOS # (Cyl. 0*- 40640*)
h: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
i: 33415200 122881185 MSDOS # (Cyl. 121905*- 155055*)
j: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
k: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
l: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
m: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
...


# mbrlabel -rw wd0
Found MSDOS partition; size 40965687 (20002 MB), offset 63
skipping existing MSDOS partition at slot g.
Found 4.2BSD partition; size 40949685 (19994 MB), offset 40965750
adding 4.2BSD partition to slot l.
Found 4.2BSD partition; size 40965750 (20002 MB), offset 81915435
skipping existing unused partition at slot c.
Found MSDOS partition; size 33415200 (16316 MB), offset 122881185
skipping existing MSDOS partition at slot i.

16 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 2097648 81915435 4.2BSD 2048 16384 21872 # (Cyl. 81265*- 83346*)
b: 2097648 84013083 swap # (Cyl. 83346*- 85427*)
c: 40965750 81915435 unused 0 0 # (Cyl. 81265*- 121905*)
d: 156301488 0 unused 0 0 # (Cyl. 0 - 155060)
e: 34672176 86110731 4.2BSD 2048 16384 28688 # (Cyl. 85427*- 119824*)
f: 2098278 120782907 4.2BSD 2048 16384 21896 # (Cyl. 119824*- 121905*)
g: 40965687 63 MSDOS # (Cyl. 0*- 40640*)
h: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
i: 33415200 122881185 MSDOS # (Cyl. 121905*- 155055*)
j: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
k: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)
l: 16384 40965750 4.2BSD 1024 8192 16 # (Cyl. 40640*- 40656*)

goruldugu gibi 'g' ve 'i' bolumlerinde DOS/WINDOWS bolumleri gozukuyor.

/etc/fstab dosyasina

/dev/wd0i /c msdos ro,noauto 1 3

satirini ekleyip

# mkdir /c
# mount /c

ile bolumumuz baglanmis (mount) olur. eger her acilista sistemin bu bolumu baglanmasini (mount) istiyorsak /etc/fstab dosyasina

/dev/wd0i /c msdos ro 1 3

eklememiz gerekir.

Yetkisiz sistem kullanicilarina baglama (mount) izni:

/dev/cd0a ' nin yetkilerini ayarlayalim (permission).

# chmod go+rw /dev/cd0a

vfs.generic.usermount parametresinin degeri yetkisiz kullanicilarin baglama islemini yapip yapamayacagini gosterir. NetBSD GENERIC cekirdeginde ontanimli

(default) deger 0 (sifir) 'dir.

# sysctl -w vfs.generic.usermount=1

ile kullanicilara yetkiyi veririz. Bu degerin '1' olmasi ile sadece cdrom degil , gerekli yetki ayarlari (permission) ile yetkisiz kullanicilara baska

birimlerin de baglanmasina izin verebiliriz. (her acilista '1' degerini almasi /etc/sysctl.conf dosyasina vfs.generic.usermount=1 satirini eklemeliyiz.)

$ mkdir /home/user/cdrom
$ mount -t cd9660 /dev/cd0a /home/user/cdrom/

iso:

sanal diskimizi olusturalim ve baglayalim.

# vnconfig -c vnd0 /home/user/NetBSD-3.0-RC1.iso
# mount -t cd9660 /dev/vnd0a /mnt/
# umount /mnt
# vnconfig -u vnd0

http://www.de.netbsd.org/guide/en/chap-2boot.html

Arkadaşıma gönder , Ana Sayfa