Cyber memos for my personal knowledge.

2008-09-23

Debian 4.0 R4a + JMB38x can not find out my MSP cards

In my Debian system (Debain 4.0 R4a w/ kernel 2.6.24-etchnhalf.1-686), I have a JMicron multimedia card reader (JMB38x which supports MMC/xD/MS). After I installed JMircon's driver I found my Debian can not auto detect the MSP cards but xD cards are OK.

The first point I checked is my udev process. I think the hotplug function is abnormal for MSP cards. Therefore I modify the following 2 file under /etc/udev: hotplug.rules and permissions.rules.

For /etc/udev/hotplug.rules just modify it as following pic w/ root permission:


For /etc/udev/permissions.rules also modify it as following pic w/ root permission:


Save them and reboot machine, now I can see my MSP cards in my system as /dev/mspblk0 and /dev/mspblk0p1 device files because the mspro_block module was successfully load-up by udev.

Of course, I need to mount it manully to access MSP cards such as $ sudo mount -t auto -o rw /dev/mspblk0p1 /media/tmpdisk.
That is OK for me 'cause I don't need auto-mount. ;-)

2008-09-15

Looking for FLV player? Check this out


Basically, there are so many flv players in the world.
I would like to recommand the following one: Wimpy Desktop FLV Player.

Why this one? Because of:
1. It is free.
2. The flv video screen size can be adjusted.

http://www.wimpyplayer.com/products/wimpy_standalone_flv_player.html

You can directly drag and drog a file to player to play. Or you can click the folder icon to open a file in your computer (flv, swf...etc). Click on the earth icon can let you connect to a file to play which was located in somewhere on this planet!

2008-09-12

Usplash sometimes caused a black screen

My Ubuntu is 8.04.1 box with kernel 2.6.24-19-lpia.
After Usplash screen sometimes I got a black screen and I can not do anything but poweroff..
This happened in MP units with Intel Poulsbo platform but not found in PVT units..it's strange!
The fail rate in production line is around 50%.

I delete the kernel parameter "splash" and everything goes fine.
End user will see the very ugly verbose text and maybe they will feel nervious with it.
But anyway, they can use this box....

I think this bug also related to Poulsbo gfx driver in Linux and X.
I have tried a patch on launchpad but doesn't worked for me.
https://bugs.launchpad.net/ubuntu/+source/usplash/+bug/81474

2008-09-07

RHAS4+PXE+DRBL+CloneZilla setup

This is a memo of my experience to setup a DRBL+CloneZilla server.
I use offline intallation method.

(A). Base OS and DRBL installation
Linux server installation (RHAS4 for example):
1. Use default installation. DISABLE SELINUX and firewall (iptable).
2. If necessary, use REISERFS, otherwise use EXT2/EXT3.
3. Don’t install office, multimedia, game, video/sound…etc.
4. Manually install some missing RPMs: perl-Digest-SHA1, dhcp, ypserv, tftp-server for RHAS4 (with root permission).

$ rpm –ivh perl-Digest-SHA1-xxx.rpm
$ rpm –ivh dhcp-xxx.rpm
$ rpm –ivh tftp-server-xxx.rpm
$ rpm –ivh ypserv-xxx-rpm

5. Setup network interface eth0:1 if necessary (IP alias if your only have 1 NIC).
Modify /etc/sysconfig/network-scripts/ifcfg-eth0:1.
Reference site: http://drbl.nchc.org.tw/one4all/desktop/ip_alias.txt
6. Setup HDD DMA=1 if necessary. (/etc/sysconfig/harddisks).

Download and make new kernel RPM:
1. Make new kernel RPM to built-in support (not module) ide-generic in our case and some NIC drivers.
2. Reference site: http://www.howtoforge.com/kernel_compilation_fedora

Download and install DRBL related RPMs (use root permission):
1. Download DRBL GPG key: http://drbl.nchc.org.tw/GPG-KEY-DRBL
2. $ rpm --import GPG-KET-DRBL
3. Download DRBL main RPM:
http://drbl.nchc.org.tw/one4all/desktop/download/stable/RPMS/drbl-current.i386.rpm
4. $ rpm –ivh drbl-current.i386.rpm
5. Download extra DRBL RPMs:
http://drbl.sourceforge.net/drbl-core/i386/RPMS.drbl-stable/
6. $ rpm –ivh xxx.rpm to install all extra RPMs (CloneZilla RPM should be the last one to install).
Before you perform next section, it is better to do a reboot.

(B). DRBL setup – OFFLINE mode (use root permission)
1. Type command: $ /opt/drbl/sbin/drblsrv-offline –k (kernel RPM) to use specified kernel RPM or $ /opt/drbl/sbin/drblsrv-offline –s `uname -r` to use same kernel as server used.
2. DRBL will check all necessary RPMs automatically. If need, press Ctrl+C to cancel DRBL setup process. Follow on-screen instruction to answer question.
3. Type command: $ /opt/drbl/sbin/drblpush –i to push settings to clients node. Follow on-screen instruction to answer question.
Reference site: http://drbl.nchc.org.tw/one4all/desktop/examples/
4. Type command: $ /opt/drbl/sbin/mknic-nbi –t initramfs –k (Kernel version that
client used)
to make initramfs boot image for clients.
5. Copy image "folder" to /home/partimag directory (default path). For example: /home/partimag/20080812-beta3-image

