Friday, October 26, 2007

Belenix freebie

Continuing the discussion on Belenix (see part 1)


“I cant burn the CD from the iso?”

And you used cdrw in Solaris? You probably tried:

bash$ cdrw -i belenix0.6.1.iso

Looking for CD devices...

Initializing device...done.

Size required (728453120 bytes) is greater than available space (681986048 bytes).


instead, try:

bash$ cdrw -C -i belenix0.6.1.iso

Looking for CD devices...

Initializing device...done.

Writing track 1...done.

done.

Finalizing (Can take several minutes)...done.




“What makes Belenix so special?”

The biggest is that it supports UFS (of course, it is opensolaris afterall), ZFS, Fat16, Fat32, NTFS (really!) and EXT2 / EXT3. Wow. One key with Belenix and I can rescue a file from any x86 computer in this building (windows, solaris, linux) With ZFS that also means *bsd with zfs, mac os x with zfs, Linux FUSE ZFS... I dont know of any other solution out there currently that out of the box is capable of the same (well, maybe Indiana, but it is not out).


The other, as illustrated by my picture of the laptop with no hard disk, no cdrom and minimal memory, is that Belenix doesn't abuse of your resources. It will run with 256MB of ram. Of course, a live distro with 256MB with Xorg and XFCE doesn't leave much space. You can open a few terminals, text editor, run top (see ) and the like, but open Firefox and you need to be ultra patient. 320MB would make a big difference, while 512MB would be just right (and with the laptop back to its full 2GB configuration, wow). Or course, in text mode only, 256MB is overkill.


Also, combine my previous blog entry with memtest (replace /boot/... with /media/usbkeyname/boot/...), and you now have Belenix/memtest on USB.


“I want one!”

You can go and buy a 1GB key, download Belenix, burn it on CDROM and install it with usbdump. Or you can leave a comment on my blog and let me know how you have used Belenix on USB or plan on using it, and the best story in two weeks from now gets a free USB key preloaded with Belenix (november 9). I even pay shipping. Not a contest, just me giving personal stuff away for free to the person I choose, like MaryMaryQuiteContrary would say...


How cool is that? Start typing!


Further reading (links)


http://solarisdesktop.blogspot.com/2007/10/where-is-cdrom-belenix-story.html

http://solarisdesktop.blogspot.com/2007/10/fun-with-grub-memtest.html

http://blogs.sun.com/moinakg/

http://www.genunix.org/distributions/belenix_site/?q=home

http://www.genunix.org/distributions/belenix_site/?q=node/51

http://blogs.sun.com/anilg/entry/session_persistance_on_belenix_liveusb

http://blogs.sun.com/josephgeorge/category/BeleniX


Where is the CDROM? Belenix Story



Where is your CDROM? A Belenix story


I have a Dell Lattitude D600 laptop. I've had it for a long while. You can see a picture of it (it is for a presentation for work). From that picture, a few questions might pop up in your mind. The first, I'm sure, might be:


“What OS is that?”

It's obviously not Mac OS or Windows. It is also not Linux. Thanks for playing. So what is it? Well, hint #1, it says XFCE Menu at the bottom of the screen. It also says “ innovating on opensolaris” in the middle. More on that later. Next question, please.


“Why did you call it Theremin?”

You have good eyes! My laptops have always been named Theremin. But it particularly applies to this one. It is a laptop with WIFI and WWAN, so it is really totally wireless. I'm also a big fan (and composer) of electronic music. Theremin is the french spelling of Termen, as in “Lev Sergeyevich Termen”, the Russian inventor more commonly known as Léon Thérémin. One of his invention is the Theremin musical instrument. Think of it as a synthesizer without a keyboard. You control the pitch and volume by moving your hands around antennas, wirelessly. Wireless.


“Why do you have spare components next to it?”

Actually, they are not spare at all. I removed the DVD/CDROM, the hard disk and one of the 2 memory DIMM. I even replaced the DIMM left by a smaller one, 256MB. It is as bare as I can make it.




