Pages

Monday 30 January 2012

How to Configure bRoadcom on Linux

Since i am is Debian users as well, it's simple ways to setup broadcom sta bcm4313 :

On This Tutorial


Add a "non-free" component to /etc/apt/sources.list, for example:
# Debian Wheezy (testing)
deb http://ftp.us.debian.org/debian wheezy main contrib non-free

  1. # aptitude update
    # aptitude install firmware-brcm80211 wireless-tools
  2. As the driver may already be loaded, reinsert the module to access installed firmware:
    # modprobe -r brcmsmac ; modprobe brcmsmac
  3. Verify your device has an available interface:
    # iwconfig
    To find the Device ID's of Broadcom cards on your machines do:
    # lspci -n | grep 14e4
    # lsmod  | grep "b43\|ssb\|bcma\|wl"
    
    If you try to build this module but get an error message that looks like 
    this:
    
    make: *** /lib/modules/"release"/build: No such file or directory. Stop.
    
    Then you do not have the proper packages installed, since installing the 
    proper packages will create /lib/modules/"release"/build on your system.
    
    On Ubuntu, you will need headers and tools.  Try these commands:
    # apt-get install build-essential linux-headers-generic
    # apt-get build-dep linux
    
    To check to see if you have this directory do this:
    
    # ls /lib/modules/`uname -r`/build
    
    BUILD INSTRUCTIONS
    ------------------
    1. Setup the directory by untarring the proper tarball:
    
    For 32 bit:  hybrid-portsrc.tar.gz
    For 64 bit:  hybrid-portsrc-x86_64.tar.gz
    
    Example:
    # mkdir hybrid_wl
    # cd hybrid_wl
    # tar xzf <path>/hybrid-portsrc.tar or <path>/hybrid-portsrc-x86_64.tar.gz
    
    2. Build the driver as a Linux loadable kernel module (LKM):
    
    # make clean   (optional)
    # make
    
    When the build completes, it will produce a wl.ko file in the top level
    directory.
    This driver now supports the new linux cfg80211 wireless configuration API in
    addition to the older Wireless Extensions (Wext).  The makefile will
    automaticly build the right version for your system but it can be
    overridden if needed:
    
    # make API=WEXT
     or
    # make API=CFG80211
    
    # rmmod wl 
    # mv <path-to-prev-driver>/wl.ko <path-to-prev-driver>/wl.ko.orig
    # cp wl.ko <path-to-prev-driver>/wl.ko
    # depmod
    # modprobe wl
    
    The new wl driver should now be operational and your all done.
    
    Fresh installation:
    
    If any of these are installed, remove them:
    # rmmod b43
    # rmmod ssb
    # rmmod bcma
    # rmmod wl
    
    To blacklist these drivers and prevent them from loading in the future:
    # echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
    # echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
    # echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf 
    # echo "blacklist b43legacy" >> /etc/modprobe.d/blacklist.conf
    # echo "blacklist brcmsmac" >> /etc/modprobe.d/blacklist.conf
    # echo "blacklist brcmfmac" >> /etc/modprobe.d/blacklist.conf
    # echo "blacklist brcm80211" >> /etc/modprobe.d/blacklist.conf
    
    # insmod <path-to-driver>/wl.ko
    # modprobe wl
    
    wl.ko is now operational.  It may take several seconds for the Network 
    Manager to notice a new network driver has been installed and show the
    surrounding wireless networks.
    
    If there was an error, see Common isstes below.
    
    Common issues:
    ----------------
    * After the insmod you may see this message:
      WARNING: modpost: missing MODULE_LICENSE()
      It is expected, not harmful and can be ignored.
    
    * If you see this message:
    
      "insmod: error inserting 'wl.ko': -1 Unknown symbol in module"
    
      Usually this means that one of the required modules (as mentioned above) is
      not loaded. Try this:
      # modprobe lib80211 or ieee80211_crypt_tkip (depending on your os)
      # modprobe cfg80211
        
      Now re-try to insmod the wl driver:
      # insmod wl.ko
      
    * If the wl driver loads but doesn't seem to do anything:
      the ssb module may be the cause.  Sometimes blacklisting ssb may not
      be enough to prevent it from loading and it loads anyway. (This is mostly
      seen on Ubuntu/Debian systems).
    
      Check to see if ssb, bcma, wl or b43 is loaded:
      # lsmod | grep "ssb\|wl\|b43\|bcma"
    
      If any of these are installed, remove them:
      # rmmod ssb
      # rmmod bcma
      # rmmod wl
      # insmod wl
    
      Back up the current boot ramfs and generate a new one:
      # cp /boot/initrd.img-`uname -r` somewheresafe
      # update-initramfs -u
      # reboot

