Slax Localization: Linux Chinese edition on mobile hard drive

Source: Internet
Author: User
Article Title: Slax Localization: Linux Chinese edition on mobile hard drive. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Slax is a suite Based on Slackware. It is mainly used for Linux desktop applications and supports LiveCD and LiveUSB. it is preinstalled with Kde3.4.1 and KWord (word processor in KOffice ). its desktop is simple and elegant, and the speed is very fast. it is very convenient. so I will use it to implement a Chinese U disk Linux suite.
  
   1. USB flash drive startup Method Selection
  
There are many boot methods of U disk, which mainly include [USB-HDD], [USB-FD], [USB-CDROM]. [USB-HDD] is correct for my IBM 40 Gb mobile hard drive. as you know, the hard disk has a partition table, while the floppy disk does not. the [USB-HDD] method is to read the boot records from the U disk partition table to complete the start. therefore, most of the U disk should choose the [USB-HDD] mode to start.
  
   2. How to start a USB flash drive
  
I chose syslinux instead of lilo or grub. after my personal compatibility test, lilo cannot boot successfully on a considerable number of computers, and grub does not seem to work on USB at all. so I chose syslinux, a boot tool working on FAT16.
  
Note: syslinux cannot work on the FAT32 partition, And the partition size cannot exceed MB. the reason is that the INT13 call used by most computer BIOS cannot process partitions larger than a certain size. so my mobile hard drive is partitioned like this: the first partition (SDA1) is only 128 M, and FAT16. the second partition (SDA5) and the third partition (SDA6) have 20 GB.
  
This is the partition details:
  
Code:
  
Device Boot Start End Blocks Id System
  
/Dev/sda1*1 13 104391 6 FAT16
  
/Dev/sda2 14 4863 38957625 f W95 Ext 'd (LBA)
  
/Dev/sda5 14 2435 19454683 + B W95 FAT32
  
/Dev/sda6 2436 4863 19502878 + B W95 FAT3
  
* Installation Method
  
After the file system is created, syslinux/dev/sda1 (unmount required in Linux) or the idisk in syslinux iWin98 is the first partition ).
  
Create a SYSlinux. cfg file under the first partition/dev/sda1 as follows:
  
Code:
  
Prompt 1
  
Time out 300 d
  
Isplay SYSlinux. msg
  
Default slax
  
Label slax
  
Kernel vmlinuz
  
Append root =/dev/ram0 rw initrdw.initrd.gz init = linuxrc load_ramdisk = 1 prompt_ramdisk = 0 ramdisk_size = 4444 max_loop = 255 nocd
  
The content of the content of SYSlinux. msg in the same directory can be customized by using vmlinuzand initrd.gz. This information will be displayed at startup:
  
Welcome to Slax Chinese Version!
  
   3. Install Slax
  
Download the slax Standard Edition from the http://slax.lin ux-live.org/download.php. This version contains KDE3.4, kmplayer, a kde audio player and KWord, and K * for surfing the Internet.
  
Typical Interface
  
1. run the command "mount-o loop slax-5.0.6.iso/mnt/cdrom" to mount the ISO file to the/mnt/cdrom directory and go to the/mnt/cdrom/boot directory, copy the vmlinuz and initrd.gz files to/mnt/sda1 (the first partition of the mobile hard disk, which will be omitted later ).
  