(C). Setup image restore option and PXE menu (use root permission):
Unicast restore:
1. Type command: $ /opt/drbl/sbin/drbl-ocs -b --nogui -s -x -r [-p command] [--run-postrun-dir] startdisk restore 20080812-beta3-image "hda"
-b: batch mode. No question aksed.
--nogui: without GUI during restore process.
-s: Don’t detect client HW.
-x: Try to enable full-duplex in UDPcast. (only work with switch, not hub.)
-r: Try to resize partition after restore process finished.
-p [reboot | poweroff | command]: Post-action after restore process finished.
--run-postrun-dir: Excute program or shell script under /opt/drbl/share/ocs/postrun after restore precess finished.
--run-prerun-dir: Excute program or shell script under /opt/drbl/share/ocs/prerun after restore precess finished.
[startdisk | startparts]: CloneZilla restoring mode.
[restore | multicast_restore | save]: CloneZilla restoring type.
20080812-beta3-image: Image "folder" under /home/partimag.
“hda”: device or partition in image to restore.

Multicast restore:
1. Type command: $ /opt/drbl/sbin/drbl-ocs -b --nogui –s -r [-p command]
--clients-to-wait 1 --time-to-wait 10 --max-time-to-wait 60 [--run-postrun-dir]
startdisk multicast_restore 20080812-beta3-image "hda"
-b: batch mode. No question aksed.
--nogui: without GUI during restore process.
-s: Don’t detect client HW.
-r: Try to resize partition after restore process finished.
-p [reboot | poweroff | command]: Post action after restore process finished.
--clients-to-wait NUM: Minimum numbers of client to wait before restore process starting.
--time-to-wait NUM: Minimum seconds to wait before restore process starting.
--max-time-to-wait NUM: Maximum seconds to wait before restore process starting (to avoid CloneZilla service time-out).
--run-postrun-dir: Excute program or shell script under /opt/drbl/share/ocs/postrun after restore precess finished.
--run-prerun-dir: Excute program or shell script under /opt/drbl/share/ocs/prerun after restore precess finished.
[startdisk | startparts]: CloneZilla restoring mode.
[restore | multicast_restore | save]: CloneZilla restoring type.
20080812-beta3-image: Image "folder" under /home/partimag.
“hda”: device or partition in image to restore.

Misc:
*** Open every shell script to read and study so that you can know every thing that DRBL+CloneZilla server does! ***

PXE boot menu is: /tftpboot/nbi_img/pxelinux.cfg/default
Postrun dir is: /opt/drbl/share/ocs/postrun
DRBL conf dir: /etc/drbl and /opt/drbl/conf
DRBL official site: http://drbl.nchc.org.tw/ or http://drbl.sourceforge.net/
FAQ: http://drbl.nchc.org.tw/faq/ or http://drbl.sourceforge.net/faq/

Ghost 11.5 little problem

Oops!
I found that using Ghost 11.5 -id to clone Linux system, partiton table may be modified in some special situations.

I got my Linux partiton table as follows:
/dev/sda1, boot flag, ID 83, Linux native
/dev/sda3, ID 82, Linux Swap

But after Ghost cloning it became to:
/dev/sda1, boot flag, ID 83, Linux native
/dev/sda2, ID 82, Linux Swap

It caused Linux can not enter S4 (hibernation) status because Linux doesn't know where is the swap file system!

I use a very stupid way to fix it: re-write MBR!
Since this problem was happened in factory production line and, any action to boot into OS to fix partition table is not allowed :-(

Simply prepare a small tool called "MBRUtilD.exe" to save / restore MBR section.
I use it to create a workable MBR w/ partiton table, and then use tftp (via PXE) to transfer to clients for restoring.

"MBRUtilD.exe /R=(MBR file name)" to restore MBR.
And option "/S=
(MBR file name)" to save MBR.
Just run it right after Ghost cloning.

It rocks of course! ;-)

2008-09-06

Use Ghost 11.5 to create / restore Linux file system image


Ghost is a very powerful tool to create / restore OS images.
But Ghost doesn't support GRUB boot loader in MBR (my experience with old Ghost) if your HDD got Linux file systems.
Usually you need to manually fix and re-install boot loader after you cloning a machine.

I just try Ghost 11.5 with option -id and this does support GRUB in MBR without any problems!
Really cool!

Option -id use sector-by-sector method to create image. So that you won't miss any data on your HDD including MBR, boot sector and so on.

I also recommend to use CloneZilla to create / restore Linux OS image. This is a great utility with open source license. Just check: http://www.clonezilla.org/