Friday, June 8, 2007

USB Back Track2

I'm currently copying the files across to my USB from the ISO but the main problem that I have encountered is getting the MBR to work. Apparently there is a script that will make the USB boo-table called bootinst.sh (for Linux and bootinst.bat for Windows) that comes in the boot folder of the CD. I have yet to try that. I have been trying various other method up until now but none of them have worked. I also while looking for a way to boot Back Track off the USB I came across a site detailing how to get your USB to multiboot using Grub. http://darksun.com.pt/mirage/usb_minipe_backtrack_knoppix.html. I also came across another tutorial on how to boot Ubuntu from a USB. At the time I didn't have much of a look at the site but it might give me another way to install Ubuntu without getting the invalid compressed format errors.
http://www.extremetech.com/article2/0,1697,2132615,00.asp

Thursday, June 7, 2007

Learning Python

I'm learning python slowly but surly using http://docs.python.org/tut/. My progress so far isn't that great but it has somethings that are are integrated right into the language that would actually be quite a pain to do in other languages (or frameworks). I have a friend who's brother I found out today was learning python as well and who's father uses Python.

Along with my progress with Linux I intend to post my progress with Python and maybe some simple code that I'm learning. In fact I might post some form of encryption algorithm written in Python.

USB Ubuntu Update

Well. I tested it at school even when the initrd.gz file was decompressed and all the references to it were changed to initrd.img but I still got the "invalid compressed formate (err=2)" error. I did notice how ever when I loaded it today on the ohter computer that I had access to it loaded much quicker than it does on my home computer. I think its about time for me pack the USB Ubuntu project in and look for another distribution of Linux to off my USB. It would be nice to get back track 2 working off my USB. In fact it shouldn't be that hard. I will try to do that when I restart my computer a little latter on.

Eric Python


I have download the Eric IDE for Python development and I hope to learn how to code in Python. It will be my first fully interpreted language that I have had a serious go at learning. While I know C# .NET is compiled to MSIL (Microsoft Intermediate Language) which allows it to be very much cross platform I still consider that a compiled language. I have worked with Java script and VB script before but only to the point of doing a bit of simple maths and random numbers in message boxes.

I thought that if I'm going to stick with Linux then I may as well learn a language with it too.

USB Ubuntu Still Being a Pain.

I have extracted all the initrd.gz images I can come across and fixed up the references to them in isolinux.cfg and syslinux.cfg but I still have the same problem. It would be nice if it told me which file in the archive was causing the problem. The problem seems to no longer exist when I have the computer up and running and I try and extract the files from the .img archives that I have created but during the boot up it insists that there is still an "invalid compressed format (err=2)".

I'm actually quite surprised that switching the names around in the config files and extracting the img archives from the gz ones worked to the point of actualy saying "loading initrd.img" not "initrd.gz". I actualy kind of suspected that it would cause the thing to go haywire when it tried to decompress the img as a gz but obviously it can tell the difference.

Another thing that happens when I boot Ubuntu up now off the usb is that it does it very slowly, much slower than of a CD. I have mentioned that before but now because the initrd.img is extraced it takes 3 times as long. I had a look at the file sizes and concluded the major bottleneck was reading the data off the USB. As a img the file is 3 times the size it is when it is a gz. I was wondering how I might be able to somehow put drivers in some archive is enable some option that would mean that it would take advantage of the 2.0 port instead of reading data of the USB in 1.1 mode.

Wednesday, June 6, 2007

Ubuntu on USB

I have been trying for quite some time now to get Ubuntu working on a 2Gb USB stick however I have been unfortunately unsuccessful.. I got a chance today to test my USB on a computer other than my own and this time it showed "operating system not found" so I figured that even though it loaded up to the boot options menu on my computer that the issue was probably related to the MBR. On http://www.pendrivelinux.com/2007/02/12/usb-ubuntu-tutorial-for-linux-users/ it tells me that I should download and install Lilo I have done that and I have run the command: sudo lilo -M /dev/sdc and it tells me that it has updated the partition table. I hope that it work tomorrow (I get a chance to test it out on another computer tomorrow too).

