最近の RTOS 事情

Hobyや修行で使う選択肢が増えた

Ubuntu 11.04 でのアクセント付き文字(É や È) の入力

m17n

m17n の latn-post や latn-pre を利用すると簡単に入力できそう。
http://www.m17n.org/common/m17n-docs-en/m17nDBData.html

pre と post は使い勝手をみて決めればいいか・・・
イタリア語は語尾にアクセントだから、postが楽かな?

$ sudo apt-get install ibus-m17n

Mac OSX / Win7 でのアクセント付き文字(É や È) の入力 part II

Win7 US international キー配列 ⇒ [OK]

Èが打てた。手順は同じ。フォントの問題か?再起動の怪・・・原因不明。

  • 操作
    1. '`' を押す(日本語キーボードでは'全角')
    2. 'Shift'+'E' を押す

ということで、Win7にて、英語(とかSourceCode)メインで、
時折ヨーロッパ言語を入力する場合は US International がBetter。

ToDo

  • Win7 US International配列で「È」は打てるのか?
  • Linux(Ubuntu) での入力は?

Mac OSX / Win7 でのアクセント付き文字(É や È) の入力

発端

ちと、イタリア語を学習していたのだが
エンジニアなのでPCでイタリア語を plain text file に
キーボードから入力できないとお話にならない。
Googleすると文字表から入力とかでるけど・・・使い物にならないでしょ?)

MAC OSX (10.7.3) ⇒ [Very Good!]

超簡単。日本モデルのまま追加インストールも無しで入力可能
2ストロークでOK

  • 「é」
    1. 'Opt'+'E' を押す
    2. 'E' を押す
  • 「è」
    1. 'Opt'+'_' を押す
    2. 'E' を押す
  • 「É」
    1. 'Opt'+'E' を押す
    2. 'Shift'+'E' を押す
  • 「È」
    1. 'Opt'+'_' を押す
    2. 'Shift'+'E' を押す

1ストローク目で'Opt'+'I'にすると「^」系のアクセントが打てる。 Ê とかが打てる。
1ストローク目で'Opt'+'U'にするとウムラウト系のアクセントが打てる。 Ë とかが打てる。

ドイツ語やスペイン語でもそのままつかえそうな。

なんつうか・・・数%の人間しか使わない機能までよくできてる。
最近エンジニアがMacでプレゼンしてる場合が多いけど、色々使いやすいのだろうな・・・

Windows7 + Plain text

Italia配列キー設定 ⇒ [Fail]

これが曲者。

最初はイタリア配列のキーボード設定を追加したんだけど、

  • '@'キーが 「è」
  • 'Shift'+'@'キーで「é」

となっていて大文字にできない。なんでじゃー?

数時間Googleを彷徨ったものの有益情報なし。
専用キー配列を覚えるのも面倒なので Give Up。さよなら。

US international キー配列 ⇒ [Under checking]

アクセント記号系のキーが特殊キーに化ける面白いモード。

  • 「è」
    1. '`' を押す (日本キーボードだと'全角'になってしまうが)
    2. 'E' を押す
  • 「`」
    1. '`' を押す
    2. 'Space' を押す (アクセントが付かない文字ならなんでもいいみたい)

ただし、È が打てない。

  • 操作
    1. '`' を押す
    2. 'Shift'+'E' を押す
  • 結果
    • 「E」
  • なんでじゃー?

各国のキー配列を覚えなくてよくなりそうなので、引き続き調査中。

Windows7 + MS Word

Wordに限定すれば簡単に入力できる。

  • 「é」
    1. 'Ctrl'+'Shift'+'7' を押す
    2. 'E' を押す
  • 「è」
    1. 'Ctrl'+'Shift'+'@' を押す
    2. 'E' を押す
  • 「É」
    1. 'Ctrl'+'Shift'+'7' を押す
    2. 'Shift'+'E' を押す
  • 「È」
    1. 'Ctrl'+'Shift'+'@' を押す
    2. 'Shift'+'E' を押す

・・・ってappleみたいにOSレベルで対応てくれよ〜

ToDo

  • Win7 US International配列で「È」は打てるのか?
  • Linux(Ubuntu) での入力は?

ubuntu10.04 update 後に Disk異常(その2)

fsck

昨夜仕掛けたfsckの確認から。

$ sudo fsck.ext3 -p /dev/sdb1
/dev/sdb1 was not cleanly unmounted, check forced.
/dev/sdb1: 3548942/19546112 files (2.5% non-contiguous), 33295713/39072080 blocks
$

一応通った。

mount test → 成功

$ sudo mount /L
$

あとは、欠損したファイルがないか調べるだけか・

ubuntu10.04 update 後に Disk異常

状況確認

昨日、帰社前に

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo reboot

して帰ったら、eSATA外付けDiskが認識しなくなった。
タイミング的に ubuntu のupdate が要因に見えるが・・・

まずは状況確認。

$ sudo fdisk -l

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 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: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
$ sudo fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb212499a.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): x
Expert command (m for help): p

Disk /dev/sdb: 255 heads, 63 sectors, 19457 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl     Start      Size ID
 1 00   0   0    0   0   0    0          0          0 00
 2 00   0   0    0   0   0    0          0          0 00
 3 00   0   0    0   0   0    0          0          0 00
 4 00   0   0    0   0   0    0          0          0 00

Expert command (m for help):

う〜ん、MBRがゼロクリアされとるようにみえるなぁ・・・

Try repair it

元々の partition 構成を覚えていないが・・・

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#                
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=b361f06b-458d-49b4-9b61-b6eb2ae0f2ed /               ext3    errors=remount-ro 0       1
UUID=6d718db3-388d-4dd4-9c28-950f1eb0d353 /L              ext3    errors=remount-ro 0       2
# swap was on /dev/sda6 during installation
UUID=a7575ae5-fa47-49df-80c2-3519e15c2ae8 none            swap    sw              0       0

なんか 1 partition だったくさい(/L が該当ドライブ)

fdisk で partition を再構成して、/etc/fstab に書いてある UUID と一緒になればいいかな?

$ sudo fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x7314564d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19457, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-19457, default 19457):
Using default value 19457

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83

Command (m for help): p

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 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: 0x7314564d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       19457   156288321   83  Linux

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

Calling ioctl() to re-read partition table.
Syncing disks.
$ sudo blkid
/dev/sda1: UUID="A4247E52247E2786" TYPE="ntfs"
/dev/sda5: UUID="b361f06b-458d-49b4-9b61-b6eb2ae0f2ed" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda6: UUID="a7575ae5-fa47-49df-80c2-3519e15c2ae8" TYPE="swap"
/dev/sdb1: UUID="6d718db3-388d-4dd4-9c28-950f1eb0d353" SEC_TYPE="ext2" TYPE="ext3"

なんか行けそうな気がしてきた。

$ sudo mount /L
mount: 間違ったファイルシステムタイプ、不正なオプション、
       /dev/sdb1 のスーパーブロックが不正、コードページまたは
       ヘルパープログラムの未指定、或いは他のエラー
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

残念。

ここでfsckを実行したら、何かリカバリするだろうか?

仕掛けて帰ろう。

$ sudo fsck.ext3 -p /dev/sdb1
/dev/sdb1 was not cleanly unmounted, check forced.

さて明朝どうなるやら?