HOWTO: Edit autoexec.bat to Boot Puppy by Choice For Pup4DOS

How to do things, solutions, recipes, tutorials
Message
Author
ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

HOWTO: Edit autoexec.bat to Boot Puppy by Choice For Pup4DOS

#1 Post by ChazZTheSpazZ »

I've been working on something a little neat in my opinion. It took me about an hour to get the DOS command syntax right (I'm tired ok?). This is for those who are using Pup4DOS to boot puppy off the c: drive of a Windows 9x, ME computer. For a Windows ME-based computer, you'll need to download a patch before this will work, here's the address: http://www.geocities.com/mfd4life_2000/ )

Note: This is very simple and step by step. Follow it exactly and there really shouldn't be any problems. It's fool-proof! I made sure of that.

First copy the usr_cram.fs, vmlinuz, and image.gz from the CD to your c: drive. Then download and extract Pup4DOS and move all files to the c: drive as well (the text files can be excluded). After that's all done, open c:\autoexec.bat in notepad. Now we're going to edit it.

It may just look like this:

Code: Select all

@echo off
Add "win" on its own line under everything , but without the quotes. It should look similar to this:

Code: Select all

@echo off
win
After that is done, skip a line and add ":puppy" without the quotes. Press enter and put in "call puppy.bat", without the quotes. After that is good and done, you should have something similar to this:

Code: Select all

@echo off
win

:puppy
call puppy.bat
Now for the long part. Place the cursor at the very beginning of everything and hit enter twice, thus creating 2 empty lines. Go all the way back to the top and type this in (or copy and paste):

Code: Select all

@echo off
echo ----------------------------------------------------
echo What Operating System Would You Like to Boot Today?
echo ----------------------------------------------------
echo 1) Microsoft Windows 98SE
echo 2) Puppy Linux
echo ----------------------------------------------------
echo Note: Windows defaults after 10 seconds.
echo ----------------------------------------------------
choice /c:12 /n /t1,10 Boot:
if errorlevel 2 goto puppy
That's pretty much it. You can change Windows 98SE to whatever version of windows you have. Here's exactly what my autoexec.bat looks like (and it works :D):

Code: Select all

@echo off
echo ----------------------------------------------------
echo What Operating System Would You Like to Boot Today?
echo ----------------------------------------------------
echo 1) Microsoft Windows 98SE
echo 2) Puppy Linux
echo ----------------------------------------------------
echo Note: Windows defaults after 10 seconds.
echo ----------------------------------------------------
choice /c:12 /n /t1,10 Boot:
if errorlevel 2 goto puppy

cls
C:\ESSAUDIO.COM -BLASTER
@echo off
Set tvdumpflags=8
win

:puppy
call puppy.bat
If yours looks somewhat like that, then you're fine, done. Just press the number 1 or the number 2 on your keyboard where "Boot:" appears on the screen and it will boot accordingly to the number you entered.

Note: The lines "C:\ESSAUDIO.COM -BLASTER" and "Set tvdumpflags=8" are special to my computer and may not be on yours. If yours doesn't have it or there's something else there, don't worry about it.

Note: The line that has "cls" is optional. That only tells it to clear the screen of the boot options.
Last edited by ChazZTheSpazZ on Wed 17 May 2006, 20:00, edited 1 time in total.
I agree with Glenn Beck. Elmo is definately the antichrist.

User avatar
jason.b.c
Posts: 755
Joined: Wed 08 Feb 2006, 05:32
Location: Marshfield,MO
Contact:

#2 Post by jason.b.c »

Cool how to Chazz, Is this the only way to dual boot puppy and win9x?? Or just the way you did it??

:roll: :wink:
Puppy is Awesome..!!!!
[url=http://www.puppylinux.com/][img]http://www.browserloadofcoolness.com/sig.png[/img][/url]

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#3 Post by ChazZTheSpazZ »

I'm sure there are other ways, but this is just how I did it and it works great. I'm running puppy 1.0.3 on it now, but only because I can't find my 1.0.7 CD. I think I may just download 1.0.8.
I agree with Glenn Beck. Elmo is definately the antichrist.

Fisherman
Posts: 6
Joined: Mon 20 Feb 2006, 19:08

#4 Post by Fisherman »

Hi,

I'm running puppy 1.0.7 on hard disc installation dual booting with Win 98SE and was interested to read your autoexec.bat tip. When I checked out my autoexec.bat file it didn't look like I'd expected based on your post however in my puppy folder on C drive there was a puppy.bat which looked very similar to your modified autoexec.bat. I just saved this C:/puppy/puppy.bat as c:/autoexec.bat and it does the same job

Fisherman

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#5 Post by ChazZTheSpazZ »

Fisherman wrote:When I checked out my autoexec.bat file it didn't look like I'd expected based on your post however in my puppy folder on C drive there was a puppy.bat which looked very similar to your modified autoexec.bat. I just saved this C:/puppy/puppy.bat as c:/autoexec.bat and it does the same job
I never did look at exactly what puppy.bat had, but if it works then go with it
:D .
I agree with Glenn Beck. Elmo is definately the antichrist.

r__hughes
Posts: 359
Joined: Thu 13 Apr 2006, 04:14
Location: Montreal, Canada

#6 Post by r__hughes »

Thanks for the info ChazZ

I got pup4DOS-0.5.zip to unzip using original folder info and create a
c:\puppy folder with all its contents. I used your autoexec.bat script almost verbatim - but I changed the call for puppy.bat to
call c:\puppy\puppy.bat (to handle the folder)

C:\puppy\ puppy.bat starts with a cd c:\puppy so all is well and none of files here need to be duplicated into c:\

I changed the puppy.cfg PFILE reference from pup1 to pup001 and my desktop PC was off and running with a problem-free menu boot to the puppy files created by LivePuppy1.0.8rl.

One caveat - I later repeated this on my NEC Versa SX laptop and all went well, the boot messages said everything was fine right up to the end - and then - a BLANK video screen - and no way of getting to the command line that I knew of.

It turned out that the Xvesa video drivers in the 1.0.8rl handled the LCD screen of the laptop with no problem but something in the pup4DOS menu bootup wasn't the same and the Xvesa setting didn't work. I finally solved this by live booting to puppy and then changing video driver to a Xorg LCD 1024 x 760 x 24 driver which works in both Live and non-Live versions.

My LivePuppy CD is now getting a well earned rest.
Last edited by r__hughes on Thu 27 Apr 2006, 00:20, edited 1 time in total.

r__hughes
Posts: 359
Joined: Thu 13 Apr 2006, 04:14
Location: Montreal, Canada

#7 Post by r__hughes »

- deleted double post

computertech
Posts: 5
Joined: Thu 04 May 2006, 12:16

Boot to CD and copy automatically to C Drive

#8 Post by computertech »

I loved the example from Chaz the Spaz concerning editiing your AutoExec bat file to give you a menu choice in Windws to boot to Windows or Puppy.

I need help in going one step further. I would like to create a batch file that would allow me to boot off of a CD and automatically copy the usr_cram.fs, vmlinuz, and image.gz from the CD to my c: drive. Can someone help me create the Batch file?

Thanks in advance for the help.

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#9 Post by ChazZTheSpazZ »

What do you mean? If all of those files are on the c:\ drive, then the CD isn't needed.

I did take this one step further, in a different direction, though. I recently installed BeOS (out of curiosity) and configured autoexec.bat to triple boot Windows 98, Puppy, and BeOS. As you will notice, I eliminated the puppy.bat script and just took the lines that I figured looked most important and just added them to autoexec.bat. It works perfectly. (Note: I have come to find out that BeOS doesn't really compare to Puppy Linux (in my opinion) but it's still something new to play around with.)

Here's what my autoexec.bat looks like now:

Code: Select all

@echo off
cls
echo ---------------------------------------------------
echo What Operating System Would You Like to Boot Today?
echo ---------------------------------------------------
echo 1) Microsoft Windows 98SE
echo 2) Puppy Linux 1.0.8r1
echo 3) BeOS 5 Personal Edition
echo ---------------------------------------------------
echo Note: Windows defaults after 10 seconds.
echo ---------------------------------------------------
choice /c:123 /n /t:1,10 Boot:
if errorlevel 1 goto windows

:windows
if errorlevel 2 goto puppy
cls
C:\ESSAUDIO.COM -BLASTER
@echo off
Set tvdumpflags=8
win