To try and remedy the problem that I was having with the invalid compressed format error I have extracted initrd.img from initrd.gz and placed it on the root of the drive and then changed the references in the syslinux.cfg file to initrd.img instead of initrd.gz. (I'm not sure if that going to play out so well because the syslinux boot loader might still handle the file as though it is compressed.)

Extracting the initrd.gz file wasn't as easy as it should be though. The actual initrd.gz file on the root of the usb disk when extracted throws an "invalid compressed data" error. So I have had to extract the file from the gz archive on the live disk. That decompresses fine and it opens fine too when I click on it.

I haven't actually tested it yet because I haven't rebooted the computer yet but as soon as I do I will post some information on how it went.

My vision I suppose if I can get this to work would be to install grub and dual boot "live" Back Track 2 and "persistent" Ubuntu. That would be very cool but I have to go one step at a time at get one part working at a time and at the moment my portable Linux project time is being taken up mostly with getting Ubuntu to boot off a USB.

Tuesday, June 5, 2007

Sreen Shots for Ubuntu and the Concept of Workspaces

Work spaces are like multiple desktops on one screen on Windows. A lot of students at me school used to use multiple desktops to switch between windows with work on them (when the teacher was nearby) and games.

You can have multiple desktops set up and you can switch between them by just using the buttons at the bottom left hand corner of the screen.

With Beryl and Emerald themes installed you can add tones of eye candy to your desktop, more so than even in Windows Vista and with more functionality. It would take ages to explain but if you goto beryl-project.org you can learn more.

I just thought I would post some screen shots of me working from Ubuntu with Beryl.


Example of my multiple workspaces on a Hexagon (I have 6 workspaces)


Example of Windows that I'm not using fading into the desktop. I have the number of bright windows set to two though so I can watch a movie and work on something else at the same time without affecting the look of the movie.


Example of the workspaces on a cube from just above.


Watching a movie on one screen with the other clear. (The desktop background is stretched across the two monitors - a feet very fiddly and difficult to achieve in Windows)



Button actions (from right to left)

the 'x' : close (same as Windows)
the '<>' : maximize (same as Windows)
the '_' : minimize (same as Windows)
the :: or . : lock to screen (when . it will display on all workspaces)
the '^' : keep above other windows (That would have been so useful when doing some assignments)

the '-' : shade window (turn it into a floating bar on the desktop - kind of like minimize but floating)

the other button just brings up the window menu.



Monday, June 4, 2007

The switch...

Ok.... I have run Ubuntu live before so I knew that it was a distro. I god fed up with Fedora 7. Everything that I wanted needed configuring, re-configuring and then when I'm done with that I need to do that every time I start up or write scripts to do otherwise.

So, fed up Fedora I whipped it and replaced it with Ubuntu which was so smart that when I installed it didn't even ask me about my boot options it figured out that my main partion on my main hard drive was Vista. That was pretty awesome I thought.

I have since then got, mp3s, m4as and other sound files working. (It just prompted me to press a couple of buttons to download and install the appropriate codecs)

Time to do on Fedora: Several hours

Time to do on Ubuntu: Several Seconds

I have since got dual monitor working and Beryl, fixed my Gtk problem in Mono (which was due I think to rpm conflicts).

Dual monitor fix for me took a little while but it was only possible because of the kind help of my software design teacher, who also caused me to work with the wrong resolution for an hour making it very hard for me to get working, but without his help on the dual monitor problem I don't think I would have been able to fix it.

How to get dual monitor working on a NVIDIA dual head card: (Should work for Fedora too)

Install the NVIDA drivers. There is an easy way to trigger the correct install.

Goto System -> Preferences -> Desktop Effects

Select Desktop Effects

After it has finished installing:

De-select Desktop Effects

You can get Beryl working latter which makes desktop effects look like the shell.

Goto Terminal
Type sudo nvidia-xconfig --twinview --mode=1680x1050 --mode=1280x1024 (replace the resolutions with your resolutions)
Goto Terminal
Type sudo gedit
Open \etx\X11\xorg.config (or where ever your xorg.config file is)
Add A line under "Section Screen" reading: Option "TwinViewXineramaInfoOrder" "DFP-1, CRT-0" (If one is connected by DVI and the other by CRT otherwise use "DFT-0, DFP-1" or "CRT-0, CRT-1" - you can probably skip this step if your monitors both use DVI or VGA)

Hold Down ctrl+alt+backspace

If the monitors aren't the right way around:


Goto Terminal
Type sudo gedit
Open \etx\X11\xorg.config (or where ever your xorg.config file is)
Add A line under "Section Screen" reading: Option "TwinViewOrientation" "LeftOf"

Hold DOwn ctrl+alt+backspace

If the monitors are still the wrong way around then change "LeftOf" to "RightOf"

Hope that helps someone!

Sunday, June 3, 2007

Back Track 2 Progress

I have fully downloaded the ISO for Back Track 2. I burnt it in Fedora which was very easy all I needed to do was insert a CD or DVD (I used a DVD) and double click on the file where it prompted me to burn it.

I then tried out the burnt disk (which only took about 30 seconds to write because it was a DVD) on a laptop and it booted just fine. I was surprised at just how many security tools are in Back Track 2. Its quite amazing. It does however run the KDE desktop which from past experiance (about a year and a half ago) I'm not a major fan of. I can be swayed though and if I use Back Track enough I might just be swayed. I only had a few minutes play around on it but it is very stylish and despite its "hacker" links its by no means all command line stuff.

If I can't get Ubuntu working on my USB I might just put it on there with a FAT partition to save my files to and use that instead.

When I have a look through some more of its features I'll post more on it.

Dual Monitor, Beryl and Fedora 7


I take it that "dual head" is just the Fedora version of dual monitor. I have tried several times in setting up dual head but when ever I do and restart the computer it can't start the X display server and i have to login in text mode and reset the X display config file (all be it with quite a few prompts from something that was trying the start the X displayer server).

I should probably try a lower resolution and see if that gets me started but the resolutions that I have been entering for the main and second monitor have been those that I have successfully used in Windows Vista. I set the main monitor (LCD) to 1680 by 1050 and the second to 1280 by 1024.

I have also tried to get Beryl (a visual display enhancer) working but it doesn't seem to want to cooperate. I have also tried to enable "desktop effects" in System -> Preferences -> Look and Feel -> Destop Effects but that too won't allow me to enable it. It just pops up and error saying "Desktop effects could not be enabled.".

I think I may have uncovered a clue with the chess game. When I try and enable 3D mode it displays this error:

Your system does not have the required software to enable 3D mode. Please contact your system administrator and ask them to install the OpenGL Python bindings and the GtkGLExt Python bindings.

You are still able to play chess in 2D without these packages.


I may have to install the above packages but I was under the impression the OpenGL was installed with Fedora. While trying to fix up my problems with not being able to get the dual monitor to work and getting the desktop effects to work I went out and downloaded and installed my graphics card driver. (NVIDA 7600 GT)


It seems to have installed. It appears under Applications -> System Tools -> NVIDIA X Server Settings.