How to put puppy inside a directory in flash drive? (Solved)

Booting, installing, newbie
Post Reply
Message
Author
kinfo
Posts: 4
Joined: Mon 28 Sep 2015, 08:05

How to put puppy inside a directory in flash drive? (Solved)

#1 Post by kinfo »

I just installed (frugal) puppy 5.7.1 on a usb pendrive.
Since I also use the pendrive to bring with me other files, to keep it clean I would like to have all the puppy files in a directory (say "puppy").

So, naively, I acted like this: from my linux box I mounted the pendrive to /media/sdc1 and its content looks like

/media/sdc1/
├── Music
├── Pictures
├── initrd.gz
├── ldlinux.sys
├── precisesave-home.2fs
├── precisesave-work.2fs
├── puppy_precise_5.7.1.sfs
├── syslinux.cfg
└── vmlinuz

Now I created a directory "puppy" in sdc1 and moved in it all the puppy files and then I rebooted.
Now, puppy experts will guess what followed: at boot no linux was found in the pendrive and I was not able to start puppy.

Is there a way to get what I want?

Thanks

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

usb booting

#2 Post by peterw »

Hi

Yes, I think you can. It will need a running Puppy to do this. Give grub4dos a try and make it only search inside the usb stick. To make bootable usb sticks I normally used gparted to format it (either ext2 or fat32) and add the boot flag. I then open up the iso and copy the directories andfiles to the usb stick (in a directory is best such as puppy-5.7) and then run the grub4dos programme. It should find all it needs and away you go. On some older laptops you might find usb booting "iffy". This is what is called a frugal install and you can have more than one Puppy on the stick and as many other directories as you want. When Puppy loads it is able to access them.

peterw

kinfo
Posts: 4
Joined: Mon 28 Sep 2015, 08:05

#3 Post by kinfo »

Hi,

I see from my post that maybe I didn't make it clear: on my usb stick puppy was ok. I was able to run puppy in the original setting, so I think I don't need to make it bootable: it already is.

What I did is: after puppy was ok on the usb pendrive, I rebooted my ubuntu desktop, I mounted the pendrive, I created the puppy dir, I moved all puppy files in the dir and then I rebooted, trying to boot from the pendrive: it is at this point that I got a failure.

If I move again the puppy files at the top level in the pendrive, I can boot again from it.

Moreover, I am in a linux only environment, so I can't use grub4dos.

Should I reinstall grub on on the pendrive after having moved the files in the puppy dir, maybe?

kinfo
Posts: 4
Joined: Mon 28 Sep 2015, 08:05

#4 Post by kinfo »

Ok, I made some progress: I moved syslinux.cfg to the top level of the usb pendrive, leaving all other files in the "puppy" dir. Then I edited syslinux.cfg and addedd "puppy/", so that now it looks like

# cat syslinux.cfg
default puppy/vmlinuz initrd=puppy/initrd.gz pmedia=usbflash
#

and now my pendrive has the following content:

├── Music
├── Pictures
├── syslinux.cfg
└── puppy
.....├── initrd.gz
.....├── ldlinux.sys
.....├── precisesave-home.2fs
.....├── precisesave-work.2fs
.....├── puppy_precise_5.7.1.sfs
.....└── vmlinuz

It works and is nearly what I am looking for: I miss the last step: how can I move syslinux inside "puppy"?
I mean: if I simply move it, puppy will not boot.
I guess I have somehow to reinstall the bootloader to instruct it that syslinux.cfg is inside "puppy". How do I do this?

kinfo
Posts: 4
Joined: Mon 28 Sep 2015, 08:05

#5 Post by kinfo »

Ok, I got it!

I rebooted ubuntu, then I reinstalled syslinux with the command

sudo syslinux --directory /puppy --install /dev/sdc1

(where sdc1 is my pendrive).
Then, after mounting sdc1, I moved back syslinux.cfg in "puppy"
and deleted the puppy prefix in syslinux.cfg (so, all in all, restoring its original form) and now everything is fine!

In any case, thanks: your hint made me think and gave me a clue for further searches which led me to the solution.

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

grub4dos

#6 Post by peterw »

Well done kinfo

You have done it. Just a clarification. In Puppy go to Sytem and you will see that Puppy has two boot loaders Grub4Dos and Legacy Grub. I know that grub4dos refers to DOS but it works extremeley well in Puppy. I don't know how it works, it just does and is my preferred boot loader. It will add the menu.1st which if you want you can edit to do what you want. It detects all Puppies cases of frugal installations, any full installation of Ubuntu, Puppy, etc and automatically adds a chainloader for any Windows installation in case you have one. This will be a bit easier than the process you went through. You did well to find that way of booting the usb.

peterw

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

Nice one. Glad you got it sorted.

As peterw says, it's a common mistake to make. Everyone takes one look at 'Grub4DOS', and immediately thinks 'DOS.....Microsoft.....Windows.....not Linux.' But as has been stated, it's the preferred bootloader of choice for a great many of us, because it simply works.

I don't pretend to understand the black magic involved at all. I'm running Win XP (in a restricted, locked-down format, it's true!), Xubuntu, and two Pups on my main PC; Grub4DOS finds, and boots them all.....with a minimum of fuss.

I'm probably wrong here (I frequently am!), but it sounds to me as though you've essentially created a Puppy 'sym-link' to syslinux.cfg. That's just one of the many eye-openers about Puppy; it doesn't care where you put its operating files.....as long as it can find them, by whatever means, it will run.

So many of the traditional Linux 'full' installs, if they can't find things exactly where they expect to find them.....they're stumped. Puppy is truly versatile.

Well done.


Regards,

Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#8 Post by bigpup »

It works and is nearly what I am looking for: I miss the last step: how can I move syslinux inside "puppy"?
I mean: if I simply move it, puppy will not boot.
syslinux.cfg has to be on the top layer of the file system so it will boot.

As it is now setup, the USB drive has a basic boot loader. (syslinux)

Edit:
You could try to put syslinux.cfg in one of these folders.
/boot/syslinux/
/syslinux/

syslinux search is setup to look in these folders.
SYSLINUX searches for the SYSLINUX.CFG file in the following order:
/boot/syslinux/syslinux.cfg
/syslinux/syslinux.cfg
/syslinux.cfg
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply