LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-26-2014, 10:12 AM   #1
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Rep: Reputation: 16
install software inside the loop image with apt-get?


I mounted a loop image in my computer in /media/image, and now I want to install software in the image with apt-get. Is it possible?
 
Old 02-26-2014, 03:46 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I'd mount the image in a virtual machine myself.

When you say you mounted some image it also may or may not be a type that can easily be modified. If an iso image you'd have to undo the cd dvd and edit it and then remake it to a iso.

Normally when you say you loop mounted some deal it means that it is only now some collection of files attached to a mount point rather than a system running from that mount point.

It may be possible to boot a system to some compressed image or so too.


I'd go back to mounting the image as a read write hard drive in a virtual machine. Qemu would be easy enough usually.

Last edited by jefro; 02-26-2014 at 03:48 PM.
 
Old 02-27-2014, 12:36 PM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
I tend to just replicate the linux install on the iso to a usb stick. Make it bootable with a bootloader and a custom /etc/fstab to represent it's new home. rsync, tar, cp, and other means to facilitate that bootable linux install method. Just bear in mind that the 2GB iso image might expand to 8GB on a usb stick. It's probably simpler and easier to do that with virtualization. I tend not to because most of my tech is so old that the performance hit of virtualization is not a trivial thing.

For example with an avlinux6.0.3-xfce410-pae-i386-en.iso image:

# mount -o loop -t iso9660 avlinux6.0.3-xfce410-pae-i386-en.iso /mnt/loop
# mount -t squashfs /mnt/loop/live/filesystem.squashfs /mnt/squashfs
# cd /mnt/squashfs
# ls
(and you'll see a familiar root / filesystem of a bootable linux)

And clone the bootable root filesystem to whatever boot medium. A little creative bootloader config (/etc/fstab + /boot/grub/grub.cfg), a minimal chroot to set a password for root and a user account on the root filesystem, so you can login without getting familiar with distro defaults. Reboot and you're running that former iso image as a bootable and booted into linux. Package manager away at this point.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script issue (for loop inside a loop) Mperonen Programming 3 08-08-2013 02:14 AM
Sleep inside for loop inside while loop causing issues. TheOnlyQ Programming 13 12-19-2012 12:59 PM
How to install software on WinXP which is inside Virtual Machine Manager 0.8.0 MWH Linux - Software 2 02-19-2011 09:11 AM
Virus or broken system? apt-get install asks to remove kernel image?? rakamaka Linux - Software 6 09-19-2005 09:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 07:33 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