Friday, February 01, 2013

Convert a flash video into a animated gif.

mplayer "filename.flv" -nosound -vo gif89a:fps=15:output=output.gif -vf scale=240:180 -ss 1:19 -endpos 7 Convert a flash video into a animated gif.

Saturday, April 16, 2011

Some handy SLAX tidbits

I've made another SLAX digital picture frame and found a few useful options I want to document so the next time I don't have to fire up the google machine to hunt this info down.


If you want to disable the screen saver and the energy star feature which will keep the screen from being turned off after inactivity run the 2 commands below: I placed this in an executable file in rootcopy/root/.kde/Autostart
xset s off
xset -dpms

To run konqueror in full screen use this:

kstart --fullscreen konqueror http://www.website.com


To hide the various tool bars edit konquerorrc:

[KonqMainWindow Toolbar locationToolBar]
Hidden=true
IconText=IconOnly
Index=2


[KonqMainWindow Toolbar mainToolBar]
Hidden=true
Index=1



To refresh konqueror every 60 seconds create an executable file with(change 60 to your needed time):


#!/bin/bash



K=`dcopstart konqueror http://website.com`; dcop $K qt/.*mainwindow#1 showFullScreen
while [ true ]; do
sleep 60; # wait 1 minute
dcop $K "konqueror-mainwindow#1" reload
done

If you want the mouse cursor hidden use "unclutter". Put

#!/bin/bash
/bin/unclutter &

in an executable file in rootcopy/root/.kde/Autostart


Command to make bootable iso run in parent directory of slax and boot directories

mkisofs -r -V "Slax" -cache-inodes -J -l -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o output.iso .

Labels:

Wednesday, June 10, 2009

Knoppix via PXE

On the heels of my recent semi-success with getting DSL to work via PXE. I mean it works... I just cant get it to recognize the hard drives, so it's basically useless to me. Anyways.

I was able to get knoppix to boot through my PXE and it recognizes the hard drives, which is the most important thing when you want to do hard drive recovery :)


I had to piece together a few "how-to's" to get it to work for me but here is a rough outline and I'm not good at taking notes and I'm not really sure what worked.. I just know it works.


Things you'll need that aren't covered here:
Working PXE/TFTPBOOT service
Working NFS service

From this guys directions I followed STEP 1 and set up a terminal service while running a knoppix live CD on one workstation:
http://pxe.dev.aboveaverageurl.com/index.php/PXE_Booting/Knoppix

_____________________________________________________________________________________
Step One: Generating the needed files

Knoppix has the built-in ability to auto-configure itself to network boot itself, and this makes the process rather easy. In the "KNOPPIX" submenu, select the "Start Terminal Server" option.

IMPORTANT NOTE! By doing this, it will start up dhcp, and many other services! Running two DHCP servers on the same subnet is generally a very bad idea!

When prompted, select the menu item to configure the terminal server, and run through that.


1. If at all possible, start the terminal service on a different NIC. This will prevent a LOT of possible mayhem. If you only have a single NIC, then before you click the final "OK" button, be sure to unplug your ethernet cable.

2. For the IPs, just a low number of IPs (must be specified as "192.168.0.2 192.168.0.3") is fine. You cannot enter a single IP, and the range is inclusive of what you input.

3. Be sure to select all needed kernel modules on the slaves!

4. Be sure NOT to check the NX thin client button! The other software does not matter, however, if you check the secure box, by default your clients will not be able to access the root user. (Note: The "secure" option is easily changable later on.)

5. Specify any needed kernel paramaters for your slaves. If you don't need any, do as the box says and just click ok.

5b. If you only have one NIC in the computer running knoppix, and an existing DHCP server on the network, unplug the knoppix computer now.

6. Click the final ok, all done.

6b. If you unplugged your ethernet cable, be sure to stop the DHCP server on knoppix before plugging it back in.

_____________________________________________________________________________________


Before I started I issued a "ifconfig eth0 down" to ensure I wasn't setting up a DHCP server on a network that already has a DHCP server.

Once I was done I copied vmlinuz and miniroot.gz to the /tftpboot/knoppix directory in my PXE server. I also copied the pxelinux.cfg/default file to get the labels to add to my current pxelinux.cfg/default file


For my working NFS service I added this line to my /etc/exports:

/path/to/share 192.168.1.0/255.255.255.0(ro,no_root_squash,async)

in /path/to/share I copied over the KNOPPIX directory from knoppix live CD


For my pxelinux.cfg/default I added these lines:

LABEL knoppix
KERNEL knoppix/vmlinuz
APPEND secure nfsdir=ipaddress.to.nfs/server:/path/to/share nodhcp nodma noudev 2 lang=us ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 initrd=knoppix/miniroot.gz quiet BOOT_IMAGE=knoppix


I had to add nodma and noudev because when I booted it locked up looking for hardware. Edit these "cheatcodes" as needed.


Booted up using Network boot and typed: knoppix


And it booted up to a "live" knoppix!

Tuesday, June 09, 2009

Using Damn Small Linux via PXE

I've recently been trying to configure my PXE server to have a live CentOS option and have been unable to add this to my existing PXE server. But I have added a Damn Small Linux option that seems to work well, except I cant get it to recognize SCSI disks. Recent release notes suggest that SCSI support was removed in DSL 4.3, so I downloaded DSL 4.2 and still could not get the drives to get recognized. I see the SCSI modules when I do a modprobe -l so maybe its just a matter of time before I insert the right module to get it working. If any one has any ideas as how to get SCSI drives working in DSL please let me know. The primary reason I want a "live" linux on my PXE server is for file recovery across the network. So this is a huge roadblock for me.


Anyways. To get DSL on your existing PXE server:

Download DSL: Im using dsl-4.4.10-initrd.iso and dsl-4.2-initrd.iso(for scsi)

Extract the iso:

mount -t iso9660 -o loop dsl-4.4.10-initrd.iso /iso

copy these to files to /tftpboot/dsl #create dsl directory first

cp /iso/boot/isolinux/linux24 /iso/boot/isolinux/minirt24.gz /tftpboot/dsl

add this line into your /tftpboot/pxelinux.cfg/default


LABEL dsl
KERNEL dsl/linux24
APPEND ramdisk_size=100000 init=/etc/init lang=us vga=791 initrd=dsl/minirt24.gz quiet


you can add cheatcodes on the APPEND line as needed. Cheatcodes are located in the /iso/boot/isolinux directory as f2 f3

Thursday, September 25, 2008

convert video to mp4 for iphone

ffmpeg -i file.wmv -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320x180 file.mp4

Monday, June 09, 2008

vi copy text from one file to another

VI COPY FILE TO FILE

Here is how to copy the required number
of lines from one file to another in
VI editor. First use the following
key combinations in the source file.

Press ESCAPE
Press Shift "(Shift double quotes)
Press a
Press the number of lines you want to copy
press y followed by another y

Now press " : " (COLON) to get the vi prompt.
Hit e "Destination file name"
Once you enter the Destination file
go to the line where you want the lines
copied to be inserted.

Press ESCAPE.
Press SHIFT "(Double quotes).
Press a.
Press p.

The lines get copied.

Wednesday, April 30, 2008

Upgrade from FC2 to CentOS 5.1

yes.. It IS possible and here is how.

2 ways.

First way.

On the FC2 box change the fedora-release file to say:
CentOS release 5 (Final)

(save file, duh!)

Boot the FC2 box with the CDROM or DVD of Centos 5.1

At the boot menu choose:
linux upgradeany

follow directions.


reboot.

BAM!

It's just that easy.


2nd way:
Upgrade with a PXE server

On the FC2 box change the fedora-release file to
CentOS release 5 (Final)

(save file, duh!)

make a section in your "/tftpboot/pxelinux.cfg/default" file like this:

label fc2upgrade
kernel centos51_i386/vmlinuz
append ks=http://ip/location/to/ks.upgrade text initrd=centos51_i386/initrd.img ramdisk_size=8192


create your kickstart file on your http server:
ks.upgrade:
____________________________

upgrade
url --url http://ip/location/to/CentOS/core/i386
lang en_US.UTF-8
keyboard us
bootloader --location=mbr --append="selinux=0"


_______________________________


modify kickstart file as needed.
I chose to disable selinux on my original FC2 install so you should disable it in the upgrade



You might have to play around with it, but this worked for me. Post comments if you have questions.


Boot with network support and choose fc2upgrade to start the upgrade!