:puppy
if errorlevel 3 goto beos
cls
cd puppy
cd boot
tiny.exe vmlinuz image.gz @puppy.cfg
tiny.exe vmlinuz initrd.gz @puppy.cfg

:beos
cls
cd beos
call loadbeos.com
Also, you'll notice that my puppy files (image.gz, puppy.cfg, tiny.exe, vmlinuz) have been moved to a folder named boot inside a folder named puppy, with the exception of my pup1 file, user_cram.fs, and usr_more.fs (for wine). I added cls to :windows, :puppy, and :beos too. It clears the screen, making it look more 'professional'.

If you'd like to check out BeOS, you'll find it at BeBits.com.
I agree with Glenn Beck. Elmo is definately the antichrist.

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#10 Post by trapster »

This doesn't seem to work on my Windows ME laptop. I would love to get rid of this boot floppy. Also tried the grub wizard but it keeps telling me I don't seem to have a linux partition (which I don't).
Here is my autoexec.bat:

Code: Select all

@echo off
echo ----------------------------------------------------
echo What Operating System Would You Like to Use?
echo ----------------------------------------------------
echo 1) Microsoft Windows
echo 2) Puppy Linux
echo ----------------------------------------------------
echo Note: Windows defaults after 10 seconds.
echo ----------------------------------------------------
choice /c:12 /n /t1,10 Boot:
if errorlevel 2 goto puppy


@echo off
win

:puppy
call puppy.bat
Here is my puppy.bat:

Code: Select all

@echo off
echo Booting Puppy Linux...
c:
cd \puppy
if not exist c:\vmlinuz goto NoCore
if exist c:\image.gz goto Puppy1
if exist c:\initrd.gz goto Puppy2

:NoCore
echo ERROR: Core Puppy files not found in C:\
echo Please read C:\PUPPY\Pup4DOS.txt for more information
goto end

:Puppy1
if not exist puppy.cfg then goto NoConfig
tiny.exe c:\vmlinuz c:\image.gz @puppy.cfg
goto NoBootload

:Puppy2
if not exist puppy.cfg then goto NoConfig
tiny.exe c:\vmlinuz c:\initrd.gz @puppy.cfg
goto NoBootload

:NoBootload
echo ERROR: The bootloader didn't boot Puppy!
echo Please take note of the above error messages for later.
goto end
rem You might want to try linld.com, then. e.g.:
rem linld.com image=vmlinuz initrd=image.gz cl=@puppy.cfg

:NoConfig
echo ERROR: Puppy Linux boot config file not found (C:\PUPPY\PUPPY.CFG)
echo Please read C:\PUPPY\Pup4DOS.txt for more information

:end
Here is my puppy.cfg:

Code: Select all

root=/dev/ram0
PHOME=hda2
PFILE=pup1-none-524288
I'm pretty sure the files are correct because if I boot to the windows dos prompt and do "puppy.bat" it boots to puppy. If I boot normally it goes right to the ME splash screen.

All the pup files are on C:\

Currently running 1.0.7

Any ideas?
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#11 Post by trapster »

After digging all morning...this is what I finally found for Windows ME. ME does not use autoexec.bat or config.sys.

This web page explains it all and it works!!!!

No more churning while the floppy is read at startup!!

http://www.geocities.com/mfd4life_2000/

So Chazz, everything does work fine, you just need ME to "see" the autoexec and config files at boot.

Thanks.
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#12 Post by ChazZTheSpazZ »

Ah ok, sorry about that. I thought ME was about the same as 98. Well, at least it works now.

I'm going to edit the original post to include the site address for that patch in ME.
I agree with Glenn Beck. Elmo is definately the antichrist.

User avatar
J_Rey
Posts: 273
Joined: Wed 04 May 2005, 20:08
Location: Northwest Florida, U.S.A.
Contact:

#13 Post by J_Rey »

Well, to each his own method, but I prefer the method outlined in the included documentation with Pup4DOS for multiple reasons. First, it avoids having to mess with the existing autoexec.bat which could be problematic for many reasons. Second, it tells how to use the included boot menu(s) that come with DOS-based Windows versions (vs. NT-based versions) to boot to a real mode DOS prompt without any thing else running in the background, instead of creating your own menu in autoexec.bat as ChazZTheSpazZ outlines for us.

