Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, July 2, 2017

I/O error, dev fd0, sector 0

This happens in my Ubuntu VM and the log usually have these 2 messages

[  148.462686] blk_update_request: I/O error, dev fd0, sector 0
[  148.462735] floppy: error -5 while reading block 0

To get rid of those messages:

echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf

sudo rmmod floppy

sudo update-initramfs -u

After reboot, you can verify that floppy module (lsmod | grep floppy) no longer get loaded automatically and there is no such messages in the log anymore.

Monday, June 12, 2017

Ubuntu download deb packages without installing

To download without installaing, just use the following command

apt-get -d install package

Once done, you can go /var/cache/apt/archives to retrieve the packages you had downloaded.

Friday, August 2, 2013

Install Adaptec Storage Manager (ASM) For Adaptec 2420SA Card On Ubuntu System

Adaptec 2420SA is actually quite an old card and therefore when you check this link, there is no available package for Ubuntu system (i not sure whether latest ASM can use for old Adaptec card or not, if you have the information, please comment below).

So i downloaded the rpm package into my Ubuntu system and use alien to convert it into deb package.

sudo alien asm_linux_x64_v5_20_17414.rpm

sudo dpkg -i storman_5.20-1_amd64.deb

After finish installing, i change the arcconf permission to make it executable.
sudo chmod 744 arcconf

To check the card information, i run the following command
sudo /usr/StorMan/arcconf getconfig 1

If you encounter the following error when run the arrconf command, you need to install libstdc++5
/usr/StorMan/arcconf: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Install libstdc++5
sudo apt-get install libstdc++5

Thursday, November 22, 2012

Package 'make' has no installation candidate

If you encounter the message stated on the title post when you try to install make on your Ubuntu server as shown below:

abc@abc:/etc/apt$ sudo apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package make is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'make' has no installation candidate

There is a possibility that your source is down and this is what happen to me when i do sudo apt-get update
As you can see there are a lot of "Gateway Timeout" message. So to solve this, i have to manually change the source from sg.archive.ubuntu.com to source like us.archive.ubuntu.com.

Open this file, /etc/apt/sources.list and replace all the sg.archive.ubuntu.com to us.archive.ubuntu.com. After that, do the sudo apt-get update and if the source is workable, you should not see any error messages as shown below:
And now i can install make without problem
abc@abc:/etc/apt$ sudo apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  make-doc
The following NEW packages will be installed:
  make
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 kB of archives.
After this operation, 324 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main make amd64 3.81-8.1ubuntu1.1 [119 kB]
Fetched 119 kB in 3s (36.6 kB/s)
Selecting previously unselected package make.
(Reading database ... 84546 files and directories currently installed.)
Unpacking make (from .../make_3.81-8.1ubuntu1.1_amd64.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8.1ubuntu1.1) ...

Thursday, October 27, 2011

Ubuntu: Running Dynamo Executable: No such file or directory

Symptom:

root@testMachine:~/iometer-2006_07_27.linux.i386-bin/src# ls
dynamo  iomtr_kstat  scripts
root@testMachine:~/iometer-2006_07_27.linux.i386-bin/src# ./dynamo
-bash: ./dynamo: No such file or directory

For this case, you need to make sure you have ia32-libs installed. To check whether the package is installed, run:

root@testMachine:/# dpkg -l ia32-libs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  ia32-libs      20090808ubuntu ia32 shared libraries for use on amd64 and i

if it shows "un", meaning ia32-libs is not installed. If is installed, it will show "ii".

Install ia32-libs by

apt-get install ia32-libs

* Please note that, for simplicity, i using root account to run the above command, you might need to add sudo in front of the above commands if you are not using root account.

Thursday, October 13, 2011

dpkg : status database area is locked by another process while trying to install

This will happen if you accidentally kill the apt-get process and dpkg become orphan process. To solve this problem you can either

Reboot your server or do the following:

sudo rm /var/lib/dpkg/lock

sudo dpkg --configure -a

Wednesday, September 14, 2011

How to change boot order for Ubuntu (>9.10)

1. cat /boot/grub/grub.cfg
see the order of the wanted kernel. Starts from 0.

Example:
...
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-30-server' --class ubuntu --class gnu-linux
# this is 0
--class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 71119ab7-e93f-49a9-80f1-efc11398c954
linux /boot/vmlinuz-2.6.35-30-server root=UUID=71119ab7-e93f-49a9-80f1
-efc11398c954 ro quiet
initrd /boot/initrd.img-2.6.35-30-server
}

# this is 1
menuentry 'Ubuntu, with Linux 2.6.35-30-server (recovery mode)' --class ubuntu -
-class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 71119ab7-e93f-49a9-80f1-efc11398c954
echo 'Loading Linux 2.6.35-30-server ...'
linux /boot/vmlinuz-2.6.35-30-server root=UUID=71119ab7-e93f-49a9-80f1
-efc11398c954 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-server
}

# this is 2
menuentry 'Ubuntu, with Linux 2.6.32-28-server' --class ubuntu --class gnu-linux
--class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 71119ab7-e93f-49a9-80f1-efc11398c954
linux /boot/vmlinuz-2.6.32-28-server root=UUID=71119ab7-e93f-49a9-80f1
-efc11398c954 ro quiet
initrd /boot/initrd.img-2.6.32-28-server
}

# this is 3
menuentry 'Ubuntu, with Linux 2.6.32-28-server (recovery mode)' --class ubuntu -
-class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 71119ab7-e93f-49a9-80f1-efc11398c954
echo 'Loading Linux 2.6.32-28-server ...'
linux /boot/vmlinuz-2.6.32-28-server root=UUID=71119ab7-e93f-49a9-80f1
-efc11398c954 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-28-server
}
### END /etc/grub.d/10_linux ###
...

2. vi /etc/default/grub
change GRUB_DEFAULT=0 value to wanted kernel

Example:

If we want to boot to 'Ubuntu, with Linux 2.6.32-28-server' we should set 2

3. run update-grub to update

4. reboot and check with uname -r to see if correct kernel selected.