Page 1 of 1

Automated frugal install and grub1 menu edit.

Posted: Sat 26 Feb 2011, 11:42
by stu90
I made this script to take some of the tedium out of doing new puppy frugal installs.

In:
Box1.enter the name you want for the frugal install. (with no clear spaces in name)
Box2. drag the puppy ISO file into box2
click ok and that is it :)
Will create new directory > mount ISO > copy .sfs, vmlinuz, initrd files > unmount ISO > and add a Menu entry in Grub1 menu list.

Image
Youtube video: http://www.youtube.com/watch?v=GbYVLeFcFSw

You will probably need to tweek the script, for instance your Grub1 menu entry line 38 - 45 .
Or for the location you wish to make the frugal install to line 9

requires Yad .pet
http://www.murga-linux.com/puppy/viewtopic.php?t=58306

Code: Select all

#!/bin/bash
#stu90 v2

grb="/tmp/grb"

yad --title="Frugal Install" --form --field="OS name" "puppy_linux" --field="ISO File" > $grb

####create directory####
location="/mnt/home/"

select=$(cut -s -d "|" -f 1 $grb)
if [ ! -d "$location$select" ]; then 
mkdir  $location$select | echo "$location$select Directory created"
else
echo " directory already exists exiting" 
exit 0 
fi

###mount and copy ISO files####
iso=$(cut -s -d "|" -f 2 $grb)

mnt="/mnt/data"
if [ "$iso" ]; then 
mount $iso $mnt -o loop | echo "mounted $iso to $mnt"
find $mnt -maxdepth 1 \( -iname "*.sfs*" -o -iname "vmlinuz*" -o -iname "initrd.gz*" \) -exec cp {} $location$select \;
umount $mnt | echo " ISO files copied to $location$select un mounted $mnt" 
else
echo " No ISO file found Exiting"
rm $grb 
exit 0
fi

###grub menu list location####
menu="/mnt/home/boot/grub/menu.lst"

###grub menu list entry###
cat >> $menu << EOF
#
# Linux bootable partition config begins 
title $select
rootnoverify (hd0,0) 
kernel /$select/vmlinuz pmedia=atahd psubdir=$select 
initrd /$select/initrd.gz 
# Linux bootable partition config ends
#
EOF
echo "Added grub menu entry to $menu"
rm $grb 

Posted: Sun 12 Aug 2012, 17:53
by oldyeller
this works just fine on precise 5.2.60 beta1


Thanks

Oldyeller

Posted: Mon 13 Aug 2012, 06:46
by RSH
Hi, stu90.

This is really a very useful script and -as always by your scripts- i did learn from this script.

I do not want to hijack and/or maintain the your script, but could not resist to do some work on it. I did made several changes and modifications and rewrote some parts as well - and so by now it

- has a complete new created GUI
- has a menu entry (in menu utility)
- is localized (de & en)
- does not longer stuck on /mnt/home
- gives option to add menu entry for Grub4DOS
- can handle path names with spaces
- can be choosed which files to install (all files or just the needed ones)
- can send menu.lst to defaulttexteditor to edit after adding menu entry

Image

More on this can be found here.

It should work in every puppy (made a .pet and a .sfs)

RSH

Posted: Mon 13 Aug 2012, 12:35
by stu91
oldyeller wrote:this works just fine on precise 5.2.60 beta1


Thanks

Oldyeller
Hi Oldyeller,
Wow this thread is a blast from the past :)

Glad to hear this worked for you - i have modified the original script some what since back then mostly for my own needs but i don't think i uploaded it to the forum.
I will post it here in case any one wants to play with it - i find booting with a blank save file can be temperamental with some puppy versions and USB install is for flash drives etc set up with Grub/2
Image

Posted: Mon 13 Aug 2012, 12:46
by stu91
RSH wrote:Hi, stu90.

This is really a very useful script and -as always by your scripts- i did learn from this script.

I do not want to hijack and/or maintain the your script, but could not resist to do some work on it. I did made several changes and modifications and rewrote some parts as well - and so by now it

- has a complete new created GUI
- has a menu entry (in menu utility)
- is localized (de & en)
- does not longer stuck on /mnt/home
- gives option to add menu entry for Grub4DOS
- can handle path names with spaces
- can be choosed which files to install (all files or just the needed ones)
- can send menu.lst to defaulttexteditor to edit after adding menu entry

Image

More on this can be found here.

It should work in every puppy (made a .pet and a .sfs)

RSH
Hi RSH,
Great work 8)
I have a nasty habit of not maintaining a lot of the things i post :twisted: so feel to post any change or updates you might make to your Lazy Puppy installer in here as well. :)

Posted: Mon 13 Aug 2012, 17:17
by anticapitalista
Deleted - sorry, should read the instructions :)

Posted: Mon 13 Aug 2012, 17:24
by stu91
anticapitalista wrote:I'd like to have a look at this (and maybe adapt it for antiX), but I get:

gunzip gfrugal2.gz

gzip: gfrugal2.gz: not in gzip format
Hi anticapitalista,

File is not actually .gz format it is just named that way so it can be uploaded to the forum. If you just rename it and remove the .gz from the end it should do it.

Posted: Mon 13 Aug 2012, 17:25
by anticapitalista
You beat me too it. I just saw the instructions just before you posted.

thanks.

Posted: Mon 13 Aug 2012, 18:31
by stu91
I have tided the gfrugal2 script up a bit and added grub2 option for USB type which was missing.

Posted: Mon 20 Aug 2012, 01:16
by oldyeller
stu91 wrote:I have tided the gfrugal2 script up a bit and added grub2 option for USB type which was missing.

I have 3 questions for you;

1) will the frugal install go to the usb just like it does with the hhd?

2) will this do a frugal install to hhd that has no other install of any kine?

3) can you make this so that I can put it in the next precise build? I know that you have used woof before and know the way it works, that way I ask about setting it up for a woof build-woof2.