Puppy-Win32-Installer

A home for all kinds of Puppy related projects
Message
Author
noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#106 Post by noryb009 »

Thanks, Aitch. I think the 431 problems are from 431, not the installer.

I'm going to get a Win7 soon that I can test on, so we will just have to wait...

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#107 Post by noryb009 »

I just uploaded Puppy Linux Installer Creator V0.3. It's on the top of page 7. Please message me if you are going to try it with Vista/7.

Changes:

- changes boot.ini timeout if it is below 5 seconds
- requires admin privileges
- Vista and 7 support (experimental)
- upgraded registry support
- only asks to uninstall GRUB if it is the last puppy installed
- adds puppy linux to everyone's start menus (not just the installer's)

Known bugs:
- is not added to "Add or Remove Programs"
- may not work with

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Windows 7 installation styles

#108 Post by shinobar »

Very nice promising project targeting Vista/7 included.
Better to make your new topic, noryb?

I have not yet made proper test on Windows 7, but like to give some information.

My Windows 7 installer made a special partition for boot.
The boot partition is 100Mb size ntfs but cannot be seen from Windows.
Puppy can see the partition as /dev/sda1, and the Windows system partion, C:, is /dev/sda2.

noryb's installer installs Puppy on C:, that is not a big problem.
But the C: may not be (hd0,0). In my case, (hd0,1).
I tried to edit the menu.lst from the windows, i am not sure the reason but i could not.
Anyway I like to request to make the menu.list more flex.

Code: Select all

title Lucid Puppy Quickset edition 511
kernel (hd0,0)/Puppy-Linux-511/vmlinuz psubdir="Puppy-Linux-511"
initrd (hd0,0)/Puppy-Linux-511/initrd.gz
boot
to:

Code: Select all

title Lucid Puppy Quickset edition 511
find --set-root --ignore-floppies /Puppy-Linux-511/initrd.gz
kernel /Puppy-Linux-511/vmlinuz psubdir="Puppy-Linux-511"
initrd /Puppy-Linux-511/initrd.gz
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Windows 7/Xp

#109 Post by shinobar »

I modified noryb's Puppy Linux Installer Creator V0.3, the main.nsi to arrange the menu.list.

Code: Select all

