Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I want to update Gentoo by using package method, how to do?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Sun May 19, 2013 8:03 am    Post subject: I want to update Gentoo by using package method, how to do? Reply with quote

I want to use Gentoo as the OS for a self-made server.

I want to volume produce the server.

So after these servers are used by different customer, I think I need to guarantee the upgrade for the OS, maybe also the upgrade for some apps.

I don't want to ask the customers to upgrade their system by using "emerge" command line. I want to provide simpler system upgrade method as some smart mobile phones do. The system could prompt the upgrade information and allow the end-user press one key and finish the whole procedure.

Who can give me some hint? Thank you so much!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Sun May 19, 2013 12:25 pm    Post subject: Reply with quote

bluephoenix,

You need to setup a BINHOST containing the binary packages you want to install to clients system. Clients machines need to point to this BINHOST.

Clients need to have the same (identical) portage tree as you do, so you need to run your own portage mirror and point your clients machines to it.

The update process on the clients now becomes
Code:
emerge --sync
emerge @system -uK
emerge @world -uK
which you can put in a script.

I've left the hard bit to last ... etc-update will be required to update scripts and config file changes.
I don't know of a way to safely automate that, mostly because I cannot predict what will change.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Mon May 20, 2013 5:29 am    Post subject: Quite a good idea Reply with quote

I do think this is a quite good idea.

In addition, I am thinking how to upgrade the kernel by this method?

And how to prepare the binary packet for each software?

I can guarantee all of the client adopt the same hardware, so we don't need to give the ability that allows each client to choose different packet. So the emerge tool I think it is a little bit "large tool but be used in small thing".

Thanks for your advanced hint!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Mon May 20, 2013 4:34 pm    Post subject: Reply with quote

bluephoenix,

The kernel is a bit harder ... You need three things.
  • the kernel binary (bzImage)
  • the initramfs (if you use one)
  • the content of /lib/modues/<kernel-ver>

Its easy enough to package them into a tarball at your end but you would need to write your own ebuild to install them on the client systems using portage.
You need not use portage - tar xpf would work just as well but thats untidy.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Mon May 20, 2013 5:45 pm    Post subject: Reply with quote

Thanks a lot!

Till now, I don't have the machine to try your method.

So your method is still using the portage to do the upgrade, even including the kernel upgrade?

You can consider those client is just the mobile phone, so I still a little bit doubt the portage method can help. Because I cannot ask all of the user of those client to type 'emerge' command. And in case the upgrade fails, as I always face, I cannot expect those users to type 'gcc-config' or 'revdep -rebuild', this kind of commands to rescure themselves.

So do we have method to use just one file package to "COVER" the existing file system (including the OS)? This is the normal way of the current consummer device upgrade method, such as iphone and apple TV box.

Now I have gotten one general idea to adopt similiar upgrade method as apple TV does. I will preapre two OS in the harddisk, one is for the normal using OS another is for only upgrading usage. The second OS is just like liveCD, but much smaller than liveCD. As long as it can boot the device and mount the partition containing the first OS so that it can use the upgrade package to "COVER" the first OS, that's enough.

I will also install grub. Once the first OS find there is upgrade package from my server through the internet and the administrator decide to upgrade the devide, maybe click some button from the administrator UI, and the administrator UI will adjust the "grub.conf" so that the system will boot from the second OS and do the upgrade. After the upgrade, and the second OS will handover the boot priority to the first OS by adjust the "grub.conf" again.

I think this is a applicable method to implement the "ONE-PACKAGE-UPGRADE" effect. The only problem for me is how to get this upgrade package? I can use one "mother" device to follow the normal upgrade method leading by portage. But how to find out the changed file before the system upgrade and after the system upgrade? If we can find out those added files and deleted files with their folder information, I think we are easy to make the package and thus my upgrade method would be used. :)

But how should I do? Indeed, I am just the beginner of Linux. I tried some distribution of linux, finnally I chose Gentoo as it can maximum be customized while it has the best balance between the customization and easy to use. To be honest, I want to produce a server used by family, but not used by company or other envionment with strong computer knowledge administrator. So I need to find some easy way to implement its software upgrade. This is the very beginning. Without this, I cannot make volumn production. Because we cannot expect this box could be used forever without any bug-fix and feature adding.