“So how is it running an OS?”

It is booting off of a USB key. A 2GB Lexar Firefly. This thing is SMALL, but comes in capacity up to 8GB. Truly physically small enough to fit on your key chain.


“And what else?”

Belenix 0.6.1. This has already been out since mid July, but I've only gotten around to using it for the past few weeks. Belenix is an opensolaris distribution. It has KDE and XFCE, all the good stuff from Solaris like ZFS, zones and DTrace. Oh, it also has Gnu Parted. And Compiz. And Koffice. It is a live CD distribution, similar to, say, Knoppix. To use it, you simply download the ISO, burn it on CD and boot that CD.


“Ah, but isn't it hard to get it on a USB key?”

To get on the USB, you log in as root, insert your USB key (1GB or more, I used a 2GB in my case) and from the command line, you type:


usbdump


That is it. No other step. You are done. You can now reboot the machine and if you have boot from USB as the first choice in your boot order, it will boot from the USB key and come up with a GRUB screen.


Yay! See also Moinak Ghosh's blog.




Monday, October 22, 2007

Fun with GRUB: memtest

So you want to add a memtest entry to your Solaris GRUB menu at boot time?

Download memtest from www.memtest86.com

extract:


[] gzcat memtest86-3.3.tar.gz | tar xvf -
[] cd memtest86-3.3
[] cp precomp.bin /boot/platform/i86pc/kernel/memtest
[] chmod a+x /boot/platform/i86pc/kernel/memtest


Edit /boot/grub/menu.lst and add at the bottom:


title Solaris memtest86
kernel /boot/platform/i86pc/kernel/memtest


When you reboot you will have the option to run Solaris, Solaris failsafe or, now, memtest.

Let me know if you are interested in more GRUB tricks.

Wednesday, September 19, 2007

NWAM and zones

Of course, NWAM wont help me at all with zones on a laptop, or will it? If my wired interface is not plumbed, I cant tie a zone to physical bge0 (my network card on my laptop). Before NWAM (network/physical:nwam) I had found a way to assign a secondary IP to bge0 and that worked to some extent. Basically, you would define an addif to /etc/hostname.bge0 and bge0:1 would come up, with bge0 plumbed or not, and the zones would be on that same network.

Let's try. I unplug the laptop from the network and reboot, so that bge0 is nowhere to be seen. 172.16.0.0 is one of the reserved private B class (up to 172.31.0.0) that is available, with plenty of breathing room (instead of potentially dealing with multiple C classes). Adding to /etc/hosts


172.16.0.2 globalzone
172.16.0.3 zone1
172.16.0.4 zone2 etc.


and adding to /etc/hostname.bge0


addif globalzone


Reboot, and... it didn't work. Hmmm. Maybe the standard way to assign IPs and NWAM can coexist.


# svcs | grep network
[...]

This shows many services, but two that are dealing with physical.


# svcs | grep physical

online 12:46:34 svc:/network/physical:nwam
disabled 12:46:37 svc:/network/physical:default

# svcadm enable network/physical:default

# svcs | grep physical
online 12:46:34 svc:/network/physical:nwam
online 14:48:46 svc:/network/physical:default

# ifconfig -a

bge0:1: flags=201000843 mtu 1500 index 2
inet 172.16.0.2 netmask ffff0000 broadcast 172.16.255.255



We are up, yay! We can now proceed at the installation of zones on a laptop without worry about network access (very useful for demos on the road).

In the next blogs I'll show why zones are so cool for a desktop or laptop (it's not just for servers, you know). I'll also show how you can gain (real) network access from a zone.

NWAM

Waiting for the newest Developer Edition, I'm running a relatively recent Solaris Express, B66 (selected the Developer Edition option at boot time). Coming from B57 or so, it's a big boost for laptops. Why is that? NWAM. No, not a new WHAM produced by Maurice Starr, but simply NetWork Auto Magic, an opensolaris project.