Sunday 29 January 2012

Triple Boot of Debian Wheezy and FreeBSD 9.0

Installation Procedure:



Install Windows 7 at First Times, then second stage.,
 
Install FreeBSD 8.2 .
Disc Slicing procedure.
1. Delete all slices.
2. Make slice for Debian
3. Make slice for FreeBSD
4. Delete slice 1 for Debian and leave it as unused.
5. Install FreeBSD in second Slice leaving first slice and don’t install Boot Loader. Just leave boot loader as we are going to install Grub Boot loader in Debian.
Install Debian 6.0.1
Do not Touch the FreeBSD slice that is visible during manual partitioning.
Install GRUB Boot Loader.
Reboot your system
Here you will not see FreeBSD system in Debian Grub as you  need to edit your grub boot loader.
FreeBSD with Debian GRUB



If you want to boot FreeBSD using GRUB, simply edit
/etc/grub.d/40_customized
In the other section add the following line:
(change the partition according to yours)
menuentry ‘FreeBSD 8.2 ‘ {
        set root=’(hd0,2)’   #in the place of 2 your partition may differ according to your partition slice.
        chainloader +1
}
Update the grub.cfg
#update-grub
FreeBSD should appear in your grub menu when you reboot next time.

You need to do this and this tools , Since BSD always use Primary Partition.,

Saturday 28 January 2012

Unable To Boot Into Windows After Updating Debian into Wheezy??

Recently updated Debian on to unstable or testing version and unable to boot into Windows on a dual boot system since then? The system does not show up the boot loader menu after updating Debian? Or your computer system fails to recognize any Operating System after you updated Debian. Facing any or all of the above issues after updating Debian? Scared that you will lose all your files? You do not need to worry any more! Let us Re-install and recover the Windows boot loader to fix the errors that are preventing you from booting into Windows after updating Debian.
Updating GRUB (with the wrong options selected) while updating Debian usually results in this issue. After completely updating Debian on your system and rebooting it you may be unable to boot into Windows as your system only detects Debian or no operating system installed in your system, maybe it detect Windows but cannot log in into it because wrong drive disk section. To fix these problems we need to re-install or just simple fix Windows boot loader for your system to start detecting the Windows operating systems as it used to before updating Debian.
Here are the steps to re-install and recover Windows boot loader and to boot into both Windows normally after updating Debian.
Step 1 - Configure Boot Sequence -
If your boot sequence has boot from CD/DVD ROM as the first preferred device (that is, if you are able to directly boot from CD/DVD ROM after just inserting the DVD and rebooting your system) then you may skip this step.
We need to re-install the Windows boot loader from a Windows Installation DVD (Windows Vista or Windows 7). In order to make the computer system boot from the Windows Installation DVD (Windows Vista or Windows 7) we need to set the first preferred boot device as the CD/DVD ROM device instead of HDD which is usually the first preferred boot device.
To change the boot sequence you need to change the boot settings in BIOS. To access the BIOS, press the Delete or F2 or F10 key (depends on your computer system) on the very first screen that you see after switching on your computer system, that is, press any one key (depending on your computer system) when you see the very first boot screen (can be the Company Logo screen) to enter the BIOS setup.
Or maybe you just need log into grub and find your windows 7 recovery path.
Screen-shot:

