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 this with a old glibc while the network is down or with a null parameter will result in a segmentation fault. In order to see what libraries your executable is dependent upon use ldd executatble name. In order to make your executatable use an updated version of glibc, you might need to update your library path via export LD_LIBRARY_PATH=/lib/686


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 old scp commands you used recently. Execute anyone of them bny typing ! command# . Incidently !! repeats the last command.

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 isolinux boot loader as well as the kernel and the initrd) into it:
mkdir /tmp/CDroot
cp /usr/share/syslinux/isolinux.bin /tmp/CDroot/
cp /boot/vmlinuz /tmp/CDroot/linux
cp /boot/initrd /tmp/CDroot

Create the boot loader configuration file /tmp/CDroot/isolinux.cfg with your preferred editor. Enter the following content:
LABEL linux
KERNEL linux
APPEND initrd=initrd root=/dev/hdXY [boot parameter]

Enter your root partition for the parameter root=/dev/hdXY. It is listed in the file /etc/fstab. Enter additional options for the setting [boot parameter], which should be used during booting. The configuration files could, for example, look like this:
LABEL linux
KERNEL linux
APPEND initrd=initrd root=/dev/hda7 hdd=ide-scsi

The following command (entered at a command prompt) then creates an ISO-9660 file system for the CD.

mkisofs -r -o /tmp/bootcd.iso -b isolinux/isolinux.bin -c isolinux/ -no-emul-boot -boot-load-size 4 -boot-info-table /tmp/bootcd

-r is important to be case sensitive

The file /tmp/bootcd.iso can be written to CD after that with either graphical CD writing applications, like K3b

This page is powered by Blogger. Isn't yours?