Score:0

How to load my Linux kernel from a different load address i.e. any manually specified address?

I booted the Ubuntu cloud image(https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img) from qemu. I cloned qemu from https://gitlab.com/bwidawsk/qemu. git branch is * cxl-2.0v4. Now I want to change the kernel load address of this qemu virtual machine. So I downloaded the linux kernel from (https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.3.12.tar.xz). I tried to build the kernel by following this tutorial (https://phoenixnap.com/kb/build-linux-kernel).

Now I want to boot this kernel from the address that I specify instead of the default address. I tried the following things :

  1. I tried to change the grub parameters from the /etc/default/grub file but none of them worked for me.
  2. I tried to change the CONFIG_PHYSICAL_START address but that also didn't work for me.

And one more question is how to verify that my kernel is booted from the address that I specified. Is there any command that displays the kernel load address? Or any file that shows the boot address. The logs that come when booting the VM didn't display any kernel load address. I am using Grub bootloader. I tried dmesg command but it didn't show me any kernel boot address. I tried searching in /proc/cmdline file but still, the load address is not shown.

Can you please help me with any possible solution? Thanks in advance.

Sam O'Riil avatar
kr flag
It's a bit off topic, but *why* do you want to boot a kernel from the fixed address? It's bad for security reasons. Maybe you actually don't need it at all?
PODILI CHAITANYA AKHIL KUMAR avatar
Hi @SamO'Riil Thanks for your reply. I know that it may lead to some unexpected issues. I am working on a project in which I need to boot the kernel from the cxl memory devices. I would like to say that our team is trying to boot kernel from some external memory which is not dram. That external memory is CXl device memory. So, I want to change the kernel load address to some other location. We are researching on it. Can you help us? Thanks in advance.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.