Saturday, 20 July 2013

initrd problem = Kernel panic - not syncing: No init found. Try passing init= option to kernel.

About Initrd
An initrd file, often zipped as initrd.gz is a file containing an "Initial Ram Disk" that Linux loads when it boots. The initrd can contain a very small set of programs needed to just work the computer, like checking files or formatting drives, or it can contain much more functionality, such as display managers and window managers and even GUI programs.

If you have ever tried to make an initrd yourself, you might have come across this problem...

THE PROBLEM
1) The kernel boots
2) It finds the initrd file
3) Then this error here...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

And if you are like me, your init file is probably in the root directory as /init and it is probably a script linked to /bin/sh.

So I tried to copy over busybox and then make all the links, and I also copied all the needed libraries for busybox, which is just libc. Not matter what I tried I get "Kernel panic - not syncing: No init found. Try passing init= option to kernel." from the Linux kernel. This went on for like 8 hours of trying every single combination of things I could think of.

What does "Kernel panic - not syncing: No init found. Try passing init= option to kernel." mean?
A) It most normally means that the kernel can see your "init" script, but when it tries to load it in /bin/sh the sh program is throwing an exception, so the kernel error message can be misleading.
B) It can also mean that the initrd.gz file is corrupt(unlikely), or that the /init file is not there either, also unlikely. The error is most commonly generated from option A, so see solution 2 below for the proper fix to this annoying and misleading error message.

Solution 1 - Use Static Linking
I unzipped the initrd file from Puppy Linux 5.61 using cpio and gzip and I noted that the busybox inside the initrd.gz file is not the same as the busybox found once Puppy is booted. So I tried using this busybox inside the initrd instead and then it boots fine. The reason it works is because it is statically linked, it does not depend on any .so library files, but the real busybox when Puppy is running is linked to libc.so. But this solution is really bad because now you have two copies of busybox in your distribution, one in the initrd.gz file and another somewhere else that gets loaded at the switch_root! I mean two copies of busybox is just not acceptable!

Solution 2 - Put the ld.so libraries!
So I was hunting around on the internet and went through five hundred forums where every guy was making all kind of guesses as to what the problem is but to no avail! So finally I simply copy the ld.so(in Puppy is like ld.22.so and ld-linux.so.2, you need both the files and they are in /lib and are statically linked) files from /lib in Puppy 5.61 into the initrd, and it worked! In other words the kernel error message was caused because when it was trying to execute the /bin/sh program, the program tried to load libc.so, but in order to load libc.so it must also load ld.so first, which then actually loads libc.so on behalf of the program.

Notes
ldd is a program which tells you what libraries a program uses, but you need to be aware that any program which uses libraries also uses ld.so! Keep that in mind when making your initrd.gz file and you can forget about the init not found error message and get on with putting all your files from one distribution into your custom distribution.






Decreasing search popularity for Linux vs Windows

I was exploring some search terms on Google trends to see what is really happening in the world, because the news websites seem to be all advertisements. So I compared some common terms such as Windows, Java and C++ for example. As it turns out, Java is more than double everybody else in the programming department. Then I added Linux, which started out in 2005 with more searches than Java, but has since then till 2013 dropped off by a huge percentage and seems to be fading into obscurity, in direct contradiction to what you would think. But then I added in windows for comparison and the result was as expected, Windows is searched for more than all the other big keywords, and keywords like OsX an iOs will not even register on this graph.

Windows is much more popular than Linux and Osx and all the big programming languages
Click to enlarge
If you look at the picture you will see the purple line on the top is Windows, showing how much interest there actually is in the operating system. The green line is Linux and you can clearly see that Linux as a word seems to be around a lot less, which is surprising.


Friday, 19 July 2013

Run bash style shell scripts using UnxUtils

In Linux, all the scripts have the following line at the top(known as a shebang)...

#!/bin/sh

So when you run the script, the shell knows to use the program /bin/sh to execute the script.

