Tuesday, February 28, 2012

Disable nouveau drivers in BT5R2

There are times when you may need to disable the nouveau graphics drivers in BT5R2 such as when you want to install Nvidia graphics drivers.

This is easily done with the following commands:

nano /etc/modprobe.d/blacklist.conf

Now add the following 6 lines at the end

blacklist vga16fb
blacklist nouveau
blacklist nouveaufb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv


Save

update-initramfs -u

Finally reboot and nouveau drivers will now be disabled.

BT5R2 Live USB Install

In this video I will show you how to make a live usb install from BT5R2.

I have downloaded the iso I want to use and have verified the md5 checksum.

I am booting the BT5R2 iso using the latest VMware workstation although the free player or other virtualisation software should work just as well.
In this video demonstration I am using an old 32GB usb stick, but a 4GB min usb stick is all you really need for this.



I hope you enjoy it.

You can download the full quality video from this link


http://blip.tv/file/get/Balding_parrot-BT5R2_Live_USB_Install294.mp4

Sorry for typing so slow in it, but I wanted to make sure everyone has time to easily read everything.

Transcript of commands used and the full output of those commands for those that don't need the video or those that want to print them out for use later.

root@root:~# dmesg | egrep hd.\|sd.

[    0.220999] NMI watchdog enabled, takes one hw-pmu counter.
[    0.234822] NMI watchdog enabled, takes one hw-pmu counter.
[    0.249169] NMI watchdog enabled, takes one hw-pmu counter.
[    0.263184] NMI watchdog enabled, takes one hw-pmu counter.
[    4.709437] sd 2:0:0:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
[    4.711998] sd 2:0:0:0: [sda] Write Protect is off
[    4.713727] sd 2:0:0:0: [sda] Mode Sense: 61 00 00 00
[    4.714744] sd 2:0:0:0: [sda] Cache data unavailable
[    4.716100] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.749340] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    4.753027] sd 2:0:0:0: [sda] Cache data unavailable
[    4.755510] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.758927]  sda: unknown partition table
[    4.761388] sd 2:0:0:0: [sda] Cache data unavailable
[    4.762556] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.763459] sd 2:0:0:0: [sda] Attached SCSI disk
[  509.750747] sd 3:0:0:0: Attached scsi generic sg2 type 0
[  509.767402] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[  512.723221] sd 3:0:0:0: [sdb] 62562239 512-byte logical blocks: (32.0 GB/29.8 GiB)
[  512.732094] sd 3:0:0:0: [sdb] No Caching mode page present
[  512.732099] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[  512.746087] sd 3:0:0:0: [sdb] No Caching mode page present
[  512.746092] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[  512.755286]  sdb: sdb1

root@root:~# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): d
Selected partition 1
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3894, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-3894, default 3894):
Using default value 3894
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)
Command (m for help): a
Partition number (1-4): 1
Command (m for help): w

The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.

root@root:~# mkfs.vfat -F 32 -n BT5R2 /dev/sdb1
mkfs.vfat 3.0.7 (24 Dec 2009)

root@root:~# mkdir /mnt/sdb1

root@root:~# mount /dev/sdb1 /mnt/sdb1
root@root:~# cd /mnt/sdb1
root@root:/mnt/sdb1# rsync -r /cdrom/* .

root@root:/mnt/sdb1# syslinux /dev/sdb1

root@root:/mnt/sdb1# cp -r isolinux syslinux

root@root:/mnt/sdb1# cp syslinux/isolinux.cfg syslinux/syslinux.cfg

root@root:/mnt/sdb1# cp syslinux/isolinux.bin syslinux/syslinux.bin
root@root:/mnt/sdb1#

I also plan on doing another post (probably later today or tomorrow) detailing the method of making a persistent usb install.

Saturday, February 25, 2012

Prepare kernel sources on BT5R2

To be able to install most software to your own install of BackTrack 5 R2 that does not come from the repo's you will need to prepare the kernel sources.

This is very simple to do and will only take you a couple of minutes.

At the terminal, issue the following commands:

apt-get update
apt-get install linux-source
prepare-kernel-sources
cd /usr/src/linux
cp -rf include/generated/* include/linux/
cd /

And that's it.

Other than resolving any dependency requirements of the software you wish to install, you are now good to go.

Install nvidia drivers on BT5R2

In order to install the nvidia graphics drivers on BT5R2 you need to enter the following into a terminal prompt while X is not running.

This process is slightly longer than in BT5 because of nouveau drivers being loaded.


First you need to disable the nouveau drivers, which can be done thus:


nano /etc/modprobe.d/blacklist.conf


Now add the following 6 lines at the end


blacklist vga16fb
blacklist nouveau
blacklist nouveaufb
blacklist rivafb
blacklist nvidiafb
blacklist rivatv



Save


update-initramfs -u


Finally reboot and nouveau drivers will now be disabled.


Then you need to prepare the kernel sources if you have not done so already by:

Please remember to copy and paste these commands into your terminal prompt as formatting can make long lines wrap over into two or more lines !

apt-get update
apt-get install linux-source
prepare-kernel-sources
cd /usr/src/linux
cp -rf include/generated/* include/linux/
cd /


Then for 32bit BT5: following the prompts

wget http://us.download.nvidia.com/XFree86/Linux-x86/295.20/NVIDIA-Linux-x86-295.20.run
chmod +x NVIDIA-Linux-x86-295.20.run
./NVIDIA-Linux-x86-295.20.run


Or for 64bit BT5: following the prompts

wget http://us.download.nvidia.com/XFree86/Linux-x86_64/295.20/NVIDIA-Linux-x86_64-295.20.run
chmod +x NVIDIA-Linux-x86_64-295.20.run
./NVIDIA-Linux-x86_64-295.20.run


And that's it, you should now be able to restart, and startx enjoying the full glory of BackTrack at the full resolution offered by your graphics card and monitor.