XP-installer for Puppy 1.0.6

News, happenings
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#21 Post by MU »

my installation uses a file called "grubinstall.exe".

I don't know how it internaly works.

here is the faq.txt:

Code: Select all

1 Q. I get "kernel panic,VFS unable to mount root fs on 07:07.

A. This is not related to the bootloader. You must complete the setup procedure. Boot to CD and type install or pick setup in the bootloader menu.

2. Q. I get to the word "GRUB_" flashing underscore cannot type.

A. The first thing you should try is to run c:\boot\install.bat manually from a command prompt. This will enable you to see any errors that may occur you can also redirect the output to a file with this as well.

3. Q. I get something about block list failed when running install.bat from a command prompt.

A. 3.1. Are you using a dynamic disk? This will not work you will have to boot from the CD and that may not work either but that is a different issue.

   3.2. Are you using any disk compression or encryption? This also will not work get rid of it and reinstall. You probably will not be able to use Topologilinux at all with this.

   3.3. Check to see if c:\boot\stage1 and c:\boot\stage2 exist. try replacing them from the installation media.

   3.4. Do you have any hidden partitions or is /boot not on the first partition of the first drive. To fix this you must edit c:\boot\install.bat.

what you need to edit in install.bat is the line

grubinstall -d (hd0,0) -1 c:/boot/stage1 -2 c:/boot/stage2 -m c:/boot/menu.lst

the part you are interested in is the -d (hd0,0) this is grub notation that represents your partition. (hd0,0) is the first partition of the first ide drive, (hd0,1) is the second partition of the first drive, (hd2,4) is the first logical drive on an extended partition on the 3rd drive. More on this notation can be found at http://www.gnu.org/manual/grub/html_node/Naming-convention.html#Naming%20convention

This still requires some guesswork the best way of determining the correct partition is with a grub bootdisk. Here is how to make one

in windows at a command prompt. with a blank floppy in a:
c:\> c:\boot\grubinstall -b -1 C:\boot\stage1 -2 C:\boot\stage2

in Linux you can copy the stage1 and stage2 files to a folder and as root

dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

This will not work with all versions of the bootloader If it freezes at the word "GRUB_" then you must try another version. The stage1 and stage2 files must be freshly compiled versions (or fresh from CD or .gz or .zip file that have not been modified with grubinstall.exe or by installing them natively

When you boot to a Grub floppy you will get a grub prompt.
you can type
find /boot/stage2
this will return the location of your files in grub notation put this in install.bat


4. Q. I get a grub prompt grub> _ (flashing underscore can type) instead of a menu.

A. Make sure c:\boot\menu.lst exists open it with notepad to make sure it is a valid file. If it is missing or corrupted replace it from the CD. If you have converted your drive from fat32 to ntfs the problem is most likely due to the GRUB NTFS driver not being able to read the converted file system. there is currently no fix for this.


5. Q. I have windows 9x, Me, can I use the bootloader.

A. The bootloader setup is designed to work with NTLDR. NTLDR is only available in NT, 2000, XP. There is currently a way to do this see 98bootloader HowTo. Or use the loadlin method.

and here install.txt:

Code: Select all

INSTALL:
--------

	you need to compile these files under CYGWIN
	get GRUB, for example in the directory /usr/local/src/grub-0.93
	install these files in grub-0.93/ntfsboot
	run "make" in the ntfsboot directory


Usage:
------

1) get a compiled stage1 and stage2 image and put these in C:\boot
   for example compiled on a linux machine

2) add the following line to the file C:\boot.ini

   C:\boot\stage1="GRUB"

   you may need to do 

	   ATTRIB -R -H -S C:\boot.ini

   to make the file visible and writable and 

	   ATTRIB +R +H +S C:\boot.ini

   to revert the attributes of the file

3) run grubinstall
   This will update the embedded blocklists in the files stage1 and stage2

   You should rerun this utility after moving/changing the files stage1 
   or stage2 and after running tools like defragmentation

   grubinstall [-d device] [-1 stage1] [-2 stage2] [-m menu] [-l] [-a]
   grubinstall [-s] [-1 stage1] [-2 stage2] [-m menu] [-l] [-a]
   grubinstall [-b] [-1 stage1] [-2 stage2]
   grubinstall [-i file] [-1 stage1] [-2 stage2]
       -d C:                  : partition where the files are
       -d (hd0,0)             : partition where the files are
       -1 C:\boot\stage1      : boot sector
       -2 C:\boot\stage2      : secondary boot loader
       -m /boot/menu.lst      : grub boot menu
       -l                     : force LBA mode
       -b                     : make boot floppy
       -i boot.img            : make boot disk image
       -s                     : scan partitions
       -a                     : alternate grub partition name for menu

       device can be a disk or GRUB partition identifier 
       stage1 and stage2 must be paths to win32 file names
 
   The defaults are such that if you put the files in C:\boot
   you can simply go for "grubinstall"