Use Metode 1 :Save the new boot settings, insert the Windows Installation DVD (Windows Vista or Windows 7) in the CD/DVD ROM and restart the computer system.
If you have successfully changed the boot settings and have inserted the Windows Installation DVD you will see the following screen -
Screen-shot -






On booting from the Windows Installation DVD, the computer system will copy load some files for the next few minutes and then finally present you with the Windows setup start screen.
The Windows Installation DVD (Windows Vista or Windows 7) is designed for both installing Windows as well as repairing it. In the Windows setup start screen select your preferred language and other details and hit Next.
Screeen-shot -



On the next screen click on Repair your computer to start the advanced Windows Repair Utility.
Screen-shot -
 On clicking on Repair your computer the Windows Repair tool will automatically start searching for the already installed Windows and errors that are stopping Windows to load/boot properly. This may take a few minutes.
Screen-shot -
 If the only problem after updating Debian is with the Windows boot loader then the Windows repair tool usually offers to repair the boot loader. If it does then, click on Repair and Restart and wait for a few minutes to let the Windows repair tool repair the Windows boot loader. If all works well, then after the repair tool reboots your system, you will be able to boot into Windows as you were before updating Debian.
 If the Windows Repair tool does not automatically detect startup problems or is unable to repair the Windows Boot Loader then you need to manually re-install the Windows boot loader. To do this, click on the option - "Use repair tools to fix Windows startup problems".

Use Metode 2
Go to Windows Recovery, choose checkdisk, then you must found use CMD.
From the Startup recovery tools menu select Command Prompt from the available tools.
Screen-shot - 

Next run the following command in the command prompt window -
bootrec /rebuildbcd
The above command when executed will search for the available Windows installation on your system. Once it automatically detects the Windows installation on your system, it asks you if you want to add the Windows Installation on your system to the Boot list. Enter Y in order to add the Windows installation to the boot list.
Screen-shot -
 Next, exit the command prompt and reboot your system, and done. You can now normally boot into Windows (access all your files and programs that were there) as you were able to before updating Ubuntu (or updating GRUB).

Now Have Fun., :)

Tuesday 24 January 2012

Pacman Package Manager on Debian

Getting it on Debian

This part is kind of weird. We want to get pacman on Debian. There isn't an apt package, so what now? Well, we can build a .deb file that installs pacman so we can use PKGBUILDs. Basically, we use a package management system to install a package management system.

There's gotta be a "Yo Dawg" in there somewhere.

Get it pacman arch and be sure to get its dependency libdownload.

A look at some PKGBUILDs

Let's take a look some PKGBUILDs that we use at Kickball Labs.
The first is a simple PKGBUILD for ltrace, a program like strace but for library calls. It just downloads the source, passes in some custom options to configure, builds the binary, and then installs to the package directory.

pkgname=ltrace
pkgver=0.5.1
pkgrel=1
pkgdesc="ltrace is a debugging program which runs a specified command until it exits"
url="http://packages.debian.org/unstable/utils/ltrace"
arch=('x86_64')
source=(http://ftp.debian.org/debian/pool/main/l/ltrace/${pkgname}_${pkgver}.orig.tar.gz)

build()
{
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/custom --sysconfdir=/custom/etc
  make || return 1
  make DESTDIR=$startdir/pkg install

Conclusion

Package management is painful. If you have any plans on building a service that scales to multiple machines, you had better have a good solution for creating and distributing packages. pacman is good for this because:
  1. It's easy to learn and use, encouraging you to make everything (from libraries to configuration files and more) a PKGBUILD.
  2. The simple plain text file format works great with your source control system of choice.
  3. Applied a patch you didn't like? Just roll the PKGBUILD file back with your package manager.
  4. Create a PKGBUILD repository by just putting the tarballs generated from your PKGBUILD files in a directory and pointing a web server at it. This is great for bringing up new hardware in a datacenter - just install pacman, point it at your repository, and install your base package which sets up the all your passwd, host, or other config files. 
When patching a Debian package, you do not have to get the original source and add all the Debian meta-stuff to it. You can just use apt-get source to get hold of Debian's source package, do the stuff you want to change and then run dpkg-buildpackage