MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am in need of creating an update DVD. I have a couple of servers at a client site where I will be loading Mandriva 2007 AND they have a very slow Internet connection. I would like to create an update DVD, then use urpmi ... whatever to source the DVD.
What I would do is take one of those computers and put it on a high speed connection, or use my own, put a fresh install on it with similar packages as the clients, find which file needs to be edited to keepcache (save all downloaded packages), update the machine and than put those packages on CD's or DVD and then set "urpmi.addmedia local" towards the disc in drive on the clients machines before updates, you'll have most if not all packages needed minimizing downloads.
I have an older distro, so the file that needs to be edited for keeping the cached files is different, but I don't think it's hard to figure out with 2007 as I never see anybody asking how to keep cached files.
It appears that 2007 does not cache updates. Which file should be edited to allow cached files?
What I am trying is this.
1.) Find a mirror using easyurpmi.
2.) Download all updates and burn onto DVD. There is currently 1.8G of updates.
3.) After install of new 2007, copy all updates to new system.
4.) Use urpmi to direct updates to the local hard drive.
5.) Then run "urpmi --auto-select --update"
One issue, I have not figured out magic step #4 yet. How do you setup urpmi so that updates will access the local hard drive?
I would have thought there was more than 1.8GB, but if that's all there is in both main & contrib than yes, might as well download the whole shebang. I just finished downloading Mandriva 2007 this morning and will hopefully have it installed in the near future. I hope you're wrong about not being able to cache because I'm on dial-up, might have to take another trip to town to do what you'll do. Here is what I had to do for Mandrake 10.2. For Mandriva, the file name may be slightly different but in the same area.
Quote:
To be able to keep all .rpms downloaded and installed through Mandriva's GUI rpmdrake, use these commands from a terminal to find all occurances of the words "noclean" & "post_clean_cache" in rpmdrake config. file in /usr/sbin/rpmdrake.
The -n option gives the line # where the word occurs in the file.
Using an editor, edit the file as such:
Change the value of noclean from (1) to (0)
Change the value of post_clean_cache from (1) to (0)
Save the file and exit the editor.
Setting urpmi to use local rpms.
If you make a directory in /home/user_name called "updates", put all the packages in it. You can also make the directory in /opt or whatever, make sure to adjust your command to point to where they are. Then from a terminal issue commands as sudo or root:
Quote:
urpmi.addmedia local file://home/user_name/updates
urpmi.update local
I don't think you need step 5, once you have your local folder as a repository, urpmi will look there first, and then the cdroms if they are still in your repos. list before going on-line for needed packages. I think it is imperative to call your local repo. "local" so urpmi looks there first. So basically, you do not need to issue command #5 as you planned, you just select the updates you want to apply and click "Apply".
OK
I kinda looked at one of the USA mirrors last night and thought I saw a "main updates" folder and a "contrib updates" folder, don't remember seeing a general "updates" folder but it was late and I could have been off. Or maybe that's just the way that mirror's structure was or something.
Here's another time saving tip for a slow connection.
When I tried downloading Mandriva 2007 with BitTorrent trough Windows on my laptop, it became apparent that it would take forever as it was really slow. So I installed my boot manager and shrunk the NTFS data partition to make 2 more partitions, 8GB for Mandrake 10.2 /, and 2GB swap. Then installed Mandrake 10.2. I found the Conexant modem had pre-built Linux rpm driver but they cut the speed to 14kbs, if you want the full speed you have to pay $$. Because the repositories data is something like 65mb of downloading to set them up, I tried a little trick that worked out alright. Transffering repo configuration files from my desktop to my laptop to avoid downloading.
1:
I copied as root the "urpmi.cfg" file from my Dell XPS Gen 5 desktop's Mandrake 10.2 installation to a USB flash drive, and copied the "urpmi" folder/directory from /var/lib also to the flash drive.
2:
Then I logged in as root in Mandrake 10.2 on my Dell XPS Gen 2 laptop, right clicked on the panel and selected (in KDE), "Add/Special_Button/Quick_browser" and set it to start at /.
3:
Now I navigated to /etc/urpmi and clicked on "urpmi.cfg" to open it up in an editor via this file browser. Then I used the same file browser to navigate to my USB flash drive and clicked on the Dell desktop's "urpmi.cfg" file and spread both of them across the screen side by side.
4: I highlighted the "main" repository information from the desktop computer's urpmi.cfg file and right clicked it and selected copy, then clicked on the laptop's urpmi.cfg file (leaving a one line space after last entry, keeping them looking alike), and pasted the main repository configuration including the }. I did this for all five of my on-line repositories, then clicked File/save at the top of the laptop's urpmi.cfg page.
5: Now, using the same file browser, I opened the urpmi folder in /var/lib, I also opened the urpmi folder on the USB flash drive from the desktop computer and again spread both of them across the screen. I then dragged & dropped every file from the desktop computers folder into the laptop's folder except those that were already present in the laptop's like the "local" for the local repo and the ones for cdrom and there was another. Again, after copying all necessary files to the laptop's urpmi folder I clicked File/save at the top and ended the current session and logged in as user.
6: I put it on-line and checked for updates, a list was there in a flash, because my local repo in the NTFS data partition was already set up (installed ntfs-3g and Fuse to access it without problems), I selected all updates except the kernel (which I did not want) and clicked "Apply", they installed in a few minutes. Then I installed BitTorrent which was also in my local repo.
7: Went to town to download Mandriva 2007. First, because I was on high speed, I opened up the GUI Package Manager and updated my repos. The Main & Contrib repos. produced an error as the mirror was down or something so I went to Easyurpmi and selected different mirrors and updated them. Checked again for updates and there were none.
It worked, I did not have to download the 60mb of repo data on dial-up. BitTorrent was super fast on Linux compared to Windows, it took 9 hours to download the DVD.
8: Just awhile ago I tried to install a small package on my desktop's Mandrake via command line to see if the keep cache settings actually applied to the command line also, got an error because of that same Main repo mirror was down. Copied the info now from the laptop to the desktop in urpmi.cfg and tried again. The small package I installed did not stay in the cache. To keep files cached via command line, one has to include the "--noclean" option in the command. I edited my previous post.
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Rep:
for the noclean option see also my old post in LQ
(search by username + noclean keyword) but it will be about same as the instruction you already have
oh here it is http://www.linuxquestions.org/questi...hlight=noclean
I was going to mention how Mandriva 2007 will still clean the cache upon the next time you download packages with the GUI "Add remove update" software manager. For someone like me whom prefers a smaller partition (10GB), it is best for me to move all rpm out of the cache and into my local repository on my data partition after using the GUI and then issue command: (#urpmi.update local) so urpm knows what I have in my local repo. But I would still like to have it so the cache does not get emptied if I forget to transfer them and apply another batch of updates/packages as I only do batches of no more than 50MB because I'm on dial-up and don't want to tie up my internet for long periods of time.
According to your post #7 in the other thread, you mention how you do it. So I issued a different grep command to know where in the file are the instances of the word clean to make the changes you recommend so the cache does not get emptied next time I use the GUI. Here is the command I used and the output:
Now I will edit it to look like yours and hopefully keep the cached items till I choose to empty it. Is this all that is required?
I guess I can do a trial with a small package to find out for sure.
In Mandrake 2005 LE, I once applied the updated rpmdrake package and then did a few more batches of updates, then remembered what I read in your old post about re-setting the cache values in rpmdrake after updating the package. I took a look to see if the settings I altered had changed with the update and they did not change, and the cache still had packages in it. It could be like that for 2007, so I'll keep an eye out but it was not like that in my 2005, the settings I altered stayed.
I also made a script to do what you mention in 2005 to move files out of the cache to my local repository, but I imagine a cron would be better as I don't have to physically activate it like a script, (great suggestion).
I'm in the process of doing updates right now and altering settings in drakrpm did not work immediately, the cache was still getting emptied. So I powered down the computer and re-booted, now it works, the cache is not getting emptied between batches.
I went to the customer site to upgrade to Mandriva 2007. The files I downloaded did not work, you must download all RPM's and updates. There are 4 directories and about 5 to 6GB of files to download.
Fortunately the client had just updated their Internet connection and I had really good download speeds.
I would like to see an updated tutorial on how to manage updates within your own organization so that internal clients would not have to go to an external site for updates. As well, if an organization has many installs, such as a university or government, then it would save on bandwidth if the files were only downloaded once to a local server.
That's kind of strange yet I think I know why.
Last night I would polish off the list of updates, then shut down the GUI, start it up again and there would be more updates. After clearing the list I did it again, and sure enough there were some more that showed up. It appears certain packages have to be updated in the order they were produced like you can't just jump to the final release. And some of the new packages in the list were not actual updates to previous ones but more like some sort of dependency.
But some of the updates in your local repository must have been used, I would think.
I had a feeling it would be something like 5 to 6 gigabytes originally, did'nt know why for sure, just had a feeling. That's why I cache all downloads, DVD's are cheap and time is expensive. If I had the high speed connection I borrow up town may change my mind, in the wee hours of the morning it hits around 380kbps speed.
But it would be easy enough for an organization with a few computers on a network to do it my way and just update one first, and set up a local repository for the others to pick at, that is, if the local repository system works on Mandriva 2007. I have not tried it yet and get the feeling you're telling me it does not, but it should because there are a few tutorials still out there showing how to set up a local urpm repo.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.