Puppy2 boot manager for SFS files ... Test ...

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

Puppy2 boot manager for SFS files ... Test ...

#1 Post by sunburnt »

Here's a simple boot manager, the GTK GUI is complete, however boot code is needed.

Probably put in: /etc/my-applications
Make a link in: /etc/my-applications/bin to: /etc/my-applications/bootman/bootmanager

Selected SFS files are put in the file: /etc/rc.d/rc.bootsfs
In the format needed by UnionFS & AUFS (:SFS-1:SFS-2:SFS-3).
There will be a leading ":" as shown above.
Before accessing, boot code should check for the existence of: /etc/rc.d/rc.bootsfs
If file is nonexisting, then union files as Puppy does now.

Need boot code to mount any partitions that SFS files are on & the SFS files themselves.

There's a setting for FreeRAM, it's to insure Puppy works for low RAM PCs with no swap.
One example is LANboot PCs that cannot have a swap.
The boot code should load SFS files to RAM if they don't compromise FreeRAM.
When out of FreeRAM & if there's enough space, boot code should copy SFS files
on CD-DVD & USB to /mnt/home (or equivalent part.) & union from there.
It may be desirable to have a path setting for this to select a different part.

The order of the SFS files in the list determines what's in RAM, first & etc.

There's also a checkbox to mount all HD partitions at boot (asked for repetedly).
I did have a complete list of choices, but it seemed too over-done & complex.

If someone (Barry, Nathan, etc.) wants the boot code, say so & I'll make it.

This is a first build... Any Qs & suggestions are welcome.
Attachments
BootManager.tar.gz
"Mount all HD partitions at boot" code has been added.
(1.91 KiB) Downloaded 1719 times
bootmanager.png
Small & simple, the Puppy way...
(10.64 KiB) Downloaded 5346 times
Last edited by sunburnt on Mon 02 Apr 2007, 21:54, edited 2 times in total.

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

#2 Post by sunburnt »

Here's the BOOT code to mount all found partitions automatically:

Code: Select all

MNT=`mount`					# this code mounts ALL partitions found
PARTS=`cat /tmp/fsparts.txt`
echo "$PARTS" |while read LINE;do

  DEV=`echo "$PARTS" |cut -d '|' -f 1`
  if [ -n "`echo $MNT |grep $DEV`" ];then continue;fi
  MNTpt='/mnt/'`echo $DEV |cut -d '/' -f 3`
  TYPE=`echo "$PARTS" |cut -d '|' -f 2`

  if [ "$TYPE" = 'ext2' -o "$TYPE" = 'ext3' -o "$TYPE" = 'vfat' -o "$TYPE" = 'msdos' -o "$TYPE" = 'ntfs' ];then

   if [ "$TYPE" = 'msdos' ];then TYPE='vfat';fi
   mkdir -p $MNTpt ; mount -t $TYPE $DEV $MNTpt
  fi
done

This code may not be right: "$TYPE" = 'ntfs' ... It may be: "$TYPE" = 'hpfs'

The code to reserve a preset amount of Free RAM is easy to do...

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

#3 Post by sunburnt »

I realized I should have made the checkbox "Mount All HD Partitions at Boot"
make the file: /etc/rc.d/rc.mntparts with the commands in it to do the work.
Then it would just be called from: /etc/rc.d/rc.local to mount all partitions.

If anyone would like me to upgrade this app. to do this, just say so...

I could also add the free ram code, but it's really boot code, so I wasn't
inclined to have it be part of this GUI app., but I could do this also.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

Something similar was discussed here . . .
http://puppylinux.org/wikka/Puppy215Mee ... 1April2007

Is this suitable or is something else required?
Last edited by Lobster on Tue 03 Apr 2007, 08:01, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#5 Post by sunburnt »

Lobster; I'm not sure what you mean by suitable...

The lead up discussion is about full-HD install not being able to mount SFS files.
The full install doesn't union anything, but it's certainly capable of doing it.
All that's needed is the command to union the SFS file on /, the GUI doesn't
do that as it's part of Barry's boot code, as is the "copy to ram" code.

I'll make a version for full-HD installs that'll do this, but how many use full-HD?
I know some prefer it, but in my opinion the frugal install is the best one.
Full-HD would be a good developer setup, but the remaster scripts make it unnessary.

The other possability is copying the SFS file's contense to the HD.
A list could be kept to remove the copied SFS file's contense.
This'd make the GUI add/remove the SFS file without the need to union it.
It also means that the SFS file becomes part of the full install, unlike if the
the SFS file is unioned then it's always a separate part.

The BootManager GUI is rather simple in what it has to do (not much code).
I'd have already made a DotPup, etc. except the boot code is needed,
so the GUI doesn't really lend itself to being made into a package.

Ask any Qs that you have about anything... maybe the "copy the SFS file idea".

Let me know what you think about all of this...
Maybe I can catch the next meeting... Terry B.
Last edited by sunburnt on Mon 02 Apr 2007, 18:44, edited 1 time in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

:)

Terry we are going flat out to get a script for Viz . . .
I totally agree with the frugal install (which is boot from CD and data and some files on HD right . . . I hope that is right - that is what I use)

the next meet is
Wed 4 April - 10:00 to 12:00 GMT

but we need a script before then . . .

WhoDo (Warren) and JoeD (Joe Dopp) are both having a go - I was too . . .

The idea I think is that people with limited ram can swap between sfs

I will direct Warren and Joe to this thread :)
maybe you can correct any code they post . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

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

#7 Post by sunburnt »

Lobster; I'm still not sure if we're only talking about a frugal or the full install.
The BootManager is made for the frugal setup, but can be modded of course.
I need exact info on just what this script is supposed to do...
Also I need a copy of the file: /sbin/init for this Puppy version we're talking
about so I can modify it to use the sfs file list made by the sfsBootManager.

Low ram PCs should be able to mount up to 5 sfs files no problem.
The "copy sfs to ram" code is very critical, & I think this is what Puppy fails
quite often to do properly, & it causes Puppy to fail in some way.
I always opt for a conservative "leave lots of ram".

Someone set me straight on this, meanwhile I'll write the needed boot code.
If there's some code written already, post it here & I'll look at it.
At least loading of sfs files can then be done at boot, NOT after that!
Selection of sfs files can be done at boot, but it'd be a console menu thing.

NathanF has AUFS working, & it does swap sfs files on the fly while running,
but only if the PC has 512MB + of ram (weard), we HAVE to figure out WHY.
But that'll have to be for a later Puppy version, no time left now...

P.S. I just looked up GMT & I'm -7 hours, so next meeting will start at 3:00 in the morning.
Last edited by sunburnt on Mon 02 Apr 2007, 18:43, edited 1 time in total.

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

#8 Post by sunburnt »

Addendum::::: I think this is the only change needed to Puppy's boot code.
I made this from an old Puppy /init file, so I still need the current one to check.

Code: Select all

At the bottom of /sbin/init is the line:

mount -t unionfs -o dirs=${UMNT1}${UMNTRO} none /pup_new;check_status $?

I think all that's needed is these lines in it's place:

UMNT2='' ; if [ -f /etc/rc.d/rc.bootsfs ];then UMNT2=`cat /etc/rc.d/rc.bootsfs`
mount -t unionfs -o dirs=${UMNT1}${UMNT2}${UMNTRO} none /pup_new;check_status $?
All I've done is to add ${UMNT2} to the union command.
Other changes are needed if control of loading the Devx & More files is wanted.
Currently I beleave they are auto. loaded by Barry's boot code in: init
These are extra sfs files, so they should be selectable like the rest.

Full functionality may not be possable with the time constraints you guy's have.
But to add the BootManager to it would be easy, or to have a console boot-time menu to choose the sfs files to load at bootup.
Ram loading will require more work to do, & it's critical code that could really screw up Puppy's ability to boot reliably.
As I said, I think the ram loading code is possably the cause of many problems.

P.S.
I've added to BootManager the code for "Mount all HD partitions at boot".

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#9 Post by WhoDo »

sunburnt wrote:Full functionality may not be possable with the time constraints you guy's have.
But to add the BootManager to it would be easy, or to have a console boot-time menu to choose the sfs files to load at bootup.
Ram loading will require more work to do, & it's critical code that could really screw up Puppy's ability to boot reliably.
As I said, I think the ram loading code is possably the cause of many problems.
Terry, all we really need for Puppy 2.15CE is a way to union the extra sfs files for a full hard drive install that doesn't involve newbies running a console command string as long as your arm. :P If it had a GUI interface so much the better.

If your Bootmanager would do it that would be fantastic. How would you differentiate between the hard drive install and a frugal? The Bootmanager should only appear on a hard drive install, given your thoughts about the RAM install code.

Hope that helps.

Cheers
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#10 Post by BarryK »

WhoDo, you want to get a SFS BootManager into 2.15CE? ...hmm, I've gone for a complete solution, that also updates the desktop -- which needs some mods to the SFS files also. I have made many changes to 'init' and 'rc.update' scripts to do proper SFS management. As you're at a RC3 it is unwise to make too many changes, so probably my solution is best for 2.16 release -- my BootManager will be out in the 'exp2' release soon.

So, I don't know.... maybe sunburnt and others can put something together for 2.15.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#11 Post by Lobster »

Joe has updated this page for latest info
http://puppylinux.org/wikka/Puppy215sfsExpansionPacks

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#12 Post by BarryK »

JoeD, thanks, that is a nice clear explanation. Jumping hurriedly between different threads, I myself was getting confused as to exactly what the requirement was for the final 2.15CE.

User avatar
dsearles
Posts: 11
Joined: Fri 06 Apr 2007, 20:52
Location: New Hampshire, USA

#13 Post by dsearles »

BUT, how do you get the .SFS files to work on a Full HD install?

I tried putting the .SFS files into "/" (as mentioned in JoeD's post) but that doesn't seem to work. Any other suggestions would be greatly appreciated...

User avatar
Rudy
Posts: 18
Joined: Tue 13 Sep 2005, 13:15
Location: Germany

SFS files

#14 Post by Rudy »

Same problem. Just realised that "fixmenus" from a terminal produces no change.

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#15 Post by WhoDo »

dsearles wrote:BUT, how do you get the .SFS files to work on a Full HD install?

I tried putting the .SFS files into "/" (as mentioned in JoeD's post) but that doesn't seem to work. Any other suggestions would be greatly appreciated...
Yes. Sunburnt and I have been working on a newbie-friendly solution to that problem but it doesn't look like it will be easy. The sfs system, like Puppy, was designed for LiveCD and Frugal hdd installs. At the moment they evidently can't be plugged in and unplugged from a full hdd install.

Here is Pizzasgood's advice that applies to full hard drive installations, and copies the sfs contents to your hard drive:

Code: Select all

mount web_215.sfs /mnt/data
cp -r /mnt/data/* /
sync
umount /mnt/data
fixmenus
Obviously you replace the sfs file name with the one you want to mount and copy to your hdd.

Hope that helps
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

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

#16 Post by sunburnt »

Yep, unioning sfs files doesn't seem to work for a full HD install as WhoDo & I found out.

WhoDo; I just wish we'd gone for the "copy the sfs file contense to HD" instead.


I'm going to rework sfsLoader into sfsCopier for full HD installs,
but I assume there's no time left to get it into CE, oh well...

NOTE: If there's any suggestions for the sfs copier GUI... leave them here.

User avatar
veronicathecow
Posts: 559
Joined: Sat 21 Oct 2006, 09:41

#17 Post by veronicathecow »

Hi, I always do a HDD install becaus it boots a lot quicker (I know it's my sad little need for speed) so anything you can do to make this system work would be really appreciated.Cheers

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

#18 Post by sunburnt »

Hi veronicathecow; If your willing to test my "sfsinstaller" GUI for ONLY Full-HD installs.

Look here: http://208.109.22.214/puppy/viewtopic.p ... 9b1aecb96b

It copies the contense of the chosen sfs file to a full-HD Puppy install.
Hopefully it'll also be able to remove all of the copied files, so as to uninstall it.
Being as it just copies files it's most likely that it should work very well.
There shouldn't be any problems like sfsLoader had, as it doesn't use UnionFS.
Also it has the advantage that the files in the sfs file become part of the full-HD install.
So the sfs file's become just another install package for the full-HD Puppy install.

Read the post's instructions, & make a NEW full-HD install for a TEST SETUP.
I've just written the GUI & so it's not tested at all as I don't run a full-HD.

If you do test it out, give feed-back to the post above as WhoDo & I need it badly.

Cheers... Terry

T_B
Posts: 160
Joined: Sun 08 Apr 2007, 12:54

#19 Post by T_B »

Hi Terry, I,ve just tried the hdd sfs installer and it works great. Java / Azureus + bluefish are installed without any hassle.
Thanks.

Post Reply