FC4 HAL setting file system support

Source: Internet
Author: User

Before giving you a detailed introduction to FC4 HAL settings, let's first take a look at FC4 HAL settings, and then give a comprehensive introduction to FC4 HAL settings, hoping to be useful to you. Due to my Fixed Thinking and insufficient acceptance of new things, I always use old thinking in learning Fedora Core 4.0. For mobile storage, such as USB flash drives, mobile hard drives, and digital cameras, currently, most plug-and-play functions are available in Linux; only a few cannot; for example, many 6-in-1 card readers integrated in a notebook do not support this function );

I rarely use Fedora. I feel that Fedora is a lab and new features will appear in FC4 HAL settings. This enhances the ease of use of the Linux Desktop edition. In fact, this is also a good thing; for the principle of plug-and-play USB storage, the bbbush brothers have already talked about it in FC4 HAL's storage-policy automatic mounting of vfat partitions on the ultra disk. You can take a look at this article. After reading this article, your skills will grow too long. :) HAL-Hardware prepare action Layer Hardware extraction Layer, I don't know how to translate it. My understanding is similar to Windows Hardware Management;

The article I wrote is actually useless. Why? Because there is no technical content, it is only written to solve the problem, there is no principle, just a few lines or a few lines of words; it may be useful for beginners;

1. USB mobile storage;

Digital camera; MMC card, SD card; usb mini disk; USB mobile hard disk has a USB interface box, which contains a laptop hard disk and a large computer hard disk ), 1394 mobile storage of interfaces, recording pen, DV, etc., mostly use mobile storage;

2. Support for setting file systems for fat, ntfs, fat32, reiserfs, ext3, and FC4 HAL;

Fedora core 4.0 supports almost all file systems, so there is no need to compile the kernel. If you have a mobile hard disk that is partitioned by NTFS like me, Please install the support of the kernel NTFS module; the kernel already supports the fat format, both of which are supported by fat16 fat32. For the NTFS format file system, install the NTFS kernel-moduls. I feel like NTFS is moving disk partitions, it doesn't make much sense, but I have a mobile hard disk and a partition is ntfs.) Because NTFS is not writable, use fat or fat32; if your machine has a 1394 Interface, if you want to purchase a large storage device, we recommend that you still buy a 1394 Interface Box. USB does not support writing large files, no matter what the file system is talking about the facts, I have tried). In addition, the hard drive with the 1394 Interface can be stably loaded during system startup;

3. plug-and-play: the system automatically mounts mobile storage devices;

1. First, make sure that the following services are enabled;
[Root @ localhost beinan] # chkconfig -- list | grep haldaemon
Haldaemon 0: Enable 1: Enable 2: Enable 3: Enable 4: Enable 5: Enable 6: Enable
[Root @ localhost beinan] # chkconfig -- list | grep messagebus
Messagebus 0: Enable 1: Enable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable
If it is not enabled in 3 and 5 modes, you must enable it;
[Root @ localhost beinan] # chkconfig -- level 0123456 haldaemon on
[Root @ localhost beinan] # chkconfig -- level 0123456 messagebus on
Open all modes; check whether the services we mentioned are running in all modes; Use the chkconfig -- list | grep server name mentioned above;
After doing so, the services we mentioned will automatically run in all modes upon startup; we do not need to interfere with them manually; however, sometimes we have to enable and disable them ourselves for debugging; see the next section;

2. Services Running in standalone mode are mostly in the/etc/init. d directory;
Usage:/etc/initrd server start | stop | status | restart | condrestart
For example, if we want to enable the haldaemon Server:
[Root @ localhost beinan] #/etc/init. d/haldaemon start
Start FC4 HAL to set the daemon: [OK]
[Root @ localhost beinan] #/etc/init. d/haldaemon restart
Disabling FC4 HAL daemon: [OK]
Start FC4 HAL to set the daemon: [OK]
[Root @ localhost beinan] #/etc/init. d/haldaemon stop
Disabling FC4 HAL daemon: [OK]
[Root @ localhost beinan] #/etc/init. d/haldaemon status
Hald stopped
This beginner knows all about it, including start, restart, stop, and status;
The three servers we mentioned in this article are all in the/etc/init. d directory;

