2007/05/20

[wine] システムフォントの設定

~/.wine/user.reg の "HKEY_CURRENT_USER¥Software¥Wine¥Fonts" にある、
"(default)" の値を編集。

そこにフォント種を指定する。

----
(2007.05.20)

2007/05/16

[fonts] XMMS の文字化け

2ちゃんで書かれていたこと。


1) gksu gedit /etc/gtk/gtkrc.ja.utf-8

2) 次の記述を追加する

style "gtk-default-ja-utf8" {
fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\
-ricoh-ms mincho-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0,\
-misc-fixed-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0,\
*-r-*"
}
class "GtkWidget" style "gtk-default-ja-utf8"


----
(2007.05.16)

2007/05/02

[grub] grub の再インストール

grub の再インストールは、何度か挑戦したけどなかなかうまくいかない。以下のコピペでもうまくいっていない。

  ※ grubの起動ディスクは、あればもしものときに役に立つ


----
(#01 : ubuntu CDからGRUBのみセットアップ)


・インストールディレクトリを /mnt にマウント
・sudo grub-install --root-directory=/mnt (device)

* (device) は /dev/hda とか /dev/sda とか

 ※ この方法が一番簡単、という話もあるが…

----
(#02 : Windowsしか立ち上がらなくなった場合)

  1. grubのisoを落としてくる
  2. フロッピーに焼く
  3. FDブート

フロッピーがなければCDブートを試みる

・http://lunatear.net/archives/000426.html
・grub-0.95.iso.bz2 を落として展開
・CDに焼いてブート
・grubが立ち上がったら、eを押して編集

第1ドライブの第1パーティーションに Windows
第1ドライブの第2パーティーションに ubuntu なら

| root (hd0,1)

として root を ubuntu のパーティションに設定

 ※ hdのあとの0は「0」から数えたドライブの序数
 ※ 第2オプションは「0」から数えたパーティションの序数

あとは、

| kernel /vmlinuz-2.6.20-12-generic root=/dev/hda2 ro
| initrd /initrd.img-2.6.20-12-generic

みたいな感じ。途中まで入れて Tab キー押下で補完が効く。
それで立ち上げてから (#01) のようにしたらOK

  ※これは正しくない方法ではないかという疑問の声


----
(#03 : 強硬技、ダミーの ubuntu をインストール)

インストールCDでどこかにパーティションを空けて手動インストール
手動でパーティションを選ぶとき既存のものを壊さぬよう注意
この時 swap は元々あるものを指定しても構わない
インストールが完了したら grub の menu.lst を編集
インストールしたパーティションを gparted か何かで削除

  ※身もふたもないが成功率は高そう


----
(LiveCDからgrubの再インストール)

grub-install --no-floppy '(hd0)'


☆☆☆☆

http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html

Next: Making a GRUB bootable CD-ROM, Previous: Installing GRUB natively, Up: Installation
3.3 Installing GRUB using grub-install

Caution: This procedure is definitely less safe, because there are several ways in which your computer can become unbootable. For example, most operating systems don't tell GRUB how to map BIOS drives to OS devices correctly—GRUB merely guesses the mapping. This will succeed in most cases, but not always. Therefore, GRUB provides you with a map file called the device map, which you must fix if it is wrong. See Device map, for more details.

If you still do want to install GRUB under a UNIX-like OS (such as gnu), invoke the program grub-install (see Invoking grub-install) as the superuser (root).

The usage is basically very simple. You only need to specify one argument to the program, namely, where to install the boot loader. The argument can be either a device file (like `/dev/hda') or a partition specified in GRUB's notation. For example, under Linux the following will install GRUB into the MBR of the first IDE disk:

# grub-install /dev/hda

Likewise, under GNU/Hurd, this has the same effect:

# grub-install /dev/hd0

If it is the first BIOS drive, this is the same as well:

# grub-install '(hd0)'

Or you can omit the parentheses:

# grub-install hd0

But all the above examples assume that GRUB should use images under the root directory. If you want GRUB to use images under a directory other than the root directory, you need to specify the option --root-directory. The typical usage is that you create a GRUB boot floppy with a filesystem. Here is an example:

# mke2fs /dev/fd0
# mount -t ext2 /dev/fd0 /mnt
# grub-install --root-directory=/mnt fd0
# umount /mnt

Another example is when you have a separate boot partition which is mounted at /boot. Since GRUB is a boot loader, it doesn't know anything about mountpoints at all. Thus, you need to run grub-install like this:

# grub-install --root-directory=/boot /dev/hda

By the way, as noted above, it is quite difficult to guess BIOS drives correctly under a UNIX-like OS. Thus, grub-install will prompt you to check if it could really guess the correct mappings, after the installation. The format is defined in Device map. Please be quite careful. If the output is wrong, it is unlikely that your computer will be able to boot with no problem.

Note that grub-install is actually just a shell script and the real task is done by the grub shell grub (see Invoking the grub shell). Therefore, you may run grub directly to install GRUB, without using grub-install. Don't do that, however, unless you are very familiar with the internals of GRUB. Installing a boot loader on a running OS may be extremely dangerous.



----
(2007.05.02)

楽天モバイルを台湾で使ってみた

GWに、久しぶりに台湾に赴きました。コロナ禍の間に延命していた台湾大哥大と中華電信の回線のうち中華電信の方を失効させてしまい(なぜ中華電信だけ失効したんだろう)、今回の滞在は台湾大哥大と楽天モバイルの2回線で賄うことにしました。テザリングでAndroidスマホ1台とiPad、Ma...