How to Dual boot Puppy&XP from USB using syslinux & grub4dos

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy&XP from USB using syslinux & grub4dos

#1 Post by ETP »

Like many Puppians, particularly those new to Linux, I have always preferred to run my pups from USB2 flash rather than by installing them to my C: drive in some sort of dual boot arrangement. These can work fine but also, can be fraught with difficulty and the corruption or total loss of your Windows system may be the result.

The method described below involves no changes or additions to your C: drive. It was arrived at after a good deal of trial & error and won out due to its simplicity.
No menu.lst is needed.

The downside of booting puppy from USB is that you can be forever popping in & out of the BIOS to change the boot order when switching between XP & puppy. Providing you leave the stick plugged in this need is eliminated as the modified syslinux menu provides the option to boot into XP or Puppy.

For the purposes of this method I used syslinux 4.04 with the graphical vesamenu.c32. It assumes that you already possess a working USB stick using syslinux & vesamenu. Vesamenu.c32 and syslinux.cfg should be in the root of the flash drive together with the splash screen (bart9splash.jpg) if used.

All files including a full copy of my syslinux.cfg, the 2 required grub files and the splash screen are attached.

STEPS:
1. On your stick create the directory structure shown and place the 2 files in it.

Image

2. Append the following block of code to your syslinux.cfg or use the one attached and modify it to suit your particular pup(s).

Code: Select all

MENU SEPARATOR

LABEL grub
MENU LABEL XP Pro            28/07/12
KERNEL /boot/grub/grub.exe --config-file="map (hd1) (hd0);map (hd0) (hd1);map --hook;chainloader (hd0)+1"

MENU SEPARATOR

LABEL reboot
MENU LABEL Reboot
KERNEL /boot/grub/grub.exe --config-file="reboot"

MENU SEPARATOR

LABEL off
MENU LABEL Power Off
KERNEL /boot/grub/grub.exe --config-file="halt"
3. That’s it! --------- Result as below:
Last edited by ETP on Thu 18 Oct 2012, 10:39, edited 4 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy&XP from USB using syslinux & grub4dos

#2 Post by ETP »

Alternate splash screen for syslinux/vesamenu.c32 (1024x768 - 68KB)

Image
Attachments
puppy.tar.gz
(64.72 KiB) Downloaded 726 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy&XP from USB using syslinux & grub4dos

#3 Post by ETP »

Hello World,
Some relevant feedback would be nice (good or bad - "Nice font" will not suffice) :)
Image
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
nilsonmorales
Posts: 972
Joined: Fri 15 Apr 2011, 14:39
Location: El Salvador

#4 Post by nilsonmorales »

tnx i will try a report ok :wink:
http://nilsonmorales.blogspot.com/
where you download the grub.exe
some link?

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy&XP from USB using syslinux & grub4dos

#5 Post by ETP »

Nilsonmorales,

Thanks for your interest. All files are included in the attachment at the bottom of the first post.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#6 Post by OscarTalks »

Hello ETP,

Thanks for posting these dual boot methods. I know how time-consuming it can be working these things out.

I have been using Puppy for a few months now but have always run Live. I have just started dipping my toe in the water of installing and booting and grub and stuff.

I would like to try your method on my little netbook with Windows XP on the HDD and Puppy frugal on an 8 Gig SD card which I have slotted in.

As a first step though, I would like to install Puppy to the SD card after it has been formatted as ext4, which I haven't been able to do yet. Can you (or anyone) tell me how to do this such that it can be booted using the BIOS?

I have currently got it working perfectly (not dual boot of course) by using BootFlash to make the SD card bootable and then Puppy Universal Installer to install the files (Slacko 5.3.3), but BootFlash forces formatting as vfat (unless I missed something) and PUI alone doesn't seem to create an install that boots on ext4 (or is it one of those mbr options that I need to use?). Does it become necessary to install grub or grub4dos even though it is not needed if the SD card is vfat?

Once I can figure this out I would then hope to go on to try the dual boot system. Where did the vesamenu.c32 file come from?
Oscar in England
Image

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#7 Post by ETP »

Hi OscarTalks,

It is good to hear that you have created a working vfat SD using Bootflash & the PUI. With very little work that can be modified to provide a dual boot but you will need to stick with vfat.

It is possible to create an ext4 partition at the end of the card to hold your main sfs & save file but I would advise against it as the gains are minimal. The benefit of having a vfat volume which is accessible from both Puppy & XP is the better option. If however you have a pressing reason for creating an ext4 partition let me know & I will post instructions.

Vesamenu.c32 is one of the many modules provided within syslinux. Its use enables posh menus with high resolution png or jpg splash screens up to 1024x768. (Grub is limited to 640x480)

A copy of vesamenu.c32 from syslinux 4.04 is attached – place it in the root of your SD.

For the benefit of other readers using XP
Syslinux (4.04 zip) can be downloaded from here:

http://www.kernel.org/pub/linux/utils/boot/syslinux/

Instructions here:
http://www.syslinux.org/wiki/index.php/HowTos