But this will not work for UnxUtils since there is no /bin directory. You can make one, but then you would have to do that for every partition on your computer, and then put sh.exe in every folder!

The solution is to change the "shebang" so that it looks like this instead...

#!sh

I find that this allows you to do things like executing the script from the Unix shell in Windows.

Alternatively you can also do this...

#!c:\UnxUtils\bin\sh.exe

But that seems a little non-portable and not so wise.

Unfortunately, however you get it to run, the scripts  then will not work in Linux. If you want your scripts to work in Linux then you must sadly create a bin directory with sh.exe or a bat file pointing to sh.exe in every partition on your hard disk. Then you can indeed use /bin/sh as the path of the shebang.

Monday, 15 July 2013

Processing Integers On 32 Bit vs 64 Bit Cpu

A number of questions that need to be answered when upgrading from 32 bit to 64 bit Cpu processing.
Q: Does a 64 bit integer on a 64 bit Cpu work slower than a 32 bit integer on a 32 bit Cpu?
A: Not for most operators. Operators like add and subtract and shift seem to be about the same. The exceptions are operators involving division. A 64 bit integer divide on a 64 bit Cpu is way slower than a 32 bit divide on a 32 bit Cpu.
Q: Is processing a big array of 64 bit integers on 64 bit Cpu slower than processing an array of 32 bit integers on a 32 bit Cpu?
A: Yes. 64 bit integers use more memory, so to get from one end of an array to the other will read in more memory from the RAM, and if you are writing back to the values then it will transfer more memory back to the RAM since a 64 bit integer is twice as large as a 32 bit integer. However processing an array of 32 bit integers on a 64 bit Cpu transfers just the same amount of memory as processing a 32 bit integer array on a 32 bit Cpu.
Q: Why did all the C++ compilers choose LLP64 and LP64 as the default model, which keeps int as 32 bits on 64 bit Cpu?
A: Mostly to keep compatibility with existing code but also because it requires less space in memory. Naive programs that just use int for everything in the ILP64 model will have to deal with more bytes being used up in the Cpu cache as a consequence of using 64 bit integers for everything. In most existing programs almost everything to do with lists and arrays and chunks of memory is in a context where the addressable indexes into the memory can all be contained within 32 bits. You will not find any 32 bit programs that use strings that are longer than 32 bits can store for example.

Q: Which integer type should be used for list indexing in C++ on 64 bit Cpu? 
A: For lists it is unlikely that you will ever need more than 2.4 billion items, at least with current systems, even 64 bit ones, so 32 bit is in 99.99% of cases ideal, since the extra 32 bits of a 64 bit are not needed. However progress is always going on so you might want to consider making a type called "ix_t" and using that instead for your list length fields and to index the lists. The problem is not just the indexing but if you had hundreds and thousands of objects in memory all of type "TList", then using a 64 bit integer would in all normal cases simply be unused 4 bytes on each list object.

Q: Which integer type should be used for array indexing on 64 bit Cpu?
A: This is a tricky question, since with array memory you can easily imagine people allocating large chunks of memory that cannot be indexed by a 32 bit int, for example, a 5Gb chunk of memory. However the practice of allocating very large chunks of memory is not yet common, and would be very rare in the overall usage of arrays in a program. Using a 64 bit integer for indexing does not make so much sense either. So if you are hyper optimizing some code, then for most arrays use a 32 bit integer and then a 64 bit integer only where you need it.

Otherwise the best thing to do is to benchmark your machine yourself. I have made a benchmark tool that builds in Codeblocks, and the download comes with a decent set of results for a Core 2 Duo Cpu.

Sunday, 14 July 2013

Building Lazarus Ide With Free Pascal For FatDog64

This is a summary of how to build the Lazarus Ide on FatDog64. It will make a Pascal Ide that builds quickly, has a form designer, an integrated debugger and a great big class library full of components like buttons, image controls, menus, edits etc... Windows programmers will know a very similar thing called Delphi but this will put the 64 bit Free Pascal compiler and Ide on your FatDog64.

