Wednesday, April 26, 2006, 02:10 PM - Linux
The sis900 ethernet controller is full GPL and in wide use. The issue was setting a media type on a 10Mbit network full duplex, where autonegotiation came back with half duplex.
By turning off the auto-negotiation, the duplex modes stays, else it will not be set.
To set full duplex, use the ethtool with the following settings:
ethtool -s eth0 speed 10 duplex full autoneg off
Querying the interface with ethtool eth0 gives:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Current message level: 0x000000c5 (197)
Link detected: yes
| permalink |
Wednesday, January 4, 2006, 10:23 AM - Linux
Sometimes there are multiple jobs to be killed. This bash script is handy for that purpose:
TOBEKILLED=your unique identifying name of the program
for PROCESS in `ps aux | grep $TOBEKILLED | grep -v grep | awk '{print $2}'`
do
kill -9 $PROCESS
done
| permalink |
Wednesday, December 7, 2005, 11:08 PM - General applicable solutions, Linux
To create a filesystem in a file, first a file needs to be create at the size of the filesystem. This can be done with dd:
dd if=/dev/zero of=fileXYZ bs=1024 count=1024
The count can be made bigger to get a bigger file.
Use your favourite filesystem creator on this file, and you will have the filesystem in a file available for all to use.
Mounting the filesystem is done by:
mount fileXYZ /mnt -o loop
| permalink | related link |
Tuesday, December 6, 2005, 09:25 PM - Linux
From the help of the kernel config:
mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
Do this from inside your running UML system.
Also see the related link for more information
| permalink | related link |
Monday, December 5, 2005, 11:41 PM - Linux
Note: This just works, it is not a complete configure so there is some work left for the rest of the setup.
Download a kernel newer than 2.6.8 from ftp.kernel.org. Newer than 2.6.8 because those versions do not need to be patched to get UML working (saves a few steps)
Unpack the kernel in your favourite location, and type:
make menuconfig ARCH=um
This starts the menuconfig in uml mode, giving you different options to configure just this kernel.
Configure what you want, but make sure you enable the following:
[b}Block devices->Virtual block device->Always do synchronous IO for UBD
This option is not obvious, but is needed to be able to access your root device.
Type:
make linux modules ARCH=um
This will create a executable file called linux in linux source directory. Copy this to a usefull location (/usr/bin for example)
While the kernel is being build, do the following:
Download a root filesystem from sourceforge.net (files starting with root_fs) or create on yourself by using dd:
dd if=/dev/hdX# of=root_fs_filename
So essentially you could copy your own install into an image.
Alter the downloaded or created image by mounting it and adding the disk locations needed for ubd:
mount -o loop -t auto root_fs /mnt
cd /mnt/dev
mkdir ubd
cd ubd
for i in 0 1 2 3 4 5 6 7; do mknod $i b 98 $[ $i * 16 ]; done
cd ..
chmod 660 ubd
chown -R root:disk ubd
cd /
umount /mnt
Start the user mode linux kernel with:
linux ubd=/yourlocation/root_fs_filename
The kernel should boot giving a running linux system on your console.
| permalink |
Thursday, December 1, 2005, 05:53 PM - Linux
Symptom
The linux system has a high load, but there is not process visible which causes this.
Solution
Apparently a process is running/runable or in a D state (Waiting for a resource to become available, usually IO).
To locate the process use ps, or by "echo t >/proc/sysreq-trigger" which will dump the kernel state into /var/log/messages.
From there on it is possible to locate the process, and help it along or just plainly kill it.
| permalink |