2. create the directory slax in/mnt/sda5 and copy all files and directories under/mnt/cdrom to/mnt/sda5/slax: cp-rf/mnt/cdrom/*/mnt/sda5/slax/
  
This completes the installation.
  
   4. Localization
  
First, we will introduce how to install custom software on Slax:
  
SQUASHFS of Slax
  
SQUASHFS is a compressed file system. slax uses it to install the root directory. in the base Directory, slax has some basic mo (SQUASHFS Image File Extension) files. such as KDE, X, and basic library. if you want to query which file or directory belongs to which mo file, go to/mnt/live/memory to find it (Slax comes with it ).
  
Slax provides methods for creating, modifying, and using the SQUASHFS module.
  
* Create a module
  
* Convert the Slackware tgz installation package to mo: tgz2mo application. tgz application.mo
  
* To create a module after the installation package is modified:
  
Installpkg-root/tmp/package application. tgz
  
Go to/tmp/package to modify the package, and then create the module:
  
Dir2mo/tmp/package module.mo
  
* Modify a module
  
O release the module to/tmp/directory
  
Mo2dir module.mo/tmp/directory
  
O create a module after modification
  
Dir2mo/tmp/directory module.mo
  
* User Module
  
Mount mo during oSlax running:
  
Uselivemod/path/module.mo
  
O The mo file in the slax/modules directory will be automatically mounted.
  
Note: SQUASHFS is sometimes unstable. Pay special attention to the following situations:
  
1. Too many overlapping layers. File A is owned by A.mo, and the new B .mo also has A file A that overwrites A.mo.
  
2. Too little memory space. Memory is required when mo is mounted. Too much memory in the module will cause a system problem.
  
Start work
  
For more information, see the localization of Slackware. Here are some differences:
  
A bug in the Slax-5.0.6:/etc/profile. d/slax. sh cleverly add export LC_ALL = c and delete it.
  
Download the firefly font (http://cle.linux.org.tw/Slackware/s...11-noarch-1.tgz), install it, generate fc. cache and fonts. dir, etc. When everything is ready:
  
Code:
  
Mkdir-p/tmp/package/usr/local/font
  
Cp-rf/usr/local/font/*/tmp/package/usr/local/font
  
Mo2dir/tmp/package/mnt/sda5/slax/modules/fonts.mo
  
Install Xorg.6.8.2-firefly version (: http://cle.linux.org.tw/Slackware/s...1.Firefly.tgz ):
  
Code:
  
Installpkg -- root/tmp/package x11-6.8.2-i486-1.Firefly.tgz
  
Cd/tmp/package/etc/X11/
  
Cp/etc/X11/xorg. conf. # copy the xorg. conf that meets your graphics card configuration here.
  
Cd/tmp/package
  
Mo2dir/tmp/package/mnt/sda5/slax/modules/xorg682.mo
  
Install fcitx:
  
Tgz2mo fcitx. tgz/mnt/sda5/slax/modules/fcitx.mo
  
Install kde-i18n-zh_CN-3.4.1-noarch-1.tgz (KDE Culture)
  
Http://ftp.cgu.edu.tw/Linux/Slackwa....1-noarch-1.tgz
  
Tgz2mo kde-i18n-zh_CN-3.4.1-noarch-1.tgz/mnt/sda5/slax/modules/kde.mo
  
In the same way, you can download and install XMMS, firefox, and thunderbird.
  
Some details
  
To enable KMplayer to play RMVB, download
  
Code:
  
Http://www1.mplayerhq.hu/MPlayer/re...0050412.tar.bz2
  
Tar-jxvf essential-20050412.tar.bz2
  
Music Video essential-20050412/usr/lib/win32
  
Rm-rf/tmp/package
  
Mkdir-p/tmp/package/usr/lib/win32
  
Cp-rf/usr/lib/win32/*/tmp/package/usr/lib/win32
  
Dir2mo/tmp/package/usr/lib/win32/mnt/sda5/slax/modules/codecs.mo
  
In this way, KMPlayer can play a variety of video files perfectly.
  
My/etc/gtk/gtkrc. zh_CN file:
  
Code:
  
Style "gtk-default-zh-cn "{
  
Fontset = "-adobe-helvetica-medium-r-normal -- 12-*-iso8859-1,
  
-*-Medium-r-normal -- 12-*-gbk-0, *-r -*"
  
}
  
Class "GtkWidget" style "gtk-default-zh-cn"
  
My profile. d/lang. sh
  
Code:
  
Export LC_ALL = zh_CN.gbk
  
Export G_BROKEN_FILENAMES = 1
  
Export XMODIFIERS = "@ im = fcitx"
  
Auto Start fcitx
  
Add the file fcitx. desktop to/root/. kde/Autostart/. The file content is as follows:
  
Code:
  
[Desktop Entry]
  
Encoding = UTF-8
  
Name = fcitx
  
Name [zh_CN] = fcitx
  
GenericName = Input Method
  
Exec = fcitx
  
Icon = fcitx
  
Type = Application
  
Terminal = 0
  
X-KDE-StartupNotify = false
  
X-KDE-AuthorizeAction = shell_access
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.