2006-01-05

在 UBUNTU 使用 MO

約在 6、7年前買了兩台 MO( Magneto Optical),廠牌是 FUJITSU(DYNA MO 640 AI),介面是 ide 介面,到目前這兩台都可正常使用。

在家及公司我都是使用 UBUNTU 的作業系統,所以為了方便起見,想在家中及公司各裝一台,這樣在一些資料的攜帶上就方便多了。

將 MO 裝到電腦主機內後(第二組 IDE 的 MASTER 所以也就是 hdc),看看 dmesg 中是否有抓到這個設備:

# less /var/log/dmesg

其中一行如下,顯示出系統己抓到這個設備了:

[4294675.690000] hdc: FUJITSU MCC3064AP, ATAPI OPTICAL drive

接著下來將一片 640 MB 及一片 230 MB 的 MO 片放入 MO機中,並 mount:

# mount -t vfat /dev/hdc /mnt

其中 640 MB 的沒問題,230 MB 的那一片出槌了,可能是檔案系統或是分割區的問題,於是想將 230 MB 的這片 fo 成 ext3 格式。建議使用 fdisk 來做這項工作,因為使用 cfdisk 如碰到有問題的 MO 片,沒辦法繼續分割。

# fidsk /dev/hdc

以下是部份內容:

Command (m for help): p

Disk /dev/hdc: 228 MB, 228518400 bytes
255 heads, 63 sectors/track, 27 cylinders
Units = cylinders of 16065 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-27, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-27, default 27):
Using default value 27

Command (m for help): p

Disk /dev/hdc: 228 MB, 228518400 bytes
255 heads, 63 sectors/track, 27 cylinders
Units = cylinders of 16065
512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 27 216846 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

其中可能會有 WARNING 不去鳥它。接著下來 fo 這片 MO:

# mkfs.ext3 /dev/hdc
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
56000 inodes, 223160 blocks
11158 blocks (5.00%) reserved for the super user
First data block=1
28 block groups
8192 blocks per group, 8192 fragments per group
2000 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

這樣這片 MO 就可以使用了。

# mount -t auto /dev/hdc /mnt
# ls /mnt
lost+found

由於剛建立的磁片,所以只有 lost+found 這個目錄。

用 df 來顯示相關的資訊,其中 /dev/hdc 就是這台 MO:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 76896316 7371336 65618780 11% /
tmpfs 372044 0 372044 0% /dev/shm
tmpfs 372044 12588 359456 4% /lib/modules/2.6.12-10-386/volatile
/dev/hdb1 39516244 131228 37377696 1% /backups
/dev/hdc 216087 4127 200802 3% /mnt

以下是使用 640 MB MO 片,顯示的內容:

# mount -t vfat -o utf8 /dev/hdc /mnt

# ls /mnt
clipper5 重要軟體

從前使用 clipper5 寫的程式,原來都放在這片 MO 片中。

沒有留言 :

張貼留言