Replacing linux kernel from outside of system
up vote
0
down vote
favorite
There is a certain ubuntu image that works (from the SD card) with a hardware controller. The whole image takes 2 gigabytes, for such is the card size. The image is built on the old kernel. We need to replace the motherboard, because old one are no longer available, and new appropriate don't speak with old kernel. And most importantly, irrevocably (due to a certain chaos when changing developers) the root password from the image is lost - that is, replacing the kernel in a civilized manner, from the inside, alas, will not work. The question: is it possible - and how can I- change the kernel, without changing the rest, outside the system, simply by rewriting something the card with existing image from my laptop? If not, it will be necessary to rebuild the entire streamlined and debugged image, which I would like to avoid.
linux linux-kernel
add a comment |
up vote
0
down vote
favorite
There is a certain ubuntu image that works (from the SD card) with a hardware controller. The whole image takes 2 gigabytes, for such is the card size. The image is built on the old kernel. We need to replace the motherboard, because old one are no longer available, and new appropriate don't speak with old kernel. And most importantly, irrevocably (due to a certain chaos when changing developers) the root password from the image is lost - that is, replacing the kernel in a civilized manner, from the inside, alas, will not work. The question: is it possible - and how can I- change the kernel, without changing the rest, outside the system, simply by rewriting something the card with existing image from my laptop? If not, it will be necessary to rebuild the entire streamlined and debugged image, which I would like to avoid.
linux linux-kernel
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
There is a certain ubuntu image that works (from the SD card) with a hardware controller. The whole image takes 2 gigabytes, for such is the card size. The image is built on the old kernel. We need to replace the motherboard, because old one are no longer available, and new appropriate don't speak with old kernel. And most importantly, irrevocably (due to a certain chaos when changing developers) the root password from the image is lost - that is, replacing the kernel in a civilized manner, from the inside, alas, will not work. The question: is it possible - and how can I- change the kernel, without changing the rest, outside the system, simply by rewriting something the card with existing image from my laptop? If not, it will be necessary to rebuild the entire streamlined and debugged image, which I would like to avoid.
linux linux-kernel
There is a certain ubuntu image that works (from the SD card) with a hardware controller. The whole image takes 2 gigabytes, for such is the card size. The image is built on the old kernel. We need to replace the motherboard, because old one are no longer available, and new appropriate don't speak with old kernel. And most importantly, irrevocably (due to a certain chaos when changing developers) the root password from the image is lost - that is, replacing the kernel in a civilized manner, from the inside, alas, will not work. The question: is it possible - and how can I- change the kernel, without changing the rest, outside the system, simply by rewriting something the card with existing image from my laptop? If not, it will be necessary to rebuild the entire streamlined and debugged image, which I would like to avoid.
linux linux-kernel
linux linux-kernel
asked Nov 28 at 10:50
zimopisec
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
First, I can not stress enough not to use your working copy, but to make a backup copy and use that incase something goes horribly wrong.
This may not work, but its your best shot.
The kernel is dependent on the files in /boot to start with.
System.map-4.19.1-1-default
.vmlinuz-4.19.4-1-default.hmac
config-4.19.4-1-default
initrd-4.19.1-1-default
initrd is symlinked to above
symvers-4.19.1-1-default.gz
sysctl.conf-4.19.1-1-default
vmlinux-4.19.1-1-default.gz
vmlinuz symlink to below
vmlinuz-4.19.4-1-default
You need all of these files in from the new version present, obviously most of the files names contain the version number and will be different depending on the kernel version you are using.
Inside /lib/modules/ is a series of folder one for each kernel version.
For example:
4.19.4-1-default
All the modules in this folder would be needed to be copied over.
Finally your grub or grub2 files will need to be modified to point to this new files.
- Backup your SD card and use the backup copy
- If your old motherboard is non UEFI disable it on the new motherboard, or there will be issues.
- Get another SD card/hdd
- Install a newer version of whatever distro you were using.
- Copy /boot and /lib/modules/ to the appropriate places on the backup copy of your OS. If present /usr/lib/bootloader also should be copied over.
- Boot and see what happens.
There will probably be further compatibility issues. The biggest danger is moving to far forward and transitioning from initd to systemd or other major change.
I would suggest finding out what version of the distro you were using and move only 1 version higher to start with. If installation fails you can move forward one version at a time.
When you have a bootable system, then I suggest using apt-get or etc to do a full distro upgrade in the proper manor.
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
First, I can not stress enough not to use your working copy, but to make a backup copy and use that incase something goes horribly wrong.
This may not work, but its your best shot.
The kernel is dependent on the files in /boot to start with.
System.map-4.19.1-1-default
.vmlinuz-4.19.4-1-default.hmac
config-4.19.4-1-default
initrd-4.19.1-1-default
initrd is symlinked to above
symvers-4.19.1-1-default.gz
sysctl.conf-4.19.1-1-default
vmlinux-4.19.1-1-default.gz
vmlinuz symlink to below
vmlinuz-4.19.4-1-default
You need all of these files in from the new version present, obviously most of the files names contain the version number and will be different depending on the kernel version you are using.
Inside /lib/modules/ is a series of folder one for each kernel version.
For example:
4.19.4-1-default
All the modules in this folder would be needed to be copied over.
Finally your grub or grub2 files will need to be modified to point to this new files.
- Backup your SD card and use the backup copy
- If your old motherboard is non UEFI disable it on the new motherboard, or there will be issues.
- Get another SD card/hdd
- Install a newer version of whatever distro you were using.
- Copy /boot and /lib/modules/ to the appropriate places on the backup copy of your OS. If present /usr/lib/bootloader also should be copied over.
- Boot and see what happens.
There will probably be further compatibility issues. The biggest danger is moving to far forward and transitioning from initd to systemd or other major change.
I would suggest finding out what version of the distro you were using and move only 1 version higher to start with. If installation fails you can move forward one version at a time.
When you have a bootable system, then I suggest using apt-get or etc to do a full distro upgrade in the proper manor.
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
add a comment |
up vote
0
down vote
First, I can not stress enough not to use your working copy, but to make a backup copy and use that incase something goes horribly wrong.
This may not work, but its your best shot.
The kernel is dependent on the files in /boot to start with.
System.map-4.19.1-1-default
.vmlinuz-4.19.4-1-default.hmac
config-4.19.4-1-default
initrd-4.19.1-1-default
initrd is symlinked to above
symvers-4.19.1-1-default.gz
sysctl.conf-4.19.1-1-default
vmlinux-4.19.1-1-default.gz
vmlinuz symlink to below
vmlinuz-4.19.4-1-default
You need all of these files in from the new version present, obviously most of the files names contain the version number and will be different depending on the kernel version you are using.
Inside /lib/modules/ is a series of folder one for each kernel version.
For example:
4.19.4-1-default
All the modules in this folder would be needed to be copied over.
Finally your grub or grub2 files will need to be modified to point to this new files.
- Backup your SD card and use the backup copy
- If your old motherboard is non UEFI disable it on the new motherboard, or there will be issues.
- Get another SD card/hdd
- Install a newer version of whatever distro you were using.
- Copy /boot and /lib/modules/ to the appropriate places on the backup copy of your OS. If present /usr/lib/bootloader also should be copied over.
- Boot and see what happens.
There will probably be further compatibility issues. The biggest danger is moving to far forward and transitioning from initd to systemd or other major change.
I would suggest finding out what version of the distro you were using and move only 1 version higher to start with. If installation fails you can move forward one version at a time.
When you have a bootable system, then I suggest using apt-get or etc to do a full distro upgrade in the proper manor.
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
add a comment |
up vote
0
down vote
up vote
0
down vote
First, I can not stress enough not to use your working copy, but to make a backup copy and use that incase something goes horribly wrong.
This may not work, but its your best shot.
The kernel is dependent on the files in /boot to start with.
System.map-4.19.1-1-default
.vmlinuz-4.19.4-1-default.hmac
config-4.19.4-1-default
initrd-4.19.1-1-default
initrd is symlinked to above
symvers-4.19.1-1-default.gz
sysctl.conf-4.19.1-1-default
vmlinux-4.19.1-1-default.gz
vmlinuz symlink to below
vmlinuz-4.19.4-1-default
You need all of these files in from the new version present, obviously most of the files names contain the version number and will be different depending on the kernel version you are using.
Inside /lib/modules/ is a series of folder one for each kernel version.
For example:
4.19.4-1-default
All the modules in this folder would be needed to be copied over.
Finally your grub or grub2 files will need to be modified to point to this new files.
- Backup your SD card and use the backup copy
- If your old motherboard is non UEFI disable it on the new motherboard, or there will be issues.
- Get another SD card/hdd
- Install a newer version of whatever distro you were using.
- Copy /boot and /lib/modules/ to the appropriate places on the backup copy of your OS. If present /usr/lib/bootloader also should be copied over.
- Boot and see what happens.
There will probably be further compatibility issues. The biggest danger is moving to far forward and transitioning from initd to systemd or other major change.
I would suggest finding out what version of the distro you were using and move only 1 version higher to start with. If installation fails you can move forward one version at a time.
When you have a bootable system, then I suggest using apt-get or etc to do a full distro upgrade in the proper manor.
First, I can not stress enough not to use your working copy, but to make a backup copy and use that incase something goes horribly wrong.
This may not work, but its your best shot.
The kernel is dependent on the files in /boot to start with.
System.map-4.19.1-1-default
.vmlinuz-4.19.4-1-default.hmac
config-4.19.4-1-default
initrd-4.19.1-1-default
initrd is symlinked to above
symvers-4.19.1-1-default.gz
sysctl.conf-4.19.1-1-default
vmlinux-4.19.1-1-default.gz
vmlinuz symlink to below
vmlinuz-4.19.4-1-default
You need all of these files in from the new version present, obviously most of the files names contain the version number and will be different depending on the kernel version you are using.
Inside /lib/modules/ is a series of folder one for each kernel version.
For example:
4.19.4-1-default
All the modules in this folder would be needed to be copied over.
Finally your grub or grub2 files will need to be modified to point to this new files.
- Backup your SD card and use the backup copy
- If your old motherboard is non UEFI disable it on the new motherboard, or there will be issues.
- Get another SD card/hdd
- Install a newer version of whatever distro you were using.
- Copy /boot and /lib/modules/ to the appropriate places on the backup copy of your OS. If present /usr/lib/bootloader also should be copied over.
- Boot and see what happens.
There will probably be further compatibility issues. The biggest danger is moving to far forward and transitioning from initd to systemd or other major change.
I would suggest finding out what version of the distro you were using and move only 1 version higher to start with. If installation fails you can move forward one version at a time.
When you have a bootable system, then I suggest using apt-get or etc to do a full distro upgrade in the proper manor.
edited Nov 28 at 17:23
answered Nov 28 at 17:12
cybernard
9,72131423
9,72131423
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
add a comment |
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
Thanks. It is not work immediately, but gives me important info
– zimopisec
Dec 2 at 11:45
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1379046%2freplacing-linux-kernel-from-outside-of-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown