[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2f495dc80902102248j26b21a86saefe1a6f811b75b5@mail.gmail.com>
Date: Wed, 11 Feb 2009 14:48:49 +0800
From: Fred Fan <fanyefeng@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Help for implementation system based linux update.
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists