Hacking Linux Kernel

My Experiences with Linux Kernel Hacks

Tuesday, February 02, 2010

Modifying Bootup Scripts in initrd

›
Unpack it -------- gunzip -c /minirt | cpio -idm OR >>mv minirt minirt.gz >>gzip -d minirt.gz >>cpio -i modify initrc or i...
177 comments:
Saturday, June 27, 2009

Embedding Type 1 Fonts in Latex Generated PDFs

›
modify file /usr/share/gs-afpl/8.14/lib/gs_pdfwr.ps and change lines /.standardfonts [ /Courier /Courier-Bold /Courier-Oblique /Courier-Bold...
7 comments:
Tuesday, May 29, 2007

SELinux Tutorial

›
I have found very few resources for SELinux on the web, which I believe is a idea tool box for the security engineer or for that matter any ...
77 comments:
Monday, January 08, 2007

Setting up a Xen DMZ using NAT and IPTables Filtering

›
Make sure you are using a version of Dom0 with kernel support for IP Tables. See my previous post on compiling Xen from source. IP Tables op...
6 comments:
Friday, January 05, 2007

Proxy settings for apt-get and wget

›
export http_proxy="http://[address]:[port]/"
1 comment:
Tuesday, December 12, 2006

What Linux Drivers are being used?

›
While recompiling a custom kernel depmod -a creates a "Makefile"-like dependency file, based on the symbols it finds in the set ...
1 comment:
Friday, December 08, 2006

Total Ram Memory Available

›
free -m
Tuesday, November 21, 2006

Setting up your own SMTP and POP3 Mail Server

›
I used SendMail for SMTP and Qpopper for POP3. Download and install the sendmail package if you don't have it rpm -qa | grep -i sendmail...
12 comments:
Friday, November 17, 2006

Checking running Kernel support for a module

›
For instance this example checks for netfilter support zgrep -i netfilter /proc/config.gz CONFIG_NETFILTER=y
Thursday, November 16, 2006

Installing Xen 3.0.3 from source on Ubuntu Edgy

›
A step by step tutirial for people getting the most out of their PC with Xen virtualization Getting the latest version of Xen mkdir /home/xe...
47 comments:
Wednesday, November 15, 2006

Linux Windows Dual Boot without nuking existing MBR

›
Want to try out a Linux Distribution on your Windows PC without nuking your Windows MBR? Here is how you go about it. Assuming you partition...
1 comment:
Tuesday, November 14, 2006

Resolving stack_chk_fail Error

›
Today I moved to the new version of gcc 4.1.2. When trying to compile Xen, it kept giving me a 'stack_chk_fail' symbol not found err...
5 comments:
Friday, November 10, 2006

Root Permissions for Linux Live CD

›
Installing Ubuntu 6.10. Open up a terminal and set your root password first using sudo passwd root
Tuesday, November 07, 2006

Detailed Recursive Directory Listing

›
Try using the find command find . -maxdepth 4 rather than the overused ls
Thursday, November 02, 2006

Redirect stdout to file and screen simultaneously

›
./a.out | tee trace.txt
Thursday, October 26, 2006

Search, Process, Replace strings in a File using Perl

›
I wanted some one-line loop to read a log file containing serial numbers line-by-line, search for a serial using some regular expression, re...
1 comment:
Tuesday, October 03, 2006

Easy Error Logging in Perl via Log4Perl

›
Need a quick and dirty tutorial on enabling loggers in your scripts? Here you go. Download and Install Log-Log4perl-1.06 from CPAN (May pro...
5 comments:
Friday, September 29, 2006

Setting up CVS client in Linux

›
This assumes that you have an account zanwar (set by your cvs admin) and cvs repository Project/Development on the CVS host cvs.cs.uiuc >...
1 comment:

Red Hat Network Setup

›
Personally I think Red Hat's network configuration utilities in no where compare to Knoppix or Ubunto for instance. Setting up networkin...
Monday, September 18, 2006

Linux Code Coverage profiling Tool

›
Compile cpp file with debug options g++ -ggdb -fprofile-arcs -ftest-coverage -o hello Hello.cpp Try Running it ./hello Run Code Coverage to...
7 comments:
Friday, August 25, 2006

Loading Dynamic Libraries

›
Some Linux API require the use of updated libraries. A common example is gethostbename command that is not thread safe. Attempting to run t...
16 comments:

Getting Linux Command History

›
Tired of remembering and repeating that long copy command again and again. Use history | grep "scp" and you will get a list of ol...
Wednesday, August 16, 2006

Creating a isoLinux Bootable CD

›
Open a root shell. The following commands create a temporary directory and copy the files required for the booting of the Linux system (the ...
13 comments:
Friday, July 14, 2006

Samba mounting Encrypted Linux file from Windows host in Vmware

›
vi /etc/samba/smb.conf [encrypted] browseable = yes comment = Encrypted FS on USB writable = yes locking = no path = /encrypt...
1 comment:
Thursday, July 13, 2006

Creating a encrypted patition visible from both windows and linux

›
Download and install uuid-dev, e2fsck and cryptsetup. dd if=/dev/zero of=myencryptedfile.enc bs=1M count=20 losetup /dev/loop2 myencryptedfi...
4 comments:
Wednesday, June 28, 2006

Modifying the kernel's make install initrd image

›
# Login as root # mkdir myinitrd # cd myinitrd # gzip -dc # edit init do what you want at the top of the script. Usually custom scripts adde...
4 comments:
Tuesday, June 27, 2006

Single Writer Multiple Readers using Anonymous Pipes

›
Use the tee command. Here is an example where I use pipes and the linux cut/paste command to implement a windows like "scanning wireles...
1 comment:
Saturday, June 10, 2006

Creating symbolic links for bootup scripts

›
If you want to startup a certain service e.g. vmware in runlevel 4 during system bootup. cd /etc/rc4.d ln -s ../init.d/vmware S90vmware The ...
2 comments:
Friday, June 09, 2006

Coping folders between Machines

›
Make sure you ssh/scp deamon is running. /etc/init.d/ssh start Regenerate host keys for ssh if necessary ssh-keygen -t dsa -f /etc/ssh/ssh_h...
1 comment:

Linux Managing multiple Network interfaces

›
If you have multiple network interfaces on your machine e.g. a wireless (check using iwconfig) and wired. i.e. eth0 and eth1. Linux will end...
10 comments:
Wednesday, June 07, 2006

Setting up Knoppix file system on a hard drive

›
A Knoppix installation on you hard drive will use unionfs by default. You can check to see which folders are part of the unionfs tree by usi...
16 comments:
Tuesday, June 06, 2006

Setting up and Formatting encrypted Partitions

›
losetup -e AES128 -T /dev/loop7 /dev/sda7 format mke2fs -j /dev/loop7
Monday, June 05, 2006

changing & formatting partitions

›
I prefer using cfdisk over fdisk because it is menu driven. Usually creating a partition table will involve a hda1 primary boot partition fo...
Friday, June 02, 2006

Disk Space Remaining

›
df -h and du -hsc

Mounting a compressed image

›
Needed when mounting a compressed KNOPPIX file found in the linux boot partition. For instance you need to recover some USB modules to place...
1 comment:
Home
View web version

About Me

zahid
View my complete profile
Powered by Blogger.