Attached is a (tested) syslinux.cfg specifically for Slacko 5.3.3. In conjunction with the 2 grub files placed as per the first post in this topic it will provide the dual boot with XP from an SD card or USB stick.

Steps to set this up.
1. Rename your existing syslinux.cfg to say syslinux.osc
2. Place the attached files (syslinux.cfg & vesamenu.c32) in the root of your SD.
3. Off the root create the directory p533 and move all your Puppy files into it:
vmlinuz
initrd.gz
slackosave.xxx.xfs (whatever yours is named)
puppy_slacko_5.3.3.sfs

4. Place the 2 grub files as shown in first post.

5. Place the splash screen (bart9splash.jpg) in the root of your SD.

Caveat:
You may find that depending on your screen resolution, the menu may be off centre. Adjust the HSHIFT & VSHIFT values in syslinux.cfg to suit.
Attachments
vesamenu.zip
vesamenu.c32
(83.18 KiB) Downloaded 587 times
syslinux.zip
syslinux.cfg for Slacko 5.3.3
(808 Bytes) Downloaded 627 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
canbyte
Posts: 264
Joined: Sat 10 Jan 2009, 20:20
Location: Hamilton, Canada

Dual boot from cd

#8 Post by canbyte »

Hoping to hitchhike on this thread but haven't yet got to the point of usb/flash install. Now running from cd with files on flash drive. A new cd RW drive is presenting difficulties getting the disk in/out before windows boots up (and also a bit lazy and just hoping to leave CD in the drive). Having various _save files on the flash drive, puppy presents them in a list and waits for a number input corresponding to the desired running profile.

Would it be possible to simply add a choice '0' to the list for going back to the C drive and starting windows (xp)? Seems there must be something in this thread to do that but I'm not expert enough to identify what and where to put it. Thanks in advance.
[color=orange]1. Dell Dimension E521, AMD Athln 64, 2 GHz 1.93GB ram,
Puppy 533 on CD, accesses flash drive only,
FFox Nightly12.0
2. Compaq P3 733Hz 375RAM
Printer: Oki C3400 > LAN [/color]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#9 Post by greengeek »

ETP, Just getting this on my watchlist 'cos I want to try this on my work netbook... Looks like a neat idea.

Just to clarify - does this method mean that I can leave my Win XP install untouched, then set my netbook to boot from usb, then plug in a usb stick with a version of puppy (including the setup you describe), then I will get a choice of booting into Windows or Puppy?

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Re: Dual boot from cd

#10 Post by ETP »

canbyte wrote:Hoping to hitchhike on this thread but haven't yet got to the point of usb/flash install. Now running from cd with files on flash drive. A new cd RW drive is presenting difficulties getting the disk in/out before windows boots up (and also a bit lazy and just hoping to leave CD in the drive). Having various _save files on the flash drive, puppy presents them in a list and waits for a number input corresponding to the desired running profile.

Would it be possible to simply add a choice '0' to the list for going back to the C drive and starting windows (xp)? Seems there must be something in this thread to do that but I'm not expert enough to identify what and where to put it. Thanks in advance.
Hi canbyte,

Leaving your CD in the drive I take it that your PC boots from it when you power up (i.e. your BIOS is set to boot from the CD before the hard disc – which is normal)

To boot from the hard disc instead, simply hold down your SHIFT key as you power on. (Release it when you see the hard disc begin to boot)
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#11 Post by greengeek »

p.s: I don't understand how I would get a working puppy on the stick without using grub already? Can you point to a tutorial how to get the stick ready for the additions you mention? cheers. (the link on the syslinux tutorial pointing to "bootable usb" seems inactive)
Last edited by greengeek on Thu 18 Oct 2012, 07:51, edited 1 time in total.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#12 Post by ETP »

greengeek wrote:ETP, Just getting this on my watchlist 'cos I want to try this on my work netbook... Looks like a neat idea.

Just to clarify - does this method mean that I can leave my Win XP install untouched, then set my netbook to boot from usb, then plug in a usb stick with a version of puppy (including the setup you describe), then I will get a choice of booting into Windows or Puppy?
You have it in one Sir. :)
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#13 Post by ETP »

greengeek wrote:p.s: I don't understand how I would get a working puppy on the stick without using grub already? Can you point to a tutorial how to get the stick ready for the additions you mention? cheers. (the link on the syslinux tutorial pointing to "bootable usb" seems inactive)
Hi greengeek,

The method does assume that you already possess a working USB stick with puppy on it using syslinux to boot.

If not, use Bootflash & the PUI to create one. Do NOT use grub to make it bootable. Then follow the instructions in the original post.

See also my reply to OscarTalks and the links if you wish to create such a stick manually.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#14 Post by greengeek »

EDIT
"If not, use Bootflash & the PUI to create one. Do NOT use grub to make it bootable. Then follow the instructions in the original post. "
OK, I think I understand. Will give that a go.

[EDIT]Deleted most of this post at ETPs request to avoid confusion that my post created
Last edited by greengeek on Thu 18 Oct 2012, 21:10, edited 3 times in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#15 Post by greengeek »