See also the Pup4DOS wiki page for the latest release and a little more about it. The more feedback/interest I get, the more I'll develop it. Sorry, I was a kinda slow responding to this topic....

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#14 Post by ChazZTheSpazZ »

It's not that hard to do this though, if you have ever used DOS before. I dunno. I just downloaded Pup4DOS, then got to work making this. If there's documentation, I never read it (past tense, I occasionally do read documentation).
I agree with Glenn Beck. Elmo is definately the antichrist.

User avatar
Wolfen
Posts: 86
Joined: Tue 18 Jul 2006, 09:34
Location: Behind you..

#15 Post by Wolfen »

This is how my AUTOEXEC.BAT looks:

Code: Select all

@echo off 
echo ---------------------------------------------------- 
echo What Operating System Would You Like to Boot Today? 
echo ---------------------------------------------------- 
echo 1) Microsoft Windows ME 
echo 2) Puppy Linux 
echo ---------------------------------------------------- 
echo Note: Puppy defaults after 10 seconds. 
echo ---------------------------------------------------- 
choice /c:12 /n /t2,10 Boot: 
if errorlevel 2 goto puppy

cls
@echo off
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
SET TVDUMPFLAGS=8
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\progra~1\felles~1\gtk2~1.0\bin
SET LANG=en
C:\WINDOWS\WIN.COM
win

:puppy
call c:\puppy\puppy.bat
I had to change a little on the information to get it working on my computer,
you can see that the last line says "call c:\puppy\puppy.bat", because that the puppy.bat is not located in c:\, but in c:\puppy.
Else I have set the timeout to start Puppy automaticly.
I guess many of the lines that says SET ....... is coming from GTK, as I have The GIMP on Windows.
The C:\WINDOWS\WIN.COM is because of the patch to WinME. 8)
Wolfen

User avatar
jason.b.c
Posts: 755
Joined: Wed 08 Feb 2006, 05:32
Location: Marshfield,MO
Contact:

#16 Post by jason.b.c »

Hey chazz , Let me ask you something...

You should know this..!

You how when you click the start button in win 98 like your going to either restart or shutdown the computer ( let's just use restart as the example ) ...?

Then you get a menu asking what you want to do , Something like this if memory serves me:

Shutdown the computer

Restart the computer.

Restart in DOS mode...

Hibernate the computer.
.

Something to that effect, ..Now would it be possible to add Puppy Linux to that list...???

Maybe just by replacing the one that say's MS-DOS mode...

Can that be done..??? :o
Puppy is Awesome..!!!!
[url=http://www.puppylinux.com/][img]http://www.browserloadofcoolness.com/sig.png[/img][/url]

ChazZTheSpazZ
Posts: 126
Joined: Mon 16 Jan 2006, 06:26
Location: Missouri, USA

#17 Post by ChazZTheSpazZ »

Sorry to be late in replying, I have been quite busy lately. School started again. -_- I haven't had much time to play with Puppy either.

I'm sure it would be possible though. It would (probably, i can't say for sure) take some registry modifying to do it like you explained, which I'm not the most familiar with. Maybe making a batch file which restarts the computer and into puppy like that would be easier. It could be placed in the start menu, like BeOS's boot-loader for Windows. Like I said, I'm not the most familiar with such matters. Given a little bit of time though, I could do it. Maybe I will.
I agree with Glenn Beck. Elmo is definately the antichrist.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#18 Post by mini-jaguar »

wow, that method at the top looks really simple, but it's not going to work if I've already installed puppy in a separate partition, is it?

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#19 Post by rcrsn51 »

A better bet would be the Lin'n'Win method. It uses the GRUB bootloader, so you could configure its menu.lst file to launch Puppy out of another partition.

mini-jaguar
Posts: 597
Joined: Thu 13 Nov 2008, 13:45

#20 Post by mini-jaguar »

Thanks, but I already looked into this before I posted here, and the autoexec.bat method seemed more interesting because I could not find the config.sys file. I don't know if it's supposed to be there in Windows 98, but if it is, a friend of mine must have wiped it out when he got rid of this bug at Windows startup a few years ago (Windows has worked fine ever since).

Post Reply