Page 3 of 4

Posted: Tue 14 Jul 2015, 07:17
by gyro
@boof
What filesystem do you have on USB?
Is it a stick or usb drive?

Could you please go back to the standard "initrd.gz" and prove that it boots Ok.
Then replace "initrd.gz" with the patched "initrd.gz", but change nothing else. Does it still boot?

gyro

Posted: Tue 14 Jul 2015, 15:15
by boof
its a usb stick, 8GB.

oem initrd.gz does not work either===does not find sfs file on usb or cd. Puppy is installed fully on sda2. and boots ok..

Posted: Tue 14 Jul 2015, 18:37
by gcmartin
Hello @Boof

I think @Gyro want info from this terminal command while your USB stick in plugged in.

Code: Select all

# fdisk -l
. Post it if you can.

Posted: Wed 15 Jul 2015, 00:33
by boof
Unfortunately, I'm working blind. I have no understanding of what I'm doing, tho' I will do as instructed if I can.

Posted: Wed 15 Jul 2015, 08:44
by mikeb
Sounds like this problem needs a fresh thread as its not really about gyros modifications or that's how i read it.

Sounds like there is more than one initrd.gz around which may affect it... or you have boot parameters to consider.... the partitioning itself should no longer be an obstacle.

mike

Posted: Wed 15 Jul 2015, 09:56
by gyro
@boof,
Sorry, but you need to get the release version of Tahrpup 6.0.2 working first, before you can test this modified "initrd.gz".
gyro

Updated to version 6

Posted: Wed 15 Jul 2015, 10:10
by gyro
Version 6 should work with usb devices.
Version 5 could not.

I recommend that you upgrade to version 6.

See first post for downloads.

I tested this on a 4GB usbstick, doing manual frugal installs using the Tahrpup 6.0.2 files directly out of the iso, but replacing the "initrd.gz" with my patched version.
In each case I copied the puppy files onto the freshly partitioned usbstick, and then ran "Grun4Dos bootloader config", installing the "bootup loader" in the MBR of the usbstick.

Test1: all of stick formatted as fat32 by windows 8.1, worked.
Test2: 100MiB fat32 partition for booting, remainder of stick an ext4 partition containing the puppy files, worked.

gyro

For those using SAVEMARK

Posted: Wed 15 Jul 2015, 10:16
by gyro
Since "/mnt/home" is the partition where your savefile/savefolder is stored, it's probably more convenient to copy "PUPSTATE" there beside the savefile/savefolder.
Just ensure that the "nosearch=sd??" boot parameter specifies the partition that "PUPSTATE" was copied to.

gyro

Posted: Thu 16 Jul 2015, 03:17
by boof
BECAUSE I have updated my system, the.sfs in the iso is invalid. I can't mount it to use the universal installer. I DO wish the universal installer would install ANY puppy version, not just its own. I'm advised there is an sfs version updater in the utilities menu, but I don't recognise a name or know how to use it. Advice pls.

Posted: Fri 17 Jul 2015, 09:34
by boof
have burned iso with initrdgz V6 onto CD. Boots but can't find sfs file...

Re: Updated to version 5

Posted: Fri 17 Jul 2015, 16:03
by Marv
gyro wrote:This version greatly simplifies the code at the expense of a little processing inefficiency.
Instead of reading the file "PUPSTATE" directly from the savefile/savefolder, it looks for it in the frugal install directory. So it doesn't have to wait until the savefile/savefolder is available before making the final decision.

To use:
1) Put patched "initrd.gz" in the frugal install directory.
2) Reboot to show that everything is still the same.
3) Copy "/etc/rc.d/PUPSTATE" to the frugal install directory.
4) Add "nosearch=sda3" as boot parameter (using appropriate partition instead of "sda3").
5) Reboot.

The "nosearch" facility can be deactivated by either removing the "nosearch" boot parameter or deleting the "PUPSTATE" file in the frugal install directory.

To add an adrv or ydrv to the boot:
1) delete the copy of "PUPSTATE" in the frugal install directory.
2) Reboot.
3) Copy "/etc/rc.d/PUPSTATE" to the frugal install directory.
4) Reboot

See first post for download.

gyro
I followed and tested through version 3. For me adding and keeping track of another file in the boot directory for each pup is a dealbreaker. One of the beauties of the frugal installs for me always has been the small and uniform number of files to keep track of and maintain (I juggle multiple pups on most of my platforms). Back to my 3 line "ignore=usb" patch.

Just my humble opinion. I greatly respect and support those willing to maintain and support the foundations of puppy.