OK, I just found a stick that I made ages ago, and it is bootable - but could you look at these contents and tell me if you think it is suitable please? Is it ok that it contains ldlinux.sys? (Just checked with Gparted that it's a FAT32 partition - so that part should be ok)
Attachments
usb stick contents b4 changes.jpg
(23.86 KiB) Downloaded 2770 times

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#16 Post by ETP »

greengeek wrote:OK, I just found a stick that I made ages ago, and it is bootable - but could you look at these contents and tell me if you think it is suitable please? Is it ok that it contains ldlinux.sys? (Just checked with Gparted that it's a FAT32 partition - so that part should be ok)
Hi greengeek,

Looks eminently suitable. Ldlinux is the hidden, vital bootloader. You do not seem to have a savefile (or have deleted it) but it matters not. You are now only 2 steps away from possessing a dual boot stick :D
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#17 Post by greengeek »

Almost there: here is my syslinux.cfg (with your suggested code appended):

Code: Select all

#default vmlinuz initrd=initrd.gz pmedia=usbflash

MENU SEPARATOR

LABEL grub
MENU LABEL XP Pro            28/07/12
KERNEL /boot/grub/grub.exe --config-file="map (hd1) (hd0);map (hd0) (hd1);map --hook;chainloader (hd0)+1"

MENU SEPARATOR

LABEL reboot
MENU LABEL Reboot
KERNEL /boot/grub/grub.exe --config-file="reboot"

MENU SEPARATOR

LABEL off
MENU LABEL Power Off
KERNEL /boot/grub/grub.exe --config-file="halt" 
The first time I booted I did not have the first line commented out (as it is shown here), but it failed to display your menu - just booting into the existing Linux set up on the stick. Now that I have commented out the first line it just says that it can not find the Linux Kernel. Can you spot any clues to what I am doing wrong please?
(just off to bed now... I hope to continue in the morning. Thanks for the help...)

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#18 Post by ETP »

Hi greengeek,
Can you spot any clues to what I am doing wrong please?
Mmmmmm…. Pretty much everything. :) Please see my post dated 24/08/12 in reply to OscarTalks. Follow the steps there exactly including using the 2 files attached to it. (vesamenu.c32 and syslinux.cfg for Slacko 5.3.3)
Your stick should finish up with 2 directories:
p533
boot (plus contents-see first post)
In the root you should have:
syslinux.cfg
vesamenu.c32
bart9splash.jpg
ldlinux.sys (hidden file)

You will then need to change the following line in syslinux.cfg to match your set up:

From:

APPEND initrd=/p533/initrd.gz pmedia=usbflash pupsfs=sdb1:/p533/puppy_slacko_5.3.3.sfs psubdir=/p533

To:

Code: Select all

APPEND initrd=/p533/initrd.gz pmedia=usbflash pupsfs=sdc1:/p533/puppy_slacko_5.3.3t.sfs psubdir=/p533
NOTES:
Your stick is seen as sdc1
For some reason I don’t understand your pupsfs has 5.3.3t.sfs on the end.
In the directory p533 you should have

initrd.gz
vmlinuz
the main sfs (puppy_slacko_5.3.3t.sfs in your case)
the slackosave- (once created)
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: How to Dual boot Puppy XP from USB using syslinux & grub4dos

#19 Post by greengeek »

ETP wrote:Please see my post dated 24/08/12 in reply to OscarTalks. Follow the steps there exactly including using the 2 files attached to it. (vesamenu.c32 and syslinux.cfg for Slacko 5.3.3)
Sorry, I misinterpreted that post. I thought the syslinux.zip contained the actual syslinux files (which I had downloaded direct from kernel.org). Didn't initially realise it was your sample syslinux.cfg file.
Your stick should finish up with 2 directories:
p533
boot (plus contents-see first post)
I don't have the puppy files in a separate subdirectory - they are still in root. I will have to play with this a little to get closer to your original setup.
For some reason I don’t understand your pupsfs has 5.3.3t.sfs on the end.
The stick was loaded with "Slacko Thin" which has the "t" added onto it. I find it a really good version for testing with.

I believe I am doing things correctly now, but the stick hangs during boot, just showing "syslinux 3.73 xxxxxx xxxxxx xxxxetc etc" and nothing else happens. (If I eliminate all the new code in syslinux.cfg and go back to my original one-line config of

Code: Select all

default vmlinuz initrd=initrd.gz pmedia=usbflash
the Slacko Thin still boots so the boot hang seems to be to do with the config of the syslinux.cfg. I will have a careful read of all of this again and may start with a fresh usb stick.

I think I had one too many glasses of wine last night when I got all excited about making this work :-)
I will come back to this and have another go with a fresh mind.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

How to Dual boot Puppy XP from USB using syslinux & grub4dos

#20 Post by ETP »

Hi greengeek,
I believe I am doing things correctly now, but the stick hangs during boot, just showing "syslinux 3.73 xxxxxx xxxxxx xxxxetc etc" and nothing else happens.
That’s fine. Please note that the stick needs to have been made bootable with syslinux 4.04 as stated in my original post. Vesamenu.c32 must also be from that version (as supplied) It will not work with 3.73.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Post Reply