Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 16-08-2007, 05:44 PM   #1 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Package management through Live-CD


Hi...I have a pretty simple question. Is it possible to use a Live-CD & USB stick combination on a Windows machine to boot up, download packages then transfer to my Ubuntu machine (which has no internet connection) to install the software that way?

Is there anyway someone could help me out?? I know there's a command with apt-get to download programs to the cache without installing. And I also know that there is a particular dpkg command with options and syntaxes and what not which will install all the .deb files in a defined location. So...help?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 16-08-2007, 05:51 PM   #2 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Package management through Live-CD

So, what's the problem then? If you don't want to use command line at all. Check apt-on-cd. But, alas it doesn't come on Ubuntu live CD.
mehulved is offline  
Old 16-08-2007, 06:32 PM   #3 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@mehulved: When I said I know that there are commands for these things, I meant that I know they exist, but I haven't got a clue to exactly what they are! So I was hoping someone could post the actual commands I would need to use with an example or two!

Plus apt-get saves .deb files to the /var/apt/cache/ folder if I remember correctly...and I have no idea how this works when running from a read-only media like a Live-CD. If I get help with commands, I'd also need to know how to make apt-get download the files to a custom location (in this case something like /media/sdb1 or /media/usb)...
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 16-08-2007, 06:45 PM   #4 (permalink)
You'r Born Free
 
int86's Avatar
 
Join Date: Aug 2006
Location: Ranchi
Posts: 425
Default Re: Package management through Live-CD

^^^^
Its /var/cache/apt/archives
__________________
# Money, Beauty and Configration has no ends.
# Life is like game sometimes. Play it or loose it. But keep the spirit of game.

http://en.wikipedia.org/wiki/Right_to_Information_Act
int86 is offline  
Old 16-08-2007, 06:58 PM   #5 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Post Re: Package management through Live-CD

Quote:
Originally Posted by faraaz
Hi...I have a pretty simple question. Is it possible to use a Live-CD & USB stick combination on a Windows machine to boot up, download packages then transfer to my Ubuntu machine (which has no internet connection) to install the software that way?
First thing will be to configure internet on ubuntu.reg,ur question-u can boot a livecd and mount ur ubuntu partn rw(root).then there is a command called chroot.if ur livecd got internet u can chroot from livecd to ubuntu hdd which can download packages to the original /var/cache/apt/archives/ dir.downloading packages manually and moving them to apt cache dir is illogical id say.if ur thinking of d/ling from win to usb stick and use livecd to mount ubuntu hdd partn and transfer the files,is possible.but what is the use?
Quote:
Originally Posted by faraaz
Is there anyway someone could help me out?? I know there's a command with apt-get to download programs to the cache without installing. And I also know that there is a particular dpkg command with options and syntaxes and what not which will install all the .deb files in a defined location. So...help?
sudo apt-get update,sudo apt-get upgrade,sudo apt-get autoclean(remove old stuff).<< is common house keeping.
as for ur option to just download package to the local repo(//var/cache..).u need to use the format:
Code:
sudo apt-get  -d install packgname
u can install .deb packages by right clicking now a days with gui(gdebi).for cli- dpkg -i /dir/afa.deb is the format.dpkg is the management tool.while apt more or less manages the whole things.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 16-08-2007, 07:18 PM   #6 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Package management through Live-CD

See, when you run a live cd it's not a read only file system. How else would programs run correctly. Many programs need to write to file system and it is accessed by other programs. I don't know how exactly it works, you will have to read up on it. I believe squashfs is one such fs.
To solve your problem
1) Mount your pen drive as /var/cache/apt/archives - so that all the downloaded files will be saved in the right format and structure.
2) Download the required softwares and do remember which ones they are
2) Take the drive to your PC and cp all the contents to your Ubuntu's /var/cache/apt/archives folder. And now give
sudo apt-get install <package>
Where package is the name of the software that you want.
mehulved is offline  
Old 16-08-2007, 08:40 PM   #7 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@praka & Mehulved: That is pure genius!! I knew I had read it somewhere, but what you fellows told is exactly what I wanted, although all that chroot stuff kinda flew over my head.

So here's what I understand, in summary:

1) Boot from Live CD
2) Use the mount -o loop "filename" "mountpoint" command (I know that's not the exact thing but you know what I mean) to set my pen drive (/dev/sdb1 on my laptop) as the /var/cache/apt/archives folder.
3) Fire up apt-get and download everything I want.
4) Copy these packages including the dependencies to my desktop system.
5) Install everything by typing dpkg -i *.deb (or something similar...I have to look it up...)

