2017年3月8日星期三

BOOT Repair for Linux

Boot Ubuntu live CD

Start a terminal and 
 
To add boot-repair to the repository
sudo add-apt-repository ppa:yannubuntu/boot-repair

To Update your repository
sudo apt-get update

To install boot-repair
sudo apt-get install -y boot-repair
Once Installation complete run boot-repair on terminal by typing the following command.
boot-repair

2016年9月28日星期三

SME Linux 8 Backup terminated: pre-backup failed - status: 256

After workstation restore full system and all function and data normal but 
the workstation backup cannot run and have this message

Backup terminated: pre-backup failed - status: 256


The ldap may be down Please use the command below to fix.



sv d /service/ldap
rm -f /var/lib/ldap/__db.00{1,2,3,4,5,6} /var/lib/ldap/alock
rm -f /var/run/openldap/slapd.{pid,args}
sv u /service/ldap

Good luck!

2016年9月22日星期四

PresentationFontCache.exe uses 50%+ of the CPU

Delete all Font*.dat in C:\Windows\ServiceProfiles\LocalService\AppData\Local\  and reboot it.

Good Luck

2016年6月29日星期三

Read mutli session DVD Disc via linux



mount /dev/sr0 /media/dvd -o session=0

if you want to see the session try this command

cdrdao disk-info --device /dev/sr0

2016年5月28日星期六

how to change linux software raid md device name and lvm volume group name

     
 Sometimes you want to move a harddisk or a raid set to other linux machine. But you will find that the raid and lvm setting will have error. It prompt you that the md name and/or lvm name encounter problem due to same name.(normally it caused by the default installation.) You can change the md name and lvm name as below:


connect the old harddisk or raid set in a computer which is no other harddisk and  raid set.

--------------------------------------
change md name


start ubuntu live cd

apt-get install lvm2
if not yet installedin your ubuntu version

apt-get install mdadm
if not yet installedin your ubuntu version

Start with (assume your raid set is md127)

mdadm --detail /dev/md127

or if just only have incomplete raid set like one harddisk in raid 1.
(assume your harddisk partition is sda1)
mdadm --examine /dev/sda1

Version : 0.90

The first line or second line shows the metadata version used by this array. Now, stop the array:

mdadm --stop /dev/md127
mdadm --remove /dev/md127

And assemble it again using the new name. (metadata version is 1.0 or higher, use this:)

mdadm --assemble /dev/md3 /dev/sd[abcdefghijk]1 --update=name

For old metadata structure (most likely 0.90, as it allows for kernel auto-assembly), use this:

mdadm --assemble /dev/md3 --update=super-minor /dev/sd[abcdefghijk]1

-----------------------------------------
change vg name

boot linux rescue or ubuntu live cd/usb

in command prompt or terminal key in

lvm vgscan
lvm lvscan
lvm vgchange -a y
lvm pvscan
lvm lvscan

The last two commands should list your volume group(s) and logical volume(s). We use vgrename to change the name.

lvm vgrename VolGroup00 to-what-you-want-to-be
                   


2016年4月28日星期四

Linux, linux box (NAS), cannot be login by win98

use the steps below to fix it.


1.Add these three lines to the [globals] section of your smb.conf:

lanman auth = Yes
client lanman auth = Yes
client plaintext auth = Yes

2.Restart the Samba server

3.Re-input passwords for every Win9x user:
smbpasswd -a username

4.Have every Win9x user log out and then log in again.

If you want to know why then you can visit the link below:

http://www.troubleshooters.com/linux/win9x_samba.htm


2016年4月5日星期二

Reset all USB Device in Linux

You can try the script below:

reference from

http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/

#!/bin/bash

# USB drivers
rmmod xhci_pci
rmmod ehci_pci

# uncomment if you have firewire
#rmmod ohci_pci

modprobe xhci_pci
modprobe ehci_pci

# uncomment if you have firewire
#modprobe ohci_pci

------------------------------------------------------------------------------------

I used the one on SME Linux Server

#!/bin/bash

# Stop USB Drivers
rmmod uhci_hcd
rmmod ehci_hcd

# Start USB Drivers
modprobe xhci_hcd
modprobe ehci_hcd