Mageia6-dev1 掛載 Big5 檔案系統後中文檔名變成亂碼

96 views
Skip to first unread message

jtmh

unread,
May 15, 2016, 8:03:36 AM5/15/16
to mageia...@googlegroups.com
我的系統上有一個舊的 FAT32 分割槽是當初 Win98 時代留下來的,
一直以來以唯讀方式掛載都可正常使用,
但自從重新安裝了 Mageia6-dev1 後進去一看中文檔名都變成亂碼了。

到 /etc/fstab 看相關內容是:

UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=utf8,ro,noexec 0 0

而另外去查了我之前 Mageia5 的 /etc/fstab 內容則是:

UUID=4905-B534 /mnt/win98 vfat umask=000,ro,noexec 0 0

比較起來在 Mageia6-dev1 多了 iocharset=utf8,
但我試著改成和 Mageia5 一樣重開機後仍然會有亂碼。

接著我又分別試了:

UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=big5,ro,noexec 0 0
UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=cp950,ro,noexec 0 0
UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=utf8,codepage=950,ro,noexec 0 0
UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=big5,codepage=950,ro,noexec 0 0

都還是會出現亂碼,
想問一下有人知道是什麼問題嗎?

You-Cheng Hsieh

unread,
May 15, 2016, 10:01:03 AM5/15/16
to Mageia 台灣使用者社群
我試出來了 但無法確認原因
等等整理一下回報 bug

--
You received this message because you are subscribed to the Google Groups "Mageia 台灣使用者社群" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mageia-taiwa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

許亞狄

unread,
May 15, 2016, 10:15:31 AM5/15/16
to mageia...@googlegroups.com
您好,

    請試試以下:
    UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=big5,codepage=cp950,ro,noexec 0 0

===============================
Let's cheer up !
Foxconn Automotive Integration Business Group
Eli Hsu
Mobile phone : +886-988-897-325
China -> Taiwan : 075528129588 #519-1978
Taiwan : 02-7715-8888 # 1978

jtmh <piscesto...@gmail.com> 於 2016年5月15日 下午8:02 寫道:

jtmh

unread,
May 15, 2016, 2:11:01 PM5/15/16
to mageia...@googlegroups.com
這樣會出現錯誤無法開機而進入 maintenance mode.

You-Cheng Hsieh

unread,
May 16, 2016, 9:01:58 AM5/16/16
to Mageia 台灣使用者社群
很奇怪 我又重裝一次
安裝過程我明明設定 iocharset=big5
結果裝完 fstab 裡面是 iocharset=uft8
更窘的是中文檔名和目錄竟然正常! @@

這是用一台 win98的vm加一個硬碟裝 mga6dev1

jtmh

unread,
May 16, 2016, 1:30:07 PM5/16/16
to mageia...@googlegroups.com
這樣就真的很奇怪了,
而且我的狀況是安裝過程中並未特別去設 iocharset,
結果裝完 fstab 中自己多了 iocharset=utf8

為什麼感覺起來似乎不完全是由 fstab 所控制,
難道有其他地方的設定在影響?

我週末在找時間重裝一次看看好了 QQ

jtmh

unread,
May 22, 2016, 2:36:32 AM5/22/16
to mageia...@googlegroups.com
重裝了三次終於被我試出解決辦法了!

可能是系統配置不同的關係(我的是有一分割區是 FAT32,其他 ext4,沒用 vm),
我有試過在安裝過程中設定 iocharset=big5,
裝完後的確 fstab 裡是 iocharset=utf8,
但我的中文檔名和目錄還是一樣變亂碼。

後來開始查著 mount 的 man page,
同時試著手動 umount 後再配合不同參數重新 mount,
最後竟然在偶然執行了 mount -t vfat 時發現如下結果(這是依預設 fstab 掛載的狀況):

/dev/sda8 on /mnt/win98 type vfat (ro,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)


對照一下 man page 的說明:

codepage=value
              Sets the codepage for converting to shortname characters on  FAT
              and VFAT filesystems. By default, codepage 437 is used.

iocharset=value
              Character set to use for converting between 8 bit characters and
              16 bit Unicode characters. The default is iso8859-1.  Long file-
              names are stored on disk in Unicode format.

utf8   UTF8 is the filesystem safe 8-bit encoding of  Unicode  that  is
              used  by  the console. It can be enabled for the filesystem with
              this option or disabled with utf8=0, utf8=no or  utf8=false.  If
              `uni_xlate' gets set, UTF8 gets disabled. 


因為 fstab 裡只有設定 iocharset=utf8
所以會有 codepage=437,iocharset=utf8 的結果很正常,
但出現 utf8 則讓人滿意外的(man page 並未說預設會開啟),
於是我修改了 fstab 的內容:

UUID=4905-B534 /mnt/win98 vfat umask=000,iocharset=big5,codepage=950,utf8=0,ro,noexec 0 0

重開機之後果然不再出現中文亂碼,
而 mount -t vfat 的結果為:

/dev/sda8 on /mnt/win98 type vfat (ro,noexec,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=950,iocharset=cp950,shortname=mixed,errors=remount-ro)

utf8 不見了。

以上,寫下來做記錄,也感謝大家幫忙 : )
Reply all
Reply to author
Forward
0 new messages