Initramfs Prompt When Ubuntu Boots

Today I set up a new Ubuntu 10.04 Server on a Dell PowerEdge T110. The installation went smoothly. However, when booting for the first time, after waiting for some time, the system would drop me into a busybox shell with not much to see. Having seen this problem often, I thought that the /dev/sda1 device would not be there because of missing kernel modules.

You can see the output in the picture on the right. 

However, when checking /dev, I surely found /dev/sda1. After some poking around I found out that the integrated RAID controller needs some more time to warm up and the kernel didn’t want to wait for the disks to come available through the RAID controller any longer.

So, the solution is to add the ‘rootdelay’ parameter to the kernel option into the /boot/grub/grub.cfg

This instructs the kernel to wait for 60 seconds before trying to enter the init process. This fixed the problem and I was able to boot into the newly installed system.

In order to make this change appear in all grub entries when Ubuntu does a kernel upgrade, you have to edit the file /etc/default/grub and also add that parameter to the GRUB_CMDLINE_LINUX variable.

After that, run ‘update-grub’ and you can double-check that your changes appear in /etc/grub/grub.cfg.

Ten useful uses for FIND command

These are 10 useful uses of the command find in Linux, they are not the most useful, just some useful for me, I will use $HOME as the path for every example but you may use any other.

    1. Find empty directories

      This will find empty directories in your home directory.

    1. Find empty files

      This will finde empty common files in your home directory.

    1. Find a file with a specific name

      This will find files with a given name in any child directory of your home.

    1. Find a file with a specific extension

      This find files wit the given extension all along your home, an example to find jpg files is:

    1. Find files with specific permissions

      This will find files with the given permission bits in your home, as an example we can look for .txt files that can have 644 bits on.

    1. Find files with some given permissions and no matter the rest

      This will find files in your home that have match with the given permissions but that can also have some others, as an example:

      This will find the files with 644 but also some with 664 or 777 or anything “greater” than 644.

Output comparison

      Let’s see some output comparison for this to be better understood.

      As you may see in the first example we do not have the file post as it has 664 permissions, so do not exactly match 644, but on the second output, it is listed as it has “greater” permissions than 644.

    1. Find files of given sizes

      This will output the files of a given block size, as an example we can see:

      And the output is:

      Now let’s see this other:

find $HOME -name ‘*.txt’ -size 5k -exec ls -l {} \;

      And the output is:

      Now if you divide each file size by 1024 (1k) you will see that the first output is always lower than 4096 (4k) and upper 3072 (3k), on the second output you have it between 4096 (4k) and 5120 (5k).

    1. Find files with a give name and any extension

      This will output the files of any given name but with any extension

    1. Find files modified in the latest blocks of 24 hours

      Where n is: 0 for the last 24 hours 1 for the last 48 hours 2 for the last 72 hours and so on.

    1. Find files that was accessed in the latests blocks of 24 hours

    Where n is: 0 for the last 24 hours 1 for the last 48 hours 2 for the last 72 hours and so on.

You may also would like to read: http://www.go2linux.org/find-Linux-command-to-find-files-on-your-disk

Ubuntu Linux: Creating ethernet alias for eth0 network device

Assuming that your eth0 IP is 192.168.1.10 and you would like to create an alias eth0:0 with IP 192.168.1.11. Type the following command:

OR

Verify that alias is up and running using following two command(s):

Permanent configuration

Your ethernet configuration is located in a file called /etc/network/interfaces. If you reboot system you will lost your alias. To make it permanent you need to add it network configuration file:

OR

Append the following configuration:

Save the file and restart system or restart the network:

Please note that you can also use graphical tools located at System > Administration > Networking menu. Or use the following GUI tool to setup aliases, hostname, dns settings etc:

If you want more network aliases, use eth0:1, eth0:2, eth0:N (max upto 254).

CentOS / Red Hat / Fedora Linux Turn off Beep / Bell Terminal Sound

Remove pcspkr driver

Login as the root user

Type the following command to unload the driver:

Sample output:

/etc/modprobe.d/blacklist file

Open /etc/modprobe.d/blacklist file:

You need to append a module here prevents the hotplug scripts from loading it:
blacklist pcspkr

Save and close the file. Alternatively, you can unload driver by appending
following line into /etc/rc.d/rc.local:

Append following line:

/sbin/rmmod pcspkr

Save and close the file. There are other ways to turn off beep sound under Linux, if you don’t have root level access.