VectorLinux
July 31, 2014, 07:33:14 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: VL 5.9 Pseudo 1 chroot for packaging  (Read 3312 times)
incognu
Packager
Vectorite
****
Posts: 256



WWW
« on: September 13, 2007, 03: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: 3178



« Reply #1 on: September 13, 2007, 03: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 
Logged

incognu
Packager
Vectorite
****
Posts: 256



WWW
« Reply #2 on: September 13, 2007, 04: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: 3178



« Reply #3 on: September 13, 2007, 04: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!.

Logged

exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #4 on: September 13, 2007, 06: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: 3178



« Reply #5 on: September 13, 2007, 06:24:06 am »

Hehe... Nice cheat exeterdad.

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

incognu
Packager
Vectorite
****
Posts: 256



WWW
« Reply #6 on: September 13, 2007, 09: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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!