Imagine the following. You install B66, networked, with full intent to unconfig the network card and install something like inetmenu, wireless network drivers, write some scripts etc so you can switch between at home wired, at home wireless, at work wired, at work wireless, on the road wired, on the road wireless etc.

Then, you finally login (forgetting to plug in your wired network) and are greeted by a dialog showing you all the various wireless access points and asking you to choose which one you want to connect to. Whoa! This is a cold install and everything was detected, and now this dialog is telling me that I dont need inetmenu and all those scripts to attempt to connect to a network?

iwi0 shows up under ifconfig. I decide to instead go with wired, plug the cable and bge0 is brought up, detects DHCP, gets a new IP and instantly i'm on the wired network.

Pretty cool! Wired or wireless, this pretty much "just works (tm)". Couldn't have been an easier experience.

See:
http://dar-k.blogspot.com/2007/07/solaris-network-auto-magic-nwam-project.html

Thursday, September 6, 2007

Quick!

From time to time, the marketing team at Sun change their graphics on the Homepage. When the image with the sunflowers appeared (http://fr.sun.com/sunnews/feature/2007/070821/images/b1_geo_eco.jpg), I noticed that the time to load was long. And every time. But I had other things to take care of.

Finally, this morning I sent a message to the Webmaster, mentioning that the size of the image is too large.

The same image by regional sites:

USA (nla) ~50KB-60KB
Canada (English) 49KB
Canada (French) 51KB
Spain 40KB
Latin America 49KB
France 250KB !


I did not expect anything, so imagine my surprise when a short time later, I receive an email which tells me that the issue is transmitted to the technical team. Furthermore, less than 10 minutes later it was corrected (60KB now)!

Now, why so much difference between the different sites? More than likely, each one uses a different software, a different ratio etc.

How can you prepare an image for the Web with Solaris?

With Imagemagick, included with Solaris (/usr/sfw/bin):
convert b1_geo_eco_master.png -quality 50% b1_crushed.jpg

50% is usually very good for the Web, but if not, you can use -quality 60% or more (the size goes up with the quality).

Another option, with Imagemagick found at Sunfreeware (pkgadd -d imagemagick-6.3.0-sol10-x86-local) or Blastwave (pkg-get -i imagemagick):
convert b1_geo_eco_master.png -strip -quality 50% b1_crushed.jpg

The -strip option is new (not found in Imagemagick 5.x) and remove all profiles and meta-data that the image may have due to programs like Gimp or Photoshop and color profiles that digital cameras tag to images.

Wednesday, June 6, 2007

Sun Studio 12 is now available



The Sun Studio 12 software suite delivers high-performance, optimizing C, C++, and Fortran compilers. Studio 12 marks a really important jump from Sun Studio 11 as far as the environment itself is concerned. This is based on the more recent Netbeans 5.5+ and is an incredible tool. Through the Sun Studio Express program, and then through the Early Access program, I was able to experience firsthand all the enhancements and new features over the course of the last 5 months. The performance of the resulting compiled applications is really phenomenal, even on 64 bit AMD and Intel processors.

It is now the development environment to beat when it comes to native applications, under Solaris or Linux. Although there are currently no version under windows, I wouldn't be surprised if one did materialize. We've ditched MS Windows and MS Visual Studio on all desktops, and now enjoy increased productivity. Sun Studio 11 did provide the performance, but it didn't provide the level of user friendliness that Sun Studio 12 now provides. It is not perfect, but it is a really solid product.

Sun is on a roll, providing once again best in class software, but at a surprisingly low cost: free.

In the coming weeks, I will mention some specific tools or aspects of Studio 12, stay tuned.

As of today, you can download it here:
Sun Studio Download

or request a media kit here, for free (I will have to confirm if this includes the just released Sun Studio 12 or 11):
developers.sun.com