Fedora Linux Support Community & Resources Center
  #1  
Old 21st July 2010, 06:07 PM
fervirtual Offline
Registered User
 
Join Date: Jul 2010
Location: Benevides - Pará - Brazil
Posts: 34
linuxchrome
preupgrade F12 -> F13

Hi !

I'm trying to upgrade from F12 to F13 via preupgrade tool.
The tool appears to be divided into 5 actions.

(1) Download release info
(2) Download installer images
(3) Determine wich packages to download
(4) Download packages
(5) Prepare and test upgrade

Oh ! The tool has a tip too :
"Tip: If you quit right now, your download will continue the next time you run this assistant."

Well, after a long night, the tool runs until the almost finish of step 4.
Then, the connection goes out, and i decided to continue in the following day. I just closed the
tool and shutdown.

In the next day, i restarted preupgrade. But the application restarts from the very beginning of
step 1.

But, i think, the step 2 is very heavy.
The file "install.img" is very very big. Re-download it is not desired.

There is any trick to skip the already concluded steps (1, 2, 3) ?

Thanks,

Fer.

Ps1: Sorry by my poor english
Ps2 : The "tip" is formulated in the bad way.

Last edited by fervirtual; 21st July 2010 at 06:32 PM. Reason: some letters missing
Reply With Quote
  #2  
Old 23rd July 2010, 03:01 AM
fervirtual Offline
Registered User
 
Join Date: Jul 2010
Location: Benevides - Pará - Brazil
Posts: 34
linuxchrome
Re: preupgrade F12 -> F13

preupgrade has a serious flaw in design.
A long time ago, people writing code to network technology, has created the concept of "resumed download".

It was necessary, because much time and net resources was being consumed by re-downloads of
previously interrupted downloads, by a net error or connection lost.

A lot o tools inside linux, uses this feature to improve users experience. yum is the best example of
that sort of tool. When you start download via yum, and something goes wrong like a power lost, the next time you start yum, all previously downloaded code are just resumed.

Preupgrade developers appears to don't care about it. The second operation of the preupgrade
tool is a lot simple. Download the kernel, the initrd.img and the install.img. To some users, it is a huge download.
In F13, these files sums near 174 Mb. Don't believe the fake "tip" below the dialog. If you quit the preupgrade, this 174M stuff will be RE-downloaded from the beginning.
My connection speed is very slow (about 4 - 12 kbps). And isn't stable. Sometimes the connection just goes off.
Can i preupgrade ? With a lot of lucky, yes. But my first try to preupgrade has gone throght
an full night. In the morning, the connection has gone, and i decided to continue in the next night.
I saw the tip and become happy by clicking quit and shutdown.
But when i returned to the task, preupgrade restarts from the beginning.
I said :
- Huh ?!
Then i did a deep breath and resignate myself with the fact that a full preupgrade was in curse.

TIP : Don't believe in tips.

I have tried to preupgrade by three days, but the connection is so unstable that just some 3 - 32 Mb was really transfered before a connection down. When it happens, i become more and more depressive, because i know that the preupgrade will restart the download of all that is yet downloaded.

There are a lot of DOs and DON'Ts in coding. Re-download unmodified data gets the big :
please-DOOOOOON'T.

Yes, i know that bugs are inside any code. But bugs are accepted things. The use will evicence it and the code will be more and more bug free.

But decision to simple re-download is not what i call bug. It is just bad-coding.

Maybe preupgrade has good code too. Who knows ?
At least, "preupgrade" is a good idea bad coded.

The workaroung against bad code, is inspect what code does. And to do a simple download, coders need to be a bit more smart, than simply assume that none will be wrong with the download itself.

If your connection is unstable too, i suggest you make the download of the three files by hand using a tool that supports resuming, like wget or kget.

Download vmlinuz and initrd.img from (mirror)/releases/13/Fedora/x86_64/os/images/pxeboot
Download install.img from (mirror)/releases/13/Fedora/x86_64/os/images

Where (mirror) is your preferred mirror. In my case, i have downloaded (using kget) the following files :

http://ftp.unicamp.br/pub/fedora/rel...xeboot/vmlinuz
http://ftp.unicamp.br/pub/fedora/rel...oot/initrd.img
http://ftp.unicamp.br/pub/fedora/rel...es/install.img

Then, copy all three files to /boot/upgrade/
I don't know if it matter, but remember to change owner of these files to root.

Now comes the harder part.
We must comment the bad-coded part of preupgraded-gtk.py file, to assure that it will not
(bad) re-download all 174 Mb stuff again.

Open (as root) /usr/share/preupgrade/preupgrade-gtk.py and search by the following block of code


Code:
	:
	:
       # Step 2: Get installer images
        self.progress.next_step()
        self.dnlProgress.reset(4) # treeinfo, kernel, initrd, stage2
        done = False
        while not done:
            try:
                self.progress.details(_("Getting installer metadata..."))
                update_interface()
                self.pu.retrieve_treeinfo()
                self.progress.details(_("Getting installer images..."))
                self.pu.retrieve_critical_boot_files()
                done = True
            except (URLGrabError, PUError), e:
                print str(e)
                 :
                 :

the line :

self.pu.retrieve_critical_boot_files()

downloads the vmlinuz and initrd.img files. Put a # sign in front of it (# is the comment mark in python).
The code will be :

