Archive for ‘Ubuntu’ Category

This used to be a pain in the butt. Lots of manual apt-get lines and config edits to get it to work. Weŕe talking about installing the LAMP stack onto a preexisting Ubuntu Desktop Edition installation. I used to do this backwards in the old days by installing the Server edition first (with LAMP) and then getting the graphical desktop goodies installed on top of that. That method still works, but I found out that LAMP stack install on a Desktop edition is a simple one command affair. As of the 7.04 release, the Ubuntu base system includes Tasksel. You can install LAMP using tasksel.
sudo tasksel install lamp-server

Writing Moblin (and Ubuntu) USB images using dd in OSX

datePosted on 15:52, May 20th, 2009 by Many Ayromlou

I came across this problem this morning, while writing the newly downloaded moblin USB image file. The concept is straight forward, plugin a 1GB+ USB stick into a functioning Linux or Windows box, make sure the stick is not mounted and use dd to write the disk image to the stick. Under OSX however the instructions for unmounting are slightly different, so here are the quick steps:

  1. Download the desired .img file
  2. Open a Terminal (under Utilities)
  3. Run diskutil list to get the current list of devices
  4. Insert your flash media
  5. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  6. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located.
  8. Run diskutil eject /dev/diskN and remove your flash media when the command completes

That should do it…..

If you’re using Ubuntu and have recently upgraded your IpodTouch or Iphone to 2.x firmware, you might be interested in this detailed tutorial. It basically outlines how you can setup syncing under Ubuntu with your 2.x device. The guide assumes that you have jailbroken your ipod/iphone . There is also a nice section for older 1.x devices.

Sugar interface on a USB stick…..

datePosted on 23:25, February 18th, 2009 by Many Ayromlou

Thanks to Sugar Labs you can now have your Ubuntu 8.10 or Fedora 10 linux distributions with sugar on it…..Shweet :-).  Yep you heard right, go here and grab your OLPC XO inspired 1GB USB stick image and boot all those old PC’s into sugar. According to Walter Bender (the creator of Sugar OS) a new version dubbed Sucrose 0.84 is on its way soon. Complete article (including interview with Mr. Bender) is over at XConomy.

Duplicate your Ubuntu Installation….

datePosted on 13:55, February 18th, 2009 by Many Ayromlou

As good as Ubuntu (and linux) are in general, once in a while you just get to a point where you need a reinstall. That’s when the realization kicks in that you’ve got far too many packages installed since the initial Ubuntu install. It’s okay, there is a way out. Make sure you have a USB key.

On Ubuntu Workstation (with graphical interface):

Run Synaptic package manager. Once inside Synaptic, go to File/Save Markings As menu option and choose a filename and location (USB stick). MAKE SURE YOU ALSO CHECK THE BOX “SAVE FULL STATE, NOT ONLY CHANGES”. This will save a text file that contains every single package installed on your system (through apt system and all it’s variants….manual compile/installs are something else). Now you can go ahead and reinstall the machine and configure your repositories. Once the machine is up and running again, load up Synaptic and go to File/Read Markings and point it at the file you saved on the USB stick and press Apply.

This will start a download process that will set the machine up (as far as installed packages are concerned) just like it used to be. Configurations need to be done manually, but atleast you get all your packages back.

This is also super handy if you’re duping identical systems. Remember that you can not do this to upgrade from one version to another. This is strictly for “Restoring” installed software packages from the same version of Ubuntu.

On Ubuntu Server (command line):

First we need to create a list of all the installed APT packages and configurations and save them:
sudo dpkg --get-selections > /tmp/dpkglist.txt
sudo debconf-get-selections > /tmp/debconfsel.txt

Copy the files from /tmp to your USB stick or save them somewhere else.

Now reinstall the OS, copy your backed up debconfsel.txt and dpkglist.txt file to your fresh system’s /tmp directory and execute the following:
sudo dselect update
sudo debconf-set-selections < /tmp/debconfsel.txt
sudo dpkg --set-selections < /tmp/dpkglist.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade

Don’t worry! This method only adds and upgrades packages, it will not remove packages that do not exist in the list.

We also covered aptoncd program which basically does the same thing (it’s a extra install). Last but not least to make a costum Ubuntu install CD/DVD you want to check out our entry on Reconstructor.

Super Ubuntu save you time….

datePosted on 19:02, January 11th, 2009 by Many Ayromlou

If you’ve ever installed Ubuntu and started cursing right after because some piece of software you thought was in there wasn’t, then Super Ubuntu might be for you. It’s basically Ubuntu with a bunch of useful applications pre-installed. You even update through the standard Ubuntu methods. The only downside is that the distro is 32-bit only for now. Below you’ll find a list of pre-installed additional software you get with Super Ubuntu:

So head on over and grab the ISO file.

How to mount CD/DVD images from command line under Linux

datePosted on 16:45, September 22nd, 2008 by Many Ayromlou

Here are some quick CLI commands to get those CD/DVD images mounted under Linux (without having to burn them first).

mount -t iso9660 -o loop,user file.iso /path/mount_directory

mount imagen.mdf /path/mount_directory -o loop=/dev/loop0

mount -o loop,offset=307200 imagen.nrg /path/mount_directory