I do believe this is a big work, even you teach me the "one-package-upgrade" method, at least I need to build the twin-OS system. And I need to find a method to guarantee the existing configuraton file (/etc) would not be overwritten while keeping it up to date. All of the thing need me to solve. But I somehow think the method is already in the world because Apple's products and a lot of vendor's device have already adopt this method. Just I don't know it. I could even quit my current job - I'd like to describe me as a network engineer, I am CCIE, but indeed I am a sales. So I am familliar with most of the knowledge of the IP network, so now I need to learn some in the server field again, I think I can reach my dream one day.

So thanks for your advice and welcome to continue the discussion!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Mon May 20, 2013 6:14 pm    Post subject: Reply with quote

bluephoenix,

Mobile phones do not carry out incemental updates as I was suggesting.
Their memory is divided into several areas and they erase the whole area and rewrite it.

Some parts, like the boot loader is never updated as if that update fails, the phone is 'bricked'. There is no recovery for ordinary users.

You can do this too is you wish - distribute several binaries that you checksum on the client before you install.

If your want to test, install Virtualbox on your Gentoo and try out ideas in safety in a Virtual Machine.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Tue May 21, 2013 4:35 am    Post subject: Reply with quote

Your idea quite develop me.

Now I think I can combine the secondary OS with "/boot" patitiion with the grub installation.

Maybe we can find some existing boot loader who has already contain simple OS function can do some extract file package job.

What I want to do is exactly as your description. I really don't need to upgrade the boot loader and the so called "secondary OS" as their job is just boot the device and extract file package. And maybe you are right, the mature existing upgrade method doesn't adopt the "increamental" way. They just use a big package containing the who OS to "swap" the existing OS. That's why all of the application and configuration need redo except they use some 3rd party software to backup them in advance and recovery after the upgrading procedure.

Do you have experience to upgrade Ubuntu or Redhat? Does they need to backup the configuration file before the upgrade? Or their upgrade program itself has the method to do the backup?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Tue May 21, 2013 5:11 pm    Post subject: Reply with quote

bluephoenix,

My last experience with Red Hat was about six months before I joined the Gentoo forums.
Updates between major versions were impossible. It was a reinstall. Updates between minor versions were a mess.
Of course, things may have changed in the last 10 years :).

I have never used Ubuntu
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
bluephoenix
Tux's lil' helper
Tux's lil' helper


Joined: 01 Nov 2008
Posts: 94

PostPosted: Tue May 21, 2013 6:12 pm    Post subject: Reply with quote

So I believe you are quite satisfied with Gentoo now because it can be upgrade at any time as you want?

:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Tue May 21, 2013 7:26 pm    Post subject: Reply with quote

bluephoenix,

Yes, you could look at it that way.

What drive me away from Red Hat was the way the configuration tools got in the way of me setting up my install the way I wanted.
I should mention RPM hell too, trying to install anything outside of 'the distro'.

Now when I break my Gentoo, its all my own fault.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Tue May 21, 2013 9:52 pm    Post subject: Reply with quote

You may also want to read the related comments on two different forum conversations I've recently had:

[SOLVED] Using 'quickpkg' to make all installed binaries - For your purposes and by using 'quickpkg' with the --include-config option will allow you to set up custom configuration files which then are included as part of the binary packages you distribute. This way your users won't need to worry about running some equivalent to 'etc-update'.

gcc-4.7.3 file collision - how should I handle this? - The fourth comment down was a revelation for me. I hadn't thought about taking advantage of the binary packages structure in that way. It's a pretty clever perspective and might be relevant to what you're trying to do.

I use binary packages internally on my network and I'm set up with three BINHOSTs. One each for x86 {32-bit}, x86_64 {64-bit} and intel Atom {netbooks}.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 713
Location: Barcelona, Spain

PostPosted: Mon Feb 10, 2014 9:16 pm    Post subject: Reply with quote

Thanks for this thread!

I have been desperate with the merge times of, for example, net-libs/webkit-gtk

Code:
genlop -t  net-libs/webkit-gtk-2.0.4
 * net-libs/webkit-gtk

     Mon Dec 23 10:31:18 2013 >>> net-libs/webkit-gtk-2.0.4
       merge time: 6 hours, 29 minutes and 7 seconds.


and I have some older laptops... :-(

The idea of having a binhost that provide compiled packages for my different machines (amd64 and x86) looks great! I have found this guide that suggest that the same machine can provide different build environments through catalyst!

I will explore this idea and see how to deal with the etc-update issue that NeddySeagoon has pointed out!

Cheers!
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum