Smoothwall Firewall project

Showing posts with label embedded linux. Show all posts
Showing posts with label embedded linux. Show all posts

Sunday, 8 November 2009

Another very useful feature of the Ubuntu live CD

I had to look at an Ubuntu installation the other day that had a problem after it had been upgraded. This problem turned out to be that the friend had previously installed an early version of the Grub boot loader and had not regressed this before the upgrade , an easy mistake to make.

The cure for this is well documented on the web and the solution is to boot your PC with an Ubuntu live CD and mount the harddisk in a chroot jail so we can then play with it and re-install the correct version of Grub. This procedure was taken from the official Ubuntu wiki.

Reinstalling GRUB 2 from LiveCD
If you cannot boot from GRUB 2 and need to reinstall it:

* Boot to the 9.10 Karmic LiveCD Desktop.
* Open a terminal - Applications, Accessories, Terminal.
* Determine your normal system partition - `sudo fdisk -l` (That is a lowercase L)
* If you aren't sure, run `df -Th`. Look for the correct disk size and ext3 or ext4 format.
* Mount your normal system partition:
Code:

sudo mount /dev/sdXX /mnt

o Note: substitue the correct partition: sda1, sdb5, etc.
o Note: GRUB 2 counts the first drive as "0", but the first partition as "1"
* Only if you have a separate boot partition:
o

sudo mount /dev/sdYY /mnt/boot

with sdYY being your /boot partition designation.
* Note: If you have any other system partitions such as "/usr" these should also be mounted in a similar manner.
* Mount devices:

sudo mount --bind /dev/ /mnt/dev

* Chroot into your normal system device:

sudo chroot /mnt

* Reinstall GRUB 2:

sudo grub-install /dev/sdX

*
o Note: Substitute the correct device - sda, sdb, etc. Do ''not'' specify a partition number.
* Verify the install:

sudo grub-install --recheck /dev/sdX

o Note: Substitute the correct device - sda, sdb, etc. Do ''not'' specify a partition number.
* Exit chroot: CTRL-D
* Unmount devices:

sudo umount /mnt/dev

* If you mounted a separate /boot partition:

sudo umount /mnt/boot

* Unmount last device:

sudo umount /mnt

* Reboot.


This procedure had his machine up and running perfectly again in five minutes, but just shows how flexible this live CD is and there are no real limitations to what you can get up to once you have this up and running.

Tuesday, 8 September 2009

Setting up the SSH daemon on your Netgear 1100 NAS server



After having installed one of these units for a small project , I wanted to get passed the web interface to have a look at the detailed error logs on this NAS unit.

I had a look on the Netgear forums and there are several add-ons you can apply to the unit to enhance or modify what it is capable of doing. As this is basically Linux running on Sparc, you will be able to do pretty much anything you like. It would appear that virtually every appliance these days runs Linux or BSD, and getting an SSH CLi onto these units gives you a lot more granular control.

When you have a look around the configuration on this unit, the company that actually built these devices before Netgear bought them - Infrant - has it's fingerprints all over the place. When you look at the processor for instance, it reports itself as an:

Infrant Technologies, INC - neon version: 0

When you dig around in the kernel libraries it becomes clear that this is a sparc CPU.

Anyway, back to the project in hand. You need to download these two files:

ToggleSSH_1.0.bin and
EnableRootSSH_1.0.bin


You then need to install them one at a time using the software update screen - below - and reboot the unit after each install. Why they are bin files is not obvious, as a simple script file would have been sufficient, but it may be to do with the extension install mechanism. It would appear all they do, is enable the SSH daemon in /etc/init.d and configure the file /etc/ssh/sshd_config to allow root access.



Once you have re-booted for the second time, point your favourite SSH client at the IP address of the NAS server and log in as root, like so:

SSH root@192.168.1.1 - or whatever your IP address is

voila!

Friday, 12 June 2009

Ubuntu 9.10 Alpha 2 has been released



I will be testing this now until released to see how it works on my Asus 1000 and Dell XPS1330. There are many new features including the latest kernel, faster boot speeds and a whole lot of package upgrades from the Debian repositories. I'm looking forward to seeing how the changes to xorg affect my hardware, as they both use Intel graphics chips, which have been a problem for some people.

More information here


Get it here

Wednesday, 10 June 2009

Linux kernel 2.6.30 has been released

The release announcement from Linus Torvalds was made this morning. You can look here at the release notes:

Linux kernel 2.6.30

Obviously this will take a while to filter down into your favourite distro, but you can get the source and compile it yourself if you fancy trying out the latest and greatest.

There are the usual improvements to hardware support, which could well help get that weird piece of hardware working. They have also started to use other forms of compression for the kernel files which include bzip2 and the boot speed of the kernel has been improved by implementing parallelism on certain parts of the kernel boot.

Fedora 11 has been released




Fedora 11 Tour

The latest release of the Redhat Development distribution Fedora 11 has been launched and it is available for download. I suspect the mirrors will be red hot for the next couple of days/weeks, but this is a worthy replacement.

Have a look at the release notes here.

Release Notes

There are many new features, including updates to the Plymouth boot process with customisable themes. There still isn't a Dom0 for Xen, but this is slated to be released with Fedora 12 later in the year. As Redhat is moving more towards using KVM, and the debates about Xen getting included in the kernel upstream, this is not that surprising. There are however many new virtualization features that make this a moot point. You can always run the xenner application to work around running Xen Domu guests or just use Fedora 8 , which has Dom0 support.

Wednesday, 27 May 2009

New Ubuntu Magazine launched

Now, for a lot of Linux purists, this is about as close as you get to Microsoft launching their own proprietary distribution ;-)

The truth is, no matter how you cut and slice it, Ubuntu is the one distro out their that is getting onto millions of desktops, is being pre-installed on machines, and offers a great user experience. Yes, I know Fedora and Suse , name your favourite distro here, use the same basic components like Gnome, but the Ubuntu team have put together a decent desktop distro, and using the Debian package management system - apt - doesn't do them any harm either. Having worked with Redhat/Fedora yum for years, I know which one I prefer.

Another point I should mention here, and it is an extremely important issue, is that there is a lot more software more easily available for Ubuntu/Debian. Just look at my post on the site on how I had to muck around just to get truecrypt installed on Redhat.

Anyway, have a look here at what is being launched, and if you use Ubuntu, I would certainly give the first half dozen issues a go and see it you like it. The article in the first issue on package building for Debian has to worth the cover price alone.

Sunday, 17 May 2009

Linux powers the TomTom car satelite system

I bought one of these great little devices about six months ago as my wife had a need to find her way around rural France a little more easily. Well I have to say we use this all the time now, and it has effectively rendered all our paper maps redundant. I probably use it more than my wife now, and it is constantly showing us great new short cuts to all sorts of locations.

This little device is just so easy to use, you just enter a post code , an address or even the latitude and longitude of your destination, and the little box will just plot you a route, using the faster or cheapest roads, in Europe you must remember we have to pay on the motorways.

Well this is all powered by Linux, and the little touch screen works without a hitch, and offers a whole range of points of interest around the destination you have selected. This is really useful if you are new to a town, and want to find the train station, ferry port, bus station, museums etc etc.

Another great facet of this unit is that it warns you of speed cameras, which is very useful when you are rushing for the ferry, as I was today.

If you have not already got one of these little beasts , then I would recommend you put embedded Linux to the test, and just see how adaptable this operating system really is. This is an extremely easy device to put to use very quickly.

Thanks to the TomTom, I'm posting this blog entry from the ferry on my way back to the UK from France, so it's proof it gets you there on time ;-)

Using Ubuntu Linux of course, I need a solid, reliable platform when I'm on the move.