Thursday, 11 July 2013

menu.lst examples for FatDog64 64 bit linux

If you are used to using Puppy Linux then you might know the menu.lst commands, but now with FatDog64 the syntax has changed a bit so you need to adapt your menu.lst entries if you want to boot up FatDog64 from a folder on your hard disk, which is the best way to do it since it requires no Cd burning and also it does not use up or "own" an entire disk partition. You can put unlimited installations of various Puppy Linux distributions on the same hard disk partition and dual boot to any one of them!

These lines are instructions to the boot loader for which linux to boot and which initrd to load. Since the files are on the hard disk the numbers have to be specified and the boot loader will not just detect them.

See this topic for more information about the boot parameters to FatDog64. 



# Example menu.lst entries for FatDog64 621
#   Explanation of the device numbers
#     (hd0,0) - First partition on first hard drive
#     (hd0,1) - Second partition on first hard drive
#     ...
#     (hd0,4) - Fifth partition on first hard drive
#     etc...
#     sda1 = First parition
#     sda2 = Second parition
#     sda5 = Fifth parition
#
# So on my machine...
# F:\ is /dev/sda5 aka (hd0,4)
# C:\ is /dev/sda1 aka (hd0,0)
# D:\ is /dev/sda2 aka (hd0,1)


# LOAD FATDOG64 IN RAM. WILL NOT LOAD A SAVEFILE.


title FatDog64 - 621 - F: - sda5 - RAM
rootnoverify (hd0,4)
kernel /fd64_621/vmlinuz savefile=none
initrd /fd64_621/initrd

# Load FatDog64 - Look for savefiles in all disk drives in the root and one folder deep
#   In other words it will scan all the partitions, and every root level folder for
#   potential save files. This is Ok, but you should rather use following entries
#   that gets options which actually specify the name of the savefile which saves
#   a few seconds at boot time.
#   If you specify search=1 then it will only look for save files in the root
#   of each drive partition, and not go into any folders.
#   If it finds two savefiles it will ask so remember to save the save files with a
#   decent name if you use multiple save files, otherwise it is difficult to know which
#   one to load.
 


title FatDog64 - 621 - F: - sda5 - Automatic savefile
rootnoverify (hd0,4)
kernel /fd64_621/vmlinuz search=2
initrd /fd64_621/initrd


# Load FatDog64 - Use custom savefile in a folder
#   If you like, you can specify the path to the savefile when you create it, so
#   now I installed FatDog files into f:\fd64_621 by unzipping the downloaded
#   .iso file using 7zip. Since I have installed to f:\fd64_621 which
#   on my machine is /dev/sda5 I can save my savefile in the same folder and
#   then just move the folder around when I need to upgrade. On the new machine all
#   I have to do is then edit the grub entries and everything is all together. Technically
#   my whole Os is just in one folder that I can copy and paste to any machine I like   


title FatDog64 - 621 - F: - sda5 - Custom Savefile
rootnoverify (hd0,4)
kernel /fd64_621/vmlinuz savefile=direct:device:sda5:fd64_621/fd64save.ext4
initrd /fd64_621/initrd


# Load FatDog64 - Use the default save file(The location of which you chose when you created it)
# If you put the FatDog files into (hd0,4)  and then saved your savefile into /dev/sda5 with
# the default filename you can use this option
 


title FatDog64 - 621 - F: - sda5 - Default Savefile
rootnoverify (hd0,4)
kernel /fd64_621/vmlinuz savefile=direct:device:sda5:/fd64save.ext4
initrd /fd64_621/initrd 




Installing Gcc On FatDog64 621

I needed to use Gcc to benchmark 64 bit instructions on Linux for my 64 bit machine. So I installed FatDog64 but by default it does not have gcc(which would be nice), but they leave it out to keep the installation small.

So you have to download a separate .sfs file and then use that to hoist pre-built gcc and other build tool such as Python into FatDog64.

The sfs file that contains gcc for Puppy Linux (which FatDog64 is a derivative of), is known as the devx file. The specific file you need for FatDog64 621 is http://distro.ibiblio.org/fatdog/sfs/600/fd64-devx_620.sfs, but you might have a newer or older version of FatDog64 so see here if there is one for your version, otherwise pick the closest match.

Once you have the devx sfs file, you need to put it on your hard drive and then tell FatDog64 to load it into the filesystem at startup, so that the gcc tools will all then be on the path and you can build files like normal.

1) In FatDog64 start menu, go to the Control Panel option.
2) The control panel will appear.
3) Click the system tab.
4) Double click the System Sfs Loader
5) Select the "devx sfs" file that you downloaded. Now this might be a bit tricky as by default it might not appear in the listing, so navigate to the root directory of where you installed FatDog64 and then put all your sfs files into that folder. Next time FatDog64 starts it will then know the correct place.
6) Be sure to tick the checkbox that specifies to load at next startup.
7) Then click the load button.