So, in short, will this work? If yes, my internet worries are solved, and I can just use my regular windows pc without worries...
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 16-08-2007, 08:56 PM   #8 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default Re: Package management through Live-CD

I think you can install aptoncd on the live system too! Just try it out..
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 16-08-2007, 09:11 PM   #9 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Package management through Live-CD

Quote:
Originally Posted by kalpik
I think you can install aptoncd on the live system too! Just try it out..
But he'll have to do so everytime. But, thinking of it again, it's not a big download so he can do that.

faraaz my method doesn't involve using dpkg at all. Once you place the contents of your drive in /var/cache/apt/archives then you can use synaptic as if you were getting it from net. My only concern is if it will work fine if the package isn't in the specified repositories, but it's still there in archive folder.
mehulved is offline  
Old 16-08-2007, 09:51 PM   #10 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@mehulved: yeah, it will work...i used to get error msgs from using aptoncd based cd repositories also, that the files were not authenticated. But apart from that, it worked fine.

But hang on, if i download, say...apt-get install -d insertpackagenamehere to the archives, then copy it to the same folder on my desktop, I can run "apt-get install insertpackagenamehere" and it will install like normal?? I dunno man, last time I tried this with aptoncd, it didn't work...
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 17-08-2007, 07:41 AM   #11 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default Re: Package management through Live-CD

@mehulved, nothing will happen if the package is in the cache, and not in the repos.

@faraaz, when you copy it to desktop, you would have to use dpkg to install, not apt-get. And aptoncd works every time! Just create an iso and copy that! Then on the target system, install aptoncd and restore the ISO. As simple as that!
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 17-08-2007, 09:49 AM   #12 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@kalpik: Cool...thanks for the tip.
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 17-08-2007, 12:49 PM   #13 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: Package management through Live-CD

^while on Ubuntu,who cares for dpkg manual install there is gdebi(double click install) na?
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 17-08-2007, 07:38 PM   #14 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@praka123: Do one thing, open up your /var/cache/apt folder and see how many deb fils are there JUST for multimedia codecs (including dependencies and what not)... its a pain to double click one by one. Especially when if you click a file, it says "missing dependency" and you have to hunt down the dependency deb just to go back to the other one. Its like reverse dependency hell.

With dpkg, if I use *.deb, I will be able to install ALL the packages in the folder in one go, am I right?? Why would I want to use gdebi?

Or else I will just make an apt-on-cd metapackage, copy the stuff to my archive folder and then just install the metapackage through synaptic. Eitherway...I wont have this stupid no-internet means no applications problem.

Okay, update...I tried doing this, but it didn't install anything...said I had broken dependencies.