Note! This entire topic also applies to building Lazarus for Puppy Linux. Just requires a 32 bit build of Free Pascal that you can get from here.

FatDog64 running Lazarus in design mode! Click to enlarge.
1) Check if you have Free Pascal on your FatDog64.  Type "fpc" in a terminal. If fpc is installed then you have fpc. Check the version. It should be at least 2.6.x I recommend 2.6.2. If you do not have Lazarus or your version is to old, then get this sfs file for Free Pascal 2.6.2 for FatDog64, or if you are in the future then read these instructions on how to make your own sfs of Free Pascal for FatDog64. Whatever you do, you must have a working fpc on your system.

2) Once you have a working fpc, then to put Lazarus on FatDog64 is just a matter of compiling it. Fortunately this is Pascal and not C++. Normally compiling large packages can take a long time but with Pascal it takes a minute or five depending on your Pc.

3) Download the Lazarus source code from http://sourceforge.net/projects/lazarus/?source=directory. I used version 1.0.10. Unzip it into a folder. When downloading code for Linux I recommend to always get the tar.gz or tar.bz2 file if there are different types of zip file.Just because some distributions of code like to format the line endings differently and will not tell you about that if the code is available as a zip and a tar.bz2 or a tar.gz.

4)With Lazarus you cannot build from the same source code to different binary targets, so you need a separate folder of the source code for each different type of Puppy Linux. So if you have five different Puppy Linux installed on one hard disk but they are all 32 bit then you only need one lazarus source code folder, but to build for FatDog64 and for normal 32 bit Puppy Linux you will need two different Lazarus folders.

In short the Lazarus source code folder is also the Lazarus build output folder, and therefore is also the Lazarus program folder etc...

5) Also it is a very good idea to put the Free Pascal source code in a directory next to your Lazarus directory. Do this before building Lazarus, so that once lazarus is built it will start and ask you where the Free Pascal source code is. Then you can just point to the directory of files and Lazarus will be happy. On my system I put the lazarus code into f:\lazarus64, I append 64 since that will be my lazarus build for FatDog64, and then I have one source code folder of the Free Pascal 2.6.2 code in F:\fpc-2.6.2 which is where lazarus can find files from, and then I reboot to Linux to do the actual compiling. If you want to build also a version for 32 bit Puppy Linux later then make another lazarus folder called lazarus32 and then both the builds in lazarus32 and lazarus64 can point to the same source code.

6) Now build the thing. Just go into the Lazarus code directory, open a terminal and type "make clean bigide". This will build it quickly compared to C++ packages and then just click the newly created file called "lazarus". The lazarus will start and it will ask you where the Free Pascal source directory is. You really do need to tell it so that Lazarus can work properly.

Versions
I specifically used the following files for this...
1) Free Pascal .sfs is made from fpc-2.6.2.x86_64-linux.tar, but you will not need this file because you can just download the Free Pascal sfs file, unless you want to build your own sfs file then read this topic.
Click here to download the sfs file and then install it on FatDog64. After that it is trivial to build the lazarus code.
3) lazarus-1.0.10-0.tar.gz - This file can be download from here. If you think that 1.0.10 is outdated by the time you read this then do try the newer version if you feel like it, but this was tested with 1.0.10 and it works great. Note how I specify the tar.gz file, this is important, because when downloading code for linux and they offer zip and also tar.gz formats it means that the zip is formatted with windows line endings and the tar.gz is formatted for linux line endings.

FatDog64 running Lazarus in runtime mode. Click to enlarge.

Saturday, 13 July 2013

Building Codeblocks Ide On Puppy Linux and FatDog64

If you have tried to build Codeblocks on Puppy Linux and FatDog64, and not had much luck, then follow these steps to get it all working. I have tested these building steps on FatDog64 621 and on Precise Puppy Linux 561.

