LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-23-2007, 04:32 PM   #1
JAKK
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 92

Rep: Reputation: 15
Saving install config


Hi. I just reinstalled slackware,but something is messed up with my apm. I've tried recompiling my kernel,but my laptop won't shut down all the way. With my old slackware install,everything worked fine. I've tried lots of recompilies,but nothing worked,so I'm thinking of reinstalling. However,I really don't want to go through the 'newbie' package selection a third time,it takes me about an hour and a half to do that(my laptop is old,so I have to choose waht to install). My question was if there is a way I can save my current package config so that if I reinstall Slackware,I could just load the config. Thanks for your help.
 
Old 01-23-2007, 06:54 PM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
The best way would be to adjust the tagfiles I think. You can find them on your Slackware CD/DVD in the folder "slackware" in every subfolder. Set "ADD" to add packages and "SKP" to not install them. When installing from the CD you can mount them and tell the installer script to use it as your package selection.

Mount your CD somewhere, go to it in a console and enter the "slackware" folder. The following line will create a folder "tagfiles" in your /tmp folder and copy all tagfiles to it (it preservers the folder structure of the CD's slackware folder, which is important:
Code:
 for folder in $(find -type d); do mkdir -p /tmp/tagfiles/$folder; cp $folder/tagfile /tmp/tagfiles/$folder ; done
Then go to the /tmp/tagfiles folder. Go into each folder and run the following script (save it to /tmp/tagfiles or where you want). It should test if each package is installed. Please beware and look over the created tagfile.custom before uncommenting the last line!

Code:
#!/bin/sh

echo "# custom tagfile created by script" > tagfile.custom
while read line
  do 
    # get package name
    package=${line%%:*}
    
    # commenting lines are not important here, so don't process them
    if test ${line:0:1} = "#"; then continue
    fi

    # is there at least one installed package found whose name begins with that pattern?
    # yes: set tag option to ADD     no: set tag option to SKP
    if test $(ls /var/log/packages/$package* 2>/dev/null | wc -l) -gt 0
      then
        echo ${package}: ADD >> tagfile.custom
      else
        echo ${package}: SKP >> tagfile.custom
    fi
done < tagfile

# if you are sure that the script works like intended run
# it (only!) once on the tagfile after uncommenting the following line
# please run the script first and verify the output is right!

#cp tagfile.custom tagfile && rm tagfile.custom
Copy the tagfile folder to a floppy or somewhere else, mount it when installing and tell the installer where the "tagfiles" folder is.
 
Old 01-23-2007, 08:14 PM   #3
JAKK
Member
 
Registered: Jun 2006
Distribution: Slackware 11
Posts: 92

Original Poster
Rep: Reputation: 15
Hi. I will try running that script. Thanks for your help.

EDIT:Ok,the output seems right. Now,I just uncomment the last line and run it in each folder,right? Also,I have 2 install cds,so what I did was put cd 1 tagfiles in a directory called tagfiles and cd 2 in a directory called tagfiles2. My last question is how I tell the installer where the tagfiles are for each cd.

EDIT 2: Ok,I figured everything out and it all worked fine-the install was completley automatic. Thanks for your help.

Last edited by JAKK; 01-23-2007 at 10:41 PM.
 
Old 01-24-2007, 04:46 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
You're welcome Nice to hear that you got it working.
 
  


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
Suse 9.3 yast2 hangs saving boot config or edit config deh6 SUSE / openSUSE 0 07-16-2006 03:43 PM
Move CD - saving config to HDD LinuxVille Mandriva 8 04-04-2005 10:03 AM
saving network config in 9.2 petkov Mandriva 1 03-22-2004 02:17 PM
Saving the config in KNOPPIX? Konig Debian 1 01-09-2004 09:15 AM
Saving eth0 config davee Linux - Networking 3 01-21-2003 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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