VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: VL 5.9 Pseudo 1 chroot for packaging  (Read 3715 times)

incognu

  • Packager
  • Vectorite
  • ****
  • Posts: 256
    • incognu.com
VL 5.9 Pseudo 1 chroot for packaging
« on: September 13, 2007, 04:21:43 am »

This probably includes lots more than is needed.  But without bulk packages, it seemed the quickest and easiest way.

Here's what I did:

1) installed VL 5.9 Pseudo 1
2) made tarballs of each directory under /: # tar -pcjf bin.tar.bz2 bin ... and put them in a spot for safekeeping, in case I want a fresh chroot later
3) in my VL-59P1_chroot directory, I extracted those:
# tar -pxjf ../VL-59P1_chroot-files/bin.tar.bz2
(I didn't extract the usr/src files though: # tar --exclude src -pxjf ../VL-59P1_chroot-files/usr.tar.bz2 )
then entered the chroot environment by, in VL-59P1_chroot,  # chroot . /bin/bash
4) ran ldconfig and fc-cache
5) installed requiredbuilder

It works okay so far.


  (yeah, I know the compression/extraction instead of just copying sounds screwy ... and may have been, though I wondered if copying from one hard drive to another wouldn't be slower than tarring and extracting, as I wanted a compressed backup anyway.)
Logged
Vector Linux 6.0 Light

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3234
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #1 on: September 13, 2007, 04:49:51 am »

you could have also just mounted the install cd and install the packages manually  to an alternate location. i`ve done that several times 

incognu

  • Packager
  • Vectorite
  • ****
  • Posts: 256
    • incognu.com
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #2 on: September 13, 2007, 05:23:08 am »

I guess with the -R /chroot-dir for installpkg?  After watching those 600-odd packages being individually installed during installation, I never thought of trying something like that.  (I sort of reeled back in shock when I first mounted and looked in the iso, and instead of seeing a couple of bulk packages under veclinux/required/ I saw 'em all in packages/!)
Logged
Vector Linux 6.0 Light

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3234
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #3 on: September 13, 2007, 05:54:46 am »

Yeah.. but installing them manually doens't take as long. I'm not sure why.
Basically, all I do is mount the iso, then cd /mnt/loop/packages then installpkg -R /path/to/new/root/dir */*.tlz
and voila!.

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #4 on: September 13, 2007, 07:03:28 am »

I cheat. 

I install normally.  Set it up the way I like it (important links, templates, adjust fonts, move my .ssh and .gftp to home dir).  Reboot to a VL on another partition.  Mount the fresh install partition.  Make a .lzma of the whole she-bang on the VL partition I'm running.

Then I go back to my 5.9 install and package, surf or whatever until it's too dirty to use anymore.
Boot to the VL install that has my .lzma on it.  Wipe the VL5.9 partition (format).  This take a few seconds (MUCH faster then deleting a chroot dir).  Then mount and cd to the clean partition. Then unpack the .lzma there.  Takes less then 5 minutes and I can have a clean install with a desktop enviorment to package, test, surf, etc.

I "had" a nifty script I made up that handled the "format and restore" stuff.  Just needed to execute.  But I accidently deleted it and haven't bothered rewriting it.

Chroot is cool, but I often get confused since the chroot console looks the same as the root console in the working VL install.
Logged

M0E-lnx

  • Administrator
  • Vectorian
  • *****
  • Posts: 3234
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #5 on: September 13, 2007, 07:24:06 am »

Hehe... Nice cheat exeterdad.

I've been using chroot for a while now for packaging... saves me the reboot ;)

incognu

  • Packager
  • Vectorite
  • ****
  • Posts: 256
    • incognu.com
Re: VL 5.9 Pseudo 1 chroot for packaging
« Reply #6 on: September 13, 2007, 10:15:12 pm »

Cool, thanks for the tips!

Quote
Chroot is cool, but I often get confused since the chroot console looks the same as the root console in the working VL install.
Yeah, that could be confusing.  I like to customise my prompts (in my regular install) so that user is green and root is red, but I don't customise the prompt in chroot.  Makes it a lot easier to tell at a glance.
Logged
Vector Linux 6.0 Light