This image shows the System SFS loader, with some .sfs files in the right panel. Sfs files in the left panel are available and the ones on the right are the loaded .sfs files.  What these actually are is compressed file systems(SFS = squash file system), and the contents of the file systems are mapped into the unix file system so that it seems like the programs are there, in this case Gcc, but if you look in this picture I also have the 32 bit compatibility layer and the Wine installed via .sfs files.

Click image to enlarge


Now you will have gcc and make installed on your system and can then start doing things like building c++ programs or adding in an IDE like Codeblocks for example. See this topic for information on getting Codeblocks running or download a pre-built Codeblocks folder for FatDog64.
This image shows FatDog64 running gcc in a console, and also loaded via means of sfs is Wine running a Windows application.

Installing Wine On FatDog64 621

Wine is a program that you can install into FatDog64 that will allow you to run Windows programs, for example Macaw or Macwaves.

Before you begin, make sure you have installed FatDog64 Linux and also that your savefile is created. Loading sfs files is easiest when you have already created your savefile. The savefile is a file on the disk that FatDog64 uses to store all the local settings(such as mapped sfs files for example) .

Installing Wine in FatDog64 is very simple. You need to follow these steps.

1) Download the Wine sfs file for FatDog64 from here(about 30Mb) (Click here to view all the sfs files available)

2) If you do not have it already then you also need to 32 bit compatibility layer so that Wine will execute it. Get the compatibility layer from here(30Mb).

2) Place the sfs file in the root of the drive where you have the FatDog64 folder. In my case that is f:\fatdog64_621 from a windows view, and /dev/sda5/fatdog64_621 from linux.

3) If you are in Windows, then reboot and boot into FatDog64.

4) Tell FatDog64 to load the sfs file when it boots up, then reboot FatDog64. Do this by opening the FatDog64 System Sfs Loader, which is in Start Menu/Control Panel/System/System Sfs Loader. If you downloaded the 32 bit compatibility layer then you must add that into the Sfs loading as well so that Wine will execute properly.

If by default your System Sfs Loader wants to load files from root home but that points nowhere then you might need to mount your hard disk and browse to the place where you put the sfs files. I put them in the root of the partition where I installed the fatdog64 files, in my case F:\ but on Linux it is known as /dev/sda5 on my machine.
FatDog64 Linux with the control panel and the System Sfs loader panels opened. Click the image to enlarge.


FatDog64 Linux running a Windows application called Macaw in Wine. Also there is a console open running Gcc but that is not in Wine, but does show also that Gcc can be loaded into FatDog using sfs files.



Installing FatDog64 for Dual Boot From Windows Xp

This is about installing FatDog64 64 bit Linux on your hard disk without needing to burn a Cd  and without needing to use an entire hard disk partition.

I am trying FatDog64 so that I can use 64 bit instructions on a 64 bit computer. I have Windows Xp 32 bit but I want to benchmark some 64 bit instructions so FatDog64 seems the logical choice since it is about the smallest decent Linux that is 64 bit and that can be downloaded quickly. Around 224 megabytes for the download. Other linux are about 600Mb to 3Gb of download which is just not going to happen.

You can get FatDog64 from here.

I am going to install FatDog64 simply by unzipping the ISO file and putting the contents into a directory on my hard disk. I am doing this using 7zip on windows. Then I will add a boot entry so that I can dual boot into Windows Xp or into FatDog64. Actually I can already dual boot into another Puppy Linux called Precise Puppy.

Important! FatDog64 includes options for installing to disk in much the same way as this article describes, so if you want to burn a Cd and then install from the Cd to the hard drive then that is an option. The downside is you have to burn a Cd, the upside is it puts it on the disk for you. The method described in this page requires no Cd to be burnt, you can just unzip the iso and boot from the unzipped contents using GRLDR...

See here for information on how to setup the boot loader to make it possible.  - This involves adding one line to the Windows Xp boot.ini file, and then editing a file called menu.lst. Fairly simple if you follow the instructions properly.

Doing it like this means you do not have to burn to a Cd and you can install as many different Puppy Linux distributions on the same computer. So after this I will have a 64 bit Puppy Linux, 32 bit Precise Puppy and also Windows Xp. More than enough to work with!

So at this point I have the contents of the iso file extracted to f:\fd64_621 on my Windows Xp machine, which is about to be dual bootable to FatDog64 linux as well. The problem now is how to dual boot to FatDog64. Fortunately from Windows Xp this is very simple.

1) Put GRLDR - Needed to boot up FatDog64
Click here to download GRLDR, a small binary file that you must copy into the root drive where Windows Xp is installed.

2) Edit menu.lst - tells GRLDR HOW to boot the FatDog64

Click here to download a sample menu.lst file used for booting FatDog64