Code:
	:
	:

       # Step 2: Get installer images
        self.progress.next_step()
        self.dnlProgress.reset(4) # treeinfo, kernel, initrd, stage2
        done = False
        while not done:
            try:
                self.progress.details(_("Getting installer metadata..."))
                update_interface()
                self.pu.retrieve_treeinfo()
                self.progress.details(_("Getting installer images..."))
                #  self.pu.retrieve_critical_boot_files()
                done = True
            except (URLGrabError, PUError), e:
                print str(e)
	:
	:
Now, go a bit down in the file until you see this code :

Code:
		:
		:
      # Try to download stage2.img and write kickstart to /boot
        extra_args = ""
        try:
            # TODO: make generate_kickstart cram the kickstart into initrd, so
            # /boot-less upgrades can still be automated
            # generate a kickstart file to automate the installation
            extra_args += " ks=%s" % self.pu.generate_kickstart()

            # download stage2.img
            stage2file = self.pu.retrieve_non_critical_files()
            stage2_abs = self.pu.bootpath+"/"+stage2file
            bootdevpath = bootpath_to_anacondapath(stage2_abs, UUID=True)
            extra_args += " stage2=%s" % bootdevpath
        except PUError, e:
		:
		:
Our target is the line :

stage2file = self.pu.retrieve_non_critical_files()

It will download the install.img file.
Comment it out, and write the followng line :

stage2file = "install.img"

The block of code will be :

Code:
		:
		:
      # Try to download stage2.img and write kickstart to /boot
        extra_args = ""
        try:
            # TODO: make generate_kickstart cram the kickstart into initrd, so
            # /boot-less upgrades can still be automated
            # generate a kickstart file to automate the installation
            extra_args += " ks=%s" % self.pu.generate_kickstart()

            # download stage2.img
            # stage2file = self.pu.retrieve_non_critical_files()
            stage2file = "install.img"
            stage2_abs = self.pu.bootpath+"/"+stage2file
            bootdevpath = bootpath_to_anacondapath(stage2_abs, UUID=True)
            extra_args += " stage2=%s" % bootdevpath
        except PUError, e:
		:
		:
Save the file and run preupgrade.

If you are familiar with python programing (what i'm not) , you can write code to
ask the user if he wants re-download this stuff or not. And correct things to assure that the download
can be made in the "resumed download" way.

Good (not so bad)-preupgrade.

Fer.

Last edited by fervirtual; 23rd July 2010 at 03:18 AM. Reason: change previous to previously
Reply With Quote
  #3  
Old 7th March 2012, 02:56 PM
redhat71 Offline
Registered User
 
Join Date: Feb 2004
Location: China
Posts: 124
linuxfirefox
Re: preupgrade F12 -> F13

i'm seeing the same problem trying to upgrade from 15 to 16, it keeps doing the "download installer images" again once it's interrupted and resumed

i would like to try your way except there's no *install.img* ?
Reply With Quote
  #4  
Old 14th March 2012, 05:32 AM
fervirtual Offline
Registered User
 
Join Date: Jul 2010
Location: Benevides - Pará - Brazil
Posts: 34
linuxfirefox
Re: preupgrade F12 -> F13

Hi redhat71 (from China) !

Sorry to the great delay, but my connection is yet as bad as before, and i'm reading e-mails veeeeery unfreq.

1) I used that "trick" only once. Here (in Brazil), we have some sites that ships an INSTALLATION DVD of FEDORA by a little price (US $ 4.5).

Then, this is my favorite method for upgrade.

2) Any case, when i see your message, i have made a dive into the code of "preupgrade".
If you go to some mirror and type /.treeinfo, you can see that the section "stage2" does not exist, nomore.

example : type this in your browser

ftp://ftp.unicamp.br/pub/fedora/rele.../os//.treeinfo

Appears that preupgrade doesn't need "install.img" to go from F15 to F16.

3) I have a question to you. Are you sure you have the last version of preupgrade ?
I'm asking because i can't find "download installer images" into preupgrade code. There is a similar message that says :

"Getting installer images..."


4) My friend. If you have a vendor that ships FEDORA16 INSTALLATION DVD, i need to say :

BUY IT !

Then, select "upgrade" instead "install"

Doing this, will prevent a lot of PROZAC from your "first aid" kit.

After upgrade, take a long breach, and make a lot of tea.

Because when you type :

# yum update

A huge download of packets will begin.

But, of course, yum doesn't re-download what it has yet downloaded.

5) If you can't buy the DVD, you can try bypass only the "self.pu.retrieve_critical_boot_files()".
But do an offerend to Zhao Gongming first.

Good (very good) luck !

Fer.
Reply With Quote
Reply

Tags
>, f12, f13, preupgrade

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Preupgrade F10 to F11 ghostdawg Installation, Upgrades and Live Media 9 16th September 2009 08:53 PM
preupgrade from fc7 to fc9 Amrita Installation, Upgrades and Live Media 1 9th June 2009 10:16 AM
F9 to F10 using preupgrade ssam Alpha, Beta & Snapshots Discussions (Fedora 10 Only) 6 19th November 2008 08:42 PM
F8 -> F9 with preupgrade can i use kde 3.5 ejgutierrez Installation, Upgrades and Live Media 2 20th July 2008 04:33 AM
F7 to F9 preupgrade -- What I had to do alake Installation, Upgrades and Live Media 1 26th May 2008 02:21 AM


Current GMT-time: 21:08 (Monday, 01-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat