Last update: 21/06/2023

Ficara Emilio Pietro Giovanni

Linux howto
Bing traduci in ITA

Other pages in this section:

Linux free software

Home
Page index:

Introduction

 I am a typical Windows user, but this year I decided to switch to Linux;
this page will be intended as a short report of my experiences in this job.
 Sometimes a little problem requires a huge amount of time to be solved,
expecially if you don't have the right tools.
 Switching to Linux can be, sometimes, a little bit frustrating, 'cause your
"usual" win instruments are still present, but in a different form or name.
 I hope the tips and tricks you can find here will be useful for shorting the
"switching time" if you are doing the giant leap to the open source world.

Install Puppy Linux on Alix-1D motherboard based system
 The "Alix-1D" is a compact mini-ITX motherboard with VERY low power consumption,
based on AMD Geode chipset; infos about the board can be obtained at this link:
-> http://www.pcengines.ch/alix.htm.
 The hard disk can be a normal IDE 2.5" or a compact flash memory (there is an
on-board connector) and the 256 MBytes RAM is mounted directly on the board.
 If you use a Compact Flash memory as main mass storage, the Puppy Linux is the
best choice, 'cause it can be set to run entirely in RAM ; the access to disk
will be limited and the life of the Compact Flash memory may be long.
 So, let's start to install; this is a step-by-step operations list using a
Windows PC to create a Linux based Alix PC.

1) Get the "Unetbootin" program from the Internet at this link:
    -> http://unetbootin.sourceforge.net.
    This tool simply installs an ISO file on USB memory key and makes it BOOTABLE.
2) Get the "Puppy Linux 4.2 retro" ISO file from the Internet at this link:
    -> ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.2retro-k2.6.21.7-seamonkey.iso.
    or the "Puppy Linux 4.3.1 retro" (last stable distro) from this link;
    -> ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.3.1/special-puppies/pup-431-k2.6.21.7-scsi-intel_modems.iso.
    Both versions are based on kernel k2.6.21.7 that runs fine on Geode chips.
3) Also get the MD5 (checksum) file for the the 4.2 version from this link:
    -> ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.2retro-k2.6.21.7-seamonkey.md5.txt.
    or the 4.3.1 version from this link:
    -> ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.3.1/special-puppies/md5sums.txt.    
    Both are text files, so them will probably open directly under your browser;
    in this case, click on the right mouse button and choose "save target as" for download.
4) Get the "HP DiskOnKey" USB disk storage format tool from this link:
    -> http://www.pctuner.org/download/utility/SP27608.exe
    (or search an alternative on Google).  
5) Get the "HashTab" program from this link:
    -> http://beeblebrox.org/.
    This program integrates the Windows shell and after installing, you have a new
    feature on the mouse right click: you can compute the MD5 verification code for any file.

 Well, you have now all that you need -as software- for starting the job; please, install
the HashTab and the HP Format tool programs; the Unetbootin program doesn't need to be
installed, it is already executable.
 As first operation, right click the downloaded ISO file to verify the MD5 check code.
 The HashTab has added to your right click menus the MD5 computation tool, so copy the
MD5 code from the *md5.txt file and paste in the verify box; if the checksum is good,
a green 'V' will appear, so the downloaded file is correct (see below).


Now, the hardware; you just need for an USB memory key (at least 128 MBytes size) and, obviously, for a compact flash or a 2.5" IDE hard disk to connect to the motherboard. Let's go with a Compact Flash memory, cause is "compact" and fits directly in the motherboard's socket; a 512 MBytes or 1 GByte size will be enough for a small system. 1) Format your USB memory key with the HP tool, specifying the FAT file system; the boot option isn't needed (see below).
2) Start the Unetbootin program and select the Puppy Linux ISO file you just downloaded from the Internet, wait for end of operations and NOT restart the Windows system.
3) Remove the USB key from the Windows system and put it in the Alix board. 4) Turn ON the Alix board and go into the BIOS, Advanced Features, and select the USB drive as the first boot device, then restart. 5) After a while, you can see on your screen a selection box for what option to start; choose Puppy and go on. 6) You will be requested for mouse type (PS/2, USB or RS232), for keyboard layout and for video mode. Select the appropriate keyboard and language for you and Xvesa for video. 7) After a while the splash screen (and dog bark) will appear, at typical 800x600 screen size. Accept it or change (better) to 1024x768, 16 colors. Now you have a fresh Puppy Linux Live OS working. You can play with it or start the installation on hard disk (the Compact Flash in this case). Puppy Linux has very powerful install feature and many useful tools, all this in about 100 MBytes of ISO file ! Note that Puppy Linux is less "paranoic" than other Linux distros. This means that you start as superuser (root) and without any password. Naturally, you can set your own users and passwords if you really need them. In the Alix-1D case, and generally in embedded applications, the need for a severe security feature is inexistent, so the "Puppy way" to operate is good and smart.
Go on installing OS onto the compact flash disk
 Now.. you're running your Puppy Linux from USB memory key. It's time to install to
hard disk; in this example we use a Transcend 512MB Compact Flash, rated for 80x access
data speed (normally used for photo cameras).

1) From 'menu' select -> System -> GParted partition manager ; this launches the disk partition
    program. From the disk selection choose the 'hda internal drive' and click Ok.
   If the Compact Flash was never formatted before, probably there is a fat16 default space
    of about 500 Mb named as /dev/hda1. Click on the box (the contour becames dotted) then choose
    -> Partition -> Delete ; confirm clicking on 'apply'. Now there is only unallocated space.
   Click the box (as usual the contour becames dotted) and select -> Partition -> New, then leave
    all fields as default (Primary Partition, ext2) and click 'Add', then confirm with 'apply'.
   Now, close the partition manager.
2) From 'menu' select -> Setup -> Puppy universal installer ; this starts the Puppy installation
    on the hard disk. Select 'Internal (IDE or SATA) hard drive' as destination and confirm the
    following box with hda installed disk.
3) Click the small dog with 'install Puppy to hda1:', then OK. At this point the program asks for
    location of installation files. There is a selection with two buttons: 'CD' and 'DIRECTORY';
    your files are on USB key, so you must click on the desktop icon called 'sda1' (that looks
    like a usb memory key drive) to make it available (mounted). Note that Puppy likes a single
    click, not double, for many operations. Now the sda1 is mounted (a green dot appeared on it)
    and a window opens with the contents of /mnt/sda1 directory. Well, close that window and
    choose 'DIRECTORY' for the install files location.
   The installer now shows a file selection dialog; on the left panel, double click '../', then
    'mnt/', then 'sda1/' ; on the right panel, now, double click the initrd.gz file.
4) The installer asks now for selection for FRUGAL or FULL install; choose FULL and the installer
    will start copying files from the USB disk drive. This will require some minutes... so, please
    WAIT PATIENTLY (don't do anything else on the system) until next box appears !!! 
5) When the installer has finished to copy files, it asks for the GRUB installation. The GRUB is
    the boot manager for the system; it can boot your PC from external drive or will reside on
    the MBR of your internal disk. In my opinion, this is the better way to use it on the Alix
    motherboard system, so click 'install/update GRUB', ignoring 'Boot from USB'.
   Next box will ask for 'UPDATE' or 'INSTALL', choose 'INSTALL' and confirm with 'OK'.
   Again a box, with 'simple' or 'expert' mode, choose 'simple' (it's simpler !!!), then on next
    message choose 'standard'. Next box asks for GRUB location; leave it as is (/dev/hda1) and
    confirm clicking 'OK'. The last selection, now: where the GRUB start sector has to be stored.
   Choose 'MBR' and click 'OK'; click again OK on the next message box, leaving blank the text field.
6) If all is gone right, you can see now the GRUB INSTALL SUCCESS message; click 'OK' and when the
    program goes to next message, proposing to redo the operation, click 'NO'. Finished.
7) Verify, now, if the GRUB is OK. Single click on the desktop icon hda1 to mount it; the contents of
    directory '/mnt/hda1' is shown. Click on 'boot', then 'grub', then 'menu.lst'. The 'Geany' text
    editor will open the grub menu file for editing. If you see a line with text 'title Windows
    (on /dev/sda1)', then you have a problem. The grub installer thinks you have a Windows OS installed
    on the HD and has set the option to boot that, not Puppy; in this case, follow next steps to force
    the Puppy Linux booting:
    a) remove all file lines (empty file)
    b) write next lines:

        timeout 3
        title Puppy Linux (on /dev/hda1)
        root (hd0,0)
        kernel /boot/vmlinuz root=/dev/hda1 ro
        boot
        title - For help press 'c', then type 'help'
        root (hd0)

    c) save the modified menu.lst and close the editor    
8) From 'menu' select -> Shutdown, then click the shutdown button. The program asks for saving your
    options (mouse, keyboard etc..) but your answer will be 'NO'. I suggest to do this way 'cause
    you still have to set some option in the freshly installed Puppy.
