[vox-tech] debian virtual install

vox-tech@lists.lugod.org vox-tech@lists.lugod.org
Sun, 23 Jun 2002 18:43:26 -0400


Gabe,

  I recommend using a virtual machine to produce a base.tar, then 
chroot or a virtual machine to continue customization of the work
area.

  I've only don't this once and used the potato base.tar, and chroot.

  User-mode Linux offers some interesting possibilities depending on 
how it works, but I'm not familiar enough with it to comment.


On Sun, Jun 23, 2002 at 02:16:22AM -0700, Gabriel Rosa wrote:
> On Sun, 23 Jun 2002, Rick Moen wrote:
> > I may be missing something important, here (long day, up late), but
> > wouldn't this be a perfect situation to use chroot?
> 
> Ya, that would work but not 100% the way I want it.
> 
> With a chrooted envr, I'd need to pull the base system from a mirror,
> unpack, etc, then do the install.

  The woody basedebs.tar is a tarfile full of .debs which you can't just 
untar, anymore.  If you plan to do the untar approach you will have to start
with potato and update from there.

  However if you want to, given a bare "root" directory you can to start 
from woody, if you to run a couple dozen commands from:
  /mnt/usr/lib/debootstrap/scripts/woody
of the root.bin disk that comes from debian woody.

  The root.bin is a gzip'ed ext2 filesystem and I don't have cloop
compiled on my kernel so to get at the contents of that disk image
you may want to do something like:
  gzip -cd < root.bin > /root.img; 
  mount -o loop /root/img /mnt
... 

  If you intend to do this thing a couple of times, then I strongly recommend
that you do a base debian install via one of two methods:
  - on a spare swap partition...
  - inside one of the virtual machines... (bochs, plex86, vmware, etc)

  Then once the base install is done, boot it for the first time answer all
the base-config questions, install any essential packages (but try to 
unselect all the cruft that the base system preselects for you), when 
you get the login prompt shutdown.

  Reboot into you main system, create a tar file of the installed base 
system... and use that the next thirty times you want a pristine base
to tinker with.


> I'd like to take advantage that the system I'm using already has a working
> OS and would simply like apt to go it's magic in a different directory.

  Once you have the base system untared into a work area (from above),
then you can use chroot... and all your happy apt-get, aptitude (or 
less happy dselect) commands will work like you want.

> Plus, chroot requires you to be root. (which is not a problem, but something
> I'd like to avoid).

  chroot is probably the best route... besides dpkg requires root to do most 
of it's install magic.

  If you think about it dpkg during install or remove does so many root 
requiring activities there isn't going to be a way around that... 
(installing files in /usr/bin, adding users/groups, etc).  
  Sure you could "fakeroot" it ... but the install area is going to be
trash, everything owned by one user... when you go to export for your
NFS clients.

  Another option is if you setup a virtual machine to get the base tar
for above... you can just continue using it to build what you want 
then once it's finished shutdown the virtual machine and mount the
filesystem it produced as /place/you/put/your/nfs/root/export :)
  ... but that means you have to sort of dedicate some static disk
space to the purpose, unless you are using LVM.  This also means
that you can't have NFS clients attached while updating of the system
via a virtual machine (having ext3 mounted by two systems at the
same time is asking for trouble).

    Good Luck,
      Mike

ps:
  let us know what you selected.

pps:
  you might want to come to the next lugod meeting as it has potential
to be very good.