Automated frugal install and grub1 menu edit.

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
stu90

Automated frugal install and grub1 menu edit.

#1 Post 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 

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#2 Post by oldyeller »

this works just fine on precise 5.2.60 beta1


Thanks

Oldyeller

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#3 Post 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
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#4 Post 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
Attachments
gfrugal2.gz
remove fake .gz and make script executable
(5.18 KiB) Downloaded 497 times

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#5 Post 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. :)

anticapitalista

#6 Post by anticapitalista »

Deleted - sorry, should read the instructions :)
Last edited by anticapitalista on Mon 13 Aug 2012, 17:24, edited 1 time in total.

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#7 Post 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.

anticapitalista

#8 Post by anticapitalista »

You beat me too it. I just saw the instructions just before you posted.

thanks.

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#9 Post by stu91 »

I have tided the gfrugal2 script up a bit and added grub2 option for USB type which was missing.
Attachments
gfrugal3.gz
remove fake .gz and make executable
(5.9 KiB) Downloaded 458 times

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#10 Post 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.

Post Reply