Posted: Sat 15 Aug 2015, 12:41
by technosaurus
gyro wrote:
technosaurus wrote:WOW, I can't believe how overly complex this has become
Some of the complexity comes from trying to efficiently integrate it into the 'init' script.
technosaurus wrote:when it could just be a single parameter SFS= with a ',' separated list of files to mount and use full paths vs. search if an item in the list starts with '/'
Are you suggesting that this code in the 'init' script

Code: Select all

#100915 requested by technosaurus (formats get changed further down)...
[ $pupsfs ] && PUPSFS=$pupsfs #format partition:<path><filename> ex: sda2:/wary071/wary_071.sfs
[ $zdrv ] && ZDRV=$zdrv #ex: sda2:/wary071/zdrv_071.sfs
[ $adrv ] && ADRV=$adrv
[ $ydrv ] && YDRV=$ydrv
is obsolete?

gyro
It's the only part that isn't obsolete. When you install puppy, the installer script knows where it puts stuff amongst other things. You have to develop the installer in conjunction with init.
Don't fix installer deficiencies with init workarounds that slow down boots.
How many *DRVs do there need to be before you just have a list?
Why does init need to search for stuff if it's not a usb install?

A basic init to X can be done in ~10 lines of c and start in less than half a second (I've done it) search for nanosaurus if your curious.
Did you know jwm has a <StartupCommand> tag that could do most of the rest of the stuff that's in the init?

Posted: Wed 19 Aug 2015, 14:14
by gyro
@technosaurus
I think you are suggesting that the "init" script could do with a rewrite. I agree. But that's beyond the scope of this little project.
gyro

version 4 released

Posted: Wed 19 Aug 2015, 14:22
by gyro
I have uploaded a version 4.
This is a continuation of the version 3 concepts, but it uses a "nosearch" boot parameter instead of a "pupsave" parameter.
This is because a "pupsave" parameter could be interpreted as simply defining the pupsave to use. Using "nosearch" should avoid any such an incorrect impression.

gyro

Posted: Mon 28 Sep 2015, 03:59
by boof
I have puppy_slacko_5.7.iso It won't boot from usb because it can't find the sfs file.

If I expand this iso into into sub files, the initrd.gz file exists and is some 1MB.

If I then expand initrd.gz, The initrd file shows up as empty, having only 1 empty line for text shown in geany.

I can't locate where or how to patch the files to get this to work.

Posted: Mon 28 Sep 2015, 10:08
by rufwoof
boof wrote:I have puppy_slacko_5.7.iso It won't boot from usb because it can't find the sfs file.

If I expand this iso into into sub files, the initrd.gz file exists and is some 1MB.

If I then expand initrd.gz, The initrd file shows up as empty, having only 1 empty line for text shown in geany.

I can't locate where or how to patch the files to get this to work.
How are you 'expanding' the initrd.gz file.

The usual way is to create a sub directory beneath where the initrd.gz file is then change directory into that new directory and

zcat ../initrd.gz | cpio -id

Personally I like to drop the puppy sfs into the initrd file i.e. I copy puppy*.sfs into tha sub directory and then reform using

find | cpio -o -H newc > ../initrd

and then compress that if desired. If you change your grub boot loader to point to initrd instead of initrd.gz then you don't need to compress it. To re-extract a non compressed initrd you use cat ../initrd | cpio -id

As I drop puppy sfs into initrd I changed init script code to not bother searching elsewhere

Code: Select all

#first look inside initrd...
[ -f /${PUPXXXSFS} ] && PUPSFS="rootfs,rootfs,/${PUPXXXSFS}"
[ -f /${ZDRVSFS} ] && ZDRV="rootfs,rootfs,/${ZDRVSFS}"
[ -f /${ADRVSFS} ] && ADRV="rootfs,rootfs,/${ADRVSFS}"
[ -f /${YDRVSFS} ] && YDRV="rootfs,rootfs,/${YDRVSFS}"

# Rufwoof if in initrd (my default) then don't bother spending time searching elsewhere
if [ "$PUPSFS" = "" ]; then # Rufwoof added
  search_func ata #110425
...
...
...
   if [ "$VMLINUZ" = "" -o "$PUPSFS" = "" -o "$SAVEPART" = "" ];then
     search_func usb
   fi
  fi

fi # Rufwoof added

Posted: Mon 28 Sep 2015, 13:56
by gyro
@boof,

You need to have a fully functioning puppy before worrying about this stuff. It won't help the "can't find puppy.....sfs" problem.

To help with editing the "init" script you could try this topic http://murga-linux.com/puppy/viewtopic.php?t=72842

gyro

Posted: Tue 29 Sep 2015, 00:09
by smokey01
boof wrote:I have puppy_slacko_5.7.iso It won't boot from usb because it can't find the sfs file.

If I expand this iso into into sub files, the initrd.gz file exists and is some 1MB.

If I then expand initrd.gz, The initrd file shows up as empty, having only 1 empty line for text shown in geany.

I can't locate where or how to patch the files to get this to work.
Boof I always put all files pertaing to a distro in the same directory. This keeps things tidy and contained.

Recently I created a USB Flash Drive with two partitions. The first partition was formatted to fat32 and the second ext2 (linux).
The distro's were slacko-5.7 and precise-5.7.1. The reason I did this was so I could create a save folder on the second partition.

The USB was originally created with MultiPup-6.0 r22. After that I used gparted to reduce the size of the fat32 partition and created a second partition which I formatted to ext2 as previously stated.

The information below from CatDude shows how I achieved this:
CatDude wrote: The flashdrive has two partitions: 1x Fat32 (sdb1) and 1x Ext2(sdb2)

If you wish to put your savefile on a different partition to that from which you boot,
add the following to the kernel line (just temporary at the grub screen):

PSAVEMARK=2

Use the RAM stanza, and tack PSAVEMARK=2 on the end.

When you reboot, it will create the savefile on (sdb2)
it also creates a subdirectory named identical to the one you are booting from.

Another way is to create a file called SAVEMARK is the pup directory. The only contents of the file is the partition number EG: 2



Contents of (sdb1)
# tree -a
.
├── boot
│   └── grub
│   ├── menu.lst
│   ├── Multipup
│   ├── stage1
│   └── stage2
├── index.txt
├── precise-5.7.1
│   ├── boot.cat
│   ├── boot.msg
│   ├── help2.msg
│   ├── help.msg
│   ├── initrd.gz
│   ├── isolinux.bin
│   ├── isolinux.cfg
│   ├── logo.16
│   ├── menu.lst
│   ├── OLDmenu.lst
│   ├── puppy_precise_5.7.1.sfs
│   ├── README.HTM
│   ├── SAVEMARK ( Content is: 2 (only 1 line ??) )
│   └── vmlinuz
└── slacko-5.7-NO-pae
├── boot.cat
├── boot.msg
├── help2.msg
├── help.msg
├── initrd.gz
├── isolinux.bin
├── isolinux.cfg
├── logo.16
├── menu.lst
├── puppy_slacko_5.7.sfs
├── README.HTM
├── SAVEMARK ( Content is: 2 (only 1 line ??) )
└── vmlinuz

4 directories, 32 files
#


Contents of (sdb2)
# tree -a
.
├── fsckme.flg ( Content is: sdb2,ext2,/precise-5.7.1/precisesave-usbtest1.3fs (only 1 line ??) )
├── lost+found
├── precise-5.7.1
│   └── precisesave-usbtest1.3fs
├── pupdesk.flg ( Content is: ati (only 1 line ??) )
└── slacko-5.7-NO-pae
└── slackosave.3fs

3 directories, 4 files
Cheers & thanks CatDude.

my usb, Fat32

Posted: Mon 23 Apr 2018, 16:53
by hamoudoudou
my usb, Fat32
Pupsaves are stored in same partition Fat32, no need to create a linux one

Posted: Thu 26 Apr 2018, 21:19
by HerrBert
i was kind of disappointed, this is only for tahr6.0.2.
so i gathered information i found and did it on slacko5.7.0.
just another minimally invasive approach:

line 806 added:

Code: Select all

if [ "$PDEV1" -a "$PSUBDIR" ];then
 FSTYPE=$(echo "$PCPARTSALL" | grep "$PDEV1" | cut -f2 -d'|')
 mount -t $FSTYPE /dev/$PDEV1 /mnt/data
 [ -e /mnt/data/$PSUBDIR/PUPSTATE ] && . /mnt/data/$PSUBDIR/PUPSTATE && SKIPSEARCH="yes"
 umount /mnt/data
fi
if [ "$SKIPSEARCH" != "yes" ];then
813
blabla...
989
(now new) line 990 added:

Code: Select all

fi #END SKIPSEARCHING
how it works:
if i specify pdev1=[partition_puppy_lives_on] AND psubdir=[path_to_puppy] as bootparameter AND a copy of /etc/rc.d/PUPSTATE is found in /mnt/$PDEV1$PSUBDIR, searching for puppy-files is skipped. any other case init behaves like normal cd|pristine|whatsoevercalled boot.