I restored an ISO image using aptoncd, then used dpkg -i /var/cache/apt/archive/*.deb

I specifically tried to install win32codecs, libdvdcss and gstreamer plugins...

Now what?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!

Last edited by faraaz; 17-08-2007 at 07:38 PM. Reason: Automerged Doublepost
faraaz is offline  
Old 17-08-2007, 11:05 PM   #15 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default Re: Package management through Live-CD

^^ When you restore the ISO, just use apt-get to install! (provided you would have to run apt-get update once)
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 18-08-2007, 01:35 AM   #16 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

apt-get update on an offline system?? just gives me tons of error msgs as to how it couldnt connect to the repository servers. does apt-get install pckgname work even after that?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 18-08-2007, 08:48 AM   #17 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default Re: Package management through Live-CD

You would have to run apt-get update once, online. After that, you can run apt-get install offline too
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
kalpik is offline  
Old 18-08-2007, 10:01 AM   #18 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

But the whole point of this downloading business was because I DONT have internet on my desktop...so how does that help me exactly?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 18-08-2007, 12:47 PM   #19 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: Package management through Live-CD

@Faraaz : What u r asking is what is called as "local repository".


I guess u already understood what @mehul and @praka bhai suggested!

"-d" option is used to only download the files and not install it! And @praka gave u the format "sudo apt-get -d install packagename". Read man pages!

After having all the needed deb files what u need to do next on target ubuntu machine is,

1. Make sure u have http server setup on the target ubuntu machine! AFAIR, it comes packed with it! If not then u need to download the server packages and manually click on the install deb files!! When u install it, it runs by default.

U can check that by opening ur browser and typing "127.0.0.1". If error is acknowledge then do "sudo /etc/init.d/apache2 start".

2. Copy the contents of that "archive" directory containing all "deb" files that u downloaded to some place say "/home/faraaz/www/apt/archives/binary" on target ubuntu machine!

3. Next u update the package info. U open terminal in archives directory i.e "cd $HOME/www/apt/archives" and issue "dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz".
If the command gives permissions error then prepend 'sudo' to it!


4. Now /var/www is where ur local webserver files are located by default. So do "cd /var/www" and then "sudo ln -s $HOME/www/apt/archives apt".

By doing this a link "apt" is created in /var/www which points to "$HOME/www/apt/archives".


5. Next, backup ur sources.list file, like "sudo cp /etc/apt/sources.list /etc/apt/sources.list.back".

Here u add ur local repository! Do,

" echo "deb http://localhost/apt binary/" > /etc/apt/sources.list".

Remember, '>>" appends, while ">" erases everything and puts in new! '>' is better coz the repository updates quickly then and u already have a backup of ur original sources.list!

6. Now run 'sudo apt-get update'.

7. If u have mplayer in ur local repo, then do "sudo apt-get install mplayer"! Simple!

Also checkout "http://127.0.0.1/apt".


This is the setup for local repository which u can create for ur friends too who dont have internet or update all the machines on the network from just one host. So wheneva u do some update or install u do

1. sudo apt-get clean
2. sudo apt-get install (or wateva u want to do i.e retrieve operation)
3. cp -v /var/cache/apt/archives/*.deb $HOME/www/apt/archives/binary
4. cd $HOME/www/apt/archives
5. sudo dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
6. And ur local repository gets updated filling the hardisk space!


* After the use u may stop the web server by "sudo /etc/init.d/apache2 stop" or disabling from "system>administration>services" in gnome!

* Also u may back ur sources.list file if u want "sudo cp /etc/apt/sources.list.back /etc/apt/sources.list" and then "sudo apt-get update"!!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 18-08-2007, 04:38 PM   #20 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Package management through Live-CD

faraaz you are getting those errors cos you have http and ftp repositories in you /etc/apt/sources.list file. Remove or comment them out.
It can be done by GUI too.
Only keep the cd's having softwares as repositories.
mehulved is offline  
Old 19-08-2007, 02:20 PM   #21 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

Oooooh....dude, that makes so much sense!!!

One question though, is it possible to use an ISO file as a repository? Its just that I don't want to have to burn a fresh CD every time I want to install stuff on an offline machine.

Also, @mediator: Dude, your method is really confusing. I'll try out mehulved's suggestion and comment out my sources.list file. If that doesn't work, I'll give your method a go and get back to ya'll.
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 19-08-2007, 04:07 PM   #22 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: Package management through Live-CD

Thats the universal method of updating and installing 'offline' and thats where I described about '>' and '>>' i.e the thing similar to "commenting" => to just backup your 'original' sources.list and instead of commenting it out all, delete the whole content and then insert just one line in ur sources.list pointing towards local repository !!

In any case if u mess up, u can have the whole sources.list from here !!

Neways yes u can have an iso as a respository! But y even care when u can have a simple folder on ur hardisk or a pen drive of size like half a Gb or more as a repository??
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 19-08-2007, 11:45 PM   #23 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@mediator: You tellin me I don't need to burn a CD for your method?? Whoa...tussi great ho!! I'ma going to go try this out...
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Old 20-08-2007, 12:21 AM   #24 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: Package management through Live-CD

In my opinion, it wud be best if u have it all on hdd or a pen drive as a backup, coz u wud waste ur time in making ISOs also!!
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 20-08-2007, 12:59 PM   #25 (permalink)
Evil Genius
 
faraaz's Avatar
 
Join Date: Oct 2004
Location: Bangalore
Posts: 692
Default Re: Package management through Live-CD

@mediator: Okay, the uncommenting of the sources.list method worked fine!! I tried your method but it gave errors, saying path couldn't be found...I'm guessing this is more because of my ineptitude...

Ah well, my system works great after a format and re-install, so lets just leave it at that!! I'm going to save this for future reference though! Thanks man.
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
faraaz is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wht package for .chm files Techmastro Open Source 1 16-09-2006 12:31 PM
choosing the right hosting package dhawald Internet & WWW 1 17-12-2004 10:37 AM

 
Latest Threads
- by Sujeet
- by soumya
- by clmlbx
- by Charan

Advertisement




All times are GMT +5.5. The time now is 12:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2