Read this topic for information about how to edit the menu.lst file to add entries for booting to FatDog64
The example menu.lst file is for the F:\fd64_621 folder on my computer so if you put it on c:\otherfolder thenpay close attention to the device numbers in your menu.lst entries.

3)  Edit boot.ini
In your Windows Xp drive, like c:\ for example there is a file called boot.ini. Double click it and it will open in Notepad. Add the following line.
C:\GRLDR="Start GRUB"

4) Reboot the machine
Reboot now and you will see the "Start Grub" has been added to your bootup options. Choose "Start Grub"

5) Select an option that appears
If you edited your menu.lst file correctly then it will boot and it will boot fast.  FatDog64 is in it's own world when it comes to boot speed. It literally just starts. No questions, no delay. Takes about ten seconds.

6) Create the savefile
The first thing you want to do once FatDog64 has started is to create the savefile. Do this just by opening the start menu and clicking reboot. It will ask some questions and then it will create a save file. I do not need so much space so I chose a size of 192Mb. Also I chose the ext3 file system because it sounded best and also I save my files into the directory fd64_621 but you can just use the default filename etc...

7) Wait for reboot
After rebooting it will load again. Now is up to you which option from the menu.lst file to use. The first one in the examples says to use all Ram, this means no savefile, so if you get stuck use this option. Otherwise pick the automatic option and it will locate the savefile for you. When you are ready though try and edit the menu.lst file so that it knows exactly which file to load, which will save a few seconds of time at  boot up.

On my machine, since I added all my sfs files into /dev/sda5 aka F:\ it automatically asked me which sfs files to load on the second boot. This was kind of convenient but you can also just configure the sfs at any time from the control panel.



Results
So I rebooted the machine and it loads and boots first time. My initial thoughts are that it boots up the first time about 5 times faster than the Precise Puppy, asks about no questions and then runs very well. On the flip side, the part when you shut down that asks where to save the storage file wants to put the storage file into a partition and does not automatically put it in the folder where I unzipped the puppy files, but maybe that is just because I am used to the way it works in Puppy 5.6.1 32 bit, but you can of course specify that it does like old Puppy did just by adding the folder name plus a forward slash before the filename.
This is what FatDog64 looked like on my second boot after creating the save file. Note that if you want it to do this for you then you must put your sfs files into the root of the drive where you put the FatDog64 folder.

And this shows FatDog64 running gcc 64 bit and also Macaw(a windows 32 bit music program ) in Wine. I enabled Wine and gcc by using the Systems Sfs loader applet in the System panel of the control panel, which you can open from the start menu.


Overall it looks like FatDog64 is going to become my go to desktop for anything to do with Linux and 64 bit stuff.

  • It loads fast
  • I can dual boot from Windows Xp 
  • It requires no Cd burning
  • It requires no separate partition
  • I can put different versions of FatDog64 alongside different versions of Puppy Linux in the same disk partition
  • It does not modify the MBR
  • It is 64 bit!
  • It can still run 32 bit programs via the 32 bit compatibility layer

Sunday, 7 July 2013

Install Puppy Linux On Your Windows Computer

Installing Linux can be a headache for people used to working with Windows. Fortunately there is Puppy Linux which allows you to simply copy some files into a folder on your hard disk, possibly on the same drive as your Windows installation, and then boot the Linux from the folder. It does not require it to own an entire hard drive partition as almost every other Os does.Also using this method requires no cd, and it will not modify your boot partitions.

Rationale To Use Puppy Linux - Puppy Linux is tiny and fast. A 170MB download plus another 100MB to add GCC. Other distributions are much bigger. Boots from folder on same drive as windows, or from folder on any drive. Multiple installs on same partition. Multiple "states" per install. Easy to add, easy to remove. Boots fast.

1) Download Precise Puppy 5.6.1
I recommend 5.6.1 because it is most compatible with Debian, which is most compatible with some other Linux distrbutions. You can get the files from http://distro.ibiblio.org/quirky/precise-5.6.1/ . You need the precise-5.6.1.iso file and if you want to do programming with gcc then get the devx...sfs file as well.

2) Download and install 7zip
If you already have 7zip then just unzip the iso somewhere.You need 7zip to unzip the .iso file. Yes, that is how this works. The iso gets unzipped and then we direct the Windows boot manager to boot directly from the files. You need to unzip the iso in a folder that is one level deep off of the disk drive, for example, c:\ppy561 or d:\puppy561. I used ppy561 as the folder name. A folder name like d:\myfiles\ppy561 is not good because it is two levels deep. It must just be one level off the root of the disk drive.

I seriously recommend using c:\ppy561 because then you can complete the following two steps with minimal effort. Otherwise you will need to manually edit the menu.lst file(see step 4), but that is not so hard if you really want to put it on d:\ or e:\ for example.



