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 Wed 26 Nov 2014, 07:32
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Automated frugal install and grub1 menu edit.
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Sat 26 Feb 2011, 07:42    Post_subject:  Automated frugal install and grub1 menu edit.
Sub_title: Yad Script
 

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 Smile
Will create new directory > mount ISO > copy .sfs, vmlinuz, initrd files > unmount ISO > and add a Menu entry in Grub1 menu list.


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:
#!/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
Back to top
View user's profile Send_private_message 
oldyeller


Joined: 15 Nov 2011
Posts: 818
Location: Mishawaka IN

PostPosted: Sun 12 Aug 2012, 13:53    Post_subject:  

this works just fine on precise 5.2.60 beta1


Thanks

Oldyeller
Back to top
View user's profile Send_private_message 
RSH


Joined: 05 Sep 2011
Posts: 2420
Location: Germany

PostPosted: Mon 13 Aug 2012, 02:46    Post_subject:  

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



More on this can be found here.

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

RSH

_________________
LazY Puppy
RSH's DNA
SARA B.
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Mon 13 Aug 2012, 08:35    Post_subject:  

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 Smile

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
gfrugal2.gz
Description  remove fake .gz and make script executable
gz

 Download 
Filename  gfrugal2.gz 
Filesize  5.18 KB 
Downloaded  240 Time(s) 
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Mon 13 Aug 2012, 08:46    Post_subject:  

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



More on this can be found here.

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

RSH


Hi RSH,
Great work Cool
I have a nasty habit of not maintaining a lot of the things i post Twisted Evil so feel to post any change or updates you might make to your Lazy Puppy installer in here as well. Smile
Back to top
View user's profile Send_private_message 
anticapitalista

Joined: 14 Apr 2010
Posts: 25

PostPosted: Mon 13 Aug 2012, 13:17    Post_subject:  

Deleted - sorry, should read the instructions Smile
Edited_time_total
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Mon 13 Aug 2012, 13:24    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
anticapitalista

Joined: 14 Apr 2010
Posts: 25

PostPosted: Mon 13 Aug 2012, 13:25    Post_subject:  

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

thanks.
Back to top
View user's profile Send_private_message 
stu91


Joined: 06 Aug 2012
Posts: 145
Location: England. Dpup. Dell Inspiron 1501

PostPosted: Mon 13 Aug 2012, 14:31    Post_subject:  

I have tided the gfrugal2 script up a bit and added grub2 option for USB type which was missing.
gfrugal3.gz
Description  remove fake .gz and make executable
gz

 Download 
Filename  gfrugal3.gz 
Filesize  5.9 KB 
Downloaded  249 Time(s) 
Back to top
View user's profile Send_private_message 
oldyeller


Joined: 15 Nov 2011
Posts: 818
Location: Mishawaka IN

PostPosted: Sun 19 Aug 2012, 21:16    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0738s ][ Queries: 13 (0.0052s) ][ GZIP on ]