4) uninstall
   just delete the C:\boot directory, and remove the entry from C:\boot.ini
   as described in 1). No registry entries were used by using the tool.
I also thought: "should I continue this program?" when the first errors were reported.
But then I just got aware of how often such a tool was asked for, and how often people messed up their system by trying out files they found randomly in the web.
So my installer (and your manual instructions) will allow to say after some feedback and testing: "this is a version working ok for 99% of all users, so there is small risk of damaging your sytem. However you might be one of the unlucky 1%, so for that case, DO BACKUP before."
The installer currently seems to have reached this quality, for your manual install some more feedbackmight be needed (or compare the amount of downloads with negative feedback, as people are lazy giving feedback if it just does what it was supposed to do).

Mark

ICPUG
Posts: 1308
Joined: Mon 25 Jul 2005, 00:09
Location: UK

#22 Post by ICPUG »

Thanks for those notes MU. They have given me the clue that I needed to understand your installer a bit more.

Despite the button on you Installer window saying 'Run Wingrub', your method does not run Wingrub at all! Wingrub is a different project from Grubinstall, (or Grub Installer for Windows as it also appears to be known), and works in a different way.

If I have understood the instructions for Grubinstall correctly, (I have not implemented it you understand), then the files Stage 1 and Stage 2 are placed on the boot partition and modified by Grubinstall to work with NTFS. The Windows XP boot.ini file is then modified by your installer to call up Stage 1. I am theorising now but I suspect Stage 1 calls up Stage 2 directly, by calling the disk sectors on which it is located. This would explain why Grubinstall has to be rerun if the Stage 1 and Stage 2 files are moved or a defragmentation is carried out. It has to find the new disk sector location of Stage 2 because it MAY have moved. I must admit I consider this a bit of a drawback with the Grubinstall method. Looking at the posts for your 1.0.5 installer it would seem to have thrown up two problems. Sometimes it just drops out to the Grub prompt and sometimes you get a hal.dll file missing message. Irritating though these problems are there seem to be workarounds for the technically competent. Someone suggested the missing hal.dll message is caused by a corrupt boot.ini. This suggests it may not be your installer at fault but Windows or user error!

Now, if I have theorised correctly, Wingrub is completely different! It certainly has a different project leader so I am almost certain it is not related to Grubinstall. Wingrub, as I said in my earlier post, has 6 possible install options. The one I think is suitable for Puppy loading is the one which mimics what I do, put the grldr file on your boot partition in the same directory as ntldr. The Windows boot.ini file is then modified to call up grldr in the same way as it calls up Stage 1 in your installer. Because grldr is one file, I theorise again that somehow the Stage 1 and Stage 2 code is altogether within grldr. However, they will always be together so you can do a defrag without altering their relationship and grldr will still work. A plus point for Wingrub, I think. The other plus points are that it is 1 instead of 2 files and you don't have to run an exe file to make it all come together. A minus point is that you do have to put the menu.lst file in the \boot\grub directory, which you don't like.

Now, Waikiki Websurfer's warning applies specifically to Wingrub and therefore grldr. It MAY not apply to the Grubinstall method. I suspect it doesn't. What Waikiki Websurfer says about the problem, that it modifies the disk signature bytes, I cannot reconcile with my theories about grldr. However, I can reconcile it with an MBR install of Wingrub, because in that case Wingrub is obviously modifying the MBR. MAYBE that warning is not relevant to Puppy users running grldr.

That leaves me with the warning in the Grub4dos readme. There are no details of what the problem is here - just that there have been reports of problems. Not very helpful if you are trying to resolve the problem. Also, I don't yet understand the suggestion of Tinybit, the Wingrub project leader, to put grldr on a FAT partition. If it has to be in the same directory as ntldr and Windows is installed to NTFS that will be a little difficult!

Sorry for my ramblings. I just thought my investigations may be useful for anyone else treading this path. Remember, some of it is theorising, so I maybe wrong!

Can I suggest you might rename that button in a future release though - 'Run Grubinstall' rather than 'Run Wingrub'! It confused me and Waikiki Websurfer.

ICPUG

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#23 Post by MU »

Yes, I will rename the button for Puppy 107.
Thanks for the detailed clarification :-)

Mark

Post Reply