set chmod for folders only

Recursively chmod folders/directories only

find . -type d -exec chmod 755 {} \;

This will recursively search directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

Similarly, the following will chmod all files only (and ignore the folders/directories):

find . -type f -exec chmod 644 {} \;


NIC problem in Ubuntu 8.10 Installation

Being a newbie in Linux is pretty challanging. So far I've managed to install 3 webservers and they still running pretty well if I may add :-)
Last week I have my first experience to troubleshoot NIC problem in Ubuntu 8.10 Server installation on my old computer. Its an Intel PIII 800 with 384 RAM, pretty old PC, heh?!

My intention was to build a gateway with Firewall, DNS and DHCP server inside. I'm aware there are many Linux distro that already build to meet my purpose, but since I am a linux newbie, I would like to learn from the basic.

After successfully installed the Ubuntu 8.10 server 2 weeks ago, I left the server untouch for a couple of days becoz of other more urgent matter. When I got back to config the server I realized that the NIC is not functioning. I checked the cable ... It was OK, then check the ifconfig output, it seems OK too, there is eth0 in the list. My thought was maybe the driver was not the right one, then I googling on how to reinstall the NIC driver. I tried several solutions but the problem consist. After some restart, I catch a boot problem concerning the ACPI driver, then my googling change to find out about those ACPI & IRQ problems.

It turned out I have to modified the grub boot loader to disable the ACPI on the Kernel

Change Boot Options Permanently On An Existing Installation
These instructions only apply to systems that use Grub - Ubuntu's default boot loader.

In order to permanently change boot options, you'll need to edit the /boot/grub/menu.lst file.

Before begin, back up the file with a copy that has the current date and time appended to its name:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.`date +~%b-%d-%Y~%T`

If the system or /boot partition has changed and the user suspects the partition is not correctly identified by Grub, run this command to obtain a list of partition UUIDs. Note the system or /boot UUID and compare it to the entry on the kernel's UUID line once the kernel menu is opened:

sudo blkid

Then edit the menu.lst file:

sudo nano /boot/grub/menu.lst

(You can edit this file with any text editor, doesn't have to be nano) Use your arrow keys to move your cursor to the line that starts with "# kopt=".

Add or subtract whichever boot option(s) you'd like to add to the end of the boot command, with a space between each one. (See Kernel Options below)

Save the file.

For nano:
Press the Ctrl and o (this is the letter o) keys at the same time. Verify that the filename is correct (edit the filename if it's not) and press the ENTER key to save the file.

Press the Ctrl and x keys at the same time to exit the editor.

Type this command to update the menu entries in the system:

sudo update-grub

The command may present a message indicating that a new configuration file available: "Do you want to keep the existing one for menu.lst". Select Use Package Version. If you select to keep the user modified version, your changes to kopt won't be applied to existing boot options.

Note: If you edit the menu entries directly from Grub and not with a text editor your changes will disappear the next time update-grub is run, for instance or when the kernel or grub packages are updated.

Kernel Options
Note: These options are used by the kernel, and will apply to any installation at any time. The file "Documentation/kernel-parameters.txt" in the relevant linux-source package provides more information.


Set your framebuffer resolution to VESA mode xxx. Check here for a list of possible modes.

acpi=off OR noacpi
This parameter disables the whole ACPI system. This may prove very useful, for example, if your computer does not support ACPI or if you think the ACPI implementation might cause some problems (for instance random reboots or system lockups).

Activates the ACPI system even if your computer BIOS date is older than 2000. This parameter overwrites acpi=off and can also be used with current hardware if the ACPI support is not activated despite apm=off.

pci=noacpi OR acpi=noirq
These parameters disable the PCI IRQ routing

This parameter activates the PCI IRQ routing

ACPI is allowed to use PIC interrupts to minimize the common use of IRQs.

ACPI is not allowed to use PIC interrupts.

Deactivates the ACPI system almost completely; only the components required for the boot process will be used.

Impact Deactivates the ACPI system almost completely; only the components required for hyper threading will be used.

Disable the "Advanced Programmable Interrupt Controller (APIC)".

Disable the "local APIC".

apm=off OR noapm
Disable the Advanced Power Management.

Changes the way the kernel handles interrupt calls (set it to polling). Can be useful in case of hardware interrupt issues.

There ... after restart my NIC work like it should be, I can run an update
Next step, configure and install softwares ... :-)