title Lucid Puppy Quickset edition 511
find --set-root --ignore-floppies /Puppy-Linux-511/initrd.gz
kernel /Puppy-Linux-511/vmlinuz psubdir="Puppy-Linux-511"
initrd /Puppy-Linux-511/initrd.gz
Made a Luciid-Puppy-Quickset-511-installer.exe.
http://shino.pos.to/party/bridge.cgi?puppy/lupq/
Tested on Windows 7 and Windows Xp (different PC's). The account is the Administrator.

Both installed files correctly in the C:/Puppy-Linux-511 directory and grldr and menu.lst at C:\. The menu.lst is well arranged. The installer says, with the debug window, Windows 7 or Xp detected correctly.
But it seems not rewrite boot.ini(Xp) or BCD(7, cannot be seen), nor the MBR.
So the Windows boot up. The Puppy is not shown in the boot menu both my 7 and Xp test.

I installed Grub4Dos on the MBR, then the Puppy can boot.
But the Windows are not in the menu.lst, so Windows cannot boot.

I boot up Windows with the LupQ-511 live CD, it can boot up Windows without MBR boot record.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#110 Post by noryb009 »

shinobar: Thank you so much for your testing! I'll try out the new menu.lst format.
But it seems not rewrite boot.ini(Xp) or BCD(7, cannot be seen), nor the MBR.
Hmmm... I don't know why that's happening there. Could you please boot XP, uninstall the current installed puppy, then start > run, type in cmd.

then, type:

Code: Select all

cd c:\
attrib
Do you see a line like:

Code: Select all

A  SHR     C:\boot.ini.backup
If not, type:

Code: Select all

attrib boot.ini -s -h -r
then try the installer again, and see what happens. (run attrib again after and see if you see boot.ini with SHR in front)

if you do see a line with boot.ini.backup, run:

Code: Select all

attrib boot.ini -s -r -h
attrib boot.ini.backup -s -r -h
Then open them both up with notepad and compair them.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Windows Xp, Worked

#111 Post by shinobar »

Windows Xp, Worked!

boot.ini.bak was not created.
The attribute of boot.ini was ' SH'
After uninstalling Puppy, it automatically turnd to 'A SHR'
Then, excuted again the Luciid-Puppy-Quickset-511-installer.exe.
It worked this time and the Puppy boots up. Great!
I don't know or remember why the attribute of boot.ini was ' SH'.

But sorry, it is not common case but my MBR is already Grub4Dos.
I am booting up the Windows Xp from the Grub4Dos and chain to the ntldr.
The entry for the Xp:

Code: Select all

title Windows XP
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
I edited the menu.lst from the Puppy, add the entry above and set the timeout 5.
Then rebooted and selected the Windows Xp, and found the ntldr offers Windows or Puppy.

Maybe it need not adding the Windows entry for these rare case,
but it can be better to make the backup if an existing menu.lst found.

Great work, noryb and thx for the support.
As for the Windows 7, maybe harder because I am not familiar with.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#112 Post by noryb009 »

boot.ini.bak was not created.
Is it created now? (with the new install)
I don't know or remember why the attribute of boot.ini was ' SH'.
It might be because you changed it, but I'm not sure.
Maybe it need not adding the Windows entry for these rare case,
but it can be better to make the backup if an existing menu.lst found.
This method is meant for people who don't have linux fully installed, and want to try puppy, but don't want to burn/partition/other, it isn't meant for advanced users. I will come up with a back up system, though.


As for the Windows 7, maybe harder because I am not familiar with.
Note: if this computer also has grub, see step 5 here

Please open up command prompt in windows 7 (not sure if start > run > cmd will work, you might have to find it in all programs) then run the following commands:

Code: Select all

bcdedit /export "C:\Backups\BCD Backup2"
*backups current boot*

bcdedit /create /d "Start Puppy Linux" /application bootsector
*spits out a ID*

bcdedit /set ID device boot
*replace ID with the ID it gave you*

bcdedit /set ID path \grldr.mbr
*again, replace ID*

bcdedit /displayorder ID /addlast
*replace ID*

bcdedit /timeout 10
Next, could you please copy the entire window into a reply? It's (something like) right click > mark > click bottom right corner > drag to top left > let go of left mouse > enter (or just take a screenshot)

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

bcdedit denied

#113 Post by shinobar »

noryb009 wrote:This method is meant for people who don't have linux fully installed, and want to try puppy, but don't want to burn/partition/other, it isn't meant for advanced users. I will come up with a back up system, though.
Yes, you are right.
Think no problem with Xp. The boot.ini.back is created now.
My Xp PC is a secondhand and i do not know its history.
Anyway it works now.

Windows 7:
I tried 'bcdedit' you suggested but the access is denied.
I re-installed Windows 7, got same reaction.
Sorry, my screen shot is of a Japanese version.
My account 'shino' is the Administrator, i beleave.

EDIT: Just type 'bcdedit', it returned an error message.
It also says in Japanese, so hardly understand, but may be saying:
Cannot open the stored Boot Configuration Data.
Access denied.

EDIT: I got it a bit.
The Windows commandline is run with a normal user, not the Administrator.
BCD Editor (Bcdedit.exe) is a command-line utility that lets you view and manage the BCD store. To use BCD Editor:
1. Click Start, point to All Programs, and then click Accessories.
2. Right-click Command Prompt, and then click Run As Administrator.
3. Type bcdedit at the command prompt.
http://technet.microsoft.com/en-us/maga ... 04185.aspx

Thanks, noryb. We need further investigation on 7...
Attachments
bcdedit denied.PNG
Screen shot taken using the snipping tool on Windows 7.

It says in Japanese:
Failed the oparation saving and/or export.
Access denied.
(6.78 KiB) Downloaded 1407 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: bcdedit denied

#114 Post by shinobar »

BCD Editor (Bcdedit.exe) is a command-line utility that lets you view and manage the BCD store. To use BCD Editor:
1. Click Start, point to All Programs, and then click Accessories.
2. Right-click Command Prompt, and then click Run As Administrator.
3. Type bcdedit at the command prompt.
Now I can run the 'bcdedit' and the attached the output.
I already run my Luciid-Puppy-Quickset-511-installer.exe which worked on Xp, and the Puppy files and grub4dos loader and menu.lst is installed on C:.
But the BCD is not modified seeing this output.
Attachments
bcdedit_by_Admin.PNG
Newly intalled Windows 7, after excuted my Luciid-Puppy-Quickset-511-installer.exe.
Seems the BCD is not modified.
(21.85 KiB) Downloaded 1388 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

grldr.mbr on Windows 7

#115 Post by shinobar »

Now i believe i've got a good test on Windows 7.

On Windows 7, excuted my Luciid-Puppy-Quickset-511-installer.exe and the Puppy files and grub4dos loader and menu.lst is installed on C:.

I did bcdedt along with noryb suggested.
I run the Windows commandline As the Administrator.
  1. bcdedit /export "C:\Backups\BCD Backup2"
    Failed. It says the directory C:\Backups not exist. I ignored this step and went ahead.
  2. bcdedit /create /d "Start Puppy Linux" /application bootsector ...
    Success. See the attached. The bootmgr of the Windows 7 offers a menu with Windows/Puppy.
  3. But, selecting Puppy from the boot menu, it fails.
    The bootmgr says: cannot find the file \grldr.mbr.
    I run again the bcdedit and replaced the path to "C:\grldr.mbr", but agian the bootmgr cannot find it.
    EDIT: I could manage it. See the next post

    I remember my Windows 7 has a system reserved 100MB ntfs partition only for boot.

    Code: Select all

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          49      102400    7  HPFS/NTFS
    /dev/sda2              49       14680    31134720    7  HPFS/NTFS
    /dev/sda3           14680       19617    10506510   83  Linux
    /dev/sda4           19617       29379    20772045    5  Extended
    /dev/sda5           19617       28382    18651433+  83  Linux
    The bootmgr may count the 1st partition as "C:" and the 2nd as "D:".
    So i replaced the path to "D:\grldr.mbr", but again the bootmgr cannot find it.
  4. I restored the path to \grldr.mbr.
    Copied the /mnt/sda2/grldr.mbr to /mnt/sda1/grldr.mbr from Puppy because the Windows cannot access this 1st partition, system reserved.
    I boot up, selected the Puppy from the menu the bootmgr offers, OK, it can find the file this time and boots up Puppy successfully!
(I have another menu.lst on the 1st partition, so the grb4dos uses it and ignored the menu.lst on the 2nd partition the installer made. Don't care, it is my particular case, and taking the 1st menu.lst is no problem.)

My suspicion, the current noryb's Puppy Linux Installer Creator V0.3 got error and failed before editing BCD with some simple reason, may be easily cleared.
Next hurdle will be to support the case the Windows 7 having the special boot partition.
Attachments
bcdedit_add.PNG
Success with copying the grldr.mbr to the 1st partition
(9.66 KiB) Downloaded 1376 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: grldr.mbr on Windows 7

#116 Post by shinobar »

shinobar wrote:But, selecting Puppy from the boot menu, it fails.
The bootmgr says: cannot find the file \grldr.mbr.
I run again the bcdedit and replaced the path to "C:\grldr.mbr", but agian the bootmgr cannot find it.
I got it.
I removed the grldr.mbr in the 1st partition i copied.
The grldr.mbr is now in the 2nd partition, 'C:' for Windows.

I ran bcdedit and replace the 'device' entry.
Instead of:

Code: Select all

bcdedit /set {ID} device boot
Replaced to:

Code: Select all

bcdedit /set {ID} device "partition=C:"
The result of the 'bcdedit' command is the attached.

OK, the bootmgr can find the c:\grldr.mbr and success to boot up Puppy.
Attachments
bcdedit_success.PNG
Success without copying the grldr.mbr
(8.92 KiB) Downloaded 1340 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#117 Post by noryb009 »

Interesting. Did the installer alert you that you didn't have admin privileges?
bcdedit /export "C:\Backups\BCD Backup2"
Failed. It says the directory C:\Backups not exist. I ignored this step and went ahead.
Ok, the installer will have to create the directory first.
I remember my Windows 7 has a system reserved 100MB ntfs partition only for boot.
Did you manually create this, or was it created automatically when you installed windows?
Replaced to: Code:
bcdedit /set {ID} device "partition=C:"
Ok, I'll add that.

EDIT: When you typed in the ID, did you have to use the "{" and "}" around it?

Again, thank you so much for your help!

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Boot partition, etc.

#118 Post by shinobar »

noryb009 wrote:Interesting. Did the installer alert you that you didn't have admin privileges?
No. My account 'shino' is admin i suppose.
I remember my Windows 7 has a system reserved 100MB ntfs partition only for boot.
I remember at the first time intalled Windows 7 with its DVD on a blank HDD, The Windows 7 installer automatically made it. But it might be 200MB, i do not remember exactry. The 100Mb partition now is i created later when i re-construct whole the HDD.
http://www.sevenforums.com/installation ... ndows.html
http://www.msfn.org/board/topic/127911- ... partition/
http://www.sevenforums.com/installation ... ition.html
When you typed in the ID, did you have to use the "{" and "}" around it?
I add "{" and "}". I have not tried without.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#119 Post by noryb009 »

Ok, I tweaked the installer to include the things you suggested. I also added some debugging prompts.

First, uninstall your current puppy, then check bcdedit to make sure it's gone. If it isn't, run:

Code: Select all

bcdedit /delete {ID} /f
When you install/uninstall, you will be able to see the commands before they are run. If anything is wrong, just end the process and delete the entry (if any) that it created.

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

#120 Post by shinobar »

thanks, noryb009.
I am testing v3.1.
Maybe exporting backup succeeded(return '0').
But the installer freezes at creating new entry in BCD.
I have to kill the task from the Windows task manager.

Code: Select all

When you install/uninstall, you will be able to see the commands before they are run. If anything is wrong, just end the process and delete the entry (if any) that it created.[/quote]
Output folder: C:\Puppy-Linux-511
Extract: lupq-511.sfs... 100%
Extract: vmlinuz... 100%
Extract: initrd.gz... 100%
Extract: readme.txt
Output folder: C:\Puppy-Linux-511
Output folder: C:\Backups
Output folder: C:
Extract: grldr... 100%
Extract: grldr.mbr... 100%
Execute: bcdedit /export "C:\Backups\BCD Backup"
Execute: bcdedit /create /d "Start Puppy Linux" /application bootsector
As for the '{' and '}', it required to enclose ID from my test on the commandline.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#121 Post by noryb009 »

Is "C:\Backups\BCD Backup" a file?

Can you overwrite the 3.1 main.nsi with the attachment, then try again? IT IS NOT ZIPPED, just remove the .gz

Thank you!
Attachments
main.nsi.gz
(37.97 KiB) Downloaded 412 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

New main.nsh

#122 Post by shinobar »

I see "C:\Backups\BCD Backup".
noryb009 wrote:Can you overwrite the 3.1 main.nsi with the attachment
Thanks. I am trying. But seems same result (freeze).
I suspect creating new item sucseeds (return 0), but somthing wrong in handling the returned ID.

Additional info: Re-run the installer after killing the primer installer, it completes with sucsess, of couse without rewrting the BCD.
My repeated proccess is then uninstall from the menu.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

bcdedit reply

#123 Post by shinobar »

Well, this may be important info:
My Windows 7 is Japanese version, so the 'bcdedit' replies in Japanese.
Attachments
bcdedit_add_entry.PNG
Windows 7 Japanese version
(4.49 KiB) Downloaded 1003 times
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

ExecWait

#124 Post by shinobar »

Hi, noryb.
I am looking up your last main.nsi.
At line 364-366:

Code: Select all

    messagebox MB_OK 'Debug: command run:$\r$\nbcdedit /export "C:\Backups\BCD Backup"' #debug
    ExecWait 'bcdedit /export "C:\Backups\BCD Backup"' $1
    messagebox MB_OK 'Debug: result:$\r$\n$1'
At line 372-379:

Code: Select all

    messagebox MB_OK 'Debug: command run:$\r$\nbcdedit /create /d "${WHAT_TO_CALL_ON_BOOT}" /application bootsector' #debug
    ExecWait 'bcdedit /create /d "${WHAT_TO_CALL_ON_BOOT}" /application bootsector' $5
    messagebox MB_OK 'Debug: result:$\r$\n$5'
    StrCpy $4 "$5" #debug
    push $5
      call BetweenBrackets
    pop $5
Both i see the debug dialog - 'result: 0'
Means both the command 'bcdedit' returns the exit code '0', may mean success.
The last 'ExecWait' sets the exit code, $5 = 0.
The function BetweenBrackets proceeds '0' and get in an infinitive loop.

How to get the reply of the command 'bcdedit' with NSIS, that is the question.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

noryb009
Posts: 634
Joined: Sat 20 Mar 2010, 22:28

#125 Post by noryb009 »

Thank you for that. I looked it up again and found execwait does return the return code, not the output, I think I found how to get it, though.

Ok, firstly, check your C:\Program Files\NSIS\Pulgins, and make sure nsexec is there. (if it isn't, you may have to reinstall NSIS and select it)

Uninstall puppy (if it's in your menu, otherwise, don't worry), and remove the entry from bcdedit.

Then, try out the attached main.nsi (again, just rename it).
Attachments
main.nsi.gz
(38.1 KiB) Downloaded 516 times

Post Reply