tag:blogger.com,1999:blog-59851208505408796872024-02-08T08:16:42.037+08:00Pumpump's BlogNotes about Linux and others.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-5985120850540879687.post-32822645753354241892013-01-26T00:28:00.003+08:002013-01-26T00:28:52.487+08:00How I lose 12 kg in 4 months<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOMAlF-fZPrcmk-mXV6Rav83GreMrN2eHikrMmHGm0IDIRcApPnfHnRpsPRmYeRnXa_-xPiAulryU4xBnH4PYsXRy9wLdpUl7z_qGqi_M8HKzJBmHqv0-Qw1aaNk6yTMG-MX0iu2w3O5uq/s1600/Screenshot_2013-01-25-21-55-37.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOMAlF-fZPrcmk-mXV6Rav83GreMrN2eHikrMmHGm0IDIRcApPnfHnRpsPRmYeRnXa_-xPiAulryU4xBnH4PYsXRy9wLdpUl7z_qGqi_M8HKzJBmHqv0-Qw1aaNk6yTMG-MX0iu2w3O5uq/s320/Screenshot_2013-01-25-21-55-37.png" width="200" /></a></div>
<span style="font-family: Arial, Helvetica, sans-serif;">First of all, my BIG thanks to the research program I signed up as a test subject, and to all who gave me support during the period - my bosses, my colleagues, and especially my wife :) </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I have been trying to reduce my weight for years, but I have not made much progress towards my goal. I once thought it is difficult for me because somehow I digest food very fast and when I need energy, my body cannot convert fat to energy efficiently. After this program, I realized I was all wrong... I now know that I cannot reduce my weight because I ate too much, and exercise too little :P</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">There is no secret in losing weight. Basically, you have to ensure your calories intake is less than your output. In my case,
</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">1) I take 500 less calories than my usual intake amount of 2000 to 2200. Which means, I take 1500 - 1700 calories per day during the weight loss phase. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"> How to control the intake precisely is the tricky part. Either you can measure the calories of the food you eat one by one, or you can take some meal replacement like me (as required by my program). There are plenty of brands out there and I will not mention any specific ones because I am not advertising here. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I take meal replacement for 2 meals, 5 days a week. For the rest of the meals I eat my normal amount (which should not be over-sized - just moderate amount).
In between my meals, I take 2 times snacks, one in the morning and the other in the afternoon. Each snack should be less than 100 calories and should be something difficult to digest (e.g. no soft drinks :P). I will sometimes take max 2 servings of fruits per day. Again, choose difficult to digest fruits. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"> If you have issue with getting hungry too soon, you can try meal replacements with protein powders. In my case the meal replacement worked pretty well in hunger control. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Of course it is not a hard and fast rule that you must reduce 500 calories intake per day. The basic idea is to eat less for main meals, and fill the gap with snacks. Overall you should eat a few hundred calories less than what you ought to (again usually it is 2000-2200 for male adults. Not sure about ladies...) </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">2) I do gym exercises to burn fats 3 times a week. Each session burns 500 calories. So that's a total of 1500 calories per week. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">What I usually do for the gym sessions is fast walking (around 14 incline, 5.5 km/h) on treadmill, which takes me about 40 to 50 minutes to burn 500 calories. Other exercises like cross trainer are equally fine, as long as you don't do something too intense. </span><span style="font-family: Arial, Helvetica, sans-serif;">The key thing here in my opinion is sustainability - you have to ensure your body can take it and won't get pain or too tired after the session.</span><span style="font-family: Arial, Helvetica, sans-serif;"> </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Again, it is not a rule that one must consume 500 calories per session, and must do 3 sessions per week. However, the total amount burnt cannot be too little, I guess. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"> 3) This is important, you must be disciplined to do 1) and 2). Do not skip them unless you are really sick... In my case, I found it not difficult (not easy either, of course) to do all those for 4 months. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The result - I lost 12 kg and 5.3 inches of waist. I must say it is pretty awesome :P </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">That's all - no magical pills, no slimming sessions on expensive equipment. No adverse side effects (except that I felt a bit hungry sometimes). It is a natural and effective way of losing weight. Hope it helps for those who are in a similar situation like me.</span>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com1tag:blogger.com,1999:blog-5985120850540879687.post-25870707862327854582011-11-28T13:10:00.003+08:002011-11-28T13:14:57.000+08:00New PC ComponentsNew Stuff:<br />Motherboard: ASRock Z68 Extreme4 Gen3 <br />CPU: Intel Core i5 2500K<br />SGD 583<br />RAM: Corsair Vengeance DDR3-1600 4GB X 2<br />SGD 85<br />Primary Disk: ADATA S511 120GB<br />SGD 290Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-34847547853801863592011-06-13T14:37:00.003+08:002011-06-13T14:54:15.297+08:00Consequences of Treating My Car as AmphibiousI have to admit - driving my car through floods in Bukit Timah Road is thrilling and fun... but the consequence is dire :P (Well, it could be much worse, if the water went into the engine.)<br /><br />Just recording down the damage for reference later based on my interpretation of the repair bill.<br /><br />1) The ETM (Electronic Throttle Module) obviously has to be cleaned because water got into it. Luckily, labor cost only - SGD 169. (http://www.youtube.com/watch?v=8Zaxtm-hdyo)<br /><br />2) MAF (Mass Air Flow) Sensor has to be replaced. This one damn expensive - SGD 728 for parts and 65 for labor.<br /><br />3) Air Filter has to be replaced because water got in. Cheap.<br /><br />4) Spark Plug has to be replaced too. about 200 parts + labor.<br /><br />5) Intercooler is ok, but need to be removed and reinstalled to replace other parts I think. SGD 327.<br /><br />Good thing is, the clutch-in seems more smooth after the repair... Anyway, next time, detour whenever seeing flood :)Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-12233728640531680702011-06-01T20:30:00.003+08:002011-06-13T14:54:46.597+08:00How I fixed my MSI P35 Neo2 FR's problemI am using a 3 year old MSI P35 Neo2 FR (MSI 7345) motherboard with 4 sticks of 1GB Corsair XMS DDR2-800 RAM. The 7345 started to have problem when all 4 sticks are inserted - I can't remember since when the problem started to surface.<br /><br />Symptoms include - system hang at "Initializing USB Controller..." during boot-up; IO error after boot loader phase; hanging at Windows start up screen (or during Linux boot-up, showing some ata device IO errors); RAM error during boot-up check (as shown by on-board diagnostic LEDs); disk IO errors after booting into Windows, etc.<br /><br />The problems seem unpredicatable, and I have spent a lot of time troubleshooting these problems. I went for RMA and replaced my motherboard eventually, but the problems still persist. <br /><br />In the end, I discovered that once I turn off the Quick Booting option in BIOS, the problems seem gone. Still need to monitor for a bit longer to make sure it is indeed the solution.<br /><br />And, I shall never buy another MSI board for my next PC.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-26697765571900952672010-08-29T21:21:00.007+08:002011-11-02T21:31:01.870+08:00HDD partition planIntel X25M<br />sda1 - Windows 7 and WoW<br /><br />320GB HDD1<br />sdb1 (30G) - Windows 7 User directory<br />sdb2 (30G) - Games<br />sdb5 (80G) - Linux LVM/RAID1 - don't touch<br />sdb6 (40G) - To convert into NTFS<br />sdb7 (10G) - RAID volume for Slackware root partition - don't touch<br />sdb8 (10G) - RAID volume for Ubuntu root partition - keep for now<br />sdb9 (120G) - Media<br /><br />320GB HDD2<br />sdc1 (60G) - Data<br />sdc5/6/7/8 - same as sdb5-8<br />sdc9 (120G) - BackupAnonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-82318788666924228772010-03-28T17:14:00.000+08:002010-03-28T17:16:27.536+08:00包水饺妈妈说:好了,妈妈要去包水饺了。苗苗问:妈妈,水是用来包水饺的吗?Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-27036688738371742032008-11-12T14:30:00.002+08:002008-11-12T14:35:15.473+08:00Removing a RAID partitionTo remove a RAID device that consists of 2 partitions (sda7 and sdb7) that has an LVM2 VG on top:<br />- lvremove to remove all LVs<br />- vgremove to remove all VGs<br />- pvremove to remove all PVs<br />- mdadm --stop to stop the device<br />- mdadm --remove to remove the device<br />- mdadm --zero-superblock to erase the md superblock on each of the 2 partitions<br />- update /etc/mdadm.conf to remove the md deviceAnonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-22196662375403054002008-11-12T13:44:00.006+08:002008-11-12T14:29:57.136+08:00Migrating /tmp to another partitionI decided to remove the 80G RAID-0 partition in my PC, and migrate the data inside to other LVM partitions. Currently, the partition has 1 LVM2 vg which contains 3 lvs. One of them contains files I downloaded and the other 2 are /tmp filesystems in my Slackware and Ubuntu installations respectively. I simply copied the files in the first lv to another lv (non-RAID LVM). For /tmp filesystems, I did the following steps for each of them:<br /><br />- Create a new lv (RAID-1 LVM) of 4G. (lvcreate)<br />- Format it as reiserfs. (mkfs.reiserfs)<br />- Mount it to a temporary mount point.<br />- Copy files in /tmp over using rsync -av<br />- Go to single user mode and unmount /tmp<br />- Edit /etc/fstab to change /tmp to use the new lv.<br />- Remount /tmp and go into multi-user mode.<br /><br />Note: the device to be put into fstab should be /dev/<vg>/<lv>, not /dev/mapper/<vg>-<lv>.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-40170914987100392132008-05-14T18:03:00.002+08:002008-05-14T18:10:24.845+08:00Slackware RAID HOWTO 指南 (Chinese Translaction)Slackware RAID HOWTO<br />Slackware RAID 指南<br /><br />Version 1.00<br />2008/04/29<br /><br />by Amritpal Bath <amrit@slackware.com><br /><br /><br /><br />Contents<br />目录<br />===============================================================================<br /><br />- Introduction<br />- Warnings<br />- Planning<br />- Setup<br />- Using the generic kernel<br />- Troubleshooting<br />- Appendices<br />- Acknowledgements/References<br /><br /><br /><br /><br />Introduction<br />简介<br />===============================================================================<br /><br />This document explains how to install Slackware 12.1 (and beyond) on a<br />software RAID root filesystem. It is meant to cover only software raid.<br />If you are using a RAID expansion card, or the RAID functionality that came<br />with your motherboard, this document will not be useful for you.<br />本文解释了如何在一个基于软件RAID(廉价磁盘冗余阵列)的根文件系统上安装Slackware 12.1。本文只涵盖软件RAID。如果你使用RAID扩展卡,或者你的主板带有RAID功能,本文将不会对你有帮助。<br /><br />In order to follow this document, your computer must have two or more empty<br />hard drives. While it is possible to be creative and create RAID arrays on<br />drives that already contain data, it can be error prone, so it is not<br />covered in this document.<br />你的电脑必须有两个以上的空硬盘你才可以跟着本文做。虽然你可以发挥创意,在已经有数据的硬盘上建立RAID阵列,但是这样做容易导致问题,所以本文不包括这方面的内容。<br /><br /><br />Warnings<br />警告<br />===============================================================================<br /><br />If you perform the following instructions on hard drives with data on them,<br />YOU WILL LOSE ALL OF YOUR DATA.<br />如果你在有数据的硬盘上执行以下指令,上边的所有数据将会丢失。<br /><br />If you wish to perform these operations on hard drives that hold data of<br />any importance, you MUST BACKUP YOUR DATA. The procedure below will<br />destroy all of the data on your hard drives, so any important data will<br />need to be restored from your backups.<br />如果你要在有重要数据的硬盘上执行以下指令,请先做好备份。下面的步骤会消除硬盘上的所有数据,所以你将需要从你的备份里恢复它们。<br /><br /><br />One more time: *BACKUP YOUR DATA, OR YOU WILL LOSE IT!*<br />再一次:备份你的数据,否则你将失去它们。<br /><br />If you don't backup your data and end up losing it, it will be your fault.<br />There is nothing I can do to help you in that case.<br />如果你因为没有备份数据而导致数据丢失,那时你自己的错。我帮不了你。<br /><br />Now, on with the show... :)<br />好了,我们开始吧... :)<br /><br /><br /><br />Planning<br />计划<br />===============================================================================<br /><br />The first step is to determine which RAID level you want to use.<br />第一步是决定你要哪个RAID级。<br /><br />It is recommended that you familiarize yourself with basic RAID concepts,<br />such as the various RAID levels that are available to you. You can read<br />about these in various places - consult your favorite search engine about<br />"raid levels", or see the References section.<br />建议你先搞清楚RAID的基本概念,比如你可以使用的各个RAID级。你可以在很多地方找到这方面的信息 - 用你喜爱的搜索引擎查一查"raid levels"。或者看本文的“参考书目”一节。<br /><br />Here's a quick summary of the more common RAID levels:<br />下面是对常见的RAID级的一个简单的总结:<br /><br /> - RAID 0: Requires 2 drives, can use more. Offers no redundancy, but<br /> improves performance by "striping", or interleaving, data between all<br /> drives. This RAID level does not help protect your data at all.<br /> If you lose one drive, all of your data will be lost.<br /><br /> - RAID 0: 需要两个或者更多的设备。不支持冗余,但“striping",或者说interleaving(数据交替储存?),可以提高读写的性能。这个级别不能够保护你的数据。如果一个设备坏了,你所有的(在这个RAID设备上的)数据都会丢失。<br /><br /> - RAID 1: Requires 2 drives, can use more. Offers data redundancy by<br /> mirroring data across all drives. This RAID level is the simplest way<br /> to protect your data, but is not the most space-efficient method. For<br /> example, if you use 3 drives in a RAID 1 array, you gain redundancy, but<br /> you still have only 1 disk's worth of space available for use.<br /> - RAID 1: 需要两个或者更多的设备。使用数据在各个设备上的镜像来提供冗余。这个级别是最简单的一种保护你的数据的方法。<br /><br /> - RAID 5: Requires 3 drives, can use more. Offers data redundancy by<br /> storing parity data on each drive. Exactly one disk's worth of space<br /> will be used to hold parity data, so while this RAID level is heaviest<br /> on the CPU, it is also the most space efficient way of protecting your<br /> data. For example, if you use 5 drives to create a RAID 5 array, you<br /> will only lose 1 disk's worth of space (unlike RAID 1), so you will<br /> end up with 4 disk's worth of space available for use. While simple to<br /> setup, this level is not quite as straightforward as setting up RAID 1.<br /> - RAID 5: 需要三个或者更多的设备。通过在每个设备上储存的奇偶数据来提供冗余。正好整一个设备大小的空间会用来储存奇偶数据,虽然这个RAID级用最多的CPU,但是他也是最有效率利用存储空间的保护数据的方法。比方说,如果你用5个设备来建立一个RAID 5阵列,你只失去了一个设备大小的空间(不像RAID 1),所以你可以有4个设备大小的空间用来存放数据。虽然设置起来简单,但是这个级别不象设置RAID 1那么容易。<br /><br /><br /><br />Setup<br />设置<br />===============================================================================<br /><br />=== Partition hard drives ===<br /> 硬盘分区<br /><br />Once you have booted the Slackware installer CD, the first step is to<br />partition the hard drives that will be used in the RAID array(s).<br />你用Slackware安装光盘引导进系统之后,第一步就是给要在RAID阵列中使用的硬盘分区。<br /><br />I will assume that your first RAID hard drive is /dev/sda. If it is<br />/dev/hda or something similar, adjust the following commands appropriately.<br />我假设你的第一个RAID硬盘是/dev/sda。如果它是/dev/hda或者其他类似的设备,你要对下面的命令作适当的调整。<br /><br />You can see your drives by running: cat /proc/partitions<br />你可以运行这个来看你的硬盘:cat /proc/partitions<br /><br /> - /boot: RAID 0 and RAID 5 users will require a separate boot partition, as<br /> the computer's BIOS will not understand striped devices. For<br /> simplicity's sake, we will make /boot a small RAID 1 (mirror) array.<br /> This means that in the case of RAID 0, it will not matter which drive<br /> your BIOS attempts to boot, and in the case of RAID 5, losing one drive<br /> will not result in losing your /boot partition.<br /><br /> - /boot: RAID 0 和 RAID 5 的使用者需要一个独立的引导分区,这是因为电脑的BIOS不能识别数据交替储存的设备。为简单起见,我们把/boot做成一个小的RAID 1阵列。这就是说,在RAID 0下面,你的BIOS可以用(这个RAID 1阵列里的)任何一个设备来引导。在RAID 5 下面,失去一个设备不会导致你失去/boot分区。<br /><br /> I recommend at least 30MB for this partition, to give yourself room to<br /> play with multiple kernels in the future, should the need arise. I tend<br /> to use 100MB, so I can put all sorts of bootable images on the partition,<br /> such as MemTest86, for example.<br /> 我建议给这个分区至少30MB,以便让你将来有需要的话可以使用多个内核。我一般会给100MB,这样我可以把各种可引导的(内核)文件如MemTest86放在上面。<br /><br /> Go ahead and create a small boot partition now on /dev/sda, via cfdisk<br /> (or fdisk, if you prefer).<br /> 现在在/dev/sda上用cfdisk或者fdisk建一个小的引导分区。<br /><br /> Ensure that the partition type is Linux RAID Autodetect (type FD).<br /> 确保分区类型是Linux RAID Autodetect (type FD)。<br /><br /><br /> - /: Every setup will require a root partition. :) You will likely want to<br /> create a partition takes up most of the rest of the drive. Unless you<br /> are using LVM (not covered in this document), remember to save some space<br /> after this partition for your swap partition! (see below)<br /> - /:每个配置多需要一个根分区。:) 你很可能想要然这个分区占掉硬盘上的大部分空间。除非你用LVM(不在本文范围内),否则记得留些空间给交换分区(见下)!<br /><br /> If you are not creating a swap partition, I recommend leaving 100MB of<br /> unused space at the end of the drive. (see "safety" for explanation)<br /> - 如果你不打算建交换分区,我建议在硬盘的末端留100MB空间。(解释见“安全性”一节)。<br /><br /> Go ahead and create your main partition now on /dev/sda, via cfdisk<br /> (or fdisk, if you prefer).<br /> 现在在/dev/sda上用cfdisk或者fdisk建你的主分区。<br /> <br /> Ensure that the partition type is Linux RAID Autodetect (type FD).<br /> 确保分区类型是Linux RAID Autodetect (type FD)。<br /><br /> - swap: Swap space is where Linux stores data when you're running low on<br /> available RAM. For fairly obvious reasons, building this on RAID 0 could<br /> be painful (if that array develops a bad sector, for example), so I tend<br /> to build swap on RAID 1 as well. If you understand the danger and still<br /> want to build swap on RAID 0 to eke out as much performance as possible,<br /> go for it.<br /> - swap: 交换空间是Linux在内存不够的时候存放数据的地方。显而易见的,把它建在RAID 0上可能会很糟糕(比如说,那个阵列出了一个坏扇区),所以我一般也把它建在RAID 1上。如果你明白其中的危险性,但是还是想把它建在RAID 0上以尽可能多的提升性能,也是可以。<br /> <br /> For RAID 1 swap, create a partition that is the exact size that you want<br /> your swap space to be (for example, 2GB, if you can't decide).<br /> 对于RAID 1 交换分区,你想要多大,就建一个多大的分区。(如果你不能决定,就放2GB)<br /><br /> For RAID 0 swap (not recommended), create a partition that is equivalent<br /> to the swap size you want, divided by the number of drives that will be<br /> in the array.<br /> 对于RAID 1 交换分区,建一个大小为你想要的大小除以设备的数目的分区。<br /><br /> For example, 2GB / 3 drives = 683MB swap partition on /dev/sda.<br /> 比如说,2GB / 3个硬盘 = 683MB 交换分区 在/dev/sda上。<br /><br /> Ensure that the partition type is Linux RAID Autodetect (type FD).<br /> 确保分区类型是Linux RAID Autodetect (type FD)。<br /><br /> I recommend leaving 100MB of unused space at the end of the drive.<br /> (see "safety" for explanation)<br /> 我建议在硬盘的末端留100MB空间。(解释见“安全性”一节)。<br /><br /> See also: Appendix A - Striping swap space without RAID 0.<br /> 又见:附录A - 不用RAID 0来交替储存交换空间。<br /><br /><br /> - safety! I highly recommend leaving 100MB of unpartitioned space at the<br /> end of each drive that will be used in the RAID array(s).<br /> - 安全性!我极力推荐在每个RAID阵列设备的末端留100MB为分区的空间。<br /><br /> In the event that you need to replace one of the drives in the array,<br /> there is no guarantee that the new drive will be exactly the same size as<br /> the drive that you are replacing. For example, even if both drives are<br /> 750GB, they may be different revisions or manufacturers, and thus have a<br /> size difference of some small number of megabytes.<br /> 如果你需要更换阵列中的一个设备的话,新的硬盘不一定和原来的正好完全一样大小。比方说,就算两个硬盘都是750GB,它们可能属于不同的版本或者制造商,因此可能会有几兆的差异。<br /><br /> This is, however, enough to throw a wrench in your drive-replacement<br /> plans - you cannot replace a failed RAID drive with one of a smaller size,<br /> for obvious reasons. Having that small 100MB buffer just may save your<br /> bacon.<br /> 然而,这足以扰乱你的硬盘更换计划。很显然,你不能用一个小一点的硬盘来换掉坏掉的硬盘。留100MB的缓冲空间可以预防这个问题。<br /><br /><br /><br />=== Copy and review partitions ===<br /> 复制与检查分区<br /><br />Now that /dev/sda is partitioned as appropriate, copy the partitions to all<br />the other drives to be used in your RAID arrays.<br />/dev/sda分好区之后,把它的分区拷贝到RAID阵列里的所有其他硬盘。<br /><br />An easy way to do this is:<br />一个简单的方法是:<br /> sfdisk -d /dev/sda | sfdisk /dev/sdb<br /><br />This will destroy all partitions on /dev/sdb, and replicate /dev/sda's<br />partition setup onto it.<br />这会毁掉/dev/sdb里的所有分区,并把/dev/sda的分区复制到/dev/sdb。<br /><br />After this, your partitions should look something like the following:<br />这之后,你的分区会大概是下面这个情况:<br /><br /> - RAID 0:<br /> /dev/sda1 30MB /dev/sdb1 30MB <br /> /dev/sda2 100GB /dev/sdb2 100GB <br /> /dev/sda3 2GB /dev/sdb3 2GB <br /><br /> - RAID 1:<br /> /dev/sda1 100GB /dev/sdb1 100GB <br /> /dev/sda2 2GB /dev/sdb2 2GB <br /><br /> - RAID 5:<br /> /dev/sda1 30MB /dev/sdb1 30MB /dev/sdc1 30MB <br /> /dev/sda2 100GB /dev/sdb2 100GB /dev/sdc2 100GB<br /> /dev/sda3 2GB /dev/sdb3 2GB /dev/sdc3 2GB <br /> <br />All partition types should be Linux RAID Autodetect (type fd).<br />所有分区类型都应该是Linux RAID Autodetect (type FD)。<br /><br /><br />=== Create RAID arrays ===<br /> 建立RAID阵列<br /><br />Now it's time to create the actual RAID arrays based on the partitions that<br />were created.<br />现在是时候在你的分区上建立RAID阵列了。<br /><br />The parameters for each of these RAID commands specifies, in order:<br />每个RAID命令的参数依次是:<br /> - the RAID device node to create (--create /dev/mdX)<br /> - 要建立的RAID设备节点 (--create /dev/mdX)<br /> - the RAID level to use for this array (--level X)<br /> - 要使用的RAID级 (--level X)<br /> - how many devices (partitions) to use in the array (--raid-devices X)<br /> - 在这个阵列里有多少个设备(分区)(--raid-devices X)<br /> - the actual list of devices (/dev/sdaX /dev/sdbX /dev/sdcX)<br /> - 实际设备列单 (/dev/sdaX /dev/sdbX /dev/sdcX)<br /><br />Start by creating the RAID array for your root filesystem.<br />首先建立根文件系统的RAID阵列。<br /><br /> - RAID 0:<br /> mdadm --create /dev/md0 --level 0 --raid-devices 2 \<br /> /dev/sda2 /dev/sdb2<br /><br /> - RAID 1:<br /> mdadm --create /dev/md0 --level 1 --raid-devices 2 \<br /> /dev/sda1 /dev/sdb1<br /><br /> - RAID 5:<br /> mdadm --create /dev/md0 --level 5 --raid-devices 3 \<br /> /dev/sda2 /dev/sdb2 /dev/sdc2<br /><br /><br />Next, let's create the array for the swap partition. This will be RAID 1<br />regardless of which RAID level your root filesystem uses, but given our<br />partition layouts, each command will still be slightly different.<br />其次,建立交换分区阵列。不论你的根文件系统用哪个RAID级,这个都是RAID 1。但是因为我们不同的分区分布,每个命令还是会有一点不同。<br /><br /> - RAID 0:<br /> mdadm --create /dev/md1 --level 1 --raid-devices 2 \<br /> /dev/sda3 /dev/sdb3<br /><br /> - RAID 1:<br /> mdadm --create /dev/md1 --level 1 --raid-devices 2 \<br /> /dev/sda2 /dev/sdb2<br /><br /> - RAID 5:<br /> mdadm --create /dev/md1 --level 1 --raid-devices 3 \<br /> /dev/sda3 /dev/sdb3 /dev/sdc3<br /><br /><br />Finally, RAID 0 and RAID 5 users will need to create their /boot array.<br />RAID 1 users do not need to do this.<br />最后,RAID 0 和 RAID 5 用户需要建立/boot 阵列。RAID 1用户不需要。<br /><br /> - RAID 0:<br /> mdadm --create /dev/md2 --level 1 --raid-devices 2 \<br /> /dev/sda1 /dev/sdb1<br /><br /> - RAID 5:<br /> mdadm --create /dev/md2 --level 1 --raid-devices 3 \<br /> /dev/sda1 /dev/sdb1 /dev/sdc1<br /><br /><br />We're all done creating our arrays! Yay!<br />所有的阵列都建好了!Yay!<br /><br /><br />=== Run Slackware setup ===<br /> 运行Slackware安装<br /><br />First, let's format our swap array, so the installer recognizes it:<br />首先,格式化交换阵列,让安装程序可以识别它。<br /> mkswap /dev/md1<br /><br />Now run 'setup' as normal.<br />接下去如常运行'setup'。<br /><br />When you choose to setup your swap partitions, /dev/md1 will show up.<br />Continue with this selected.<br />当你选择设置你的交换分区时,/dev/md1会出现在选项里。选它然后继续。<br /><br />When asked for the target partition, choose the root array (/dev/md0).<br />当让你选择目标分区时,选根阵列(/dev/md0)。<br /><br />You may choose the format method and filesystem of your choice.<br />你可以选择你要的文件系统和格式化方法。<br /><br />RAID 0 and RAID 5 users must also setup /boot. When asked about setting up<br />extra partitions, choose /dev/md2. When asked where to mount this device,<br />enter "/boot".<br />RAID 0 和 RAID 5 用户必须设置/boot。当然你设置额外的分区时,选/dev/md2。当问你挂载到哪里时,输入/boot。<br /><br />After this, continue installation as normal.<br />之后,照常继续安装。<br /><br />For LILO configuration:<br /> - When asked about LILO, choose the "simple" setup.<br /> - When asked about additional "append=" parameters, RAID 0 and<br /> RAID 5 users should type in "root=/dev/md0", to ensure that the proper<br /> array is mounted on / at bootup.<br /> - When asked about where to install LILO, choose MBR.<br />LILO设置:<br /> - 当问你LILO设置时,选“simple”设置。<br /> - 当问你附加的"append="参数时,RAID 0 和 RAID 5 用户要输入"root=/dev/md0" 以确保引导时正确的阵列会被挂载到/上。<br /> - 当问你把LILO安装到哪里时,选MBR。<br /><br />You may see some warnings scroll by. This is OK.<br />你可能会看到一些警告信息,那些不碍事。<br /><br /><br />=== Finishing touches ===<br /> 完成安装<br /><br />After exiting the installer, we have just a few settings to tweak.<br />推出安装程序后,还有几个设置要“搞”一下。<br /><br />Start by switching into your actual installation directory:<br />首先切换进你的系统所安装到的目录。<br /> - chroot /mnt<br /><br /><br />Let's make sure LILO boots from the RAID arrays properly. Using your<br />favorite editor (vim/nano/pico), edit /etc/lilo.conf:<br />确保LILO是从正确的RAID阵列引导的。用你喜欢的编辑器(vim/nano/pico)编辑/etc/lilo.conf:<br /> - add a new line (add it anywhere, but don't indent it):<br /> - 加入一行(随便哪里,但是不要缩进):<br /> raid-extra-boot = mbr-only<br /> - You will need to change the following line:<br /> - 修改这一行:<br /> boot = <something><br /> RAID 0 and RAID 5 users, change it to:<br /> RAID 0 和 RAID 5 用户改成:<br /> boot = /dev/md2<br /> RAID 1 users, change it to:<br /> RAID 1 用户改成:<br /> boot = /dev/md0<br /> <br /> - Save the file and exit your editor.<br /> - 保存文件,推出编辑器。<br /> - run "lilo".<br /> - 运行“lilo”。<br /><br /><br />When that's done, let's exit the installation and reboot:<br />完成后,退出安装,重启:<br /> - exit<br /> - reboot<br /><br />Voila!<br />完成!<br /><br /><br /><br />Using the generic kernel<br />使用generic内核<br />===============================================================================<br /><br />The official Slackware recommendation is to switch to the "generic"<br />Slackware kernel after installation has been completed. If you wish to use<br />the generic kernel, you must create an initrd. This section gives a quick<br />example of booting a RAID system in this fashion.<br />Slackware官方推荐完成安装后换去使用generic内核。如果你想用generic内核的话,就要建立一个initrd。这一节简单讲述如何用这个方法启动一个RAID系统。<br /><br />If you require more information on initrds, please read /boot/README.initrd.<br />如果你需要更多关于initrd的信息,请读/boot/README.initrd。<br /><br />Typically, a user switches to a generic kernel by booting the system, and<br />afterwards running the following:<br />一般来说,用户要启动系统并做以下步骤来切换到generic内核:<br /> - cd /boot<br /> - rm vmlinuz System.map config<br /> - ln -s vmlinuz-generic-smp-* vmlinuz<br /> - ln -s System.map-generic-smp-* System.map<br /> - ln -s config-generic-smp-* config<br /><br />Don't run lilo yet, we'll do that soon.<br />先不要巡行lilo。我们马上就会做到那一步。<br /><br />Next, edit (create, if necessary) /etc/mkinitrd.conf and add:<br />其次,编辑(如有必要,创建)/etc/mkinitrd.conf 并加入:<br /> MODULE_LIST="ext3"<br /> RAID="1"<br /><br />Obviously, this assumes that you are using the EXT3 filesystem. If you are<br />using another filesystem, adjust the module appropriately (reiserfs or xfs,<br />for example). If you wish to read more about the MODULE_LIST variable,<br />consult "man mkinitrd.conf".<br />显然,这里假设你用EXT3文件系统。如果你用其他的文件系统,适当修改模块行(比如reiserfs,xfs)。如果你要了解更多关于MODULE_LIST变量,参考"man mkinitrd.conf"。<br /><br />Note: If the module for your hard drive controller is not compiled into the<br />generic kernel, you will want to add that module to the MODULE_LIST variable<br />in mkinitrd.conf. For example, my controller requires the mptspi module, so<br />my /etc/mkinitrd.conf looks like:<br />注意:如果你的硬盘控制器的模块没有被编译到generic内核的话,你需要把他加到mkinitrd.conf的MODULE_LIST变量里。比如,我的控制器需要mptspi模块,所以我的/etc/mkinitrd.conf是这样的:<br /> MODULE_LIST="ext3:mptspi"<br /> RAID="1"<br /><br />We're almost done.<br />差不多了。<br /><br />Edit /etc/lilo.conf, and find the line at the very end that says:<br />编辑/etc/lilo.conf,找到这一行:<br /> image = /boot/vmlinuz<br /><br />Add a new line after it that says:<br />在它之后加入这行:<br /> initrd = /boot/initrd.gz<br /><br />In this case, be sure to indent the line you've added!<br />这个时候,确保加入的这行有缩进。<br /><br />Next, create the initrd based on the config file created earlier.<br />接下去,根据之前建立的配置文件创建initrd。<br /> mkinitrd -F<br /><br /><br />Finally, run "lilo" to make the new settings take effect, give yourself a<br />pat on the back, and reboot your finished system. :)<br />最后,运行“lilo”让新的设置生效。拍拍你自己的背,然后启动完成的系统。<br /><br /><br /><br />Troubleshooting<br />故障检查<br />===============================================================================<br /><br />Any number of typos can result in a system that does not boot on its own,<br />but all is not lost. Put the rubber chicken and the lemon away...<br />无论多少的打字错误都可能导致你的系统不能启动。不过这并不意味着全完了。(下一句不会 :P)<br /><br />Booting your Slackware media (DVD, for example) can make it very easy to<br />switch into your installed system and make repairs:<br />用你的Slackware介质(比如DVD)启动系统。这可以让你非常容易的切换到你安装好的系统来进行修理。<br /><br /> - Boot Slackware CD/DVD.<br /> - 启动Slackware CD/DVD。<br /> - Login to installer as normal.<br /> - 如常登录进安装程序。<br /> - Scan for, and then assemble the RAID arrays:<br /> - 扫描并组装RAID阵列:<br /> mdadm -Es > /etc/mdadm.conf<br /> mdadm -As<br /> - Mount root partition:<br /> - 挂载根分区:<br /> mount /dev/md0 /mnt<br /> - Switch to installed OS:<br /> - 切换到安装好的系统:<br /> chroot /mnt<br /> - Mount remaining filesystems:<br /> - 挂载其他的文件系统:<br /> mount /boot (RAID 0 and RAID 5 users only)<br /> mount /proc<br /> mount sys /sys -t sysfs<br /><br />At this point, you can bring up your favorite editor, tweak config files,<br />re-run mkinitrd/lilo/etc as you wish, or anything else you need to do to<br />make your system bootable again.<br />到这里,你可以打开你喜欢的编辑器,修改配置文件,重新运行mkinitrd/lilo/等等,或者任何其他让你的系统可以正常引导要做的事情。<br />When you're finished making your changes, rebooting is simple:<br />当你做完了改动后,重新启动很简单:<br /> - cd /<br /> - umount boot proc sys<br /> - exit<br /> - reboot<br /><br />If you are having issues that you're unable to resolve, shoot me an email.<br />Perhaps the answer will make it into this section. :)<br />如果你又不能解决的问题,给我发个电邮。也许答案会被加到这一节里。<br /><br /><br /><br />Appendices<br />附录<br />===============================================================================<br /><br />=== Appendix A: Striping swap space without RAID 0 ===<br /> 附录A:不用RAID 0来交替储存交换空间<br /><br />For completeness' sake, I should mention that swap space can be striped to<br />improve performance without creating a RAID 0 array.<br />为了完整性,我应该阐明不需要RAID 0阵列也可以做到交替储存交换空间。<br /><br />To accomplish this, start by forgetting about any instructions having to do<br />with /dev/md1, which would be our swap array - create the swap partitions on<br />the hard drives, but do not create this particular array.<br />为了做到这点,先不要管关于/dev/md1(我们的交换阵列)的指令 - 在硬盘上建立交换分区,但是不要建立这个阵列。<br /><br />When creating the swap partitions, ensure that the partition type is set to<br />Linux Swap (type 82).<br />当建立交换分区时,确保分区类型是Linux Swap (type 82)。<br /><br />During setup, the installer will recognize the swap partitions. Ensure that<br />all of them are selected, and continue as normal.<br />在安装过程中,安装程序会识别交换分区。确保所有的分区都被选上。如常继续。<br /><br />After installation is complete, go ahead and boot your system - we can<br />finish this once the system is booted, in the interest of simplicity.<br />安装完成后,重启系统 - 重启后我们就可以完成安装了。<br /><br />When the system boots, edit /etc/fstab with your favorite editor. Find the<br />lines that describe your swap partitions - they say "swap" in the second<br />column.<br />系统启动后,编辑/etc/fstab。找到描述你的交换分区的那些行 - 第二列是"swap"的哪些。<br /><br />Each of these lines says "default" in the fourth column. Simply change that<br />to "default,pri=0" for each line.<br />每一行的第四列都是“default”。把它们都改成“default,pri=0”。<br /><br />After saving the file, either reboot, or simply run:<br />保存文件后,要么重启,要么只要运行:<br /> swapoff -a<br /> swapon -a<br /><br />To confirm that the setting has taken effect, you can run:<br />可以运行一下来确认设置生效了:<br /> swapon -s<br /><br />Verify that the Priority column reads 0 for each partition, and we're done!<br />检查每个分区的Priority列都是0,就完成了!<br /><br /><br /><br />Acknowledgements/References<br />感谢/参考书目<br />===============================================================================<br /><br />- In depth explanation of RAID levels:<br /> "LasCon Storage - Different types of RAID"<br /> http://www.lascon.co.uk/d008005.htm<br /><br />- Thanks to John Jenkins (mrgoblin) for some tips in:<br /> "Installing with Raid on Slackware 12.0+"<br /> http://www.userlocal.com/articles/raid1-slackware-12.php<br /><br />- Thanks to Karl Magnus Kolst?(karlmag) for his original writeup on<br /> Slackware and RAID, ages ago!<br /> "INSTALLING SLACKWARE LINUX version 8.1 WITH ROOT PARTITION ON A SOFTWARE<br /> RAID level 0 DEVICE"<br /> http://www.userlocal.com/articles/raid0-slackware-linux.php<br /><br />- Of course, thanks to Patrick "The Man" Volkerding for creating Slackware!<br /> http://slackware.com/<br /><br />- Also thanks to the rest of the guys that proofread, tested, and suggested!<br /> Eric Hameleers (alienBOB), Robby Workman, Alan Hicks,<br /> Piter Punk, Erik Jan Tromp (alphageek)...<br /><br />- My contact info:<br /> 作者联系方法:<br /> Primary email: amrit@slackware.com<br /> Secondary email: amrit@transamrit.net<br /> On certain IRC networks: "amrit" (or some variation :) )<br /><br />- This latest version of this document can be found at:<br /> 最新版本位于:<br /> http://slackware.com/~amrit/<br /> http://transamrit.net/docs/slackware/Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-91775261655981949072008-05-11T21:46:00.007+08:002008-05-12T11:42:55.286+08:00家庭经典语录今天买了一个机箱风扇,挺酷的,风扇中间还有个防伪三维彩印。一动风扇彩印就会变化。拿风扇去给老婆看,老婆看到就说,好厉害,还会转!我差点晕倒。她赶快澄清她说的是那个彩印。Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-11149759164618512492008-05-09T17:58:00.001+08:002008-05-09T17:59:26.863+08:00Slackware 12.0 to 12.1 Upgrade HOWTO Chinese TranslationSlackware 12.0 to 12.1 Upgrade HOWTO <volkerdi@slackware.com><br />Slackware 12.0 到 12.1 升级指南 <volkerdi@slackware.com><br /><br />This document explains how to upgrade from Slackware 12.0 to Slackware 12.1.<br />这篇文章是Slackware 12.0 到 12.1的升级说明。<br />----------------------------------------------------------------------------<br /><br />For details of important changes from Slackware 12.0 to 12.1, see the file<br />'CHANGES_AND_HINTS.TXT'. Thanks to Robby Workman for help with this.<br />关于从Slackware 12.0 到 12.1的重大变化,请参考CHANGES_AND_HINTS.TXT。感谢Robby Workman在这上的帮助。<br /><br />Before you begin, I would strongly recommend making a backup of your<br />system, or, if not the entire system, at least the /etc directory. You<br />might find that you need to refer to a few things after the upgrade<br />process is complete. Back it up, or take your chances.<br />开始之前,我强烈建议你备份你的系统。就算不备份整个系统,至少要备份/etc目录。因为升级完成后你可能需要查(目录)里的一些东西。要么备份要么博一下。<br /><br />OK, now that everything is safely backed up, let's proceed. :-)<br />好了,如果都备份好了,就开始吧。<br /><br />To do this, you'll need the Slackware 12.1 packages. If these are on a CD,<br />create a new directory to mount the CD on so that it doesn't get in the way<br />during the upgrade:<br />升级需要Slackware 12.1 的软件包。如果它们在CD上,建一个新目录来挂载CD,以免它们在升级过程中碍事。<br /><br />mkdir /packages<br />mount /dev/cdrom /packages<br /><br />The packages don't have to be on a CD-ROM, as an alternative you could<br />copy the slackware directory (the one with the various package<br />subdirectories in it, basically the "slackware" directory from the install<br />CD) to someplace like /root/slackware/. The important thing is that you<br />know where the slackware packages directory is. We'll use /root/slackware<br />in the following examples.<br />软件包不一定要在CD-ROM上。另一个方法是把slackware目录拷贝到某个地方,比如/root/slackware/。你需要知道软件包的目录在哪里。在以下的例子中我们假设是/root/slackware。<br /><br />0. Put your machine in single-user mode:<br />0. 让你的机器进单用户模式:<br /> telinit 1<br /><br /><br />1. Upgrade your glibc shared libraries. This is important, or things<br /> might go haywire during the first part of the upgrade:<br />1. 升级glibc共享库。这很重要。不然的话第一部分的升级会搞糟:<br /> upgradepkg /root/slackware/a/glibc-solibs-*.tgz<br /><br /><br />2. Upgrade your package utilities:<br />2. 升级软件包管理工具:<br /> upgradepkg /root/slackware/a/pkgtools-*.tgz<br /><br /><br />3. Upgrade everything else (and install new packages):<br />3. 升级其他所有的软件包 (包括安装新的软件包):<br /> upgradepkg --install-new /root/slackware/*/*.tgz<br /><br /> If you wish to upgrade everything except for the KDEI language<br /> packs for KDE (these take a lot of space and can be dealt with<br /> after the main upgrade more quickly and easily), running this<br /> script in the "slackware" directory will do the trick:<br /> 如果你想要升级除了KDEI语言包(这些会用掉很多空间,而且系统升级完成后升级它们很容易)之外的所有软件包的话,在slackware目录下运行这个脚本:<br /><br /> #!/bin/sh<br /> for dir in a ap d e f k kde l n t tcl x xap y ; do<br /> ( cd $dir ; upgradepkg --install-new *.tgz )<br /> done<br /><br /><br />4. Make sure your system will boot. First, be sure your initrd is up<br /> to date (if you use one). If you use LILO, make sure the paths in<br /> /etc/lilo.conf point to a valid kernel and then type 'lilo' to<br /> reinstall LILO. If you use a USB memory stick to boot, be sure to<br /> copy the new kernel to it in place of the old one.<br />4. 确保你的系统可以引导进slackware。首先,确定你的initrd是最新的。如果你用LILO, 确保/etc/lilo.conf里的路径都指向有效的内核,然后打'lilo'重新安装LILO到引导区。如果你用USB闪存来引导,一定要把新内核拷贝过去覆盖旧的。<br /><br />5. Remove obsolete packages. The CHANGES_AND_HINTS.TXT file should have a<br /> list of these. You may also wish to go into /var/log/packages and take<br /> a look at the package list:<br />5. 卸载已废弃的软件包。CHANGES_AND_HINTS.TXT里有一个列单。你也可以到/var/log/packages看一看:<br /> ls -lt | less<br /><br /> You may spot some old, obsolete, or discontinued packages. If so,<br /> you can remove these using 'removepkg'.<br /> 你可能会发现一些旧的,已废弃的,或者已停止支持的软件包。可以用'removepkg'卸载它们。<br /><br />6. Fix your config files. Some of the config files in /etc are going to <br /> need your attention. You'll find the new incoming config files on <br /> your system with the ".new" extension. You may need to fill these in <br /> with information from your old config files and then move them over.<br />6. 修正你的配置文件。需要注意/etc目录下的一些配置文件。新安装的配置文件以".new"为扩展名。你需要把旧的配置文件里的东西移到新的里面。<br /><br /> Feel brave? You can use this little script to install all of the<br /> .new config files in /etc. If you've made any local changes you'll<br /> need to add them to the newly installed files. Your old config files<br /> will be copied to *.bak. Anyway, it might be an easier starting<br /> point. Here it is:<br /> 如果你勇敢的话,可以用下面这个小脚本安装所有的.new配置文件。如果你以前改过某些配置文件的话,你要在新的配置文件里再做一遍你的改动。旧的配置文件会被备份成.bak扩展名。无论如何,可能这样做来开始比较容易。脚本如下:<br /><br /> #!/bin/sh<br /> cd /etc<br /> find . -name "*.new" | while read configfile ; do<br /> if [ ! "$configfile" = "./rc.d/rc.inet1.conf.new" \<br /> -a ! "$configfile" = "./group.new" \<br /> -a ! "$configfile" = "./passwd.new" \<br /> -a ! "$configfile" = "./shadow.new" ]; then<br /> cp -a $(echo $configfile | rev | cut -f 2- -d . | rev) \<br /> $(echo $configfile | rev | cut -f 2- -d . | rev).bak 2> /dev/null<br /> mv $configfile $(echo $configfile | rev | cut -f 2- -d . | rev)<br /> fi<br /> done<br /><br /><br />7. If you use a non-en_US language pack for KDE and you already have it<br /> installed, then you may upgrade it by moving into the slackware/kdei<br /> directory and using this command:<br />7. 如果你已经安装使用了非美国英语的KDE语言包的话,可以进入slackware/kdei目录用下面这个命令升级它:<br /> upgradepkg --install-new k*<your KDE locale>*tgz<br /><br /> To have upgradepkg cycle through all of the available packages, and<br /> see which ones need to be upgraded, use this in slakckare/kdei:<br /> 在slackware/kdei里用如下命令来升级所有需要升级的语言包:<br /> upgradepkg *tgz<br /><br /> If your language has been added to KDE since Slackware 12.0, you'll<br /> need to install it using installpkg, or upgradepkg --install-new.<br /> 如果你的语言是Slackware 12.0后才加入的。你要用installpkg,或者upgradepkg --install-new来安装它。<br /> Typically you'll need to make sure that you have installed the<br /> slackware/kdei packages for kde, koffice, and k3b (if you use those).<br /> 通常你要保证安装了kde, koffice, 和k3b的语言包(如果你有用它们的话)。<br /><br />8. Return to multi-user mode:<br />8. 回到多用户模式:<br /> telinit 3<br /><br /><br />At this point you should be running Slackware 12.1. :-)<br />到这里有已经在运行Slackware 12.1了 :-)<br />I wish everyone good luck with this!<br />我祝愿每个人升级时好运!<br /><br />---<br />Patrick Volkerding<br />volkerdi@slackware.comAnonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-50547677514692851172008-05-04T16:12:00.003+08:002008-05-12T11:41:48.265+08:00Making initrd for Slackware 12.1 generic-smp kernelKernel: 2.6.24.5-smp<br />Root Device: /dev/md0 (RAID-1)<br />Root FS: ext3<br /><br />mkinitrd -c -k 2.6.24.5-smp -m ext3 -f ext3 -R<br />add "-L" if LVM support is required.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-75416780432149543412008-05-03T16:34:00.004+08:002008-05-04T10:37:05.657+08:00Extenting a Logical Volume (non-RAID)Create a new partition. e.g. /dev/sda9. Set the partition type to 8E (Linux LVM)<br />May need to reboot.<br />pvcreate /dev/sda9<br />vgextend datastore_vg0 /dev/sda9<br />lvextend -L80G /dev/datastore_vg0/download #80G is the target total size, not incremental size<br />resize_reiserfs -f /dev/datastore_vg0/downloadAnonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-16222887648138169312008-05-01T18:37:00.008+08:002009-05-05T22:10:27.071+08:00Buring Files bigger than 4GB to DVDUpdate2 (5 May 2009) - The issue below is fixed in k3b 1.63 (r948463) in slackware current and cdrtools-2.01.01a57.<br /><br />Update - Issue: The DVDs burnt using K3B (and cdrtools) cannot be mounted with appropriate permissions using type udf. The permission is "d---------" when mounted. Mounting as iso9660 gives right permission.<br /><br />After some trying, I finally managed to burn files bigger than 4GB to DVDs.<br /><br />Required software:<br />cdrtools-2.01.01a38-i486-1 or later<br />k3b-1.0.4-i486-3 or later<br /><br />From www.k3b.org k3b 1.0.4 Annoucement:<br />K3b now silently allows the burning of files bigger than 4 GB if an appropriate version of genisoimage or mkisofs is installed ("silently" means that I did not introduce any new messages)<br /><br />Before start burning DVD, change the Filesystem Settings as follows: (see screenshot below)<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7jppoQa5bPVHCEFQU4bq79yzLWcyK6ZWKpGX9SjIEDog04WcY2k3G08I1YpA7Lzf_3De3xUrLiVQwh5DS0nMOcts7wRGz9cSRdcL7Ye9_6w_3zQ_ZwDxlpRXuyTLdvwPds3U57GHmUkCh/s1600-h/K3bSetting.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7jppoQa5bPVHCEFQU4bq79yzLWcyK6ZWKpGX9SjIEDog04WcY2k3G08I1YpA7Lzf_3De3xUrLiVQwh5DS0nMOcts7wRGz9cSRdcL7Ye9_6w_3zQ_ZwDxlpRXuyTLdvwPds3U57GHmUkCh/s320/K3bSetting.png" alt="" id="BLOGGER_PHOTO_ID_5195366697743933298" border="0" /></a><br />- Check "Generate UDF structures"<br />- Select "Level 3" under "ISO Level"<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Note if the settings are not appropriate, k3b will still go ahead to burn the DVD, but happily leave out the file that is more than 4GB and close the DVD, effectively wasting the DVD.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com1tag:blogger.com,1999:blog-5985120850540879687.post-27633329150965173422008-03-05T10:23:00.000+08:002008-05-03T10:24:02.047+08:00Grub menu.lst# menu.lst - See: grub(8), info grub, update-grub(8)<br /># grub-install(8), grub-floppy(8),<br /># grub-md5-crypt, /usr/share/doc/grub<br /># and /usr/share/doc/grub-doc/.<br /><br />## default num<br /># Set the default entry to the entry number NUM. Numbering starts from 0, and<br /># the entry number 0 is the default if the command is not used.<br />#<br /># You can specify 'saved' instead of a number. In this case, the default entry<br /># is the entry saved with the command 'savedefault'.<br /># WARNING: If you are using dmraid do not change this entry to 'saved' or your<br /># array will desync and will not let you boot your system.<br />default 0<br /><br />## timeout sec<br /># Set a timeout, in SEC seconds, before automatically booting the default entry<br /># (normally the first entry defined).<br />timeout 15<br /><br />## hiddenmenu<br /># Hides the menu by default (press ESC to see the menu)<br />#hiddenmenu<br /><br /># Pretty colours<br />color cyan/blue white/blue<br /><br />## password ['--md5'] passwd<br /># If used in the first section of a menu file, disable all interactive editing<br /># control (menu entry editor and command-line) and entries protected by the<br /># command 'lock'<br /># e.g. password topsecret<br /># password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/<br /># password topsecret<br /><br />#<br /># examples<br />#<br /># title Windows 95/98/NT/2000<br /># root (hd0,0)<br /># makeactive<br /># chainloader +1<br />#<br /># title Linux<br /># root (hd0,1)<br /># kernel /vmlinuz root=/dev/hda2 ro<br />#<br /><br />#<br /># Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST<br /><br />### BEGIN AUTOMAGIC KERNELS LIST<br />## lines between the AUTOMAGIC KERNELS LIST markers will be modified<br />## by the debian update-grub script except for the default options below<br /><br />## DO NOT UNCOMMENT THEM, Just edit them to your needs<br /><br />## ## Start Default Options ##<br />## default kernel options<br />## default kernel options for automagic boot options<br />## If you want special options for specific kernels use kopt_x_y_z<br />## where x.y.z is kernel version. Minor versions can be omitted.<br />## e.g. kopt=root=/dev/hda1 ro<br />## kopt_2_6_8=root=/dev/hdc1 ro<br />## kopt_2_6_8_2_686=root=/dev/hdc2 ro<br /># kopt=root=UUID=1b579cb2-4e7b-4e97-8536-88595be8fb64 ro<br /><br />## Setup crashdump menu entries<br />## e.g. crashdump=1<br /># crashdump=0<br /><br />## default grub root device<br />## e.g. groot=(hd0,0)<br /># groot=(hd0,5)<br /><br />## should update-grub create alternative automagic boot options<br />## e.g. alternative=true<br />## alternative=false<br /># alternative=true<br /><br />## should update-grub lock alternative automagic boot options<br />## e.g. lockalternative=true<br />## lockalternative=false<br /># lockalternative=false<br /><br />## additional options to use with the default boot option, but not with the<br />## alternatives<br />## e.g. defoptions=vga=791 resume=/dev/hda5<br /># defoptions=quiet splash<br /><br />## should update-grub lock old automagic boot options<br />## e.g. lockold=false<br />## lockold=true<br /># lockold=false<br /><br />## Xen hypervisor options to use with the default Xen boot option<br /># xenhopt=<br /><br />## Xen Linux kernel options to use with the default Xen boot option<br /># xenkopt=console=tty0<br /><br />## altoption boot targets option<br />## multiple altoptions lines are allowed<br />## e.g. altoptions=(extra menu suffix) extra boot options<br />## altoptions=(recovery) single<br /># altoptions=(recovery mode) single<br /><br />## controls how many kernels should be put into the menu.lst<br />## only counts the first occurence of a kernel, not the<br />## alternative kernel options<br />## e.g. howmany=all<br />## howmany=7<br /># howmany=all<br /><br />## should update-grub create memtest86 boot option<br />## e.g. memtest86=true<br />## memtest86=false<br /># memtest86=true<br /><br />## should update-grub adjust the value of the default booted system<br />## can be true or false<br /># updatedefaultentry=false<br /><br />## ## End Default Options ##<br /><br />### END DEBIAN AUTOMAGIC KERNELS LIST<br /><br /># This entry automatically added by the Debian installer for a non-linux OS<br /># on /dev/sda1<br />title Microsoft Windows XP Professional<br />root (hd0,0)<br />makeactive<br />chainloader +1<br /><br /># Slackware 12.0 Huge SMP<br />title Slackware 12.0 Huge SMP<br />root (hd0,6)<br />kernel /boot/vmlinuz root=/dev/md0 ro vga=773<br />#initrd /boot/initrd.gz<br />boot<br /><br /># Slackware 12.0 Generic SMP<br />#title Slackware 12.0 Generic SMP<br />#root (hd0,6)<br />#kernel /boot/vmlinuz-generic-smp-2.6.21.5-smp root=/dev/md0 ro vga=773<br />#initrd /boot/initrd.gz<br />boot<br /><br />title Ubuntu 8.04, kernel 2.6.24-16-generic<br />root (hd0,7)<br />kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/md3 ro quiet splash<br />initrd /boot/initrd.img-2.6.24-16-generic<br />quiet<br /><br />title Ubuntu 8.04, kernel 2.6.22-14-generic<br />root (hd0,7)<br />kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/md3 ro quiet splash<br />initrd /boot/initrd.img-2.6.22-14-generic<br />quiet<br /><br />title Ubuntu 8.04, kernel 2.6.22-14-generic (recovery mode)<br />root (hd0,7)<br />kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/md3 ro single<br />initrd /boot/initrd.img-2.6.22-14-genericAnonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com1tag:blogger.com,1999:blog-5985120850540879687.post-48036592918966194282007-08-23T21:18:00.000+08:002007-08-23T21:30:09.252+08:00Custom Font Config<pre><?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br /><fontconfig><br /> <br /> <!--<br /> default settings for all fonts.<br /> --><br /> <match target="font" ><br /> <edit mode="assign" name="rgba" ><br /> <const>rgb</const><br /> </edit><br /> </match><br /> <match target="font" ><br /> <edit mode="assign" name="hinting" ><br /> <bool>true</bool><br /> </edit><br /> </match><br /> <match target="font" ><br /> <edit mode="assign" name="hintstyle" ><br /> <const>hintmedium</const><br /> </edit><br /> </match><br /> <match target="font" ><br /> <edit mode="assign" name="antialias" ><br /> <bool>true</bool><br /> </edit><br /> </match><br /> <br /> <br /> <!-- disable anti-alias for 8-17 size fonts --><br /> <match target="font" ><br /> <br /> <test compare="contains" name="lang" qual="any"><br /> <string>zh-cn</string><br /> <string>zh-sg</string><br /> <string>zh-tw</string><br /> <string>ja</string><br /> <string>ko</string><br /> </test><br /><br /> <test compare="more_eq" name="pixelsize" qual="any" ><br /> <double>8</double><br /> </test><br /> <test compare="less_eq" name="pixelsize" qual="any" ><br /> <double>17</double><br /> </test><br /> <edit mode="assign" name="antialias" ><br /> <bool>false</bool><br /> </edit><br /> </match><br /> <br /> <!-- the space between English fonts is too wide,solve this problem --><br /> <match target="font"><br /> <br /> <test name="lang" compare="contains" qual="any"><br /> <string>zh-tw</string><br /> <string>zh-sg</string><br /> <string>zh-cn</string><br /> <string>ja</string><br /> <string>ko</string><br /> </test><br /> <edit name="spacing"><br /> <const>proportional</const><br /> </edit><br /> <edit name="globaladvance"><br /> <bool>false</bool><br /> </edit><br /> </match><br /> <br /> <!--<br /> define the smallest size of Chinese fonts<br /> --><br /> <match target="font" ><br /> <test name="family" qual="any" ><br /> <string>SimSun</string><br /> <string>NSimSun</string><br /> <string>SimHei</string><br /> <string>AR PL ShanHeiSun Uni</string><br /> <string>AR PL ZenKai Uni</string><br /> <string>AR PL New Sung</string><br /> </test><br /> <test compare="more_eq" name="pixelsize" ><br /> <int>8</int><br /> </test><br /> <test compare="less_eq" name="pixelsize" ><br /> <int>12</int><br /> </test><br /> <edit compare="eq" name="pixelsize" ><br /> <int>12</int><br /> </edit><br /> </match><br /> <!--<br /> sort the family of "serif ,sans,monospace",make it fit to Chinese people<br /> --><br /> <alias><br /> <family>serif</family><br /> <prefer><br /> <family>Times New Roman</family><br /> <family>Liberation Serif</family><br /> <family>Nimbus Roman No9 L</family><br /> <family>Luxi Serif</family><br /> <family>Times</family><br /> <family>Bitstream Vera Serif</family><br /> <family>DejaVu Serif</family><br /> <family>Simsun</family><br /> <family>MingLiu</family><br /> <family>WenQuanYi Bitmap Song</family><br /> <family>AR PL ShanHeiSun Uni</family><br /> <family>AR PL ZenKai Uni</family><br /> <family>AR PL New Sung</family><br /> </prefer><br /> </alias><br /> <alias><br /> <family>sans-serif</family><br /> <prefer><br /> <family>Arial</family><br /> <family>Verdana</family><br /> <family>Tahoma</family><br /> <family>Helvetica</family><br /> <family>Liberation Sans</family><br /> <family>Bitstream Vera Sans</family><br /> <family>DejaVu Sans</family><br /> <family>SimSun</family><br /> <family>WenQuanYi Bitmap Song</family><br /> <family>AR PL ShanHeiSun Uni</family><br /> <family>AR PL ZenKai Uni</family><br /> </prefer><br /> </alias><br /> <alias><br /> <family>monospace</family><br /> <prefer><br /> <family>Courier New</family><br /> <family>Liberation Mono</family><br /> <family>Luxi Mono</family><br /> <family>Andale Mono</family><br /> <family>Bitstream Vera Sans Mono</family><br /> <family>Nimbus Mono L</family><br /> <family>NSimSun</family><br /> <family>PMingLiu</family><br /> <family>WenQuanYi Bitmap Song</family><br /> <family>AR PL ShanHeiSun Uni</family><br /> <family>AR PL ZenKai Uni</family><br /> </prefer><br /> </alias><br /> <alias><br /> <family>Courier New</family><br /> <prefer><br /> <family>Courier New</family><br /> <family>Liberation Mono</family><br /> <family>Bitstream Vera Sans Mono</family><br /> <family>Nimbus Mono L</family><br /> <family>Courier</family><br /> <family>Luxi Mono</family><br /> <family>Andale Mono</family><br /> <family>NSimSun</family><br /> <family>PMingLiu</family><br /> <family>WenQuanYi Bitmap Song</family><br /> <family>AR PL ShanHeiSun Uni</family><br /> <family>AR PL ZenKai Uni</family><br /> </prefer><br /> </alias><br /></fontconfig><br /> <br /></pre>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-31746012923225834922007-08-05T20:44:00.003+08:002008-11-12T13:44:01.650+08:00Enabling DRI for Intel 945G/GMA950<strong>Update for Slackware 12.1</strong><br />In Slackware 12.1, don't have to do all the changes in xorg.conf, except setting the driver to the right one (mine is "intel").<br /><br />However, I observed some slowness in firefox in 12.1. After setting the following option for the intel driver, the problem goes away. Seems it is caused by the new acceleration method EXA, which is the default.<br /><br /><span style="font-family:courier new;">Option "AccelMethod" "XAA"</span><br /><br />xorg的i810(或者新的intel)驱动支持945G/GMA950. 实际上,i810驱动支持所有这些intel chipset:<br />i810, i810-DC100, i810e, i815, 830M, 845G, 852GM, 855GM, 865G, 915G, 915GM, 945G, 945GM<br />虽然man page里只提到915G和915GM。可以man i810看具体情况.<br /><br />关键就是打开DRI. 我参照了以下文章。<br /><a href="http://dri.freedesktop.org/wiki/DriTroubleshooting" target="_blank">http://dri.freedesktop.org/wiki/DriTroubleshooting</a><br /><br />这篇文章很有帮助,告诉你如何一步一步确定DRI的问题的原因。建议有需要的看一看。<br /><br />1. 我确定了我的内核(Slackware 12.0缺省huge smp内核)有Intel i810及以后芯片组的AGPGART和DRM的支持。<br /><br />2. 我发现要在X里打开DRI.<br /><br />编辑 xorg.conf<br /><span style="font-family:courier new;">...</span><br /><span style="font-family:courier new;">Section "Module"</span><br /><span style="font-family:courier new;">...</span><br /><span style="font-family:courier new;"># This loads the DRI module 载入DRI模块</span><br /><span style="font-family:courier new;">Load "dri"</span><br /><br /><span style="font-family:courier new;"># This loads the GLX module 载入GLX模块</span><br /><span style="font-family:courier new;">Load "glx"</span><br /><span style="font-family:courier new;">...</span><br /><span style="font-family:courier new;">EndSection</span><br />...<br /><span style="font-family:courier new;"># 建一个用i810驱动的设备</span><br /><span style="font-family:courier new;">Section "Device"</span><br /><span style="font-family:courier new;">Identifier "i810"</span><br /><span style="font-family:courier new;">Driver "i810"</span><br /><span style="font-family:courier new;"># Alternative to Load "dri" 这个Option与Load "dri"等效</span><br /><span style="font-family:courier new;"># Option "DRI" "true" </span><br /><span style="font-family:courier new;">EndSection</span><br /><span style="font-family:courier new;">...</span><br /><span style="font-family:courier new;"># 使用i810设备</span><br /><span style="font-family:courier new;">Section "Screen"</span><br /><span style="font-family:courier new;">Identifier "Screen 1"</span><br /><span style="font-family:courier new;">Device "i810"</span><br /><span style="font-family:courier new;">Monitor "Samsung 710N"</span><br /><span style="font-family:courier new;">...</span><br /><br /><span style="font-family:courier new;"># 让普通用户也可以使用DRI. 如果没有这个,只有root可以用。</span><br /><span style="font-family:courier new;">Section "DRI"</span><br /><span style="font-family:courier new;">Mode 0666</span><br /><span style="font-family:courier new;">EndSection</span><br /><br />之前:<br /><span style="font-family:courier new;">x@slackx:~$ glxinfo</span><br /><span style="font-family:courier new;">name of display: :0.0</span><br /><span style="font-family:courier new;">display: :0 screen: 0</span><br /><b style="FONT-FAMILY: courier new">direct rendering: No</b><br /><span style="font-family:courier new;">server glx vendor string: SGI</span><br /><br /><span style="font-family:courier new;">x@slackx:~$ glxgears</span><br /><span style="font-family:courier new;">4246 frames in 5.1 seconds = 840.647 FPS</span><br /><span style="font-family:courier new;">4200 frames in 5.0 seconds = 835.972 FPS</span><br /><span style="font-family:courier new;">4605 frames in 5.1 seconds = 901.136 FPS</span><br /><span style="font-family:courier new;">4920 frames in 5.1 seconds = 961.904 FPS</span><br /><span style="font-family:courier new;">5160 frames in 5.0 seconds = 1027.514 FPS</span><br /><span style="font-family:courier new;">5160 frames in 5.0 seconds = 1027.391 FPS</span><br /><span style="font-family:courier new;">5160 frames in 5.0 seconds = 1028.289 FPS</span><br /><span style="font-family:courier new;">5160 frames in 5.0 seconds = 1028.484 FPS</span><br /><span style="font-family:courier new;">5160 frames in 5.0 seconds = 1027.678 FPS</span><br /><span style="font-family:courier new;">5173 frames in 5.0 seconds = 1027.146 FPS</span><br /><span style="font-family:courier new;">...</span><br /><br />重起X之后:<br /><span style="font-family:courier new;">x@slackx:~$ glxinfo</span><br /><span style="font-family:courier new;">name of display: :0.0</span><br /><span style="font-family:courier new;">display: :0 screen: 0</span><br /><b style="FONT-FAMILY: courier new">direct rendering: Yes</b><br /><span style="font-family:courier new;">server glx vendor string: SGI</span><br /><br /><span style="font-family:courier new;">x@slackx:~$ glxgears</span><br /><span style="font-family:courier new;">7591 frames in 5.0 seconds = 1518.076 FPS</span><br /><span style="font-family:courier new;">7774 frames in 5.0 seconds = 1554.788 FPS</span><br /><span style="font-family:courier new;">17984 frames in 5.0 seconds = 3596.714 FPS</span><br /><span style="font-family:courier new;">17536 frames in 5.0 seconds = 3507.012 FPS</span><br /><span style="font-family:courier new;">17372 frames in 5.0 seconds = 3474.314 FPS</span><br /><span style="font-family:courier new;">18021 frames in 5.0 seconds = 3604.041 FPS</span>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com1tag:blogger.com,1999:blog-5985120850540879687.post-47469312678567717772007-08-04T15:58:00.000+08:002007-08-06T07:24:57.403+08:00转载:让 xterm 与其它程序间复制粘贴更灵活在 TERM 中选中文字“甲”,需鼠标中键贴入其它程序(如 firefox ),而此时在 firefox 里选中文字“乙”并不 Ctrl-c ,再用鼠标中键贴出,发现贴出“乙”,而“甲”不见了。<br /><br />需要效果:在 TERM 中选中即可 Ctrl-v 贴入 firefox 一类的程序中,无需鼠标中键。而在 firefox 一类的程序中 Ctrl-c 复制后,鼠标不论再选中什么,在 TERM 中 Shift-Insert 出的依然是 Ctrl-c 的内容<br /><br />在 Xwindow 里有一个选中缓冲(PRIMARY)和一个剪贴板(CLIPBOARD)<br />几乎除了 TERM 程序以外,没有还在用选中缓冲的程序<br />造成 TERM 中选中的,需要鼠标中键才能贴到其它程序里。在贴之前,在其它程序中还不能选中任何东西,一旦选中,选中缓冲就被刷新<br /><br />a) xterm 功能强大,本身就带剪贴板功能,如下配置即可<br />在 $HOME/.Xresources 里如下写,可让 xterm 的复制进入剪贴板,不再过选中缓中<br /><br />*VT100*translations: #override \n\<br /> Shift <keypress> Insert:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\<br /> ~Shift~Ctrl<btn2up>: insert-selection(CLIPBOARD, CUT_BUFFER1) \n\<br /> ~Shift<btnup>: select-end(CLIPBOARD, CUT_BUFFER1)<br /><br />前两句是说当 Shift-Insert 与鼠标中键(Btn2UP)效果是贴出剪贴板内容<br />第三句是说当 鼠标左键(BtnUP)效果是复制给剪贴板<br /><br />这样一来,在 firefox 中任意选中的文字(不 Ctrl-c ),不管是 Shift-Insert 还是鼠标中键都复制不出来了<br /><br />*VT100*translations: #override \n\<br /> Shift <keypress> Insert:insert-selection(CLIPBOARD, CUT_BUFFER1) \n\<br /> ~Shift~Ctrl<btn2up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\<br /> ~Shift<btnup>: select-end(CLIPBOARD, CUT_BUFFER1) \n\<br /> ~Shift<btnup>: select-end(PRIMARY, CUT_BUFFER0)<br /><br /> 这样就让在 firefox 里随意选中的文字,鼠标中键可贴在 TERM 中,而 Ctrl-c 的内容由 Shift-Insert 贴出<br /> 当然配置是灵活的,随自己喜欢了。<br /><br />b) rxvt, aterm, mrxvt, rxvt-unicode 系列,需要一点小修改<br /> 这一系列都是基于 rxvt 的,代码相近,下面以 rxvt-unicode 为例:<br /> (无需会编程,不过是替换游戏,把选中缓冲替换为剪贴板)<br /><br />原理:把选中缓冲(XA_PRIMARY)换成剪贴板(xa[XA_CLIPBOARD])即可<br />vi rxvt-unicode-8.1/src/screen.C<br />2895 行:<br /> if (selnum == Sel_Primary)<br /> sel = xa[XA_CLIPBOARD];<br /> else if (selnum == Sel_Secondary)<br /> sel = XA_SECONDARY;<br /> else<br /> sel = XA_PRIMARY;<br /><br />3066行:<br /> XSetSelectionOwner (dpy, xa[XA_CLIPBOARD], vt, tm);<br /> if (XGetSelectionOwner (dpy, xa[XA_CLIPBOARD]) == vt)<br /><br />From: <a href="http://bbs.linuxsir.org/showthread.php?t=290883">http://bbs.linuxsir.org/showthread.php?t=290883</a></btnup></btnup></btn2up></keypress></btnup></btn2up></keypress>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-90104161678707390562007-08-04T14:59:00.004+08:002008-10-31T14:30:22.095+08:00Setting up Chinese in Slackware 12<span style="FONT-WEIGHT: bold">Update: </span>With Slackware 12.1, Chinese display works out-of-the-box with 文泉驿 (WenQuanYi) 正黑 font. IME packages like scim, skim and a lot more are included in 12.1, Chinese (and other language) input can be enabled easily by following instructions in <a href="ftp://ftp.slackware.com/pub/slackware/slackware-12.1/CHANGES_AND_HINTS.TXT">CHANGES_AND_HINTS.TXT </a>in the distribution.<br /><br /><span style="FONT-WEIGHT: bold">Objective</span><br />- Allow displaying of Chinese characters in UTF-8 encoding while still having the normal English user interface.<br />- Allow inputing of Chinese characters using SCIM.<br /><br /><span style="FONT-WEIGHT: bold">Environment</span><br />Slackware 12.0 full installation, default 2.6.21.5 huge smp kernel.<br />文泉驿 (WenQuanYi) Bitmap Song font 0.8.1<br />scim 1.4.7, scim-pinyin-0.5.91, skim-1.4.5<br /><br /><span style="FONT-WEIGHT: bold">Display</span><br />Get 文泉驿 (WenQuanYi) Bitmap Song font from <a href="http://wqy.sourceforge.net/">http://wqy.sourceforge.net/</a>. I use the PCF format of current version 0.8.1. Follow the instructions included in the downloaded file (run mkfontdir, vc-cache, etc). I copied all the pcf files into /usr/share/fonts/ folder, so that no change to /etc/X11/xorg.conf and /etc/fonts/fonts.conf is required. You can also copy the file 85-wqy-bitmapsong.conf into /etc/fonts/conf.avail/ and created a link in /etc/fonts/conf.d/, as suggested by the installation instructions but with slight variation in directory names. However, this config file will force WenQuanYi to be the chosen for all kinds of font requests, and make your English contents ugly. So if you want beautiful English fonts, don't use this one, and do your own font config instead.<br /><br />As I still want to use English as my primary desktop language, I leave the LC_* environment variables untouched, and only changed LC_CTYPE=zh_CN.UTF-8 in my ~/.profile. (Note: I tried en_US.utf8 but it does not work, as all KDE applications will show squares for Chinese characters. This means fontconfig does not pick WenQuanYi font. I guess the reason is because WenQuanYi Bitmap Song font's lang attribute does not have "en" in the list so it does not get matched. )<br /><br />After that restart X.<br /><br /><span style="FONT-WEIGHT: bold">Input</span><br />Download and compile scim, scim-pinyin, and skim, using root.<br />scim 1.4.7<br /><span style="font-family:courier new;">./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var</span><br /><span style="font-family:courier new;">make -j3</span><br /><span style="font-family:courier new;">make instal DESTDIR=/your/dest<dest></dest></span><br /><span style="font-family:courier new;">makepkg scim-1.4.7-i686-1xc.tgz<br />installpkg </span><span style="font-family:courier new;">scim-1.4.7-i686-1xc.tgz</span><br /><br />scim-pinyin 0.5.91<br /><span style="font-family:courier new;">./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var</span><br /><span style="font-family:courier new;">make -j3</span><br /><span style="font-family:courier new;">make instal DESTDIR=/your/dest<dest></dest></span><br /><span style="font-family:courier new;">makepkg scim-pinyin-0.5.91-i686-1xc.tgz<br /></span><span style="font-family:courier new;">installpkg scim-pinyin-0.5.91-i686-1xc.tgz</span><br /><br />skim 1.4.5<br /><span style="font-family:courier new;">scons configure prefix=/usr</span><br /><span style="font-family:courier new;">scons -j3</span><br /><span style="font-family:courier new;">mkdir -p <dest>/usr/lib/pkgconfig</dest></span><br /><span style="font-family:courier new;">cp skim.pc <dest>/usr/lib/pkgconfig/</dest></span><br /><span style="font-family:courier new;">scons install DESTDIR=/your/dest<dest></dest></span><br /><span style="font-family:courier new;"><span style="font-family:courier new;">makepkg skim-1.4.5-i686-1xc.tgz<br />installpkg </span></span><span style="font-family:courier new;"><span style="font-family:courier new;">skim-1.4.5-i686-1xc.tgz</span></span><br /><span style="font-family:courier new;"><span style="font-family:courier new;"></span><br /></span>I also added the following lines to .profile:<br /><span style="font-family:courier new;">export XMODIFIERS=@im=SCIM</span><br /><span style="font-family:courier new;">export XIM=SCIM</span><br /><span style="font-family:courier new;">export XIM_PROGRAM=SCIM</span><br /><br />After that restart X.Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com1tag:blogger.com,1999:blog-5985120850540879687.post-63499644171162522542007-08-03T21:23:00.000+08:002007-08-03T21:26:41.227+08:00Sample .bashrc<span style="font-family:courier new;"># Set the following to make all x terminals have proper PS1 and PS2</span><br /><span style="font-family:courier new;"># \033[0;30m - Black</span><br /><span style="font-family:courier new;"># \033[0;31m - Red</span><br /><span style="font-family:courier new;"># \033[0;32m - Green</span><br /><span style="font-family:courier new;"># \033[0;33m - Orange</span><br /><span style="font-family:courier new;"># \033[0;34m - Blue</span><br /><span style="font-family:courier new;"># \033[0;35m - Cyan</span><br /><span style="font-family:courier new;"># \033[0;36m - Light Blue</span><br /><span style="font-family:courier new;"># \033[0;37m - Grey</span><br /><span style="font-family:courier new;"># \033[0;39m - White</span><br /><span style="font-family:courier new;">export PS1='\u@\h:\w\$'</span><br /><span style="font-family:courier new;">export PS2='> '</span><br /><br /><span style="font-family:courier new;"># Below sets the titlebar of the terminal windows</span><br /><span style="font-family:courier new;">export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'</span><br /><br /><span style="font-family:courier new;"># Display fortune for each new terminal session, and enable colors in ls output</span><br /><span style="font-family:courier new;">for profile_script in '/etc/profile.d/bsd-games-login-fortune.sh' '/etc/profile.d/coreutils-dircolors.sh' ; do</span><br /><span style="font-family:courier new;"> if [ -x $profile_script ]; then</span><br /><span style="font-family:courier new;"> . $profile_script</span><br /><span style="font-family:courier new;"> fi</span><br /><span style="font-family:courier new;">done</span><br /><span style="font-family:courier new;">unset profile_script</span>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com0tag:blogger.com,1999:blog-5985120850540879687.post-53042514799160607882007-07-28T20:46:00.005+08:002008-05-14T18:06:44.391+08:00Installing Slackware 12 on Linux Software RAID and LVM2This article describes how I installed Slackware 12 onto Linux Software RAID partitions and LVM logical volumes. It is the first time I played with Software RAID and LVM.<br /><br />In my case, the root filesystem is installed on a RAID-1 partition (non-LVM), and other filesystems (like /home, /tmp, and swap) are on LVM logical volumes on top of RAID-1 or RAID-0 arrays. I read from somewhere (and I concur) that it is not necessary and not good to put root partition into LVM, because if anything screws up, it is easier to get into root partition and do recovery if you don't have to deal with LVM. If you run into space problems with root filesystem later, you can always move some directories to another filesystem and change the mount points easily. I still want the root filesystem to be on RAID because I want the redundancy and speed gain on reads.<br /><br /><strong>Hardware Installation</strong><br />I have a PC with:<br />- Pentium D 930 CPU<br />- <a href="http://www.gigabyte.sg/Products/Motherboard/Products_Overview.aspx?ProductID=2279">Gigabyte GA-8i945GMH-RH motherboard</a><br />- Seagate 80GB IDE harddisk.<br />The motherboard supports up to 2 IDE and 4 SATA devices. I bought 2 more Seagate 7200.10 320GB SATA2 harddisks (at S$126 each, from Best Bargin, Sim Lim Square).<br />What to take note here is that you need SATA cable and SATA power cable to connect the harddisks to your PC. If they don't come with the harddisk or motherboard, you have to buy separately. I paid S$2 for one SATA cable, and S$3 for one SATA power cable.<br /><br />Installing the harddisks is straightforward if you follow your motherboard manual, or you have basic PC assembling knowledge.<br /><br />After that, make appropriate setting changes in the BIOS. I don't plan to use the on-board RAID chipset, because it cannot create RAID arrays out of partitions. So I did not enable the RAID mode in BIOS. Instead I just enabled the SATA controller so that the SATA disks can be detected by the BIOS.<br /><br /><strong>Space Allocation Strategy</strong><br />I partitioned the 2 harddisks as follows:<br />sda:<br />sda1 (30GB) : Windows XP (yeah, still need it for photo processing, video chatting and gaming)<br />sda2 (30GB) : Reserved<br />sda5 (80GB) : Device 0 of RAID-1 array (md0)<br />sda6 (40GB) : Device 1 of RAID-0 array (md1)<br />sda7 (10GB) : Device 0 of RAID-1 array (md2)<br />The rest is free space for future expansion.<br /><br />sdb:<br />sdb1 (30GB) : Windows Data Partition (FAT)<br />The rest follows sda<br /><br />Note: Originally I plan to install Windows on some logical partition, but I encountered some problems. Seems like Windows cannot be installed onto logical partitions, but I am not sure.<br /><br /><strong>Installing Slackware</strong><br />Get ready the following things:<br />-Slackware 12 Installation CDs (I only burned CD1)<br />- Slackware 12 installation files (I downloaded selected directories from a mirror site using wget) in one of your harddisk partition (I put them into my USB harddisk), because I plan to use the option to copy files from a harddisk partition.<br />- Grub 0.97 package from extra directory (I plan to use Grub instead of Lilo).<br /><br />Boot up using Installation CD1, using the default image (huge.s) to have mdadm and LVM available.<br /><br />Use fdisk/cfdisk to partition the two harddisks. In my PC they are under /dev/sda and /dev/sdb respectively. I want identical partitions in the two, so I can use the following command to duplicate sda's partitions to sdb.<br /><br /><span style="font-family:courier new;">sfdisk -d /dev/sda | sfdisk /dev/sdb (will wipe out existing partitions in sdb)</span><br /><br />Below is the output from "sfdisk -d" after the partitioning:<br /><span style="font-family:courier new;"># partition table of /dev/sda<br />unit: sectors</span><br /><span style="font-family:courier new;">/dev/sda1 : start= 63, size= 58588992, Id= c, bootable<br />/dev/sda2 : start= 58589055, size= 58589055, Id= c<br />/dev/sda3 : start=117178110, size=253907325, Id= 5<br />/dev/sda4 : start= 0, size= 0, Id= 0<br />/dev/sda5 : start=117178173, size=156248127, Id=fd<br />/dev/sda6 : start=273426363, size= 78124032, Id=fd<br />/dev/sda7 : start=351550458, size= 19534977, Id=fd<br /></span><br /><span style="font-family:courier new;"># partition table of /dev/sdb<br />unit: sectors </span><br /><span style="font-family:courier new;">/dev/sdb1 : start= 63, size= 58588992, Id= c, bootable<br />/dev/sdb2 : start= 58589055, size= 58589055, Id= c<br />/dev/sdb3 : start=117178110, size=253907325, Id= 5<br />/dev/sdb4 : start= 0, size= 0, Id= 0<br />/dev/sdb5 : start=117178173, size=156248127, Id=fd<br />/dev/sdb6 : start=273426363, size= 78124032, Id=fd<br />/dev/sdb7 : start=351550458, size= 19534977, Id=fd<br /></span><br />Note setting Id=FD (Linux Raid Autodetect) allows kernel to automatically start the array when the system boots. If you don't want auto-detection, use Id=83 (Linux) instead.<br /><br />After that, create the RAID arrays using mdadm (using default chunk size of 64KB):<br /><span style="font-family:courier new;">mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sd[ab]5</span><br /><span style="font-family:courier new;">mdadm --create /dev/md1 --level=0 --raid-devices=2 /dev/sd[ab]6</span><br /><span style="font-family:courier new;">mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sd[ab]7</span><br /><span style="font-family:Courier New;"></span><br />Create LVM PVs, VGs and LVs. I want an 8G RAID-1 LV for /home, a 4G RAID-0 LV for /tmp, and a 512M RAID-0 LV for swap. So:<br /><span style="font-family:courier new;">pvcreate /dev/md0</span><br /><span style="font-family:courier new;">pvcreate /dev/md1</span><br /><span style="font-family:courier new;">vgcreate raid1_vg0 /dev/md0</span><br /><span style="font-family:courier new;">vgcreate raid0_vg0 /dev/md1</span><br /><span style="font-family:courier new;">lvcreate -L8G -nslackware_home raid1_vg0</span><br /><span style="font-family:courier new;">lvcreate -L512M -nswap /raid0_vg0</span><br /><span style="font-family:courier new;">lvcreate -L4G -nslackware_tmp raid0_vg0</span><br /><span style="font-family:Courier New;">vgchange -a y raid1_vg0</span><br /><span style="font-family:Courier New;">vgchange -a y raid0_vg0</span><br /><br />Set up swap filesystem (do this manually because Slackware Setup program cannot detect swap filesystems on LVM):<br /><span style="font-family:courier new;">mkswap /dev/raid0_vg0/swap</span><br /><span style="font-family:courier new;">swapon /dev/raid0_vg0/swap</span><br /><br />Run Setup:<br /><span style="font-family:courier new;">setup</span><br /><br />Skip the ADDSWAP step because I want the swap filesystem on LV but it will not look inside the LVs.<br /><br />At TARGET step, I choose /dev/md2 for root (/) (ext3), /dev/raid1_vg0/slackware_home as /home (reiserfs), /dev/raid0_vg0/slackware_tmp as /tmp (reiserfs). Here what filesystem you want to use is up to individual test. Do take note that since Slackware 12, the default filesystem is changed from reiserfs to ext3, probably because of the uncertain future of reiserfs...<br />I also specify /dev/sda1 to be mounted as /mnt/windows-xp, and /dev/sdb1 as /mnt/windows-data.<br /><br />At SOURCE step, I choose Install from a hard drive partition, then specify the partition (dev/sdc5) and path of the installation files in my USB harddisk.<br /><br />After that, select the packages and install them to the selected partitions. (I choose all since I don't want to spend too much time picking through the packages)<br />I then go through the CONFIGURE step as per normal, but skip LILO installation. I did not create a USB boot stick because I don't have a spare one.<br /><br />After that, exit the Setup program, but do not reboot first. Still need to do a couple of things:<br /><br />- Install grub. By now the root filesystem of the installed system is mounted to /mnt, so:<br /><span style="font-family:courier new;">chroot /mnt</span><br /><span style="font-family:Courier New;">installpkg <path>/grub-0.97-i486-3.tgz</path></span><br /><span style="font-family:Courier New;">mkdir /boot/grub; cp /usr/lib/grub/i386-pc/* /boot/grub</span><br /><br /><p></p>Exit chroot.<br /><br />- Create menu.lst under /boot/grub (better prepare it in advance in case you forgot the syntax). My grub entry for Slackware:<br /><br /><p><span style="font-family:courier new;">title Slackware 12 SMP (on /dev/md2)</span><br /><span style="font-family:courier new;">root (hd0,6)</span><br /><span style="font-family:courier new;">kernel /boot/vmlinuz root=/dev/md2 ro vga=773</span><br /><span style="font-family:courier new;">boot</span><br /><br />- Install grub to MBR of both sda and sdb:<br /><span style="font-family:courier new;">grub</span><br /><span style="font-family:courier new;">grub>device (hd0) /dev/sda (and sdb)</span><br /><span style="font-family:courier new;">grub>root (hd0, 6)</span><br /><span style="font-family:courier new;">grub>setup (hd0)</span><br /><span style="font-family:courier new;">grub>quit</span><br /><br />- Create mdadm.conf (It is not required by mdadm to work, but is useful for keeping track of arrays and member disks.).<br /><span style="font-family:courier new;">mdadm --detail --scan >> /mnt/etc/mdadm.conf</span><br /><br />- Add swap mount point to /mnt/etc/fstab:<br /><span style="font-family:courier new;">/dev/raid0_vg0/swap swap swap defaults 0 0</span><br /><br />- Run vgscan to create /etc/lvm/backup, which is checked by the init scripts in order to enable LVM (for details see /etc/rc.d/rc.S).<br /><span style="font-family:courier new;">chroot /mnt</span><br /><span style="font-family:courier new;">vgscan -v</span><br /><br />Exit chroot.<br /><br />Now reboot. After rebooting, you should see the login prompt. Go in and check if everything is started and mounted correctly.<br /><br /><strong>Points to Note</strong><br />- The Generic Slackware kernels cannot boot from root partitions on RAID, so the Huge kernel should be used. (It probably can with some initrd, but I didn't try that.)<br />- Be careful when you change your harddisk partitions. Because there is RAID arrays and PV/VG/LVs created on top of the partitions, deleting existing partitions may screw up those. Always make sure there is no existing RAID arrays or PVs using them first. See if you really need to change the partitions - after all with LVM it may not be necessary to change partitions directly. Try changing the LVs instead.<br /><br />To remove the PV/LVs, use lvremove, vgreduce, and pvremove commands. To remove a partition or harddisk from a RAID array, use mdadm --zero-superblock to erase the RAID superblock from the device. The superblock is a 4K block of data written near the end of the device. It contains information for the array and the member devices. It allows the kernel to automatically start arrays when the system boots.<br /><br />- If you did not manage to complete the installation process after you have created the RAID arrays and LVM stuff, you can do the following:<br /><span style="font-family:courier new;">mdadm --assemble /dev/md0 /dev/sd[ab]5 # manually specify the RAID array and it member devices</span><br />OR <span style="font-family:courier new;">mdadm --assemble --scan /dev/md[0-2] # just specify the RAID array<br /></span>OR <span style="font-family:courier new;">mdadm --assemble --scan --config=<path.to.mdamd.conf> # assemble all MD devices using mdadm.conf<br /></PATH.TO.MDAMD.CONF></span>vgscan # detect all VGs<br /><br /><span style="FONT-WEIGHT: bold">Listings</span><br />/etc/fstab:<br /><span style="font-family:courier new;">/dev/md2 / ext3 defaults 1 1</span><br /><span style="font-family:courier new;">/dev/raid0_vg0/slackware_tmp /tmp reiserfs defaults 1 2</span><br /><span style="font-family:courier new;">/dev/raid1_vg0/slackware_home /home reiserfs defaults 1 2</span><br /><span style="font-family:courier new;">/dev/raid0_vg0/swap swap swap defaults 0 0</span><br /><span style="font-family:courier new;">/dev/sda1 /mnt/windows-xp vfat defaults 1 0</span><br /><span style="font-family:courier new;">/dev/sdb1 /mnt/windows-data vfat defaults 1 0</span><br /><span style="font-family:courier new;">#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0</span><br /><span style="font-family:courier new;">/dev/fd0 /mnt/floppy auto noauto,owner 0 0</span><br /><span style="font-family:courier new;">devpts /dev/pts devpts gid=5,mode=620 0 0</span><br /><span style="font-family:courier new;">proc /proc proc defaults 0 0</span><br /><br />/proc/mdstat:<br /><span style="font-family:courier new;">Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] </span><br /><span style="font-family:courier new;">md1 : active raid0 sdb6[1] sda6[0] 78123904 blocks 64k chunks </span><br /><span style="font-family:courier new;">md2 : active raid1 sdb7[1] sda7[0] 9767424 blocks [2/2] [UU] </span><br /><span style="font-family:courier new;">md0 : active raid1 sdb5[1] sda5[0] 78123968 blocks [2/2] [UU] </span><br /><span style="font-family:courier new;">unused devices: <none></none></span><br /><br />PVs:<br /><span style="font-family:courier new;">--- Physical volume ---<br />PV Name /dev/md1<br />VG Name raid0_vg0<br />PV Size 74.50 GB / not usable 0<br />Allocatable yes<br />PE Size (KByte) 4096<br />Total PE 19073<br />Free PE 17921<br />Allocated PE 1152<br />PV UUID 0DaWBK-Mw3A-MnoW-ZZNT-DeKr-kbEX-LTrbX3<br /><br />--- Physical volume ---<br />PV Name /dev/md0<br />VG Name raid1_vg0<br />PV Size 74.50 GB / not usable 0<br />Allocatable yes<br />PE Size (KByte) 4096<br />Total PE 19073<br />Free PE 17025<br />Allocated PE 2048<br />PV UUID yab1wC-so2Y-XR8L-K3NM-9pYX-CBfD-iqdrqH<br /><br /></span>VGs:<br /><span style="font-family:courier new;">--- Volume group ---<br />VG Name raid0_vg0<br />System ID<br />Format lvm2<br />Metadata Areas 1<br />Metadata Sequence No 3<br />VG Access read/write<br />VG Status resizable<br />MAX LV 0<br />Cur LV 2<br />Open LV 2<br />Max PV 0<br />Cur PV 1<br />Act PV 1<br />VG Size 74.50 GB<br />PE Size 4.00 MB<br />Total PE 19073<br />Alloc PE / Size 1152 / 4.50 GB<br />Free PE / Size 17921 / 70.00 GB<br />VG UUID sTV1RZ-AShv-Rbb3-J84Y-WZcF-s4Hu-1OQQT1<br /><br />--- Volume group ---<br />VG Name raid1_vg0<br />System ID<br />Format lvm2<br />Metadata Areas 1<br />Metadata Sequence No 2<br />VG Access read/write<br />VG Status resizable<br />MAX LV 0<br />Cur LV 1<br />Open LV 1<br />Max PV 0<br />Cur PV 1<br />Act PV 1<br />VG Size 74.50 GB<br />PE Size 4.00 MB<br />Total PE 19073<br />Alloc PE / Size 2048 / 8.00 GB<br />Free PE / Size 17025 / 66.50 GB<br />VG UUID jatY6C-g1hq-Xexs-rGzb-2qcF-KOgG-xkv64E<br /></span></p><br />LVs:<br /><span style="font-family:courier new;">--- Logical volume ---<br />LV Name /dev/raid0_vg0/swap<br />VG Name raid0_vg0<br />LV UUID vQhFg9-U0uW-U2eT-njKp-cEyb-jmwx-7gFqkR</span><br /><span style="font-family:courier new;">LV Write Access read/write</span><br /><span style="font-family:courier new;">LV Status available</span><br /><span style="font-family:courier new;"># open 1</span><br /><span style="font-family:courier new;">LV Size 512.00 MB</span><br /><span style="font-family:courier new;">Current LE 128</span><br /><span style="font-family:courier new;">Segments 1</span><br /><span style="font-family:courier new;">Allocation inherit</span><br /><span style="font-family:courier new;">Read ahead sectors 0</span><br /><span style="font-family:courier new;">Block device 253:0</span><br /><span style="font-family:courier new;"></span><br /><span style="font-family:courier new;">--- Logical volume ---</span><br /><span style="font-family:courier new;">LV Name /dev/raid0_vg0/slackware_tmp</span><br /><span style="font-family:courier new;">VG Name raid0_vg0</span><br /><span style="font-family:courier new;">LV UUID fp2bGy-1mIw-V79A-BCdX-EGWp-NCLq-Hu90Bb</span><br /><span style="font-family:courier new;">LV Write Access read/write</span><br /><span style="font-family:courier new;">LV Status available</span><br /><span style="font-family:courier new;"># open 2</span><br /><span style="font-family:courier new;">LV Size 4.00 GB</span><br /><span style="font-family:courier new;">Current LE 1024</span><br /><span style="font-family:courier new;">Segments 1</span><br /><span style="font-family:courier new;">Allocation inherit</span><br /><span style="font-family:courier new;">Read ahead sectors 0</span><br /><span style="font-family:courier new;">Block device 253:1</span><br /><span style="font-family:courier new;"></span><br /><span style="font-family:courier new;">--- Logical volume ---</span><br /><span style="font-family:courier new;">LV Name /dev/raid1_vg0/slackware_home</span><br /><span style="font-family:courier new;">VG Name raid1_vg0</span><br /><span style="font-family:courier new;">LV UUID czyWXU-YYHc-zaVE-eFVh-x9h6-712k-HSEIps</span><br /><span style="font-family:courier new;">LV Write Access read/write</span><br /><span style="font-family:courier new;">LV Status available</span><br /><span style="font-family:courier new;"># open 2</span><br /><span style="font-family:courier new;">LV Size 8.00 GB</span><br /><span style="font-family:courier new;">Current LE 2048</span><br /><span style="font-family:courier new;">Segments 1</span><br /><span style="font-family:courier new;">Allocation inherit</span><br /><span style="font-family:courier new;">Read ahead sectors 0</span><br /><span style="font-family:courier new;">Block device 253:2</span><br /><br /><br /><p><strong>References:</strong><br /></p>LVM and mdadm man pages<br />Managing RAID on LINUX by Derek Vadala, O'Reilly 2003<br /><a href="http://tldp.org/HOWTO/LVM-HOWTO">http://tldp.org/HOWTO/LVM-HOWTO</a><br /><a href="http://tldp.org/HOWTO/Software-RAID-HOWTO.html">http://tldp.org/HOWTO/Software-RAID-HOWTO.html</a><br /><a href="http://slacksite.com/slackware/raid.html">http://slacksite.com/slackware/raid.html</a><br /><a href="http://wiki.linuxquestions.org/wiki/Slackware-Guides#How_do_I_install_Slackware_on_a_with_LVM-partitions.3F">http://wiki.linuxquestions.org/wiki/Slackware-Guides#How_do_I_install_Slackware_on_a_with_LVM-partitions.3F</a><br /><a href="http://bbs.linuxsir.org/showthread.php?t=308297">http://bbs.linuxsir.org/showthread.php?t=308297</a><br /><br /><p><a href="http://bbs.linuxsir.org/showthread.php?t=308297"></a></p>Anonymoushttp://www.blogger.com/profile/16536922753750625731noreply@blogger.com5