Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 26 May 2018, 19:54
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Avoid "Searching for Puppy files" during bootup - revisited
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Wed 15 Jul 2015, 05:56    Post subject:  

@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

Last edited by gyro on Wed 15 Jul 2015, 06:10; edited 1 time in total
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Wed 15 Jul 2015, 06:10    Post subject: Updated to version 6  

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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Wed 15 Jul 2015, 06:16    Post subject: For those using SAVEMARK  

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
Back to top
View user's profile Send private message 
boof

Joined: 26 Sep 2012
Posts: 432

PostPosted: Wed 15 Jul 2015, 23:17    Post subject:  

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.
Back to top
View user's profile Send private message 
boof

Joined: 26 Sep 2012
Posts: 432

PostPosted: Fri 17 Jul 2015, 05:34    Post subject:  

have burned iso with initrdgz V6 onto CD. Boots but can't find sfs file...
Back to top
View user's profile Send private message 
Marv


Joined: 04 May 2005
Posts: 1042
Location: SW Wisconsin

PostPosted: Fri 17 Jul 2015, 12:03    Post subject: Re: Updated to version 5  

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.

_________________
Pups currently in kennel Very Happy LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64, and LxPupBB for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS. Now tazpup for puzzles Smile
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4809
Location: Kingwood, TX

PostPosted: Sat 15 Aug 2015, 08:41    Post subject:  

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:
#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?

_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Wed 19 Aug 2015, 10:14    Post subject:  

@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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Wed 19 Aug 2015, 10:22    Post subject: version 4 released  

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
Back to top
View user's profile Send private message 
boof

Joined: 26 Sep 2012
Posts: 432

PostPosted: Sun 27 Sep 2015, 23:59    Post subject:  

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.
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2323

PostPosted: Mon 28 Sep 2015, 06:08    Post subject:  

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:
#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
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1501
Location: Brisbane, Australia

PostPosted: Mon 28 Sep 2015, 09:56    Post subject:  

@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
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 2711
Location: South Australia

PostPosted: Mon 28 Sep 2015, 20:09    Post subject:  

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.

_________________
Software <-> Distros <-> Tips <-> Newsletters
Back to top
View user's profile Send private message Visit poster's website 
hamoudoudou


Joined: 24 Jul 2014
Posts: 873
Location: rabat

PostPosted: Mon 23 Apr 2018, 12:53    Post subject: my usb, Fat32
Subject description: Just not to imagine more complicated
 

my usb, Fat32
Pupsaves are stored in same partition Fat32, no need to create a linux one
fat32.jpg
 Description   Just not to imagine more complicated
 Filesize   26.02 KB
 Viewed   123 Time(s)

fat32.jpg

Back to top
View user's profile Send private message 
HerrBert

Joined: 03 Nov 2016
Posts: 19
Location: NRW, Germany

PostPosted: Thu 26 Apr 2018, 17:19    Post subject:  

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:
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:
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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 5 [62 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1749s ][ Queries: 12 (0.0377s) ][ GZIP on ]