LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-27-2007, 01:49 PM   #1
ejennings_98
Member
 
Registered: Sep 2003
Location: Canada, West Coast
Distribution: Mandriva 2012.1 i586 & x86_64
Posts: 69

Rep: Reputation: 15
Create Update DVD


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.

Here is an old procedure for Mandrake 9.2.

http://forums.scotsnewsletter.com/in...ST&f=14&t=3879

Is this procedure the same for Mandriva 2007. Of course I would need to download all of the files from the correct mirror.

Thanks, Eric
 
Old 02-28-2007, 08:18 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 03-01-2007, 09:51 AM   #3
ejennings_98
Member
 
Registered: Sep 2003
Location: Canada, West Coast
Distribution: Mandriva 2012.1 i586 & x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks junior for the reply.

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?

Regards, Eric
 
Old 03-01-2007, 04:49 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.

#grep -n noclean /usr/sbin/rpmdrake
#grep -n post_clean_cache /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".
 
Old 03-01-2007, 04:54 PM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Forgot to mention,
You will still have to set up the repositories before you can get a list of needed/available updates.

EDIT: The cached packages will be in /var/cache/urpmi/rpms

Last edited by Junior Hacker; 03-01-2007 at 07:11 PM.
 
Old 03-01-2007, 05:08 PM   #6
ejennings_98
Member
 
Registered: Sep 2003
Location: Canada, West Coast
Distribution: Mandriva 2012.1 i586 & x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks Junior, I will attempt the updates on Monday.

Only the updates directory was 1.8G. The main install was over 4G.

Eric
 
Old 03-01-2007, 05:30 PM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
Old 03-01-2007, 07:10 PM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.

Hope this trick comes in handy.
 
Old 03-07-2007, 07:11 AM   #9
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
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
 
Old 03-07-2007, 07:29 PM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Right on Emmanuel uk

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:

[root@localhost jo]# grep -n clean /usr/bin/drakrpm
1452: update_sources($urpm, noclean => 0, banner => $::isEmbedded);
1783: clean_all => 1,
1914: post_clean_cache => 0,

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.

Thanks
 
Old 03-08-2007, 01:02 AM   #11
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
Quote:
I guess I can do a trial with a small package to find out for sure
I always do that.
Do not forget that if you upgrade mcc or rpmdrake you are back to cache cleaning again

Quote:
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
How about a cron job that cp from /var/cache/urpmi/rpms (AFAICR) to /home/somewhere
 
Old 03-08-2007, 02:01 AM   #12
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Actually

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.

Thanks Emmanuel uk
 
Old 03-08-2007, 02:06 AM   #13
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606

Rep: Reputation: 53
you are welcome.
I meant cp -u.
well back on topic now, but no ideas for now
 
Old 03-09-2007, 11:40 AM   #14
ejennings_98
Member
 
Registered: Sep 2003
Location: Canada, West Coast
Distribution: Mandriva 2012.1 i586 & x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
Junior:

Here is an update to this thread...

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.

Regards, Eric
 
Old 03-09-2007, 03:05 PM   #15
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
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.
 
  


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
how to create RH DVD from 4 RH CD? sluge Red Hat 4 04-06-2007 02:04 AM
create my own update source RPM hdlist.cz carl0ski Mandriva 3 11-20-2004 11:47 PM
Create RH9 DVD from CD TXM Red Hat 1 07-28-2004 10:38 PM
Want to create Fedora Core 1 Update CD, which RPMs to get? Arodef Fedora 6 04-13-2004 11:53 PM
create own install dvd ? ilovebytes Linux - General 0 01-07-2004 03:48 PM

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

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