mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fred Fan <fanyefeng@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Help for implementation system based linux update.
Date: Wed, 11 Feb 2009 14:48:49 +0800	[thread overview]
Message-ID: <2f495dc80902102248j26b21a86saefe1a6f811b75b5@mail.gmail.com> (raw)

Hi All:
       I want to implement a function to provide a system update for
our product. I don't know what is popular approach.
The kernal Image update is easy. The problem is update about rootfs,
because our rootfs has over 100Mbytes.
And the storage is hard disk. I can not use cramfs + configuration or
application partition to implement them.
There are a lot of lib. Maybe, I can try them.
I just get two ways to implement it.
First, we can use two same partitions: active or backup. We can switch
them:we alway update the backup partion
and switch the roles of them.
The last one is the init application will be replaced in a rescue
partion or initrd. After the rootfs is update, it will
perform the tranditional init process.
      But I hope I can complete the update before system reboot.
I have follow the switchroot's work flow in nash source code to try it.
First, I kill all non-kernel processes and remove all filesystem
excepts "/" and "/dev":the trial is manual.
The "/dev" can not be umount, althought I have add force flag in command line.
Next, I mount a small partition which has basic rootfs to /mnt.
And then enter /mnt. Also I do mount with move flag to move /mnt to "/".
At last, I use chroot command to switch "/".
I expect, I can umount the original "/". But fact is it is busy. so it
is can not umount.
Could you give me some suggestion about how to implement the latest method?
Or it is totial wrong. So could you give me some suggestion to
implement system update.
Best Regards.
Fred

                 reply	other threads:[~2009-02-11  6:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f495dc80902102248j26b21a86saefe1a6f811b75b5@mail.gmail.com \
    --to=fanyefeng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®