Posts

Showing posts with the label Debian

Add new hard drive in Debian

Its unfortunely that my disk array (RAID 5 with 4 hard drive) degraded because of a hard drive failed. For data safty issue, I have to back up all data and rebuild it again! After rebuilt, I have to re-mount it again as new hard drive into my system. Here is the procedure for notes. At first, make sure the disk is the one I want to re-mount. $ sudo fdisk -l /dev/sdc Disk /dev/sdc: 1500.0 GB, 1499999502336 bytes 64 heads, 32 sectors/track, 1430511 cylinders, total 2929686528 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000  Disk /dev/sdc doesn't contain a valid partition table Its lucky I found it! And I'll create a new partition on it. $sudo cfdisk /dev/sdc Just follow those steps below... New -> Primary -> specify size in MB Write Quit After that, I can see following message when success! Disk has been changed.  WARNING: If you have created o...

How to mount LVM partition in Debian/Ubuntu

How to mount LVM partition that just appended into system? Just follow below steps and get it! Install package:lvm2 if you did not enable it. $ sudo apt-get install lvm2 Load the necessary module: dm-mod. $ sudo modprobe dm-mod Scan LVM volumes in your system. $ sudo vgscan or $ sudo pvs Activate the LVM volume. $ sudo vgchange -a y [LVM Group] Find the logical volume. $ sudo lvs or $ sudo lvdisplay /dev/[LVM_group_name] Mount the logical volume you want access it. $ sudo mount /dev/mapper/[LVM_group_name]-[LVM-logical-volume-name] /mnt -o ro,user You can access the LVM partition now in /mnt. Enjoy it. :-)

PHP: Unable to load dynamic library suhosin.so in Debian sid

When you install php5 in Debian sid, you'll get following warning after updating. PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ suhosin.so' - /usr/lib/php5/20100525/ suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0 And you will get a punch of   annoying  system mail. Orz After searching on google, I got the answer from Debian bug mailing list. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=668739 The problem is the suhosin was obsoleted in Debian sid and it will be remove after system upgrading. But its configuration still exist in /etc/php5/conf.d. shawn:/usr/lib/php5$ dpkg --list | grep php5 | more ii  libapache2-mod-php5                5.4.4-14                  amd64        server-side, HTML-embedded scripting language (Apache 2 module) ii  php5         ...

Use offical jdk/jre in Debian Wheezy and later version

After Wheezy, sun-jdk and sun-jre won't be available in non-free repository. But there are still lots of applications won't be work without it. Orz Well, we still have a solution to overcome this condition from Debian. Follow below steps and get it! Install java-package. Download the latest jdk/jre binary tar ball for linux. fakeroot make-jpkg ./the_tar_ball_you_downloaded. dpkg -i the_deb_package_you_just_build_it. sudo update-alternatives --auto java. And then you have oracle-jdk/oracle-jre now! :-)

Shrink qcow2 file with Windows guest

Remove unnecessary file and empty the recycle bin in windows guest. De-fragment your disk in windows guest. You may do it several times for good compact status. Free unused disk space in windows guest. sdelete -c c: Convert the disk image itself. qemu-img convert -c -O qcow2 win.qcow2 win-shrinked.qcow2

Convert Debian amd64 to multi-arch

Do following steps... sudo dpkg --add-architecture i386 sudo sed -i 's/deb\ /deb\ [arch=amd64,i386]\ /g' /etc/apt/sources.list sudo apt-get clean; sudo apt-get autoclean; sudo apt-get update After that you can install the packages that only support i386 such like skype. Enjoy it!

Restart networking service on Debian

Most Debian user should run into this problem before they find out a good way to restart networking service. Debian deprecated the restart option of /etc/init.d/networking script for security issue. Users will get following warning when they do restart: Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning). And their network won't be restart finally. How to restart the networking service? There are several ways to achieve that. (Login as root or sudo it) /etc/init.d/networking stop && /etc/init.d/networking start (You'd better run the command on console than remote it) inovke-rc.d networking restart Hope those helpful for you and me. :-)

Debian can not restart/reboot properly on Acer Aspire One D257

You have to make some changes with following steps $ sudo vim /etc/default/grub Replace GRUB_CMD_LINUX="" with GRUB_CMD_LINUX="reboot=eif" sudo update-grub You may restart your aod257 and it works properly now.

equinox-theme installation on Ubuntu/Debian

Please follow steps below: Find equinox project on launchpad.net, then you can see the ppa path in the page. Install Ubuntu sudo add-apt-repository ppa:tiheum/equinox Debian sudo vim /etc/apt/sources.list Add a line: deb http://ppa.launchpad.net/tiheum/equinox/ubuntu lucid main sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4631BBEA sudo apt-get update sudo apt-get install equinox-theme faenza-icon-theme Open preference/appearence and change theme to Equinox Evolution Then, you can enjoy it!

Rename folders from Chinese to English in Ubuntu/Debian

$ export LANG=en_US $ xdg-user-dirs-gtk-update A dialog will popup and change it. Non-empty folders will be keep. Move all files to new folders named in English from original folders. $ export LANG=zh_TW.UTF-8

Dictionary files installation for stardict

After stardict installed, you may... Get dictionary files from sourceforge.net http://stardict.sourceforge.net/Dictionaries_zh_TW.php Extract files to dedicated path /usr/share/stardict/dic Restart stardict That works on Debian/Ubuntu, Enjoy it!

How to diable kernel module in Debian

OS: Debian 5 I want to disable module i2o_core to prevent unexpected exception/error. Create a conf file for i2o_core in /etc/modprob.d Edit its content with 'blacklist i2o_core' and then save it run 'depmod -ae' as root run 'update-initramfs -u' to re-create initrd After rebooting, you won't see i2o_core via 'lsmod'. You can reference to this wiki page .

Pure-FTPd installation on Debian

Install Pure-FTPd with following steps: # aptitude select and install pure-ftpd quit aptitude after install finished Add or modify or remove configurations in /etc/pure-ftpd/conf restart the daemon after configurations changed What items I've chnaged are... UnixAuthentication -> yes DontResolve -> yes ChrootEveryone -> yes

Upgrade Your Debian to testing after System installed

Do following steps to upgrade your system when you first time login: Edit your /etc/apt/sources.lst Replace lenny with testing (besides violatile package) Save & exit # apt-get autoclean # apt-get clean # apt-get update # apt-get -t testing upgrade # apt-get -t testing dist-upgrade After that, you're in testing environment now.

Install Grub/Lilo in /dev/i2o/hda1 failed with Debian

OS Debian GNU/Linux 5 RAID Card Adaptec ASR2100S with Raid 5 Problem Installation failed message will show while installing Grub as boot loader. Solution Do not stop your installation!! And try following steps to install boot loader during installation: Enter another console with short cut: alt + Fn Press enter to enable console > chroot /target > aptitude update packages db install grub exit aptitude > /usr/sbin/grub-install /dev/i2o/hda > update-grub > exit continue to finish others steps with "continue without boot loader" option If its failed after above steps, that might be some steps wrong while you processing it. Don't worry! You will see Grub prompt after reboot, and try following steps: grub> root (hd0,0) grub> setup (hd0) grub> kernel /vmlinuz root=/dev/i2o/hda1 ro grub> initrd /initrd.img grub> boot Then, you will boot into your system now. Caution!! It's not the end! You have to do following steps again to fix your problem...