3) Download GRLDR(Grub Loader) and configure the boot entry for it - Click here to download

GRLDR is a tiny file that we will put into the c:\ or the drive where Windows is installed. You need this file so that the Windows Boot Manager can transfer the booting to GLDR, which will then boot Puppy Linux from the folder where you have placed the files.

If you are using windows Xp, then add the following line to your boot.ini file, which is located in the root of the Windows drive, for example c:\boot.ini

Add this line to boot.ini for Windows Xp
C:\GRLDR="Start GRUB"

Note that I have note tested these versions of Windows below. I only did this with Windows Xp, which is a much better system for me because it is faster and I don't see how applications that use four times the memory are better.
For other versions of Windows you will need to use more complicated means and tell it to start the GRLDR file for you. Try these links for more info.
http://diddy.boot-land.net/grub4dos/files/install_windows.htm
See this topic at Microsoft for more information.

http://www.sysprobs.com/free-gui-boot-loader-editor-windows-7-forget-command-tool

If all of that seems to much, also try EasyBcd, which is a tool you can use to edit the boot in Windows 7 and 8 and Vista from a GUI.

Any way it goes down you need to simply get some form of grub into memory and direct it to boot the initrd and kernel from the unzipped iso. Thats all.

4) Download menu.lst - Click here to download
The menu.lst file is used by the Grub loader to know which folder to boot Puppy Linux from.

If you placed the unzipped iso files inside c:\ppy561, then just put this menu.lst file in the windows drive along with your GRLDR. Otherwise if you really needed a different folder like d:\ppy561, or c:\puppyx then you must manually edit the menu.lst file. Instructions for editing the file are in comments, and it involves assigning the correct drive numbers to about 5 lines of commands to the grub loader. Much easier than it sounds, and it cannot break your computer, but basically just involves editing the file and then rebooting until it works in the case you have to guess the numbers. You can edit the file in windows using Notepad or Wordpad and then just reboot.

After doing all the steps above you should end up with something like this...



5) Put SFS files
If you downloaded the devx sfs file(a Puppy package that has gcc) then put it in the root of the drive where your Puppy folder is. If you put Puppy in c:\ppy561 then put the sfs files in c:\ for example. Note that once Puppy is running you must run the Boot Startup Configuration program from the start menu to tell Puppy to load the sfs files you want.

6) Finished
So now you should have a working Linux and dual boot. From here you can boot into Linux and then do things like build code and learn abut Linux. See this link for how to put a C++ IDE called Codeblocks into the Puppy Installation with minimal effort.





Install Codeblocks On Puppy Linux

Note this article is superseded by a newer build of Codeblocks 12.11 from here.

I needed to use Codeblocks on Puppy Linux, but it is a big job to build it and the rpm files from Codeblocks do not work so I found a much easier solution.

First  I installed Precise Puppy 5.6.1 on my computer. I installed it so that I can just boot to either Windows Xp or to Puppy Linux. If you need to install Puppy Linux on your Windows computer so that you can dual boot to Windows or Linux then please click here. Installing the Puppy Linux is not like other Linux installs, you can just put the files in a folder and then boot from the folder. In other words you can have three different versions of Puppy Linux on the same drive and partition as your Windows installation!

Installing the Codeblocks is simple using this method, which places an sfs file that Puppy loads into the Uniz filesystem automatically for you...
1) Download the sfs file. An sfs file is a special file that Puppy uses to manage packages.

(Note that this version of Codeblocks works well on Puppy Linux 5.6.1 but on previous versions of Puppy Linux, such as 4.3, the step debugging does not work, so I recommend using Puppy Linux 5.6.1)

2) Place the file in the root of the drive where your Puppy Linux folder is. So if Puppy linux is in d:\ppy561 then put the sfs file in the d:\

3) Boot to Puppy Linux and then go to the menu, and locate the "Boot Manager" entry. Browse to the sfs file and the select it for loading at boot time.

4) Reboot the Puppy Linux and then Codeblocks will be installed.

Saturday, 6 July 2013

Suse Studio - Build and test your own Linux online

One problem with downloading Linux to use for testing and building C++ is that all the Linux servers deliver distrubutions that are made for users, packed with lots of programs but no decent IDE or GCC, and certainly not properly configured.

So I found this online Linux distribution building tool at http://susestudio.com which allows you to build and then run your own Linux, either 32 bit or 64 bit, with KDE, Gnome, XFCE or other window managers, and it allows you to build to a disk image, Live CD, and various virtual machine images.

All you have to do is register free at http://susestudio.com and you can start building right away, with all the files and options stored online, it's all done through the browser.

But please note, this is just a fallback solution for those looking for a very specific flavor of Linux and not something I would recommend if you just want to watch movies, listen to music or check the email, for that try Puppy Linux or FatDog64 if you have a 64 bit ready computer.