Changes

From SME Server
Jump to navigationJump to search
6,827 bytes added ,  04:15, 7 May 2010
Line 1: Line 1:  
==Introduction==
 
==Introduction==
   −
This HowTo describes how to get SME 7.x working properly on a [http://www.mini-itx.com/store/?c=34#j7f4 Jetway J7F4 Mini-ITX motherboard]. These motherboards are an extremely attractive option for builing a small, energy-efficient yet relatively fast server. The J7F4 series have two Realtek RTL8110SC Gigabit LAN adapters on board, and are powered by a VIA C7 (Ester) processor at 1.2 Ghz (with passive cooling), or at 1.5 or 2.0 Ghz with active cooling. In addition, it includes hardware AES and SHA encryption/decryption, hardware MPEG2/4 decoding and a number of other potentially useful features. Unfortunately however, most of its hardware is not very well supported by the 2.6.9 kernel that is supplied with SME and CentOS 4. This document describes the compilation and installation of a custom kernel. It can also be used as an example of how to get SME running on or with any hardware that requires a modified or newer linux kernel.
+
This HOWTO describes how to get SME 7.x working properly on a [http://www.mini-itx.com/store/?c=34#j7f4 Jetway J7F4 Mini-ITX motherboard], or other Mini-ITX boards based on the [http://www.via.com.tw/en/products/chipsets/c-series/cn700/ VIA CN700] or a similar chipset. These motherboards are an extremely attractive option for building a small, energy-efficient yet relatively fast server. The J7F4 series have two Realtek RTL8110SC Gigabit LAN adapters on board, and are powered by a [http://www.via.com.tw/en/products/processors/c7/ VIA C7] (Esther) processor at 1.2 Ghz (passive cooling), or at [http://linitx.com/viewproduct.php?prodid=11337 1.5] or 2.0 Ghz with active cooling. In addition, the chipset includes hardware AES and SHA encryption/decryption, hardware MPEG2/4 decoding and a number of other potentially useful features. Unfortunately however, this hardware is not very well supported by the 2.6.9 kernel that is supplied with SME and CentOS 4. This document describes the compilation and installation of a custom kernel. It can also be used as an example of how to get SME running on or with any hardware that requires a modified or newer linux kernel.
 
      
==Procedure==
 
==Procedure==
Line 8: Line 7:  
===Before you start===
 
===Before you start===
   −
It is always a good idea to make a backup, in case things get messed up. Furthermore, as the standard SME 7.x kernel doesn't support the on-board RTL8110SC network controllers, you might want to perform at least steps 1 through 4 on a different machine, and switch the harddisk to the Jetway machine after the new kernel is installed. If you follow the instructions below, the new kernel should run on most machines with a 686-compatible CPU (i.e. a Pentium II or higher).
+
It is always a good idea to make a backup, in case things get messed up. Furthermore, as the standard SME 7.x kernel doesn't support the [http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=4&Level=5&Conn=4&ProdID=9 RTL8110SC] network controllers on board the J7F4, you might want to perform at least steps 1 through 4 on a different machine, and switch the harddisk to the Jetway machine after the new kernel is installed. If you follow the instructions below, the new kernel should run on most machines with a 686-compatible CPU (i.e. a Pentium II or higher).  
 
  −
Alternatively you could install a temporary network-card in the PCI slot on the Jetway-board, or [http://forums.contribs.org/index.php?topic=35435.0 temporarily install the r1000 kernel module from Realtek]. The r1000 driver works with all RTL8169 and RTL8110 gigabit ethernet controllers. However, many people have found it to be buggy and unstable, so as soon as you have installed the new kernel you should switch to the r8169 kernel module. Recent versions of this driver have support for the RTL8110.
      +
Alternatively you could install a temporary network-card in the PCI slot on the Jetway-board, or [http://forums.contribs.org/index.php?topic=35435.0 install the r1000 kernel module from Realtek]. The r1000 driver works with all RTL8169 and RTL8110 gigabit ethernet controllers. However, many people have found it to be buggy and unstable. Realtek has recently released a [ftp://209.216.61.149/cn/nic/r8169-6.001.00.tar.bz2 new version (6.001.00) of the r1000 driver], which is rumoured to fix some of the problems of earlier versions (1.05 and before). However, this version does not yet compile with newer kernel versions. You can use it with the SME/CentOS 2.6.9 kernel, but not with the new 2.6.2x kernels. As soon as you have installed the new kernel you can however switch to the r8169 kernel module. Recent versions of this driver have support for the RTL8110.
    
===Step 1: Installing a compiler and build tools===
 
===Step 1: Installing a compiler and build tools===
Line 38: Line 36:  
  bzip2 -dc /usr/src/patch-2.6.21-rc5-git1.bz2 | patch -p1
 
  bzip2 -dc /usr/src/patch-2.6.21-rc5-git1.bz2 | patch -p1
   −
Finally, I applied a patch to add kernel support for the VIA C7 processor (this is also optional, it should work just fine without this patch):
+
Finally, I applied a patch to add kernel support for the VIA C7 processor (this is also optional, the C7 is i686 compatible so it should work just fine without this patch):
    
  wget -O /usr/src/via-c7.patch http://lkml.org/lkml/diff/2007/2/12/428/1
 
  wget -O /usr/src/via-c7.patch http://lkml.org/lkml/diff/2007/2/12/428/1
 
  cd /usr/src/linux/
 
  cd /usr/src/linux/
 
  patch -p1 </usr/src/via-c7.patch
 
  patch -p1 </usr/src/via-c7.patch
      
===Step 3: Configuring the kernel===
 
===Step 3: Configuring the kernel===
Line 57: Line 54:  
  make menuconfig
 
  make menuconfig
   −
Select "Load an Alternate Configuration File" and load the file "smeconfig". If you don't want to bother with the manual configuration below, you may also load the [http://wiki.contribs.org/images/6/62/Smeconfig.txt ready-made configuration file from this site] and [[#Step 4: Compiling and installing the kernel|skip to the next step]].
+
Select "Load an Alternate Configuration File" and load the file "smeconfig". If you don't want to bother with the manual configuration below, you may also load the [http://wiki.contribs.org/images/6/62/Smeconfig.txt ready-made configuration file from this site] and [[#Step 4: Compiling and installing the kernel|skip to the next step]]. This configuration should work on all boards with a VIA C7 processor.
    
We should give our custom kernel a name, to distinguish it from a generic kernel. You may choose any suffix you want, in this example I will use "-custom-via". Select the following in the menu:
 
We should give our custom kernel a name, to distinguish it from a generic kernel. You may choose any suffix you want, in this example I will use "-custom-via". Select the following in the menu:
Line 132: Line 129:  
Finally you should make sure that all necessary modules are built for
 
Finally you should make sure that all necessary modules are built for
 
the hardware that you have. The default settings are quite reasonable,
 
the hardware that you have. The default settings are quite reasonable,
but for the Jetway board, I would select at least the following additional options (when available):
+
but for Jetway or VIA Epia boards, I would select at least the following additional options (when available):
    
  Processor type and features  --->
 
  Processor type and features  --->
 +
    [*] Symmetric multi-processing support
 
     Processor family (VIA C7)  --->
 
     Processor family (VIA C7)  --->
 
         (X) VIA C7
 
         (X) VIA C7
 +
 +
If you have an older Mini-ITX board based on a [http://www.via.com.tw/en/products/processors/c3/ VIA C3] processor, you should of course select one of the the VIA C3 options here instead of the C7. If your board has a [http://www.via.com.tw/en/products/processors/corefusion/index.jsp 'Luke' CoreFusion] or [http://www.via.com.tw/en/products/processors/eden/ Eden-N] processor (such as the VIA Epia VT or EK series Mini-ITX boards), you should probably select VIA C3-2 (Nehemiah). Symmetric multi-processing support (SMP) is only needed for dual Eden-N boards, such as the VIA Epia VT310DP.
    
  Power management options (ACPI, APM)  --->
 
  Power management options (ACPI, APM)  --->
Line 164: Line 164:  
         ATA/ATAPI/MFM/RLL support  --->
 
         ATA/ATAPI/MFM/RLL support  --->
 
                 <*>        VIA82CXXX chipset support
 
                 <*>        VIA82CXXX chipset support
 +
        Serial ATA (prod) and Parallel ATA (experimental) drivers  --->
 +
                <M> ATA device support
 +
                        <M>  VIA SATA support
 
         Network device support  --->
 
         Network device support  --->
 +
                Ethernet (10 or 100Mbit)  --->
 +
                        <M>  VIA Rhine support
 +
                        [*]    Use MMIO instead of PIO
 
                 Ethernet (1000 Mbit)  --->
 
                 Ethernet (1000 Mbit)  --->
 
                         <M> Realtek 8169 gigabit ethernet support
 
                         <M> Realtek 8169 gigabit ethernet support
 +
                        <M> VIA Velocity support
 
         Character devices  --->
 
         Character devices  --->
 
                 <M> Hardware Random Number Generator Core support
 
                 <M> Hardware Random Number Generator Core support
Line 194: Line 201:     
When you're done, exit and save your configuration.
 
When you're done, exit and save your configuration.
      
===Step 4: Compiling and installing the kernel===
 
===Step 4: Compiling and installing the kernel===
   −
When everything is configured, you can can build the kernel. In order to facilitate an easy installation and maintenace, we will build the new kernel as an RPM package:
+
When everything is configured, you can can build the kernel. In order to facilitate an easy installation and maintenance, we will build the new kernel as an RPM package:
    
  make rpm
 
  make rpm
Line 223: Line 229:  
  title SME Server (2.6.21-rc5-git1-custom-via)
 
  title SME Server (2.6.21-rc5-git1-custom-via)
 
         root (hd0,0)
 
         root (hd0,0)
         kernel /vmlinuz-2.6.21-rc5-git1-custom-via ro root=/dev/hda6
+
         kernel /vmlinuz-2.6.21-rc5-git1-custom-via ro root=/dev/main/root
 
         initrd /initrd-2.6.21-rc5-git1-custom-via.img
 
         initrd /initrd-2.6.21-rc5-git1-custom-via.img
   −
Before rebooting, you should tell SME that wou want to use the r8169 driver for the on-board ethernet controllers:
+
Before rebooting, you should tell SME what driver you want to use for the on-board ethernet controllers.
 +
 
 +
If your board has RealTek RTL8169 or RTL8110 gigabit ethernet controllers (e.g. the Jetway J7F4 or the [http://linitx.com/viewcategory.php?catid=140 3x Gigabit LAN extension module] for the [http://linitx.com/viewcategory.php?catid=141 Jetway J7F2]), you'll want to use the r8169 driver:
    
  /sbin/e-smith/config set EthernetDriver1 r8169
 
  /sbin/e-smith/config set EthernetDriver1 r8169
 
  /sbin/e-smith/config set EthernetDriver2 r8169
 
  /sbin/e-smith/config set EthernetDriver2 r8169
    +
If your board has dual VIA 10/100 Mbit ethernet controllers (e.g. the [http://www.mini-itx.com/store/?c=2#epiavt VIA Epia VT] or [http://linitx.com/viewproduct.php?prodid=11134 Epia EK] series), you'll want to use the via-rhine driver:
 +
 +
/sbin/e-smith/config set EthernetDriver1 via-rhine
 +
/sbin/e-smith/config set EthernetDriver2 via-rhine
 +
 +
These instructions assume that you have two controllers on board with the same chipset. If you have more than one type of controller, you should of course modify the 'set EthernetDriver1' etc. lines to use the correct drivers. For instance, the VIA Epia VT boards have one VIA 'Velocity' series gigabit ethernet controller in addition to the dual 10/100 Mbit controllers, so you could also do:
 +
 +
/sbin/e-smith/config set EthernetDriver1 via-rhine
 +
/sbin/e-smith/config set EthernetDriver2 via-velocity
 +
/sbin/e-smith/config set EthernetDriver3 via-rhine
    
===Step 5: Booting the new kernel===
 
===Step 5: Booting the new kernel===
Line 246: Line 264:  
===Step 6: Final configuration===
 
===Step 6: Final configuration===
   −
If all has gone well, you should now be up and running on your brand new kernel. All that remains is to make sure that any remaining 'extra features' are loaded into the kernel. If you are running on a VIA C7 based board such as the Jetway J7F4, try the following to enable hardware crypting support:
+
If all has gone well, you should now be up and running on your brand new kernel. All that remains is to make sure that any remaining 'extra features' are loaded into the kernel. If you are running on a VIA Eden, Eden-N or 'Luke' CoreFusion board such as the Jetway J7F4 / J7F2 or the VIA Epia VT / EK series, try the following to enable hardware crypting support:
    
  /sbin/modprobe via-rng
 
  /sbin/modprobe via-rng
 
  /sbin/modprobe padlock
 
  /sbin/modprobe padlock
   −
And in the unlikely event that you want to run an Xserver with hardware accellerated 2D graphics and MPEG-decoding:
+
And in the unlikely event that you want to run an Xserver with hardware accelerated 2D graphics and MPEG-decoding:
    
  /sbin/modprobe via
 
  /sbin/modprobe via
   −
You should also enable on-demand frequency scaling, so the processor will switch from 400 Mhz to 1200 Mhz when needed:
+
If your board has a C7 processor, you should also enable on-demand frequency scaling, so the processor will switch from 400 Mhz to e.g. 1200 Mhz when needed:
    
  echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 
  echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 +
 +
If you have a dual core or dual processor board, you should do this for the second processor as well:
 +
 +
echo ondemand >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
 +
    
Of course, you don't want to type all of this every time you reboot the server. So you can create a script in /etc/e-smith/events/local that will configure things for you at boot-time:
 
Of course, you don't want to type all of this every time you reboot the server. So you can create a script in /etc/e-smith/events/local that will configure things for you at boot-time:
Line 266: Line 289:     
  #!/bin/sh
 
  #!/bin/sh
   
  # Custom initialisation stuff for the VIA C7
 
  # Custom initialisation stuff for the VIA C7
   
  /sbin/modprobe via_rng
 
  /sbin/modprobe via_rng
 
  /sbin/modprobe padlock
 
  /sbin/modprobe padlock
 
  echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 
  echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
 +
# Uncomment the following for dual-processor boards:
 +
# echo ondemand >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
    
Save the script (F2 or F10 in mcedit) and set the right permissions:
 
Save the script (F2 or F10 in mcedit) and set the right permissions:
Line 284: Line 307:     
  /sbin/e-smith/signal-event local
 
  /sbin/e-smith/signal-event local
  −
      
===Step 7: Cleaning up===
 
===Step 7: Cleaning up===
Line 295: Line 316:  
You can also delete the remaining packages and sources in /usr/src, if you wish.
 
You can also delete the remaining packages and sources in /usr/src, if you wish.
    +
==Other Tips & Tricks==
 +
 +
According to [http://www.tkarena.com/forums/linux-arena/32095-j7f4k-hard-lockups-14.html#post228588 this thread], the chipset used on many VIA C7-based boards is quite sensitive to overheating. This may cause lockups during high disk activity, especially if your board is passively cooled and in a small case.
 +
Jetway has released a [http://download.jetway.com.tw/download.asp?sorder=Name&sword=J7F4K1G5D new BIOS version (A07) for J7F4 boards] that seems to more or less fix this problem. To flash it, you'll need to [http://www.nenie.org/misc/flashbootcd.html boot the board in DOS] and use the [http://download.jetway.com.tw/download/utilities/awdflash.zip Award flash utility]. If you keep experiencing mysterious lockups after the BIOS-update, it is advisable to add a CPU- or case-fan or to fit the board into a bigger case.
 +
 +
Jetway have released a new revision of the J7F4 mainboard, which incorporates a bigger heatsink in conjunction with the new BIOS to solve the overheating problems. Thanks to Ryan Salsbury for pointing this out. Ryan has also kindly provided pictures of the old and new board revisions:
 +
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_EDEN_Mainboard_-_Dual_GigaLAN_main.jpg The board with the old, small heatsink]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_EDEN_Mainboard_-_Dual_GigaLAN_rear.jpg Rear view of the old board]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_Eden_CN700_Mainboard_-_Dual_GigaLAN_-__NEW_REVISION_main.jpg New board, with larger heatsink]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_Eden_CN700_Mainboard_-_Dual_GigaLAN_-__NEW_REVISION_front.jpg Front view of the new board]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_Eden_CN700_Mainboard_-_Dual_GigaLAN_-__NEW_REVISION_rear.jpg Rear view of the new board]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_Eden_CN700_Mainboard_-_Dual_GigaLAN_-__NEW_REVISION_side.jpg Side view of the new board]
 +
* [http://www2.multithread.co.uk/mtcshop/images/linitx.com/products/Jetway_J7F4K_1.2GHz_Eden_CN700_Mainboard_-_Dual_GigaLAN_-__NEW_REVISION_Overview.jpg Overview of the new board]
 +
 +
==Kernel Version Issues==
 +
 +
People have reported that USB drive recognition will no longer work after updating the kernel. This is due to the fact that the udev version used in CentOS 4 will not work with kernel versions above 2.6.12. You will need to update the udev package. I will update this Howto as soon as I have tried this myself. In the mean time, you may find newer udev versions here: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
 +
 +
Another problem is that the custom kernel may cause problems when trying to upgrade SME. On any update that includes a newer kernel, yum will complain about dependency problems because the custom kernel has a higher version-number than the kernel that is to be updated. The only way around this seems to be to uninstall the custom kernel (using yum remove ...), do the upgrade, and then re-install the custom kernel before rebooting.
 +
You can also use the exclude package option to avoid kernel and kmod updates, and everything will just work fine !
    
==Author and Acknowledgements==
 
==Author and Acknowledgements==
   −
This HowTo is written by Levien van Zon (levien at scum.org). It is based to a large extent on forum postings and documents by Harro, Charlie Brady, Falko Timme, Simon Arlott and many others. See the references below for more information. This document may contain mistakes and typos, so please feel free to add or correct things if you have wiki-access. You can also send corrections and suggestions to the author by e-mail.
+
This Howto is written by Levien van Zon (levien at scum.org). It is based to a large extent on forum postings and documents by Harro, Charlie Brady, Falko Timme, Simon Arlott, Neil, Ryan Salsbury and many others. See the references below for more information. This document may still contain mistakes and typos, so please feel free to add or correct things if you have wiki-access. You can also send corrections and suggestions to the author by e-mail.
    
==References==
 
==References==
Line 306: Line 348:  
* http://lkml.org/lkml/2007/2/12/428
 
* http://lkml.org/lkml/2007/2/12/428
 
* http://acpi.sourceforge.net/documentation/processor.html
 
* http://acpi.sourceforge.net/documentation/processor.html
 
+
* http://forums.viaarena.com/messageview.aspx?catid=28&threadid=77032
    
[[Category:Howto]]
 
[[Category:Howto]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,228

edits

Navigation menu