The bonus with this method of building the Codeblocks is that it will build a self contained folder that hosts it's own wxWidgets. Thus it can be executed from the same folder on many computers over the network, or just from multiple variations of Puppy Linux on one Pc. Either way, all the files go into one folder and then a simple Install script makes a link in /opt to the Codeblocks folder so you can just unzip and run. 

If you just want the Ide pre-built, I also have those available from here, otherwise continue reading.

1) You need the devx sfs file for your Puppy Linux installed. This will put the make and C++ tools on your Puppy Linux. For me I have Precise Puppy 561 and FatDog64 621.

2) Download this file of scripts used to build the Codeblocks and the wxWidgets wxGTK at the same time. Read the instructions from step 3 before downloading the source. You need specific versions etc...

3) Unzip the scripts in some folder. In this folder is a readme.txt file and also a file called about.txt. Please read these for specific instructions.

4) Download the source code for wxGTK 2.8.12 and also Codeblocks 12.11, put them in folders as outlined in the instruction text files from step 3.

5)Be very, very sure you have got all the variables setup properly(about three or four values need to be set), and I mean be sure because unless you are running a fast Pc it will take an hour to build!

6) Execute your build script from a terminal. If you have followed the instructions good it should just work.

If you really cannot make it work, then leave a comment or maybe just download the pre-built folders I have made from here.

Otherwise here are some more details

The Build Script - You can either edit the scripts provided in scripts download ot make your own copy. As you can see the build is mostly controlled just by specifying names and some paths.

#!/bin/sh

# BUILD 32 BIT CODEBLOCKS WITH WX ONE TIME ON PUPPY LINUX


# Please edit these variables to suit your setup. Personally I just put everything in
# the root of my f:\ or /dev/sda7/ on linux, and then go from there. You might
# need to do it differently.

# wxBuildName - Name of the wxBuild - Not a path - Just a unique name for the build
wxBuildName="bld_wx2812_gtk_cb_puppy_561"

# wxPath - absolute path to the folder where wx source code is. 
wxPath="/mnt/sda7/wx2812"

# wxOutputDir - Where to put wx build output
wxOutputDir="/mnt/sda7/cb_temp_work/$wxBuildName"

# cbBuildName - The name of the codeblocks build. Not a path, just a name for the codeblocks build.
cbBuildName="cb12_11_puppy_561"

# cbPath - absolute path to the codeblocks source code.
cbPath="/mnt/sda7/cb12_11"

# cbOutputDir - Where to put codeblocks build output, note this folder will be
#               linked to from opt, which is where the build thinks it is putting
#               the files, but actually they go here...
cbOutputDir="/mnt/sda7/cb_temp_work/$cbBuildName"

# Is it 64 bit, for FatDog64 will be 1, otherwise 0 for 32 bit
PuppyIs64Bit="0"

# Now execute the build using the include script
source `pwd`/xinc_util



The work script(xinc_util) - The worker script just takes the values from your build script and then actually does the build. The process is simply to build the wxWidgets, then set a bunch of variables so that Codeblocks build can see wxWidgets, then build Codeblocks and finally copy the wxWidgets into the output directory. 

This script is called xinc_util. You do not execute it yourself but rather you make your own build script which sets the values and then calls this script. 

Do not copy and paste this, just download it instead.

#!/bin/sh

# This script by Turboloops - turboloops@gmail.com
# No rights reserved, use at own risk!

if [ "$1" = "" ]; then
  echo "This script must be included!"
  exit 1
fi

THE_SCRIPT_DIR="`echo "${0}" | sed 's%/[^/][^/]*$%%'`/"
if [ "${THE_SCRIPT_DIR}" = "./" ]; then
 THE_SCRIPT_DIR="`pwd`"
fi

echo "Working in directory $THE_SCRIPT_DIR"


# this script does all the work. You do not run this script itself. It is
# included by for example, make_cb_puppy561


