Who maintains boot code? Remove flash drive boot type.

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Who maintains boot code? Remove flash drive boot type.

#1 Post by sunburnt »

I use a USB 64gb flash drive for my main HD.
The flash drive handling code is out dated.
Save file in ram is no longer needed.
I`ve tried to fix this, but boot code`s messy.
Remove the flash drive boot type and code.

These are the sections to remove:

1) Code that sets up the save file in ram.
2) Code that saves ram to flash at timed interval.
3) Code that saves ram to flash at shutdown.

Puppy has a lot of life left in it.
So much legacy crap bloating it!
Please... Lets clean it up!

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

edit: I found this:
sunburnt wrote:Puppy distro. is: precise_5.4.X.5 , old I know, but it`s probably the same as newer Puppies.
Here's a thread about the new init in 7.x puppies (Xenialpup 7.5, Slacko 6.9.9.9). Perhaps this is a start to cleaning it up?
http://www.murga-linux.com/puppy/viewtopic.php?t=107178

I would argue that the flash option is still used. I actually use pmedia=ataflash on hard drive so I can see the Save icon. :)

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#3 Post by jafadmin »

So you want us to rewrite puppy because you are not using a HD?

Yeah, we'll get a guy right on that ..

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

#4 Post by bigpup »

There is a big reason for the way the save works on a USB flash drive.
It limits the writes to the drive.
There is a number or writes limit on USB flash drives.
True, that limit is a high number on todays drives, but it is still a limit.

If you want it to work like saves on a hard drive.
Go into whatever is used to boot this install and use the pmedia=atahd or pmedia=usbhd option entry.

Example for a Grub4dos menu entry:

Code: Select all

title Puppy xenialpup64 7.5 (sdc7/xenialpup6475uefi)
  uuid 1cd0f861-5576-42aa-af41-d09a6d260bc9
  kernel /xenialpup6475uefi/vmlinuz   psubdir=xenialpup6475uefi pmedia=atahd pfix=fsck 
  initrd /xenialpup6475uefi/initrd.gz
I do not know what boots this.
Could be Grub4dos menu, isolinux.cfg, syslinux.cfg, extlinux.conf, etc......
But the change can be made or added to any of these boot configure files.
Last edited by bigpup on Mon 15 Jan 2018, 06:20, edited 1 time in total.
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)

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

#5 Post by bigpup »

2) Code that saves ram to flash at timed interval.
3) Code that saves ram to flash at shutdown.
menu>System>Puppy Event Manager>Save Session
Here you can control these when booting from USB flash drives.
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)

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#6 Post by s243a »

I would like to add to bigpup's suggestions that if you want to use a usb flash device like a hard drive that you format the area where you keep the save file/folder or partition as
https://en.wikipedia.org/wiki/F2FS

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

Hi bigpup; It`s been a really long time, huh? Hope you are well...

What I see is this subject has been talked about a lot on the forum.
And as usual nothing is done to fix it permanently.
I talked about this "boot bug" years ago.

pmedia= ....... Does nothing to fix this.

Puppy Event Manager only sets the save interval.

There is no std. way to change the pupmode once Puppy is installed.

FIX: Make a new pup boot parameter that overrides the install setting.

pupmode=


# Please change the std. boot code for ALL Puppies in file: initrd

Then post the file so we can replace the initrd file in current Puppies.
.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#8 Post by jamesbond »

The RAM layer is useful for people who wants to have the options to save their sessions, or not.

But I agree with sunburnt that the RAM layer should not be tied out to whether a person is running on flash drive or not. It should be controlled independently, for those who needs it, whether or not they run on a flash drive.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#9 Post by MochiMoppel »

sunburnt wrote:I talked about this "boot bug" years ago.
You talked about it here and it would be most helpful if you would continue your original thread instead of opening a second one.
On 14 Sep 2016 sunburnt wrote:Now maybe I can write a Bash script to mod. the initrd.gz file for anyone.
The mod. would make boot arg.: pmedia=atahd force: pupmode=12 ( As it should...)
I think you are talking about this section:

Code: Select all

 12) #4=puppy.sfs found, 8=${DISTRO_FILE_PREFIX}save.2fs found.  total=12
  DRVSAVE="`echo -n "$PUPSAVE" | cut -f 1 -d ',' | sed -e 's/[0-9]*$//' -e 's/p$//'`" #ex: sda  110126 mmcblk0p1 becomes mmcblk0
  REMOVABLEDRVSAVE="`cat /sys/block/$DRVSAVE/removable`"
  #[ "$REMOVABLEDRVSAVE" = "1" ] && PUPMODE=13
  [ "$REMOVABLEDRVSAVE" = "1"  -a  "$PMEDIA" != "usbhd" ] && PUPMODE=13  #110116 shinobar.
  [ "$PMEDIA" = "usbflash" ] && PUPMODE=13 #v404 fix classmate, with internal usb flash.
  [ "$PMEDIA" = "ataflash" ] && PUPMODE=13 #w019 constrain writes to internal flash drv.
 ;;
So apparently what changes the PUPMODE from 12 to 13 is the value in /sys/block/$DRVSAVE/removable and not so much your pmedia string. If you booted with pmedia=atahd and your SSD is recognized as removable (=value 1) you will be switched to PUPMODE 13. But if you started with pmedia=usbhd you would stay with PUPMODE 12. pmedia=usbhd appears to be a guarantee for PUPMODE 12. Try it.

If "Having pmedia=usbhd or pmedia=atahd seems to make no difference." (as you stated earlier in the thread), then you probably use an old init file without shinobar's fix.

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

Re: Who maintains boot code? Remove flash drive boot type.

#10 Post by Marv »

sunburnt wrote:I use a USB 64gb flash drive for my main HD.
The flash drive handling code is out dated.
Save file in ram is no longer needed.
I`ve tried to fix this, but boot code`s messy.
Remove the flash drive boot type and code.

These are the sections to remove:

1) Code that sets up the save file in ram.
2) Code that saves ram to flash at timed interval.
3) Code that saves ram to flash at shutdown.

Puppy has a lot of life left in it.
So much legacy crap bloating it!
Please... Lets clean it up!
I use this 'legacy crap' every day on multiple pups, as do many of my users.!
Adding some control flexibility is a goal, getting rid of one of the features that makes pupLinux stand out isn't IMO.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Who maintains boot code? Remove flash drive boot type.

#11 Post by MochiMoppel »

Marv wrote:I use this 'legacy crap' every day on multiple pups, as do many of my users.!
:lol:
So do I.

I don't see what sunburnt refers to. At least for this particular task there is no 'crap', no 'bloat', no 'mess'. The 'bloat' consists of only one line of code and it still makes perfect sense.

And the problem of SSDs being recognized as removable drives: This issue is not new. Many people want to change this and there are numerous instructions on the net. Google can help.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#12 Post by gyro »

@sunburnt,

I only just noticed your post in the "Rationalise" topic, and hence became aware of this topic.

If I remember correctly you can get real pupmode=12 on a usbstick, if you boot with "pmedia=usbhd".

But I agree that it would be better if there were a more direct method of specifying the way in which Puppy does saves.

May I humbly suggest you have a look at my more recent re-write of "init" in http://www.murga-linux.com/puppy/viewtopic.php?t=110636
It does support real pupmode=12 on a usb stick.
Of course it also does a lot of other stuff that you might not want.

gyro

Post Reply