3. If the above steps can be completed, most mobile storage devices are plug-and-play and automatically mounted. Although the system is plug-and-play, however, the permission may not meet our needs. In addition, if text is stored in the fat and ntfs file systems, the Chinese support for file names is unfriendly ...... solution .....

4. solve the problem that the vfat and ntfs file systems normally display Chinese file names and file permissions;

1. Confirm the locale of the system;
[Beinan @ localhost ~] $ Locale
LANG = zh_CN.UTF-8
LC_CTYPE = "zh_CN.UTF-8"
LC_NUMERIC = "zh_CN.UTF-8"
LC_TIME = "zh_CN.UTF-8"
LC_COLLATE = "zh_CN.UTF-8"
LC_MONETARY = "zh_CN.UTF-8"
LC_MESSAGES = "zh_CN.UTF-8"
LC_PAPER = "zh_CN.UTF-8"
LC_NAME = "zh_CN.UTF-8"
LC_ADDRESS = "zh_CN.UTF-8"
LC_TELEPHONE = "zh_CN.UTF-8"
LC_MEASUREMENT = "zh_CN.UTF-8"
LC_IDENTIFICATION = "zh_CN.UTF-8"
LC_ALL =
[Beinan @ localhost ~] $
If your system code is gb2312, gbk, or gb18030, do not change locale. You just need to change FC4 HAL to set a file on the server;

2. modify the configuration file set by FC4 HAL;
In Fedora Core 4.0, FC4 HAL sets the server's mobile storage configuration file
/Usr/share/hal/fdi/policy/10 osvendor/10-storage-policy.fdi;
Back up data before making changes;
[Root @ localhost 10 osvendor] # cp 10-storage-policy.fdi 10-storage-policy.fdiBAK
Open the 10-storage-policy.fdi file, and add the following two sections;
<Device>
<Match key = "volume. fsusage" string = "filesystem">
<Match key = "volume. fstype" string = "vfat">
<Merge key = "volume. policy. should_mount" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.auto" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.user" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.rw" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.utf8" type = "bool"> true </merge>
</Match>
</Match>
</Device>
<Device>
<Match key = "volume. fsusage" string = "filesystem">
<Match key = "volume. fstype" string = "ntfs">
<Merge key = "volume. policy. should_mount" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.auto" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.user" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.umask = 000" type = "bool"> true </merge>
<Merge key = "volume. policy. mount_option.utf8" type = "bool"> true </merge>
</Match>
</Match>
</Device>

After the following section;
<Device>
<Match key = "info. udi" string = "/org/freedesktop/Hal/devices/computer">
<Merge key = "storage. policy. default. mount_root" type = "string">/media </merge>
<Merge key = "storage. policy. default. use_managed_keyword" type = "bool"> true </merge>
<Merge key = "storage. policy. default. managed_keyword.primary" type = "string"> managed </merge>
<Merge key = "storage. policy. default. managed_keyword.secondary" type = "string"> kudzu </merge>
<Merge key = "storage. policy. default. mount_option.noauto" type = "bool"> true </merge>
<Merge key = "storage. policy. default. mount_option.pamconsole" type = "bool"> true </merge>
<Merge key = "storage.policy.default.mount_option.exe c" type = "bool"> true </merge>
</Match>
</Device>
NOTE: If your system code is gb2312, gbk, gb18030, or other, change the utf8 in the two sections we added to cp936 or gb2312. One step experiment, it always works;

3. Restart FC4 HAL to set the daemon;
[Root @ localhost beinan] #/etc/init. d/haldaemon restart
Disabling FC4 HAL daemon: [OK]
Start FC4 HAL to set the daemon: [OK]

4. Plug in a USB or 1394 device. Click the computer on the desktop to view the disk icon;
Sometimes it may slow down, whether it is mounted, and where it is mounted, we can use df-lh to check;
[Root @ localhost beinan] # df-lh
Filesystem capacity in use available % mount point
/Dev/hda8 11G 5.9G 4.5G 58%/
/Dev/shm 236M0 236 M 0%/dev/shm
/Dev/sdc5 5.2G 63 M 4.9G 2%/media/usbdisk2
/Dev/sdc1 4.2G 1.4G 2.8G 34%/media/usbdisk1
/Dev/sdb1 988 M 3.7 M 984 M 1%/media/usbdisk
/Dev/sda1 56G 22G 35G 39%/media/ieee1394disk

5. test whether the permission can be written by common users;
If the format is fat or fat32, we have defined the mount option in the file 10-storage-policy.fdi, such as user and rw, which are readable and writable. If the format is ntfs partition, we set umask = 000 for the mount option, so that all users have all the permissions, but the ntfs partition can only be readable in Linux; it doesn't make much sense; for ext3, reiserfs, and ext2 file systems, if common users can read and write data, check the mount point and run the chmod-R 777 directory name; in this way, all users can read, write, and execute files. The files of each user are independent of each other and kept confidential. Chinese support is not problematic. If garbled characters occur, you can use export LANG = to temporarily set the encoding. For example, if export LANG = zh_CN is another file format, you must support the kernel. Most FC4 supports the encoding, such as the hfs file system;

5. tips on how to learn the FC4 HAL configuration file;

1. View/usr/share/doc/hal-0.5.2/conf
2. Check the package points set by FC4 HAL, and a prompt can also be sent to the system. [root @ localhost beinan] # rpm-ql hal
3. Documents are in the directory of/usr/share/doc/hal-0.5.2/; examples of configuration files are available;
4. HAL-Hardware Abstraction Layer). Is this a literal translation or a Hardware Abstraction Layer? It seems like windows Hardware Management. We can use lshal | more to view it; [root @ localhost beinan] # lshal | more has a more intuitive tool; hal-gnome, can be obtained through apt or yum. After installation, there is a more intuitive hal graphical interface; [root @ localhost beinan] # hal-device-manager
5. The hardware configuration of FC4 HAL is flexible, and the syntax is relatively simple. We should check the system devices based on lshal or hal-device-manager; hal can manage all the devices; in addition, the structure is clear. I also found hal after reading man to solve the problem. Later I found the post of the bbbush brothers, and made a big difference through the post of the bbbush brothers ), I did not find it, wasting a lot of time; (currently I just plug in USB in practice; 1394 mobile storage device with FC4 HAL settings, it is more straightforward to do some tests and practices to solve the problem. More do not understand: (if you want to specify a device that starts with a device and ends with a layer, it is similar to the html syntax; match, if you want to set a more precise configuration, you should perform multiple matching operations. In this case, you can set the action for the row specified by the device, for example, whether to load the device. If yes, true is used, whether the relationship is logical relation bool type; that is, 1 and 0 can be obtained through lshal; in addition, string is a string, such as mout_root mount point)/media, which can also be found in lshal; all condition information can be obtained in lshal;

A condition row is a collection of actions that we want not to perform by the system. Instead, we require that the system match hardware more accurately and it should be an intersection. For example, some devices and some parameters are the same, in this case, multiple matches are required, but the more accurate the better. For example, in Mobile storage, we can find the same information of all mobile storage, so that common devices can act; I just want to talk a little bit about the principle. In fact, the default configuration file of the system can make our devices move; there is no need to change too much; Note: Write for new users; and new fellow students, hope to communicate with the brethren;

  1. Introduction to the ora HAL Server
  2. Brief Introduction to Liunx hal system users
  3. Do not know the Halt shutdown command
  4. Red Hat Enterprise Linux won 11 tests based on Nehalem
  5. Fedora Core network configuration-related files and commands-Linux operating system

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.