9) Your Alix PC is now turned OFF; remove the usb key and power-on it again.

 Your Puppy Linux will start and run from the Compact Flash drive. You will be asked again for
mouse, keyboard and video, but this is the last time.
 Note that you have over 188 MBytes free for your programs on the 512 MBytes CompactFlash disk !!!
 Enjoy Puppy Linux !!!
monitor and board picture
Install GAMBAS2 visual Basic under Puppy Linux
 Gambas2 is an excellent visual Basic FREEWARE for Linux. It's extremely simple to learn,
expecially if you're accustomed to the M$ environment. If you want to start programming
under Linux, I highly recommend this installation ; you can have a full visual development
environment in minutes...
 For Puppy Linux installing, you need for two PET packages.
 I found them in the -great- Puppy Linux discussion forum
-->  http://www.murga-linux.com/puppy/.

 ** edited Mar 10 2010: links modified due to unreacheable server ; thanks to forum's
members 'Dejan555' for providing new hosting for packages and 'Gposil' for building the
Gambas2 package for Puppy. **
 
 The PET package for Gambas2 can be downloaded from this link:
--> http://puppy.b0x.me/software/packages/programming/gambas2-2.7.1.pet.

 I noticed that the only Gambas2 package is not enough for starting programming ; 
some dependencies are missing, but I discovered another package that can fill the bottle
and make usable the IDE ; that's the "Kommanderlibs.pet" and can be downloaded from this link:
--> http://puppy.b0x.me/software/packages/libs/Kommanderlibs.pet.
I suggest to choose "open with default application (petget)" after clicking the provided link. After the petget has finished downloading, wait for installation; this will require a lot of time (minutes), depending upon the speed of your processor. Don't do anything else, but WAIT until you receive a dialog with status and missing dependencies, then click 'OK' and go on. If all is OK, you can click on 'menu' -> 'utility' and in the list you can find the Gambas2 icon. If such icon is not present, then click 'menu' -> 'refresh menus', wait for end of operation and redo 'menu' -> 'utility'. Now the Gambas2 icon must be present. If you now click the Gambas2 line, probably the IDE won't start, 'cause some library is still missing. So, click the "Kommanderlibs" link and choose, again, "open with default application" and wait for the download and installation. At end of job you will see the dialog with the results, so click 'OK' and go back to the 'menu' -> 'utility' -> 'Gambas2'. Now the IDE must start and you can implement your first Gambas2 project. I suggest to use one of the examples as starting block; there are so many that you surely can find one near to your development project. Note that NOT ALL the examples can run with this installation. Some other module / library has to be installed, depending upon application. ** added Feb 22 2010: If you want to run the Web Browser demo, you also need to get the 'kdelibs' package. This can be found on this Murga-Linux forum's topic posted by Dejan555 --> http://www.murga-linux.com/puppy/viewtopic.php?t=41115, or downloaded directly from this link --> http://www.fileden.com/files/2008/12/26/2239160/kdelibs4c2a.pet. ** ** added Mar 10 2010: Still another package will be necessary to run the Web Browser example; download it from this link: --> http://puppy.b0x.me/software/packages/utilities/mp.pet. then install as usual. ** Well ! Have nice time programming with Gambas2 under Puppy Linux, all free, all working fine, all documented and VERY powerful !

Troubles with internet connection
 My internet connection realizes through a wireless router/bridge DIALFACE - Alice Gate 2 plus.
 With the Puppy Linux (and Ubuntu too) default settings, I can't navigate the web or download
files from the internet. I receive just about 5 Kbytes of data and, after that, the connection
"hangs" and nothing more happens.
 I found a solution and hope this will be helpful for someone.
- solution for Puppy Linux:
edit the file /etc/rc.d/rc.local and add the following lines:

 /sbin/sysctl -e net.ipv4.tcp_window_scaling=0
 ifconfig eth0 mtu 1436
 ifconfig eth1 mtu 1436

then save the file and restart Puppy.
 The eth0, in my system, is the wired ethernet interface, while eth1 is the wireless (wifi);
if your wifi interface appears as wlan0, then change eth1 to wlan0.

 - solution for Ubuntu Linux:
 edit (as root) the file /etc/sysctl.conf and add the following line:

  net.ipv4.tcp_window_scaling=0 

then save the file and restart Ubuntu.
 If the solution doesn't work, please add two more lines to the file:

 net.ipv4.tcp_syncookies=1
 net.ipv4.tcp_ecn=0

then save and restart Ubuntu.
 Now the patch must work !