[SOLVED] How to change linux kernel image while device is running?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to change linux kernel image while device is running?
Hello everyone,
I have a device which run linux kernel, i want to update the kernel image while it is running, so that the next time it reboots the new kernel image. I thought of using dd (inside the device while running), but I do not know the possible arguments. The sector map for the device is here. http://dev.odroid.com/projects/odroid-t/#s-3
Any suggestion is welcome. Thanks!
I'm glad to hear you found a solution. Might I suggest posting your solution here so people who stumble across this post, with a similar issue, can see how you did it?
I was supposed to use the values of the sector in the link I provided there for ODROID-T, but the value is wrong. I found out during bootup the actual sector:
Code:
reading kernel.. 1081, 8192
MMC read: dev # 0, block # 1081, count 8192 ...8192 blocks read: OK
completed
reading RFS.. 9273, 6144
MMC read: dev # 0, block # 9273, count 6144 ...6144 blocks read: OK
completed
Boot with zImage
I know the 2 mmc block partitions are not to be used:
Code:
# fdisk /dev/block/mmcblk0
The number of cylinders for this disk is set to 61440.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/block/mmcblk0: 2013 MB, 2013265920 bytes
4 heads, 16 sectors/track, 61440 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 532 8805 264740 83 Linux
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 8805 60032 1639265 83 Linux
Partition 2 does not end on cylinder boundary
I noticed that the start of mmcblk0p1 does not start on 0, so below that could be the location of uboot, kernel, and ramdisk. So I tried that, along with the 1081 above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.