LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-12-2007, 01:28 AM   #16
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15

hey it works
this has realy expanded my horizons I had read through the abs-howto before and could not find anything that made any sense i realize now it was my vague understanding of bash programing thanks to your small script it makes a little more sense to me now
although i still do not find anything that resembles the $? thing in the howto or the
[ `cat /var/lock(..)`=value] ;
still unclear as to why that has to be but thats just me i understand what is there a lttle better anyway

I think this should be included in the abs howto what do you think

I modified the script a little to include some convienences here are my edits


#!/bin/bash

clear # to clear the screen so as to view the output

# this is a comment
# what's between "`" means the result of the command...
# ex: "echo `uname`" have the same effect of "echo Linux"

dpkg -i package1
dpkg -i package2
dpkg -i package3
dpkg -i package4
dpkg -i package5
dpkg -i package6
dpkg -i package7

# waits until the package is installed
while [ `cat /var/lock(..)`=value] ;

# while package is installed...
do
sleep 0.5 # wait 0.5 second and retest the value
done
if ["$?"="0"]; then
echo "Package installed sucessfully"
else
echo "errors occured"
fi

exit 0 # to avoid the unexpected end of file error




with a little modification this could be used to install lots of different files I think I am still experimenting
 
Old 04-12-2007, 05:17 AM   #17
nleitao
LQ Newbie
 
Registered: Jun 2006
Location: Aveiro - Portugal
Distribution: Debian
Posts: 8

Rep: Reputation: 0
;)

What i mean with the use of packages out of the box, is about the way you try to install the packages... where are those packages?
for old machines, i recomend to use a recent distribution an then install the slink kernel.
This will put the engine of your machine fast since all programs were built to standart i386. With this procedure u won't have this problems installing programs newer than slink.
Assuming slink is good for you, I would try to install sarge/etch, maybe using a better machine ( I assume u are using a very old machine) install the base, and then "dpkg -i slink_kernel"
what you're trying to do, import xwind packages to a old distro, it may not worth the pain involved,

By the way .. I haven't tested the script I gave you.. this is just a flux control to make sure everything will install properly. any way i send you the full picture... so u can get the flux control part: this is because it must check the installation of each package before it starts installing the next one.

I take out the check part.. i don't know where to look anyway...
bash can be used to most stuff you need.. u'll find it in the start up scripts of any linux machine


Code:
#!/bin/bash

clear # to clear the screen so as to view the output

# this is a comment
# what's between "`" means the result of the command...
# ex: "echo `uname`" have the same effect of "echo Linux"
for package in `ls *.deb`
do
      dpkg -i $package
      if ["$?"="0"]; then
            echo "Package installed sucessfully"
      else
            echo "errors occured"
      fi
done

# exit 0 forces exit.. not cool. Is good to not need that
if u really need that, read the dpkg man page, i gues there are other ways to work around

OTHER METHOD:
Make your own repository. U'll need reprepro (not available for slink)
here's a good tutorial
http://alioth.debian.org/plugins/scm...sroot=mirrorer

but consider to use a newer distro will save u a lot of work

whats that "abs howto"?

Nuno Leitão
 
Old 04-12-2007, 05:27 AM   #18
nleitao
LQ Newbie
 
Registered: Jun 2006
Location: Aveiro - Portugal
Distribution: Debian
Posts: 8

Rep: Reputation: 0
whats that "abs howto"?

I used those:

http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

and mostly sed command
http://www.rtfiber.com.tw/~changyj/sed/

bash + grep, sed, awk are the toolbox you need for almost everything

best regards

Nuno Leitão
 
Old 04-13-2007, 08:18 AM   #19
DeanLinkous
Member
 
Registered: Jun 2006
Posts: 111

Rep: Reputation: 15
Quote:
Originally Posted by zbenjudah
I want to copy my distro cd rom to a hardisk logical partition and have it do the install from there.
Well, you do not need any script for that. Ever heard of apt?

Quote:
and I did not say debian was lousy only the documentation for firgureing things out
If anything, I find there is TOO much documentation out there for everything. Did you look?

Quote:
as for bashing people around I am sorry it came out that way but if you had stuck to the main idea of the thread rather than giveing me your opion about the why and what you think then we would have made more progress
If someone tells you something *good* then while it may be OT, it is still GOOD and you should be thankful.
 
Old 04-13-2007, 12:36 PM   #20
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nleitao
What i mean with the use of packages out of the box, is about the way you try to install the packages... where are those packages?
for old machines, i recomend to use a recent distribution an then install the slink kernel.
This will put the engine of your machine fast since all programs were built to standart i386. With this procedure u won't have this problems installing programs newer than slink.
Assuming slink is good for you, I would try to install sarge/etch, maybe using a better machine ( I assume u are using a very old machine) install the base, and then "dpkg -i slink_kernel"
what you're trying to do, import xwind packages to a old distro, it may not worth the pain involved,

