tag:blogger.com,1999:blog-74856898322733922062023-11-15T06:54:25.947-08:00Visions N MindsShawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7485689832273392206.post-41916317926342945632008-02-16T08:50:00.000-08:002008-02-16T09:04:07.303-08:00How to Obtain BIOS Information Remotelydmidecode is very useful as it provides the details about your system such as the number of memory slots, BIOS version, etc.<br /><table style="background-color: rgb(0, 0, 0); color: rgb(255, 255, 255);" border="0" cellpadding="3" cellspacing="3" width="300"><tbody><tr><td><pre>root@V2000# dmidecode<br /># dmidecode 2.9<br />SMBIOS 2.31 present.<br />18 structures occupying 595 bytes.<br />Table at 0x000DC010.<br /><br />Handle 0x0000, DMI type 0, 20 bytes<br />BIOS Information<br /> Vendor: Hewlett-Packard<br /> Version: F.25 <br /> Release Date: 03/23/2006<br /> Address: 0xE5BF0<br /> Runtime Size: 107536 bytes<br /> ROM Size: 512 kB<br /> Characteristics:<br /> PCI is supported<br /> PC Card (PCMCIA) is supported<br /> PNP is supported<br /> APM is supported<br /> BIOS is upgradeable<br /> BIOS shadowing is allowed<br /> ESCD support is available<br /> Boot from CD is supported<br /> Print screen service is supported (int 5h)<br /> 8042 keyboard services are supported (int 9h)<br /> Serial services are supported (int 14h)<br /> Printer services are supported (int 17h)<br /> CGA/mono video services are supported (int 10h)<br /> ACPI is supported<br /> USB legacy is supported<br /><br />Handle 0x0001, DMI type 1, 25 bytes<br />System Information<br /> Manufacturer: Hewlett-Packard<br /> Product Name: Presario V2000 (PV340AV#ABA) <br /> Version: Rev 1<br /> Serial Number: XXXXXXXXX<br /> UUID: XXXXXXX-XXXX-XXXX-XXXX-XXXXXXX<br /> Wake-up Type: Power Switch<br /><br />Handle 0x0002, DMI type 2, 8 bytes<br />Base Board Information<br /> Manufacturer: Quanta<br /> Product Name: 3097<br /> Version: 47.0E<br /> Serial Number: None<br /><br />Handle 0x0003, DMI type 3, 21 bytes<br />Chassis Information<br /> Manufacturer: Quanta<br /> Type: Notebook<br /> Lock: Not Present<br /> Version: N/A<br /> Serial Number: None<br /> Asset Tag: <br /> Boot-up State: Safe<br /> Power Supply State: Safe<br /> Thermal State: Safe<br /> Security Status: None<br /> OEM Information: 0x00000000<br /> Height: 52 U<br /> Number Of Power Cords: 18<br /> Contained Elements: 0<br /><br />Handle 0x0004, DMI type 4, 35 bytes<br />Processor Information<br /> Socket Designation: U23<br /> Type: Central Processor<br /> Family: Opteron<br /> Manufacturer: AMD<br /> ID: 42 0F 02 00 FF FB 8B 07<br /> Signature: Family 15, Model 36, Stepping 2<br /> Flags:<br /> FPU (Floating-point unit on-chip)<br /> VME (Virtual mode extension)<br /> DE (Debugging extension)<br /> PSE (Page size extension)<br /> TSC (Time stamp counter)<br /> MSR (Model specific registers)<br /> PAE (Physical address extension)<br /> MCE (Machine check exception)<br /> CX8 (CMPXCHG8 instruction supported)<br /> APIC (On-chip APIC hardware supported)<br /> SEP (Fast system call)<br /> MTRR (Memory type range registers)<br /> PGE (Page global enable)<br /> MCA (Machine check architecture)<br /> CMOV (Conditional move instruction supported)<br /> PAT (Page attribute table)<br /> PSE-36 (36-bit page size extension)<br /> CLFSH (CLFLUSH instruction supported)<br /> MMX (MMX technology supported)<br /> FXSR (Fast floating-point save and restore)<br /> SSE (Streaming SIMD extensions)<br /> SSE2 (Streaming SIMD extensions 2)<br /> Version: AMD Turion(tm) 64 Mobile ML<br /> Voltage: 2.2 V<br /> External Clock: 200 MHz<br /> Max Speed: 1600 MHz<br /> Current Speed: 1600 MHz<br /> Status: Populated, Enabled<br /> Upgrade: ZIF Socket<br /> L1 Cache Handle: Not Provided<br /> L2 Cache Handle: 0x0005<br /> L3 Cache Handle: Not Provided<br /> Serial Number: Not Specified<br /> Asset Tag: Not Specified<br /> Part Number: Not Specified<br /><br />Handle 0x0005, DMI type 7, 19 bytes<br />Cache Information<br /> Socket Designation: L2 Cache<br /> Configuration: Enabled, Socketed, Level 2<br /> Operational Mode: Write Back<br /> Location: Internal<br /> Installed Size: 1024 KB<br /> Maximum Size: 1024 KB<br /> Supported SRAM Types:<br /> Burst<br /> Pipeline Burst<br /> Installed SRAM Type: Synchronous<br /> Speed: Unknown<br /> Error Correction Type: Unknown<br /> System Type: Unknown<br /> Associativity: Unknown<br /><br />Handle 0x0006, DMI type 9, 13 bytes<br />System Slot Information<br /> Designation: MiniPCI Slot J20<br /> Type: 32-bit PCI<br /> Current Usage: Available<br /> Length: Long<br /> ID: 0<br /> Characteristics:<br /> 5.0 V is provided<br /> 3.3 V is provided<br /> PME signal is supported<br /><br />Handle 0x0007, DMI type 10, 6 bytes<br />On Board Device Information<br /> Type: Video<br /> Status: Enabled<br /> Description: 128<br /><br />Handle 0x0008, DMI type 11, 5 bytes<br />OEM Strings<br /> String 1: $HP$<br /><br />Handle 0x0009, DMI type 16, 15 bytes<br />Physical Memory Array<br /> Location: System Board Or Motherboard<br /> Use: System Memory<br /> Error Correction Type: None<br /> Maximum Capacity: 4 GB<br /> Error Information Handle: Not Provided<br /> Number Of Devices: 2<br /><br />Handle 0x000A, DMI type 17, 27 bytes<br />Memory Device<br /> Array Handle: 0x0009<br /> Error Information Handle: No Error<br /> Total Width: 32 bits<br /> Data Width: 32 bits<br /> Size: 512 MB<br /> Form Factor: DIMM<br /> Set: 1<br /> Locator: U5<br /> Bank Locator: Channel A0<br /> Type: DRAM<br /> Type Detail: Synchronous<br /> Speed: Unknown<br /> Manufacturer: Not Specified<br /> Serial Number: Not Specified<br /> Asset Tag: Not Specified<br /> Part Number: Not Specified<br /><br />Handle 0x000B, DMI type 17, 27 bytes<br />Memory Device<br /> Array Handle: 0x0009<br /> Error Information Handle: No Error<br /> Total Width: 32 bits<br /> Data Width: 32 bits<br /> Size: 512 MB<br /> Form Factor: DIMM<br /> Set: 1<br /> Locator: U6<br /> Bank Locator: Channel A3<br /> Type: DRAM<br /> Type Detail: Synchronous<br /> Speed: Unknown<br /> Manufacturer: Not Specified<br /> Serial Number: Not Specified<br /> Asset Tag: Not Specified<br /> Part Number: Not Specified<br /><br />Handle 0x000C, DMI type 19, 15 bytes<br />Memory Array Mapped Address<br /> Starting Address: 0x00000000000<br /> Ending Address: 0x0003FFFFFFF<br /> Range Size: 1 GB<br /> Physical Array Handle: 0x0009<br /> Partition Width: 0<br /><br />Handle 0x000D, DMI type 20, 19 bytes<br />Memory Device Mapped Address<br /> Starting Address: 0x00000000000<br /> Ending Address: 0x0001FFFFFFF<br /> Range Size: 512 MB<br /> Physical Device Handle: 0x000A<br /> Memory Array Mapped Address Handle: 0x000C<br /> Partition Row Position: 2<br /> Interleave Position: 2<br /> Interleaved Data Depth: 2<br /><br />Handle 0x000E, DMI type 32, 20 bytes<br />System Boot Information<br /> Status:<br /><br />Handle 0x000F, DMI type 126, 4 bytes<br />Inactive<br /><br />Handle 0x0010, DMI type 127, 4 bytes<br />End Of Table<br /><br />Handle 0x0011, DMI type 127, 4 bytes<br />End Of Table<br /></pre></td></tr></tbody></table>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-46605188941646563652007-08-21T11:28:00.000-07:002007-08-23T15:17:08.138-07:00How to Keep Hardware Clock in Local Time<script type="text/javascript"><br />digg_url="http://aka-shawn.blogspot.com/2007/08/how-to-keep-hardware-clock-in-local.html';</script><br /><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>If you dual boot or multiple boot different systems (Linux/Windows), you should keep your system clock in local time meaning you want to disable UTC; otherwise, the clock will be inconsistent between different systems.<br /><br />Fedora/Red Hat systems:<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# vi /etc/sysconfig/clock</pre></td></tr></table>Change 'True' to 'False' in the line where it says 'UTC=True'<br /><br />Ubuntu/Debian Systems:<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# vi /etc/default/rcS</pre></td></tr></table>Change 'yes' to 'no' in the line where it says 'UTC=yes'<br /><br /><a href="http://www.linuxsa.org.au/tips/time.html">Reference</a>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-68730994676252297612007-08-10T15:05:00.000-07:002007-08-24T11:54:58.845-07:00Have fun experimenting with RAID<script type="text/javascript"><br />digg_skin = 'compact'; <br />digg_title = "A guide of building RAID1";<br />digg_url ='http://aka-shawn.blogspot.com/2007/08/have-fun-experimenting-with-raid.html';<br />digg_bodytext = "Have you wondered how to build your own RAID for your Desktop? Check out the simple guide yourself.";<br />digg_topic = "linux_unix";</script><br /><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>If your kernel compiled with RAID support and your system supports RAID, the /proc/mdstat exists<table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[shanren@newemachines ~]$ cat /proc/mdstat<br />Personalities : <br />unused devices: <none><br /></pre></td></tr></table><br /><br />I have reserved two equal-sized unformatted partitions<table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[shanren@newemachines ~]$ egrep '(sda4|sdb3|blocks)' /proc/partitions<br />major minor #blocks name<br /> 8 4 9052627 sda4<br /> 8 19 9052627 sdb3<br /></pre></td></tr></table><br /><br />Let's grab mdadm--RAID administration tool<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# yum -y install mdadm<br />Loading "installonlyn" plugin<br />Setting up Install Process<br />Parsing package install arguments<br />fedora 100% |=========================| 2.1 kB 00:00 <br />Resolving Dependencies<br />--> Running transaction check<br />---> Package mdadm.i386 0:2.6.2-4.fc7 set to be updated<br /><br />Dependencies Resolved<br /><br />=============================================================================<br /> Package Arch Version Repository Size <br />=============================================================================<br />Updating:<br /> mdadm i386 2.6.2-4.fc7 updates 817 k<br /><br />Transaction Summary<br />=============================================================================<br />Install 0 Package(s) <br />Update 1 Package(s) <br />Remove 0 Package(s) <br /><br />Total download size: 817 k<br />Downloading Packages:<br />(1/1): mdadm-2.6.2-4.fc7. 100% |=========================| 817 kB 00:11 <br />Running Transaction Test<br />Finished Transaction Test<br />Transaction Test Succeeded<br />Running Transaction<br /> Updating : mdadm ######################### [1/2] <br /> Cleanup : mdadm ######################### [2/2]<br /><br />Updated: mdadm.i386 0:2.6.2-4.fc7<br />Complete!<br /></pre></td></tr></table><br /><br />I want to construct RAID 1 with two partitions on separate hard drives and format it with ext3 file system<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# /sbin/mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/sda4 /dev/sdb3<br />mdadm: size set to 9052544K<br />mdadm: array /dev/md0 started.<br /><br />[root@newemachines shanren]# /sbin/mkfs.ext3 /dev/md0<br />mke2fs 1.39 (29-May-2006)<br />Filesystem label=<br />OS type: Linux<br />Block size=4096 (log=2)<br />Fragment size=4096 (log=2)<br />1133440 inodes, 2263136 blocks<br />113156 blocks (5.00%) reserved for the super user<br />First data block=0<br />Maximum filesystem blocks=2319450112<br />70 block groups<br />32768 blocks per group, 32768 fragments per group<br />16192 inodes per group<br />Superblock backups stored on blocks: <br /> 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632<br /><br />Writing inode tables: done <br />Creating journal (32768 blocks): done<br />Writing superblocks and filesystem accounting information: done<br /><br />This filesystem will be automatically checked every 32 mounts or<br />180 days, whichever comes first. Use tune2fs -c or -i to override.<br /></pre></td></tr></table><br />Checking the status of building the RAID<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# cat /proc/mdstat<br />Personalities : [raid1] <br />md0 : active raid1 sdb3[1] sda4[0]<br /> 9052544 blocks [2/2] [UU]<br /> [==========>..........] resync = 50.0% (4530496/9052544) finish=5.0min speed=15035K/sec<br /> <br />unused devices: <none><br /><br />[root@newemachines shanren]# cat /proc/mdstat<br />Personalities : [raid1] <br />md0 : active raid1 sdb3[1] sda4[0]<br /> 9052544 blocks [2/2] [UU]<br /> <br />unused devices: <none><br /></pre></td></tr></table><br />Mount the RAID<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# mkdir /mnt/raid<br />[root@newemachines shanren]# mount -t ext3 -v /dev/md0 /mnt/raid<br />/dev/md0 on /mnt/raid type ext3 (rw)<br /></pre></td></tr></table><br /><br />Create the configuration file for mdadm so I can assemble the created array easily later on. I use mdadm with --detail option to obtain the detailed array information and add that information to /etc/mdadm.conf. My final mdadm.conf is shown.<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# /sbin/mdadm --detail --scan<br />ARRAY /dev/md0 level=raid1 num-devices=2 UUID=00c674c9:04162ff3:124ba3d9:31646810<br />[root@newemachines ~]# cat /etc/mdadm.conf<br />DEVICE /dev/sda4 /dev/sdb3<br />ARRAY /dev/md0 level=raid1 num-devices=2 UUID=00c674c9:04162ff3:124ba3d9:31646810 devices=/dev/sda4,/dev/sdb3<br /></pre></td></tr></table><br /><br />Should we check how well RAID 1 perform?<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# ls -lh debian-testing-i386-netinst.iso |cut -d" " -f5<br />159M<br />[root@newemachines shanren]# time cp debian-testing-i386-netinst.iso Desktop/<br /><br />real 0m0.720s<br />user 0m0.018s<br />sys 0m0.629s<br />[root@newemachines shanren]# time cp debian-testing-i386-netinst.iso /mnt/raid/<br /><br />real 0m0.697s<br />user 0m0.019s<br />sys 0m0.613s<br /><br />[root@newemachines shanren]# ls -lh F-7-i386-DVD.iso |cut -d" " -f5<br />2.8G<br />[root@newemachines shanren]# time cp F-7-i386-DVD.iso Desktop/<br /><br />real 3m18.350s<br />user 0m0.422s<br />sys 0m14.498s<br />[root@newemachines shanren]# time cp F-7-i386-DVD.iso /mnt/raid/<br /><br />real 7m14.209s<br />user 0m0.453s<br />sys 0m13.556s<br /></pre></td></tr></table>As the file size increases, the overhead of RAID 1 becomes quite noticeable.<br /><br />I would like to see if RAID 1 does what it is supposed to do--Mirroring<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines shanren]# umount /dev/md0<br />[root@newemachines shanren]# /sbin/mdadm --stop /dev/md0<br />mdadm: stopped /dev/md0<br /><br />[root@newemachines shanren]# mkdir /mnt/raiddevice0 /mnt/raiddevice1<br />[root@newemachines ~]# mount /dev/sda4 /mnt/raiddevice0<br />[root@newemachines ~]# mount /dev/sdb3 /mnt/raiddevice1<br /><br />[root@newemachines ~]# md5 /mnt/raiddevice0/F-7-i386-DVD.iso <br />355bdb01b0268a4bb7c757f2737dcf7c /mnt/raiddevice0/F-7-i386-DVD.iso<br />[root@newemachines ~]# md5 /mnt/raiddevice1/F-7-i386-DVD.iso <br />355bdb01b0268a4bb7c757f2737dcf7c /mnt/raiddevice1/F-7-i386-DVD.iso<br /></pre></td></tr></table>Obviously, it does because the md5 of the files written to two RAID devices is the same<br /><br />Let's clean it up...<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>[root@newemachines ~]# umount /mnt/raiddevice0 /mnt/raiddevice1<br />[root@newemachines ~]# rmdir /mnt/raiddevice0 /mnt/raiddevice1<br />[root@newemachines shanren]# /sbin/mdadm --assemble --verbose /dev/md0<br />mdadm: looking for devices for /dev/md0<br />mdadm: /dev/sda4 is identified as a member of /dev/md0, slot 0.<br />mdadm: /dev/sdb3 is identified as a member of /dev/md0, slot 1.<br />mdadm: added /dev/sdb3 to /dev/md0 as 1<br />mdadm: added /dev/sda4 to /dev/md0 as 0<br />mdadm: /dev/md0 has been started with 2 drives.<br /></pre></td></tr></table><br /><br />Reference: <a href="http://www.novell.com/coolsolutions/appnote/15087.html">Link 1, </a><a href="http://www.raditha.com/linux/raid.php">Link 2, </a><a href="http://tldp.org/HOWTO/Software-RAID-HOWTO-6.html">Link 3</a>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-34890982459617657972007-07-30T21:06:00.000-07:002007-08-23T15:18:36.531-07:00Quick way to find out what types of file systems you can under FreeBSD on your machine<script type="text/javascript"><br />digg_url = 'http://aka-shawn.blogspot.com/2007/07/quick-to-find-out-what-type-of-file.html';<br /></script><br /><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>Open a terminal and run:<br /><table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>ls /sbin/mount_*</pre></td></tr></table><br /><br />The following tells the kinds of file systems I can mount under my FreeBSD such as ntfs, ext2fs(linux ext2, ext3 file systems) and etc.<table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><br /><td><pre>newemachine# ls /sbin/mount_*<pre>/sbin/mount_cd9660 /sbin/mount_mfs /sbin/mount_procfs<br />/sbin/mount_devfs /sbin/mount_msdosfs /sbin/mount_reiserfs<br />/sbin/mount_ext2fs /sbin/mount_nfs /sbin/mount_std<br />/sbin/mount_fdescfs /sbin/mount_nfs4 /sbin/mount_udf<br />/sbin/mount_linprocfs /sbin/mount_ntfs /sbin/mount_umapfs<br />/sbin/mount_linsysfs /sbin/mount_nullfs /sbin/mount_unionfs<br /></pre></pre></td></tr></table><br />Say, now I plug in a USB drive have two slices. The first slice da0s1 is a NTFS file system and the second slice da0s2 is an ext3 file system. I can mount them as follows:<table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><br /><td><pre>newemachine# mount -t ntfs /dev/da0s1 /media<br />newemachine# mount -t ext2fs /dev/da0s2 /mnt<br /></pre></td></tr></table>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-61013967710528840562007-06-10T19:24:00.000-07:002007-08-23T15:21:28.116-07:00How to Add Startup Programs (Linux & FreeBSD)<script type="text/javascript"><br />digg_url = 'http://aka-shawn.blogspot.com/2007/06/how-to-add-startup-programs.html';<br /></script><br /><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>This applies to different desktop managers (XDM, GDM, and KDM)</li><table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine$ vi ~/.xsession</pre></td></tr></table><br />then put your commands to the following in the file<br /><table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><br /><td><pre>#!/bin/sh<br />gnome-terminal &<br />exec /usr/bin/gnome-session<br /></pre></td></tr></table><br />This runs gnome-terminal after you log into a Gnome session. You can substitute 'gnome-terminal' with other commands that you want to run. 'exec /usr/bin/gnome-session' is required here; otherwise, as soon as starting gnome-terminal process finishes, you will be taken back to the log in window. The directory of window managers such as Gnome varies from distribution to distribution. If you run a different window manager, you want to change '/usr/bin/gnome-session' accordingly.<br /><table cellpadding="3" cellspacing="4" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine$ chmod u+x ~/.xsession</pre></td></tr></table>.xsession has to be executable to get this working.Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-56216319124141085222007-06-02T10:52:00.000-07:002007-08-24T12:28:28.923-07:00Learning FreeBSD<script type="text/javascript"><br />digg_url = 'http://aka-shawn.blogspot.com/2007/06/freebsd.html';<br /></script><br /><script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html"><b>How to Install a FreeBSD Application</b></a><ul><li style="list-style-type: square">install pre-compiled applications</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# pkg_add -r bash</pre></td></tr></table>The above command installs precompiled Bash application.<br /><br /><li style="list-style-type: square">install ports</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# cd /usr/ports/www/bash<br />newemachine# make install clean</pre></td></tr></table>The above command download necessary source pre, then compile and install it.</ul><br /><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-finding-applications.html"><b>How to find a FreeBSD Application</b></a><ul><li style="list-style-type: square">Option 1: (If you know the exact application name)</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# whereis xclock<br />xclock: /usr/local/bin/xclock /usr/share/man/man1/xclock.1.gz /usr/ports/x11/xclock</pre></td></tr></table><br /><li style="list-style-type: square">Option 2:</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# cd /usr/ports<br />newemachine# make search name=xclock<br />Port: xclock-1.0.2<br />Path: /usr/ports/X11/xclock<br />Info: Analog and digital clock for X<br />.......<br /></pre></td></tr></table></ul><br /><b>How to Give User Superuser Privilege</b><br /><ul><li style="list-style-type: square">allow a user to sudo</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# pkg_add -r sudo<br />newemachine# /usr/local/sbin/visudo<br /></pre></td></tr></table><br />then add the following line after 'root ALL=(ALL) ALL'<br /><pre>shawn ALL=(ALL) ALL</pre>this gives user shawn the superuser privilege<br /><br /><li style="list-style-type: square">allow a user to su</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# vi /etc/group</pre></td></tr></table>then add change 'wheel:*:0:root' to 'wheel:*:0:root,shawn', this adds user shawn to the wheel group which have the superuser privilege. <br /></ul><br /><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.html"><b>How to Configure X</b></a><ul><li style="list-style-type: square">create a X server configuration file</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# Xorg -configure</pre></td></tr></table><br /><li style="list-style-type: square">test newly created configuration file</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# X -config /root/xorg.conf.new</pre></td></tr></table>If you see a gray screen with x mouse cursor, then X is running ok. Now Ctrl + Alt + Backspace to exit X<br /><br /><li style="list-style-type: square">fine-tune X configuration</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# mv /root/xorg.conf.new /etc/X11/xorg.conf</pre></td></tr></table><br />Move tested configuration to the system-wide configuration directory<table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# vi /etc/X11/xorg.conf</pre></td></tr></table><br />Under Section "Screen", add a line DefaultDepth 24 after the line where it says Monitor "Monitor0"<br />then under SubSection "Display", add a line Modes "1024x768" (#change to your own screen resolution) after the line where it says Depth 24<table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# startx</pre></td></tr></table>start the X server!<br /></ul><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html"><b>How to Configure Sound Card</b></a><ul><li style="list-style-type: square">load a set of common sound device drivers</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# kldload snd_driver</pre></td></tr></table><br /><li style="list-style-type: square">test loaded sound card driver</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# cat /dev/sndstat</pre></td></tr></table>You will see something similar to the following:<br /><pre>FreeBSD Audio Driver (newpcm)<br />Installed devices:<br />pcm0: <Intel ICH4 (82801DB)> at io 0xffa7f800, 0xffa7f400 irq 17 bufsz 16384 kld snd_ich (1p/1r/0v channels duplex default)</pre>This means that my actual sound card driver is snd_ich; therefore, I can load snd_ich instead of snd_driver.<br /><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# kldload snd_ich</pre></td></tr></table><br /><li style="list-style-type: square">load modules at boot</li><table cellpadding="3" cellspacing="3" border="0" width="300" style="background-color: #000000; color: #FFFFFF;"><tr><td><pre>newemachine# vi /boot/loader.conf</pre></td></tr></table><br />add <code>snd_ich_load="YES"</code> to the file</ul>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-19637571858199743922007-05-31T15:26:00.000-07:002007-05-31T15:36:36.092-07:00OSesToo many operating systems to choose from? Or you only use Windows? Read on:<br />--> Plain English: <a href="http://people.freebsd.org/%7Emurray/bsd_flier.html">FreeBSD vs Linux vs Windows</a><br />--> Kernel Talk: <a href="http://www.opensolaris.org/os/article/2005-10-14_a_comparison_of_solaris__linux__and_freebsd_kernels/">A Comparison of Solaries, Linux, and FreeBSD Kernels</a>Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0tag:blogger.com,1999:blog-7485689832273392206.post-59045204259909640522007-05-30T11:45:00.000-07:002007-05-30T12:21:41.234-07:00trying bloggerwow, blogger is pretty cool but I think it can be better :)Shawnhttp://www.blogger.com/profile/08029752694806097575noreply@blogger.com0