How to boot linux without an initramfs?

Clash Royale CLAN TAG#URR8PPP
As the title says I'm looking for a way to boot an existing linux kernel without an initramfs. According to this link it should be possible simply by editing /boot/grub2/grub.cfg. But if I try this config
menuentry 'Fedora Linux, no initramfs'
set root='hd0,msdos1'
linux /vmlinuz-3.3.4-5.fc17.i686.PAE rootfstype=ext4 root=/dev/sda2 rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8
the boot process stops with a kernel panic at the point where the kernel tries to mount the initramfs. Do I have to tell during compile process that I don't want an initramfs? The only config option I found is CONFIG_INITRAMFS_SOURCE which is already set to CONFIG_INITRAMFS_SOURCE="".
I know there is a similar question but it lacks an explanation how to do it in practice.
linux boot linux-kernel grub2 kernel-modules
add a comment |
As the title says I'm looking for a way to boot an existing linux kernel without an initramfs. According to this link it should be possible simply by editing /boot/grub2/grub.cfg. But if I try this config
menuentry 'Fedora Linux, no initramfs'
set root='hd0,msdos1'
linux /vmlinuz-3.3.4-5.fc17.i686.PAE rootfstype=ext4 root=/dev/sda2 rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8
the boot process stops with a kernel panic at the point where the kernel tries to mount the initramfs. Do I have to tell during compile process that I don't want an initramfs? The only config option I found is CONFIG_INITRAMFS_SOURCE which is already set to CONFIG_INITRAMFS_SOURCE="".
I know there is a similar question but it lacks an explanation how to do it in practice.
linux boot linux-kernel grub2 kernel-modules
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00
add a comment |
As the title says I'm looking for a way to boot an existing linux kernel without an initramfs. According to this link it should be possible simply by editing /boot/grub2/grub.cfg. But if I try this config
menuentry 'Fedora Linux, no initramfs'
set root='hd0,msdos1'
linux /vmlinuz-3.3.4-5.fc17.i686.PAE rootfstype=ext4 root=/dev/sda2 rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8
the boot process stops with a kernel panic at the point where the kernel tries to mount the initramfs. Do I have to tell during compile process that I don't want an initramfs? The only config option I found is CONFIG_INITRAMFS_SOURCE which is already set to CONFIG_INITRAMFS_SOURCE="".
I know there is a similar question but it lacks an explanation how to do it in practice.
linux boot linux-kernel grub2 kernel-modules
As the title says I'm looking for a way to boot an existing linux kernel without an initramfs. According to this link it should be possible simply by editing /boot/grub2/grub.cfg. But if I try this config
menuentry 'Fedora Linux, no initramfs'
set root='hd0,msdos1'
linux /vmlinuz-3.3.4-5.fc17.i686.PAE rootfstype=ext4 root=/dev/sda2 rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8
the boot process stops with a kernel panic at the point where the kernel tries to mount the initramfs. Do I have to tell during compile process that I don't want an initramfs? The only config option I found is CONFIG_INITRAMFS_SOURCE which is already set to CONFIG_INITRAMFS_SOURCE="".
I know there is a similar question but it lacks an explanation how to do it in practice.
linux boot linux-kernel grub2 kernel-modules
linux boot linux-kernel grub2 kernel-modules
edited Apr 13 '17 at 12:36
Community♦
1
1
asked Sep 22 '15 at 13:35
JohnnyFromBFJohnnyFromBF
1,31792034
1,31792034
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00
add a comment |
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00
add a comment |
1 Answer
1
active
oldest
votes
Initramfs has all the needed information which OS needs to boot the system up..
It has all the file system information (like which devices to from and which devices has root fs which needs to be mounted for system to boot up.) and the contents are generated specific to the kernel.
You can boot from another image which should have all needed info.
Vmlinux which you are trying use is a statically linked image.. It's not usable for the system to boot. Best of my knowledge it's used for symbols generation and debugging mainly.
It's not like it cannot be used to boot up, but it needs to be made Bootable before using it.. Since it doesn't have bootsector information.
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
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%2funix.stackexchange.com%2fquestions%2f231326%2fhow-to-boot-linux-without-an-initramfs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Initramfs has all the needed information which OS needs to boot the system up..
It has all the file system information (like which devices to from and which devices has root fs which needs to be mounted for system to boot up.) and the contents are generated specific to the kernel.
You can boot from another image which should have all needed info.
Vmlinux which you are trying use is a statically linked image.. It's not usable for the system to boot. Best of my knowledge it's used for symbols generation and debugging mainly.
It's not like it cannot be used to boot up, but it needs to be made Bootable before using it.. Since it doesn't have bootsector information.
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
add a comment |
Initramfs has all the needed information which OS needs to boot the system up..
It has all the file system information (like which devices to from and which devices has root fs which needs to be mounted for system to boot up.) and the contents are generated specific to the kernel.
You can boot from another image which should have all needed info.
Vmlinux which you are trying use is a statically linked image.. It's not usable for the system to boot. Best of my knowledge it's used for symbols generation and debugging mainly.
It's not like it cannot be used to boot up, but it needs to be made Bootable before using it.. Since it doesn't have bootsector information.
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
add a comment |
Initramfs has all the needed information which OS needs to boot the system up..
It has all the file system information (like which devices to from and which devices has root fs which needs to be mounted for system to boot up.) and the contents are generated specific to the kernel.
You can boot from another image which should have all needed info.
Vmlinux which you are trying use is a statically linked image.. It's not usable for the system to boot. Best of my knowledge it's used for symbols generation and debugging mainly.
It's not like it cannot be used to boot up, but it needs to be made Bootable before using it.. Since it doesn't have bootsector information.
Initramfs has all the needed information which OS needs to boot the system up..
It has all the file system information (like which devices to from and which devices has root fs which needs to be mounted for system to boot up.) and the contents are generated specific to the kernel.
You can boot from another image which should have all needed info.
Vmlinux which you are trying use is a statically linked image.. It's not usable for the system to boot. Best of my knowledge it's used for symbols generation and debugging mainly.
It's not like it cannot be used to boot up, but it needs to be made Bootable before using it.. Since it doesn't have bootsector information.
edited Sep 27 '15 at 14:17
answered Sep 27 '15 at 14:09
amitamamitam
288
288
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
add a comment |
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
You are correct about vmlinux; you cannot (directly) boot a system off it. There is a difference, however, between vmlinux and vmlinuz (the latter being what the OP is trying to boot). 'vmlinuz' is simply what a kernel (bz)Image (which is bootable) gets named when it gets installed and copied to /boot.
– Billy
Jul 31 '18 at 19:54
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f231326%2fhow-to-boot-linux-without-an-initramfs%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
Ok seems there is another option CONFIG_BLK_DEV_INITRD.
– JohnnyFromBF
Sep 22 '15 at 13:56
Most distribution kernels (the kernel that comes with the distro, Fedora in your case) do not have all the necessary drivers required to boot (hard drive driver, filesystems, etc.) compiled in, rather keeping them in an initramfs. (Those are what you need to add to your .config to make your kernel work.) This is so that at boot, the system can detect what drivers it needs (SATA instead of IDE, for example), and remove all the unnecessary drivers, whereas, if they were compiled in, they could not be removed. If you're still interested, leave a comment and I'll write-up a full-fledged answer.
– Billy
Jul 31 '18 at 20:00