By the way .. I haven't tested the script I gave you.. this is just a flux control to make sure everything will install properly. any way i send you the full picture... so u can get the flux control part: this is because it must check the installation of each package before it starts installing the next one.

I take out the check part.. i don't know where to look anyway...
bash can be used to most stuff you need.. u'll find it in the start up scripts of any linux machine


Code:
#!/bin/bash

clear # to clear the screen so as to view the output

# this is a comment
# what's between "`" means the result of the command...
# ex: "echo `uname`" have the same effect of "echo Linux"
for package in `ls *.deb`
do
      dpkg -i $package
      if ["$?"="0"]; then
            echo "Package installed sucessfully"
      else
            echo "errors occured"
      fi
done

# exit 0 forces exit.. not cool. Is good to not need that
if u really need that, read the dpkg man page, i gues there are other ways to work around

OTHER METHOD:
Make your own repository. U'll need reprepro (not available for slink)
here's a good tutorial
http://alioth.debian.org/plugins/scm...sroot=mirrorer

but consider to use a newer distro will save u a lot of work

whats that "abs howto"?

Nuno Leitão

The packages I have put on a logical ext2 partition on my hard drive
where I keep my backup. The machine I guess by computer standards is
fairly old its a intel 500 mhz but I have found that the base system
command line will run on anything from a 486 66 mhz to a Intel
celeron 1.2 ghz I have run it on all these machines and it runs
quite well for me.
I do it this way because dselect will not install anything from the
hard drive its broken. The main installation program does not do it
either and I don't have the source code to be able to modify it
I think its resc1440.bin and even if I use apt from the command line
i still need to feed it a list of packages with a script
as far as getting a newer distro I can only afford dial up service
so it takes way too long to down load and then when i am able to
the iso has errors and will not work.
The only thing that I use the gui for is to run
the netscape browser for the internet. Seeing as its hard to get
vidio drivers to work on some computers i just go with the text base
command line and keep my old windows 95 with the win modem for the
internet

I would give you the list of packages but I am not sure the methods
are the same under woody and i doubt you really want to mess with
something like this anyway. Basically I manually work out the dependencies
and put them all in one directory with the script. It is about 20 files
that take up about 9 mb of space and it works. Would be nice to be able
to get an updated gui to work like this, and it works on my celeron 1.2ghz
with the ati mach64 graphics card

Oh! and the abs-howto is the advanced bash howto i think there is a link in
another thread at the bottom of this page. After reading it i did not
come away any further ahead its probably just my ignorance! but a real world
workable script example something like this one here I think would go a long
way to helping more people understand it my opinion of course
 
Old 04-13-2007, 12:56 PM   #21
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by DeanLinkous
Well, you do not need any script for that. Ever heard of apt?


If anything, I find there is TOO much documentation out there for everything. Did you look?


If someone tells you something *good* then while it may be OT, it is still GOOD and you should be thankful.

do you mean apt in the dselect front end or from the command line? or are you doing it frm a program in xwindow under a newer distro? dselect is broke in my distro also in ubuntu to. so how would you do it without a script please tell me?

And yes you are quite right there is too much way too much and that seems to be the problem searching for and finding good concise info takes too much of my time hours in some cases! posting the question here took a few minuts
 
Old 04-14-2007, 09:39 AM   #22
DeanLinkous
Member
 
Registered: Jun 2006
Posts: 111

Rep: Reputation: 15
install packages from a cd?
apt-cdrom add
even if the ISO or the files from the ISO are on the harddrive that will work.

Of course you can just move the debs to /var/cache/apt/archives and then when you apt-get install packagename it will pull it from there
 
Old 04-14-2007, 01:27 PM   #23
nleitao
LQ Newbie
 
Registered: Jun 2006
Location: Aveiro - Portugal
Distribution: Debian
Posts: 8

Rep: Reputation: 0
Quote:
The packages I have put on a logical ext2 partition on my hard drive
where I keep my backup. The machine I guess by computer standards is
fairly old its a intel 500 mhz but I have found that the base system
command line will run on anything from a 486 66 mhz to a Intel
celeron 1.2 ghz I have run it on all these machines and it runs
quite well for me.
I'm running debian stable (sarge, haven't upgraded it yet) in a intel pentium 100 MHz, 16 Mb RAM, with a woody kernel.
You have a much better machine than I do,, but you prefer to deal with old distros that are unable to support your hardware, and have lack of good tools

