LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-17-2004, 12:47 AM   #1
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Rep: Reputation: 30
saving list of RPMS


ive been trying to find a good way to backup linux, and the only good one i can find is the one built into the MCC. so, i have a question about saving a list of installed RPMS so whenever i need to reinstall mandrake 10 (just in case i need to reinstall it) i dont have to manually select all of my previously installed RPMS, i can just have them handy on a list.

i know that when installing you can save the list on a floppy, but i dont have a floppy drive, and i heard in the next version you can save the info on a USB drive.

how can i save the list of installed RPMS so i can just tell it to reinstall those RPMS from the cds (not the internet)
 
Old 08-17-2004, 04:03 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
rpm -qa gives a list of all installed rpms.

You should look at kickstart to help you with automatic or semi-automatic installations.
 
Old 08-17-2004, 04:24 AM   #3
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Rep: Reputation: 30
if you would like to save the list to a file simply run rpm -qa > textfile.txt. with Mandrake however you would run urpmq > textfile.txt if I am not mistaken.
 
Old 08-17-2004, 05:54 AM   #4
otish1000c
Member
 
Registered: May 2004
Location: Pennsylvania, USA
Distribution: dual boot.... Mandrake 10.0OE/10.xcooker
Posts: 611

Rep: Reputation: 30
another trick you can use, is (if you have the hard drive space) create a directory somewhere on your computer (either in the Mandrake install, or on a free partition) & copy all the RPM files from the Mandrake CD's into that directory. then, go to Mandrake Control Center->software->media manager. click "remove" & remove all your CD sources (& "main" source if you have one). then, click "add", choose "local source", give it a name, browse to the folder where you put the RPM's, leave the "path to hdlist......." blank, & click "save". click "save" in the media manager when after the source is added. now, when you want to install a package, it won't ask you to insert a CD or have to download it from a mirror.

you should still keep a "contrib" source & a "plf" source. they are always good to have, & sometimes neccessary for dependency issues.

otis
 
Old 08-17-2004, 11:48 PM   #5
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
ok, so now after i save the list of RPMS, how do i tell mandrake to install the RPMS from cds 1-3 using this rpm list textfile?
 
Old 08-19-2004, 08:16 PM   #6
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Rep: Reputation: 21
This is what I do. See also
http://www.linuxquestions.org/questi...hreadid=175806

Not only do I kep a list of my installed RPMs, I kep the list in the form of a shell script so that, to reinstall, I just have to run the file! My list looks something like this:

Code:
#!/bin/sh

urpmi program1
urpmi program2
urpmi program3
...
.. and so on.

Name the file "reinstall_stuff" or something like that, and then "chmod u+x reinstall_stuff" to make it executable. Then run it (type "reinstall_stuff") and it will go through each program and execute the urpmi program for it, which will install it from CD-ROM or FTP or however you installed it in the first place. (If it's already installed, it will say so and skip it.)

By the way, if you installed a known package like "gimp" that is already listed in your RPM Sources setup (Mdk Ctrl Ctr -> Software -> Sources), then you can just use the command

urpmi gimp

But if you have a specific file that you downloaded, like "/home/DAChristen29/downloads/WeirdAndWonderfulGIMPversion.rpm", then you have to specify the full pathname

urpmi /home/DAChristen29/downloads/WeirdAndWonderfulGIMPversion.rpm

I've never used kickstart (whatever that is --does it come with Mandrake?) or the backup command in Mdk Ctrl Ctr, preferring to write my own scripts so I know exactly what is happening with the files.

If you already have a file with the list of programs in it, you can use an appropriate sed command to add the characters "urpmi " to the front of each line to turn it into a script file. Something like:

sed -e "s/^/urpmi /" <MyListOfRPMs >reinstall_stuff

Don't forget to add "#!/bin/sh" as the first line.
 
Old 08-19-2004, 11:17 PM   #7
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
thanks a bunch. im about to reformat my drive in a few weeks because im completely wiping windows off,and need to reinstall linux. now everything's set, thanks.
 
Old 08-23-2004, 08:12 PM   #8
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Rep: Reputation: 21
Quote:
im about to reformat my drive in a few weeks because im completely wiping windows off,and need to reinstall linux
You sound like you're going to wipe your linux partition. Why? If I were you, I would use a partitioning program (Partition Magic is the most well-known; I use Acronis Partition Expert, downloaded for US$46; there are free ones too that I haven't used before like Ranish Partition Manager, QtPartEd, GNU PartEd, etc.) that resizes a partition without destroying the other partitions.

Just shrink your Windows partition to size 0 or something, and leave the Linux partition alone. (Don't actually delete the Windows partition because then the other partitions get renumbered, and your former /dev/hda7 is now /dev/hda6, etc. --big headache).

You could also shrink the Windows partition to a small size enough to fit a second Linux installation --3GB ought to be enough-- and then convert that to a Linux filesystem like ext2, ext3 or ReiserFS, all ready to accept a new installation. (You wouldn't actually have to install something there.)

Or you could shrink the Windows partition and turn it into another swap partition, perhaps half a GB to one GB in size.

In any case, with the new room created on your hard drive, you can just expand the current Linux partition to take up the rest of your space.

Linux is not Windows. You don't have to re-install every 10 months.
 
Old 08-23-2004, 11:01 PM   #9
DAChristen29
Member
 
Registered: Dec 2002
Location: Johnstown, Co
Distribution: Mint (debian edition)
Posts: 541

Original Poster
Rep: Reputation: 30
yeah, i know how to repartition. i dont want 2 distros on this machine because i only need one. i dont need windows for anything really except adobe premiere.

im still diciding on if i should repartition/resize because if i run windows in vmware to use adobe premiere, i might want to use the extra partition as my windows virtual drive. or, i might just use my /home dir in linux and keep the virtual drive there, *OR* i might repartition my drive so windows has a 7 GB space, and just use that for my LAN party games and stuff. its still in dispute, but i have about 2 months to make up my mind.
 
  


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
Saving m3u list in XMMS Napper Linux - Software 9 02-20-2006 05:48 PM
saving list of installed programs DAChristen29 Ubuntu 1 08-28-2005 04:58 PM
List installed RPMs radam Linux - Software 4 07-21-2004 02:05 PM
Access denied when saving rpms to disk newbiedrake Linux - Software 1 06-17-2004 01:29 AM
List and remove rpms linuxturtle Linux - General 3 09-24-2003 01:01 AM

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

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