Basic APT commands

datePosted on 16:37, September 22nd, 2008 by Many Ayromlou

Okay, now for a bit of CLI goodness. Here is a quick list of basic apt commands.  Debian and most derivatives (Ubuntu) use these for package maintenance.
apt-cache search packagename

#package info
apt-cache show packagename

sudo apt-get clean
sudo apt-get autoclean #old packages

apt-get check

#get source code
apt-get source packagename

#get dep
apt-get build-dep packagename

sudo apt-get update
sudo apt-get install packagename
sudo apt-get remove packagename
sudo apt-get upgrade
sudo apt-get dist-upgrade

UNetbootin takes care of all your USB Linux installtion blues….

datePosted on 11:46, August 28th, 2008 by Many Ayromlou

I’d covered Fedora’s Live USB creator a while back. But for those of you wanting to install other flavours of linux on a USB stick (or a HD even), the process was lengthy and cumbersome. That was before UNetbootin, the Universal Netboot Installer. You see UNetbootin can be run from Linux or Windows and will enable you to install a fully functional linux distro to a USB stick or even a spare partition.

The current version has built-in support for the following distributions:

So go ahead and try some of those acquired flavors of Linux, or that FreeBSD you always wanted to install, but were too scared to. After all it’s only a USB stick, if it screws up just format and reinstall in 5-10 minutes using UNetbootin again.

UNetbootin can also be used to load various system utilities, including:

  • Parted Magic, a partition manager that can resize, repair, backup, and restore partitions.
  • Super Grub Disk, a boot utility that can restore and repair overwritten and misconfigured GRUB installs or directly boot various operating systems
  • Backtrack, a utility used for network analysis and penetration testing.
  • Ophcrack, a utility which can recover Windows passwords.
  • NTPasswd, a utility which can reset Windows passwords and edit the registry.
  • Gujin, a graphical bootloader that can also be used to boot various operating systems and media.
  • Smart Boot Manager (SBM), which can boot off CD-ROM and floppy drives on computers with a faulty BIOS.
  • FreeDOS, which can run BIOS flash and other legacy DOS utilities.

So have fun and happy installing…..

Well kids are you ready for todays lesson in transcoding DV video. So first you need a decent machine. I’m using a P4 2.4Ghz oldie that has Firewire on-board and am chewing up 50% CPU for NTSC encoding. Then you need to get Ubuntu 8.04 installed. Once that’s done use the following command to install vlc (Video Lan Client):
sudo apt-get install vlc
Then either follow this guide or if you’re using 8.04 (Hardy Heron) ONLY, use the following command to add Medibuntu to your repository sources.list:
sudo wget -O /etc/apt/sources.list.d/medibuntu.list
followed by
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
to add the GPG key for Medibuntu Repository. You may be asked to accept this package even though it cannot be authenticated. This is normal; typing “Yes” means you trust Medibuntu.
Now do the following commands to get libdvdcss and other codecs installed on your machine:
sudo apt-get install libdvdcss2
sudo apt-get install w32codecs (for i386 architecture) OR
sudo apt-get install w64codecs (for amd64 architecture)

Now that we have all the goodies installed and ready to go you can go ahead and connect that DV camera to your Ubuntu box using Firewire. Make sure it’s in Camera mode (NOT VCR) and open up a command line and type in the following command to get the encoder setup:
sudo -i (This will put you in superuser root account)
cat /dev/dv1394/0 | vlc - :demux=rawdv -I dummy --sout '#transcode{vcodec=mp4v,vb=1024,acodec=mpga,ab=192,scale=1,width=720,height=480}:duplicate{dst=std{access=udp,mux=ts,dst=IPAddressofDestinationMachine:PortNumber}}'

You could also run the above command from your user account by adding sudo infront of it and supply your password followed by Enter key.

The above command (in case you’re wondering) will literally open device zero on the firewire chain and redirect it’s raw output into the VLC program. VLC is told to accept input from a pipe in rawdv format and to transcode it to mpeg4 Video @ 1Mb/s with mpeg1-layer3 audio @ 192 Kb/s.

Once the above command is running you’ll need to go to your receiving machine (the machine who’s IP you supplied in the command above), run VLC and from the File menu choose “Open Network Stream” and go with the default UDP/RTP on port 1234 (or whatever port you chose in the encoder command line).

Another neat thing you can do with your new found opensource goody bag is capture DV from your camera/settop box and save it in mpeg4 format for archival purposes (or mpeg2 for editing maybe). I’m not gonna get into the details, but assuming you’ve done the above commands, skip the encoder command and issue the following command to get your DV stream saved:
sudo -i
cat /dev/dv1394/0 | ffmpeg -f dv -i - -f mp4 -s 720x480 -vcodec mpeg4 -acodec aac -ab 128 -ar 44100 -deinterlace -b 3000k -y yourfilename.mp4

This command will take rawdv from the camera, pass it to ffmpeg, which will chew on it and spit it out as mpeg4 video @ 3Mb/s with AAC audio @ 128Kb/s into a file named yourfilename.mp4 (if the file exists it will overwrite it). Stopping is accomplished by CTRL-C. More info on this command can be found on ffmpeg’s man page.

Have Fun….