If you are really into keep that release, u must be warned that it never will be up to date as it should.. and i mean about software versions

consider format it and put a newer release... then ask the ppl about it
and pls: don't use dselect, use apt-get/aptitude

ps: you'll need a minimum of 8MB RAM to run X-windows

Nuno Leitao

Last edited by nleitao; 04-14-2007 at 01:31 PM.
 
Old 04-15-2007, 12:23 AM   #24
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nleitao
I'm running debian stable (sarge, haven't upgraded it yet) in a intel pentium 100 MHz, 16 Mb RAM, with a woody kernel.
You have a much better machine than I do,, but you prefer to deal with old distros that are unable to support your hardware, and have lack of good tools

If you are really into keep that release, u must be warned that it never will be up to date as it should.. and i mean about software versions

consider format it and put a newer release... then ask the ppl about it
and pls: don't use dselect, use apt-get/aptitude

ps: you'll need a minimum of 8MB RAM to run X-windows

Nuno Leitao
yeah I am feeling the version withrawel so to speak but Iam a little skeptical of getting a newer one I paid money for this one and was promised free life time tech support with upgrades and internet access and the glories of a free OS. Got nothing but pain trying to install it on my 486 16 megs of ram although they assured me that it would work there was no tech support at all. could not get it to work with my modem to access the internet never have. then got a tip to get ubuntu it was free yeah but they took out midnight commander made the grub loader the default boot (which I realy hate) and it takes 40 minuts to install On my 1.2 ghz celeron 250 mb ram. So I am really frustrated. mean while I have grown quite fond of my 1.2 slink I can take it apart and re assemble it, the tool chain works quite well I am used to the way it works and I can install the whole system to an emty partition in about 3 minuts.

basicaly the only problem with hardware right now is the modem everything else is fine I have 128 mb ram so there is plenty of memory

do the newer debian distros still have the base2_1.tgz
file to setup the base command line or has that changed
also what is the default boot loader and of course my beloved midnight commander. the first familiar interface that i was able access when i could not get the xwindow to intall MC was my life line I accessed it by accident one day while typeing in commands at the prompt I saw it in dselect and wow never let it go.

anyway didnt mean to drivel endlesly here but thanks to this script i have been able to do things more efficiently and thanks for that mabye some day i will get a new distro
 
Old 04-15-2007, 11:10 AM   #25
mjolnir
Member
 
Registered: Apr 2003
Posts: 815

Rep: Reputation: 99
Interesting thread. Have you tried an external modem? I have slink on a 386 with 12 megs of ram and use a U.S.Robotics modem.
 
Old 04-15-2007, 11:39 AM   #26
DeanLinkous
Member
 
Registered: Jun 2006
Posts: 111

Rep: Reputation: 15
not even sure what this thread is about myself
 
Old 04-16-2007, 01:41 PM   #27
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mjolnir
Interesting thread. Have you tried an external modem? I have slink on a 386 with 12 megs of ram and use a U.S.Robotics modem.
yeah this threads getting a life of its own sorry about that!

I had a externel us robotics it stopped working on me so got got rid of it have not been able to afford another.

say is there a way to get an internel encore v.92 fax modem to work. it says its hays at command compatable

Last edited by zbenjudah; 04-16-2007 at 01:46 PM.
 
Old 04-16-2007, 01:59 PM   #28
zbenjudah
Member
 
Registered: Mar 2006
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by DeanLinkous
install packages from a cd?
apt-cdrom add
even if the ISO or the files from the ISO are on the harddrive that will work.

Of course you can just move the debs to /var/cache/apt/archives and then when you apt-get install packagename it will pull it from there
I am not sure if I understand you
apt-get cdrom add file.deb
what is the syntax of the command Iam doing a list of files apt-get has no text browser type interface how do you do it without a script of some kind or can I use the structure from the script that nuno just gave me?
 
Old 04-16-2007, 03:03 PM   #29
DeanLinkous
Member
 
Registered: Jun 2006
Posts: 111

Rep: Reputation: 15
apt-cdrom is the correct way to add a debian cd or a cd with the proper debian repo structure to your sources.list to install packages from. That is also the easiest way to have a ISO on the hard drive and do the same thing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script or Simple App to Create HTML Table Populated With Images infidel Linux - Software 14 06-07-2005 01:08 AM
Script to Run the Same Commands on a List of Files Chryzmo Programming 1 10-03-2004 08:34 AM
Simple Script Files jcai Linux - General 4 09-19-2004 07:15 AM
Create custom user's directory with simple script dtournas Programming 2 09-09-2004 05:00 AM
Looking for simple way to create scheduled emails from perl script kdowney Programming 1 10-17-2003 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration