LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2010, 02:58 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
How to install all packages from iso file without physical cd


I had installed a debian file using
#dpkg -i <file>
Now package manager gave count error though that debian file got installed.I tried
#apt-get install -f
It says want to download 20MB but no internet on my pc so destined to fail.
In synaptic package manager I selected broken packages & marked them for removal.I saw file-roller,totem.seahorse,nautilus etc. got uninstalled.
question ) I just have iso image of my ubuntu 8.04.How can I use it to install all packages that come by default on cd.
 
Old 01-02-2010, 02:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you can mount a cd image using "mount -o loop cd.iso /mnt" or use the iso image in place of device references, e.g. /dev/dvd.
 
Old 01-02-2010, 03:01 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
I have learnt
LESSON FOR ALL
if broken packages error then do
Code:
#dpkg --configure -a
#apt-get install -f
My question in first post is still unsolved ?
 
Old 01-02-2010, 03:01 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Use apt-cdrom

Code:
sudo apt-cdrom add
Then follow the prompts.

Code:
man apt-cdrom
for more info.

This will add an entry to your sources.list. Since you say you have no internet connection you should comment out the other entries, then do:
Code:
sudo apt-get update
sudo apt-get -f install
Cheers,

Evo2.

Last edited by evo2; 01-02-2010 at 03:04 AM. Reason: more info
 
Old 01-02-2010, 03:08 AM   #5
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
i mounted

sudo mount -o loop /data/ubuntu.iso /cdrom

Then I ran

sudo apt-cdrom add
Using CD-ROM mount point /cdrom/
Unmounting CD-ROM
Waiting for disc...
Please insert a Disc in the drive and press enter
Mounting CD-ROM...
E: Failed to mount the cdrom.

Note I don't have real physical disk just iso file.
Also I commented all lines from /apt/get/sources.list except cdrom & did 'apt-get update' before using above commands

Last edited by sumeet inani; 01-02-2010 at 03:10 AM.
 
Old 01-02-2010, 03:15 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
You need to put an entry in fstab and then tell apt-cdrom what the mount point is using the -d flag.

Try adding a line like the following to /etc/fstab
Code:
/data/ubuntu.iso /cdrom iso9660  	ro,noauto,user,loop=/dev/loop 0 0
Then run apt-cdrom like:
Code:
apt-cdrom -d /cdrom add
Evo2.

PS. Don't mount the iso yourself: let apt-cdrom do it using the info you put in fstab

Last edited by evo2; 01-02-2010 at 03:18 AM. Reason: fix fstab entry
 
Old 01-02-2010, 03:42 AM   #7
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
I am able to mount iso as cd & apt-cdrom recognises it.
But question is
How can I tell system to install all packages found on cdrom because I don't remember 20 packages uninstalled.
i also tried
#apt-get install nautilus
but message is usual 'no installation candidate'
Also
#apt-get upgrade
#apt-get dist-upgrade
gave no help.
Also my system has no internet.
 
Old 01-02-2010, 03:46 AM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by sumeet inani View Post
But question is
How can I tell system to install all packages found on cdrom
Ohh, that should be easy. Just mount the cdrom and do

Code:
dpkg -i $(find /cdrom -name '*.deb')
Evo2.

PS. Not sure why you would want to install *all* the packages though.

Last edited by evo2; 01-02-2010 at 03:48 AM.
 
Old 01-02-2010, 03:48 AM   #9
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Let's say you mounted the .iso image at /media/cdrom. In /etc/apt/sources.list language, that would be: deb file:///media/cdrom/ squeeze main contrib non-free. If you don't want to use non-free, just leave it out. Now, apt-get will use the cd image file to install.
 
Old 01-02-2010, 03:59 AM   #10
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
My aim is those packages which get installed by default using cd like nautilus,totem should be installed on system ?
 
  


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
method to install ISO file udayakumarsv Linux - Newbie 3 05-14-2009 12:22 AM
Installing iso without physical media?? Mikesoft Linux - Newbie 2 12-01-2006 04:51 PM
Slackware 11.0 CD2 ISO image mountable, but physical CD not gargamel Slackware 16 10-27-2006 07:13 PM
Install 3rd party .iso packages GTownsend Linux - Software 1 09-15-2006 01:26 AM
help me install Mandriva 2006 (64) 3-iso pack?; loop @ packages step NoMoreReinstallMS Mandriva 2 08-22-2006 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 PM.

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