# ------------------------------------------------------------
# Technically you should not need to edit any lines below this
# ------------------------------------------------------------

usage="Turboloops make_codeblocks script
  Please specify the command properly...

  --hello        mandatory Safety against double click!
  --compile-wx   optional  Do not re-configure the wx
  --compile-cb   optional  Do not re-configure the codeblocks

  Examples    
    Build codeblocks only
      make_cb_xyz hello --compile-wx
    
   Build wx only
     make_cb_xyz --hello --compile-cb

   Rebuild everything
     make_cb_xyz --hello
"

if ! [ "$1" = "--hello" ]; then
  echo "$usage"
  exit
fi
shift

TheWxCmd="build"
TheCbCmd="build"
CleanCb=""
CleanWx=""

while [ "$1" ]; do
  cmd="$1"
  shift
  if [ "$cmd" = "--compile-wx" ]; then
    TheWxCmd="compile";
  fi
  if [ "$cmd" = "--compile-cb" ]; then
    TheCbCmd="compile";
  fi
  if [ "$cmd" = "--clean-all" ]; then
    CleanCb="1"; CleanWx="1";
  fi
  if [ "$cmd" = "--clean-cb" ]; then
    CleanCb="1";
  fi
  if [ "$cmd" = "--clean-wx" ]; then
    CleanWx="1";
  fi
done

#echo "CleanCb=$CleanCb CleanWx=$CleanWx TheCbCmd=$TheCbCmd TheWxCmd=$TheWxCmd"
#exit


#if [ "$1" = "--compile-wx" ]; then
#  TheWxCmd="compile"
#  shift
#fi

#if [ "$1" = "--compile-cb" ]; then
#  TheCbCmd="compile"
#  shift
#fi






wxBuildDir="$wxPath/$wxBuildName"

# Make the directories for wx
mkdir -p $wxOutputDir
mkdir -p $wxBuildDir
cd $wxBuildDir

x64Flags=""
if [ "$PuppyIs64Bit" = "1" ]; then
  x64Flags=CFLAGS="-fPIC" CXXFLAGS="-fPIC"
fi 

echo "The x64Flags are $x64Flags"
echo "The WxCmd is $TheWxCmd"
echo "The CbCmd is $TheCbCmd"

#
# --enable-monolithic

if [ "$CleanWx" = "1" ]; then
  make clean
fi
if [ "$TheWxCmd" = "build" ]; then
  echo "Configuring wx in `pwd` ..."
  ../configure --prefix=$wxOutputDir --enable-unicode --enable-xrc --without-opengl $x64Flags
  make clean
fi
make
make install

echo "Finished the wxWidgets compiling..."

# Put dir on path where is wx-config
savePATH=$PATH
export PATH=$wxOutputDir/bin:$PATH

# Add wxPrefixPath/lib to /etc/ld.so.conf(Here just cheat and put it in variable)
saveLD_LIBRARY_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$wxOutputDir/lib

# run ldconfig
#ldconfig
#source /etc/profile

export ACLOCAL_FLAGS="-I $wxOutputDir/share/aclocal"

mkdir -p $cbOutputDir

# Make a symlink to the output directory in opt
thePwd=`pwd`
cd /opt
rm $cbBuildName
ln -svf $cbOutputDir $cbBuildName

# Rename the output directory, now the compiler will put files in opt but
# actually is going to the proper place outside of Puppy Save files!
cbOutputDir=/opt/$cbBuildName

cd $cbOutputDir

echo > Install "# Install the codeblocks to opt/$cbBuildName !"
echo >> Install "THE_SCRIPT_DIR=\"\`echo \"\${0}\" | sed 's%/[^/][^/]*$%%'\`/\""
echo >> Install "if [ \"\${THE_SCRIPT_DIR}\" = \"./\" ]; then"
echo >> Install "  THE_SCRIPT_DIR=\"\`pwd\`\""
echo >> Install "fi"
echo >> Install "cd /opt"
echo >> Install "rm $cbBuildName"
echo >> Install "ln -svf \$THE_SCRIPT_DIR $cbBuildName"
echo >> Install "echo \"You can now use Codeblocks!\""

echo > Readme.txt "Codeblocks built for Puppy Linux by Turboloops - turboloops@gmail.com"
echo >> Readme.txt "--------------------------------------------------------"
echo >> Readme.txt "Each time you move this folder, just double click the script Install"
echo >> Readme.txt "and it will install it for you..."
echo >> Readme.txt "This build is not like Windows! It will look for libraries in"
echo >> Readme.txt "/opt/$cbBuildName and therefore you need to create the"
echo >> Readme.txt "symlink to this directory in /opt so that it works properly."
echo >> Readme.txt "If the Install script does not work then create the symlink yourself"
echo >> Readme.txt "but make sure the name of the symlink is $cbBuildName"

# Now return to where it was
cd $thePwd

MyPlugins=""
MyPlugins="--with-contrib-plugins=all,-NassiShneiderman,-SpellChecker,-FileManager"

# Here are the plugin names - Specify -TheName after the all to not do one and just comment out
# the entire line to not build any!
#Plugin names are: AutoVersioning, BrowseTracker,byogames,Cccc,CppCheck,cbkoders,codesnippets,
#             codestat, copystrings, Cscope, DoxyBlocks, dragscroll, EditorConfig, EditorTweaks, envvars,
#             FileManager, headerfixup, help, hexeditor, incsearch, keybinder, libfinder, MouseSap,
#             NassiShneiderman, profiler, regex, ReopenEditor, exporter, symtab, ThreadSearch,
#             ToolsPlus, Valgrind, wxsmith, wxsmithcontrib,wxsmithaui
#
#
#
# The plugins that are excluded here require libs, if you hve them then just change the line
#MyPlugins="--with-contrib-plugins=all,-NassiShneiderman,-SpellChecker,-FileManager,-byogames,-BrowseTracker,-EditorConfig,-EditorTweaks,-MouseSap"
if [ "$PuppyIs64Bit" = "1" ]; then
  MyPlugins="--with-contrib-plugins=Valgrind,wxsmith,wxsmithcontrib,wxsmithaui,symtab,envvars"
  MyPlugins="$MyPlugins,ThreadSearch,profiler,regex,help,hexeditor,Cccc,CppCheck"
  MyPlugins="$MyPlugins,codesnippets,codestat,copystrings,Cscope,DoxyBlocks,EditorConfig,EditorTweaks"
  #MyPlugins="$MyPlugins,libfinder,ToolsPlus"
  #MyPlugins="$MyPlugins,ToolsPlus,keybinder,help,headerfixup,"
  #MyPlugins="$MyPlugins,ToolsPlus"
  #MyPlugins="$MyPlugins,exporter"
fi 



# Build the codeblocks now
cd $cbPath
if [ "$CleanCb" = "1" ]; then
  make clean
fi
if [ "$TheCbCmd" = "build" ]; then
  echo "Configuring cb..."
  ./bootstrap
  ./configure --with-wx-config=$wxOutputDir/bin/wx-config --prefix=$cbOutputDir $MyPlugins
  make clean
fi
#exit
make
make install

# And now copy the wxWidgets dll files into your codeblocks folder, this
# is so the codeblocks can just run anywhere without needing wxwidgets to
# be installed.
cp $wxOutputDir/lib/lib* $cbOutputDir/lib

# Finally set the variables back and run ldconfig again, I am not sure
# if this is needed but it should keep the system clean? I mean I built
# a wrong version of wx before and then the link was always going to that
# version so maybe this will prevent that from happening.
#export PATH=$savePATH
#export LD_LIBRARY_PATH=$saveLD_LIBRARY_PATH
#ldconfig
#source /etc/profile





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