You are not logged in.

#1 2015-04-02 15:58:47

boogerlad
Member
Registered: 2013-04-20
Posts: 48

booting without initramfs

I know this question has been asked before. I've compiled my own kernel with all the necessary modules to install. I'm able to boot with an initramfs made from a mkinitcpio.conf of

MODULES=""
BINARIES="fsck fsck.ext4"
HOOKS="base"
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
#MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
#BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect block filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev block filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev block mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev block lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
#HOOKS="base udev autodetect modconf block filesystems keyboard fsck"

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
COMPRESSION="cat"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=""

Notice how there are no modules. When I change my kernel command line to not require the initramfs, I get a kernel panic vfs unable to mount root fs unknown block at 0,0

Here's my kernel command line.
echo "root=sda4 rw rootfstype=ext4 initrd=/intel-ucode.img init=/usr/lib/systemd/systemd quiet" | iconv -f ascii -t ucs2 | efibootmgr --create --gpt --disk /dev/sda --part 1 --label 'Arch Linux' --loader 'vmlinuz-linux-ck' --append-binary-args -
or
echo "root=UUID=eff40d31-9c23-4404-a4ee-a601663ec268 rw rootfstype=ext4 initrd=/intel-ucode.img init=/usr/lib/systemd/systemd" | iconv -f ascii -t ucs2 | efibootmgr --create --gpt --disk /dev/sda --part 1 --label 'Arch Linux' --loader 'vmlinuz-linux-ck' --append-binary-args -
I've tried switching between using uuid and sda4, but same result.

Last edited by boogerlad (2015-04-02 16:05:15)

Offline

#2 2015-04-04 07:14:32

boogerlad
Member
Registered: 2013-04-20
Posts: 48

Re: booting without initramfs

Any ideas as to what is wrong?

Offline

#3 2015-04-04 11:40:38

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,572
Website

Re: booting without initramfs

Please do not bump with empty posts.  Tell us what you have tried or learned since yout initial post.  How did you build the kernel?  What modules are loaded upon a clean reboot with the initramfs?  Have you checked that you are booted into the right kernel?  What was in your kernel config?  Have you checked that your desired config was actually used by the kernel that is running?  All these (and more) diagnostic steps would be found if you searched for this issue as the following thread comes up near the top of a search:

https://bbs.archlinux.org/viewtopic.php?id=149653


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2015-04-04 12:52:27

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,906
Website

Re: booting without initramfs

root=UUID= won't work without an initramfs, because udev won't start until after root is mounted. I don't think root=sda4 will work either, I think you need an absolute path.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2015-04-05 05:28:51

boogerlad
Member
Registered: 2013-04-20
Posts: 48

Re: booting without initramfs

@Trilby, I saw that linked thread and my situation is largely similar to his. I'm away from the computer that I was experimenting on, so I can't post details atm.

@ WorMzy, would the proper absolute path be "/dev/sda4"? or something else entirely?

Offline

#6 2015-04-05 16:11:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: booting without initramfs

boogerlad wrote:

@ WorMzy, would the proper absolute path be "/dev/sda4"? or something else entirely?

Yes, that is correct.  When I saw this thread yesterday, I went and looked at my grub configuration where I have an option to boot a custom kernel without initrd.  This is the form used in my configuration.  And, I agree, UUID's will not work in the pre-boot environment.  Using an initrd, the kernel is running and has 'booted' from the initrd and has access to a few more niceties.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB