Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Cannot Find Any Block Devices
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Sat Jul 27, 2019 7:50 pm    Post subject: Dual Boot windows 10 partitioning Reply with quote

Hi,

First of all, thanks for all of the support you guys have, it's been really helpful in getting as far as I have. Now for my query: I'm trying to dual boot gentoo with windows 10 (windows 10 installed first), and I'm pretty sure everything is set up correctly (the kernel functions well, the boot drive shows up in rEFInd, etc). My issue is that on selected the boot drive from rEFInd, it runs into an error "cannot find root drive in ."

I assume it's a mounting issue with my /etc/fstab/

Here's a structure of my partitions (all on one drive)
Code:
Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     206847    204800   100M EFI System
/dev/nvme0n1p2    206848     239615     32768    16M Microsoft reserved
/dev/nvme0n1p3    239616  867045375 866805760 413.3G Microsoft basic data
/dev/nvme0n1p4 998117376 1000214527   2097152     1G Windows recovery environmen
/dev/nvme0n1p5 867045376  867250175    204800   100M Linux filesystem
/dev/nvme0n1p6 867250176  869347327   2097152     1G Linux swap
/dev/nvme0n1p7 869347328  998117375 128770048  61.4G Linux filesystem

Where the 100M partition is boot, swap is swap, and the 61.4G partition is root.
The root drive is labeled "root" when running blkid instead of fdisk -l (hence the label pointer in the following fstab)
Here is my fstab configurations
Code:
UUID=dc90c004-cb2b-4e54-89df-bd6847ec3449   /boot   ext2    defaults,noatime     0 2
UUID=503fa9cf-aeb0-4fb2-bb6d-52c13e76a861  none         swap    sw                   0 0
LABEL=root   /       ext4    noatime,discard              0 1
/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0


If anyone sees anything that's incorrect or could point my in the right direction, that would be much appreciated. Thanks, guys!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Jul 27, 2019 8:08 pm    Post subject: Reply with quote

ijcon40,

Code:
"cannot find root drive in ."
is a message from the kernel.
Just before the period, is a list of all the block devices the kernel can see. In your case its empty.

/dev/nvme* needs nvme support in the kernel.
Until root is mounted, /etc/fstab cannot be read.

Put your kernel .config file onto a pastebin site an tell us the steps you used to make and install your kernel.

Spit off the partitioning topic as its a kernel issue -- NeddySeagoon
ijcon40 ... Feel free to change the topic title

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Sun Jul 28, 2019 12:11 am    Post subject: Kernel identifying block device issue Reply with quote

Thanks for your advice, I went ahead and added the respective nvme driver support and recompiled the kernel. My process in doing so it make menuconfig, make modules_install, make install in that order when building the kernel.

This brings me to my next issue which I assume is directly related to me not having any idea what im doing mounting-wise. My new error is
Code:
unable to find mount root fs on unknown-block(0,0)

I've attached my config in this pastebin https://pastebin.com/tGFgytv6. It's the entire thing which is definetly mostly irrelevant, but I'm super new to this so I don't really know where to look for this type of issue.
Again, thanks for all your help.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Jul 28, 2019 12:57 am    Post subject: Reply with quote

You have:
Code:
CONFIG_BLK_DEV_SD=m


This will stop you from booting without initramfs. Rebuild your kernel with <*> for SCSI block devices.

Also, you need built-in support for your root filesystem, currently you have
Code:
CONFIG_EXT4_FS=m

_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Sun Jul 28, 2019 7:38 am    Post subject: cannot open root device "(null)" Reply with quote

Hi,

Thanks for all your help thus far. For the next chapter of my incompetence, I went ahead and added ext4 file support in the kernel. I would prefer to not use initramfs as I don't really need it with the setup I have (pretty sure about that). I was also getting the error:
Code:
cannot open root device "LABEL=root" on unknown_block(0,0)
Which I figured meant there was an issue with my labeling and that it needed UUID instead, so I switched it over to the respective UUID and then the error changed to this:
Code:
cannot open root device "(null)" on unknown_block(0,0)
It looks like the docs suggest that I make sure the controller has been configured in the kernel rather than a module, so aside from the general what am I doing wrong question, where would I look to find my controller chipset in the config?

Thanks, I really appreciate all the help and I'm sorry that I haven't picked it up as quickly as I would have liked.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jul 28, 2019 11:17 am    Post subject: Reply with quote

ijcon40,

I asked for your entire kernel .config because what is missing is just as important to what is present.
I can't see what is missing from filtered output.

Don't worry about incompetence. That can be fixed by education and practice. All the helpers here have been through the learning experiences you are going through now.
Most of us will teach you to fish, rather than feed you, so we expect you to contribute to the solutions to your problems too.

Contrast incompetence to stupidity. Stupidity is forever. With the philosophy out of the way, back to your issues. You have several.

Some background. The boot sequence solves the problem of loading an operating system stored on some block device using a few tools that don't know very much about the block device.
There are lots of circular dependencies to resolve on the way and that's where your current issues arise.

Something loads your boot loader. BIOS and UEFI do it differently but bit its all the same from the grub menu being displayed to the login prompt.
Grub loads your kernel and optionally initrd(s). You can have several.
Now its your kernel and optional initrd all alone in RAM. This combination has to be able to mount the root filesystem, since until its mounted nothing can be read from it.
You can infer that with no initrd, the kernel is on its own. In turn, this means that everything needed to mount root must be configured as <*>, since <M> puts the loadable modules on the HDD.
Its a very bad thing to need to read the HDD to load a module that is needed to read the HDD. That's one of the circular dependencies that has to be broken.

Looking at your kernel
Code:
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y
good. You only need the right one of those two to boot.

I don't have NVME but
Code:
CONFIG_NVME_FABRICS=m
CONFIG_NVME_RDMA=m
CONFIG_NVME_FC=m
CONFIG_NVME_TARGET=m
CONFIG_NVME_TARGET_LOOP=m
CONFIG_NVME_TARGET_RDMA=m
CONFIG_NVME_TARGET_FC=m
CONFIG_NVME_TARGET_FCLOOP=m
looks like a problem. You probably need some of those built in.

Code:
CONFIG_BLK_DEV_SD=m
is a showstopper. NVME uses the SCSI transport. <*> is required. Jaglover spotted this.

Turn off
Code:
CONFIG_ATA_VERBOSE_ERROR=y
You will get lots of logspam that is only useful to kernel developers.

Turn off
Code:
CONFIG_EXT2_FS=m

Code:
CONFIG_EXT4_FS=m
must be <*>
With CONFIG_EXT2_FS off, you will see a new option about using the EXT4 driver for EXT2. Turn that on for EXT2 support.

The kernel does not understand LABEL=root on your kernel command line in grub.cfg
LABEL is a property of a filesystem.
In grub.cgf you must use root=/dev/nvme..... or root=PARTUUID=<root_partition_UUID>
Take care to use the PARTUUID, not the filesystem UUID, which is a different value, see my example
Code:
$ blkid | grep sde
/dev/sde1: UUID="c400b18c-0210-4338-a0fd-f437ecbaaf99" TYPE="ext4" PARTLABEL="ext4" PARTUUID="150e6ef1-7ba8-409c-9c3f-dbdecdc9f18b"
/dev/sde2: UUID="cFoZJl-1URB-JTGu-05Df-eJ0R-nJYE-45AqZb" TYPE="LVM2_member" PARTLABEL="LVM" PARTUUID="5472e6a9-101d-4d52-87aa-91388f0df5b6"


Once root is mounted all the user space tools can be used, so you can use anything in /etc/fstab.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Sun Jul 28, 2019 4:42 pm    Post subject: Grub v. rEFInd Reply with quote

Alright, so I made those changes as well as removing some very extraneous options (ones that clearly were not applicable to my setup). My next question is around the bootloader. The guide for dual booting windows and gentoo https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8 specifically highlights skipping the bootloader configuration step in the general amd64 handbook. As such, I don't have a grub.cfg set up. I do have the override of commandline for the bootloader,
Code:
root=PARTUUID=e39e3043-087e-4bed-a087-21c6b6adbaf9
I could change the bootloader from rEFInd to just be grub and then add a grub.cfg for that, but if there is a simpler solution building off of rEFInd, that would be preferable in my opinion.

Otherwise, I updated my config and remade the kernel to the same error of unknown-block(0,0). Here's the raw config: https://pastebin.com/xNB6kGb0 I really really appreciate all the help you guys have been.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Jul 28, 2019 5:13 pm    Post subject: Reply with quote

If you are using refind, you can (should? must?) set the boot device and other parameters in linux.conf.
The path to mine is /boot/refind_linux.conf but yours may be different based on refind version.

Here is mine from my server :
Code:
"Boot by PARTUUID"   "net.ifnames=0 root=PARTUUID=280acabd-75cb-41f6-8322-a428a78bdf2a"
"Boot by /dev/sdXn"  "root=/dev/sda2 net.ifnames=0  "

IIRC, refind will try lines in order until it finds one that works. You only need one. These lines correspond to the grub parameter lines.
"net.ifnames=0" tells the kernel to make ethernet names like eth0, eth1,... instead of the new persistant names enps0l2 or whatever. This is just an explanation, not a recommendation. IT IS NOT NECESSARY TO BOOT. The "root=PARTUUID=" or "root=/dev/sda..." is, unless you specify them in the kernel's internal command line, which is yet another possibility, but one that is hard to change.
The first, quoted part of a line is the prompt that refind with give you before the timeout expires. If your linux.conf is blank, there is no prompt.

My only dual-boot system is an old BIOS boot XP and grub legacy, so I can't offer any suggestions there. My other systems are pure Linux, except for one Win7 box about to be retired (replaced by Win 7 in Virtualbox on Gentoo).

Recapping this long winded post, edit your linux.conf to look like:
Code:
"<some prompt text> "root=PARTUUID=<the partition uuid> <optional other parms>"
Notice the order of the command line is not significant.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jul 28, 2019 5:23 pm    Post subject: Reply with quote

ijcon40,

I guessed at grub for your boot loader

You have
Code:
CONFIG_EFI=y
CONFIG_EFI_STUB=y

and a built in command line
Code:
CONFIG_CMDLINE=" root=PARTUUID=e39e3043-087e-4bed-a087-21c6b6adbaf9 ro"

Should work too.

Code:
unknown-block(0,0)
still says that the kernel cannot see the root drive.

Rebuild your kernel but add
Code:
rootwait
to the CONFIG_CMDLINE.
CONFIG_CMDLINE is a space separated list of parameters.

rootwait tells the kernel to wait for the root filesystem to appear before it tries to mount root. It will wait forever.
I don't think this will fix it by the last screenful before it stalls may be useful.
Can you post an image of it please.

There is also
Code:
rootdelay=<sec>
That will wait <sec> seconds before trying to mount the root partition ... then panic if its not there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Sun Jul 28, 2019 9:20 pm    Post subject: (driver?) and unknown-block(259,7) Reply with quote

Alright, so I added the refind_linx.conf in /boot as recommended by Tony as well as adding the rootwait to the command line although I'm not entirely sure how to take a screenshot from command line, so I wasn't able to do that. After adding the refind_linux.conf, the error has now changed to unknown-block(259, 7) rather than unknown-block(0,0). In addition, I noticed that it is picking up the nvme drive and partitions along with their partition UUIDs, but it has the tag (driver?), which I figured could mean that I have not installed a driver to aptly read from them. It also stated:
Code:
No filesystem could mount root: tried iso9660
Which looks like (to my amateur eyes) that it couldn't load the root filesystem, whether or not that's because I'm missing a driver or have in incorrect config, I am unsure of. Thanks for all the help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jul 28, 2019 9:55 pm    Post subject: Reply with quote

ijcon40,

Code:
unknown-block(259, 7)
That's progress.

The numbers are the kernel major and minor device numbers.
/usr/src/linux/Documentation//admin-guide/devices.txt:

259 block      Block Extended Major
                  Used dynamically to hold additional partition minor
                  numbers and allow large numbers of partitions per device
That's not very useful.
However the ,7 means partition 7

From your partition table...
Code:
/dev/nvme0n1p7 869347328  998117375 128770048  61.4G Linux filesystem
so it looks like its trying to read your root filesystem and failing.

Is your root really ext4 and is ext4 built into the kernel?

Normally, unknown-block(non-zero,x) means the kernel can get to the drive but not read what it finds.
I intended you should use a digital camera to photograph the screen, them upload the image.

Code:
No filesystem could mount root: tried iso9660
That should be a list of filesystems the kernel tried to use. As you did not tell the kernel which filesystem to use, it tries them all in order.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Jul 28, 2019 10:54 pm    Post subject: Re: (driver?) and unknown-block(259,7) Reply with quote

ijcon40 wrote:
Alright, so I added the refind_linx.conf in .

Wrong file name!
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Mon Jul 29, 2019 12:44 am    Post subject: Reply with quote

First of all, apologies for the typo in my previous message, it actually is refind_linux.conf, that was just me being dumb in the message.
I went ahead and disabled the initrd and initramfs in the kernel config following the resolution of this thread https://forums.gentoo.org/viewtopic-t-1059434.html. That removed some of the error text from the boot up error screen. I also took a picture of what I'm getting error wise with rootwait (not entirely sure that it's working though because it doesn't permanently pause) https://imgur.com/a/2ZpsjXH. I don't know if this is visible, but it also labels (driver?) in the error screen above the nvme partitions. I don't know if that means I don't have driver support enabled, but it seems likely given that it can't read the filesystem. I checked out the root fs and it appears to be an EXT4, and EXT4 support is included in the kernel (non-modularly). Thanks for all the advice guys.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Mon Jul 29, 2019 11:00 am    Post subject: Reply with quote

ijcon40,

The image is very useful. It lists all the partitions the kernel can see.
There are your 16 RAM drives ram0..ram15
Then there are your seven partitions on your NVME drive.

One of those partitions satisfies rootwait, so rootwait allows booting to continue.

Together, that tells that the kernel can see your NVME drive and read the partition table (or it could not list the partitions).
That only leaves two things,

a) The kernel does not contain the filesystem to read the root partition.
b) The partition given as root= on the kernel command line is not the root partition.

It could be both :)

Boot into your install media, mount your partitions then run df -Th. It will tell the filesystem types.

Code:
$ df -Th
Filesystem                    Type   Size  Used Avail Use% Mounted on
/dev/mapper/static-root       ext4   976M  659M  251M  73% /
/dev/mapper/static-usr        ext4   158G  145G  6.4G  96% /usr
...


Once you know the filesystem type(s) you have in use, make sure that they are configured as <*> in the kernel.

A popular error at this stage is to try to mount swap as root.

-- edit --

You have
Code:
CONFIG_EXT4_DEBUG=y
is your most recent kernel .config above.
All options with DEBUG in their names are permitted to interfere with normal operation and are for maintainers and people working under the instructions oy maintainers only.
I don't know if CONFIG_EXT4_DEBUG=y prevents normal operation or not but it might.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Tue Jul 30, 2019 1:12 pm    Post subject: Confirming root partition Reply with quote

Alright, so I've made sure that EXT4 is <*> is in the kernel and that pretty much all the options for NVMe are supported. So my next question is a little stupid: which drive is supposed to be root? My general way of editing the files is to mount what I think is the root drive, and then follow the mounting stages of the amd64 handbook base installation section. This is a really dumb question, but what is the purposes of each of the partitions, I know that swap is supposed to serve as a hard drive based paging solution and that boot is supposed to deal with all the mounting, but I'm not entirely sure what files/ contents root should contain. I know that I very rarely touch the boot partition manually, and I thought I was actively using root, but looking at the actual commands I run, very rarely am I actually editing anything in root, boot or swap. Unless /usr/src/linux or /etc/fstab are somehow related to root, I don't think I'm really editing it at all. It's also a little worrying that my root partition shows up in EFI, although I presume that is a good sign given that I have EFI_STUB=y. I guess my question relates more to what exactly the boot partition should be doing and why what I thought is my root partition is showing up as an executable in rEFInd when I thought that the kernel was located solely in /boot?

Again, thanks for all the help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 1:43 pm    Post subject: Reply with quote

ijcon40,

Unlike windows, where everything gets a drive letter and things start to break with more than 26 drives, *NIX attaches everything somewhere in the filesystem tree.
The filesystem tree is rooted at root, denoted /.

After that, what is on separate partitions or drives or shared from other systems is hidden by the system.
There are a few ground rules, like everything needed to boot should be on /. That way, you can fix your system without access to any other filesystem.
Its up to the system admin - thats you.
Its a good idea to make /home its own partition. That's all your user data. Then you can reinstall without messing up your user data, should you ever need to reinstall.

My complete filesystem tree is
Code:
# df -hT
Filesystem                    Type   Size  Used Avail Use% Mounted on
/dev/mapper/static-root       ext4   976M  660M  250M  73% /
/dev/mapper/static-usr        ext4   158G  145G  6.3G  96% /usr
/dev/dm-12                    ext4   5.8G  3.7G  1.9G  67% /var
tmpfs                         tmpfs  1.6G  224K  1.6G   1% /run
shm                           tmpfs  7.9G   98M  7.8G   2% /dev/shm
cgroup_root                   tmpfs   10M     0   10M   0% /sys/fs/cgroup
/dev/mapper/vg-home           ext4   1.5T  1.1T  313G  79% /home
/dev/shm                      tmpfs  7.9G   80K  7.9G   1% /tmp
/dev/mapper/static-opt        ext4   976M  334M  576M  37% /opt
/dev/mapper/static-local      ext4   976M  7.1M  902M   1% /usr/local
/dev/mapper/static-portage    ext4   5.3G  312M  4.7G   7% /usr/portage
/dev/mapper/vg-local          ext4   187G  150G   30G  84% /usr/portage/distfiles
/dev/shm                      tmpfs  7.9G     0  7.9G   0% /var/tmp/portage
/dev/mapper/vg-var            ext4    58G   21G   35G  38% /mnt/oldvar
192.168.100.55:/mnt/mediatomb nfs     11T  6.4T  3.8T  64% /mnt/media
/dev/sde1                     ext4   118M   74M   36M  68% /boot

I'll gloss over the use of logical volumes instead of partitions and just say that is another layer of abstraction. Its effectively the same thing.
192.168.100.55:/mnt/mediatomb is my media collection in a server in my garage. Its far too noisy to have in the lounge.
My DVDs and CDs all appear at /mnt/media, even though they are not physically on this system.

Booting is the art of loading a filesystem for a HDD using a system that cannot read the hard drive.
The files in boot are read either by the boot loader or the UEFI firmware.
Its formatted VFAT as thats all that the UEFI firmware can read. That's the main reason its separate, because its VFAT. Its not possible to install on VFAT, so the main install has to go somewhere else.

Swap is not for you. The kernel uses its directly. Its used to hold dynamically allocated RAM when real RAM is in short supply.
tmpfs is in dynamically allocated RAM, so it can be swapped too.

In a minimal partition layout install, root is everything else. On my /no-multilib/ install it looks like
Code:
# ls /
bin   dev  home  lib64       mnt  proc  run   service  tmp  var
boot  etc  lib   lost+found  opt  root  sbin  sys      usr
a more common multilib install will have one or two more entries ending in 32, as it has to keep the 32 bit and 64 bit code separate.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Jul 30, 2019 1:49 pm    Post subject: Reply with quote

Code:
tony@MSI ~ $ ls /
bin        etc.new     media  sbin                                  var
boot       home        mnt    scrollkeeper                          video
chroot.sh  lib         opt    stage3-amd64-20190609T214502Z.tar.xz  video2
data       lib32       proc   sys
dev        lib64       root   tmp
etc        lost+found  run    usr
You won't have all of these, my root is somewhat polluted, but you should have /sbin and /bin or you surely can't boot because the kernel will run /sbin/init as the handover and /sbin/init will use executables in /bin. It should have /usr also unless you run a separately mounted /usr, but it must have /sbin and /bin

Amplifying NeddySeagoon's instructions, fire up your install media and mount the partition you think is root as /mount/gentoo, and see if it looks like a root. If not, try the other six partitions and see if you are booting the wrong partition.

EDIT:
Sorry, Neddy, we must have both been typing at the same time. I'm much slower.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 2:50 pm    Post subject: Reply with quote

Tony0945,

<nit>
Tony0945 wrote:
It should have /usr also unless you run a separately mounted /usr

/usr will still be there, its just that it will be empty, as its a mount point for a filesystem.
</nit>

That brings up another interesting point. A directory and a mount point are the same thing but used differently.
When a filesystem is mounted at a directory/mount point, whatever was there becomes hidden.
When a filesystem is NOT mounted at a directory/mount point it behaves as a directory.

This means that when you forget to mount /boot to install the kernel, it all works without any error messages but the kernel is installed in the wrong place.
Its a popular kernel update error.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Tue Jul 30, 2019 4:59 pm    Post subject: Do I need a boot partition? Reply with quote

So correct me if I'm wrong, but since I'm using rEFInd, would it possible for me to use EFI_STUB and remove the boot drive entirely? If I place the /boot folder on the root filesystem when it mounts on / it should be able to share the same functionality but simplify the system a fair bit.

This is just for clarification: Here's a timeline of how I think this is functioning.

Computer Start->Bios Mananger/Drive Select->Windows EFI-> rEFInd->boot->refind_linux.conf->kernel->load drivers->rootfs->modules->Running Gentoo

Would it be possible to bypass the "boot->refind_linx.conf->kernel->rootfs" pathway by just having the boot drive mounted on root? Would it just make sense to restart this install from the ground up and use a LVM next time? I'm very confident that I'm mounting the root drive and that it is actually the root drive. I also know the ext4 is <*> in my kernel config. I may just restart the install from the ground up with the exception of leaving rEFInd installed (as it is on the windows EFI partition), unless you (the more experienced users) would recommend just continuing with the install/ if you think this is a simple issue and readily fixable. Thanks for the help.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Jul 30, 2019 5:13 pm    Post subject: Reply with quote

I don't know what Windows EFI is and why you think it is chainloading rEFInd.
the shortest boot sequence would be:

Power on;
EFI firmware runs and loads EFI stub kernel;
kernel loads drivers, mounts rootfs and runs init system.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue Jul 30, 2019 5:23 pm    Post subject: Reply with quote

ijcon40,

Your timeline is correct but its missing some constraints.
You need a partition formatted as VFAT to hold your EPI programs.
You can indeed make your kernel an EFI compliant program but EFI can read exactly one partition type and that's VFAT.

Neither *NIX nor Windows can be installed on VFAT. Windows insists on NTFS and *NIX gives you choices. VFAT does not support permissions or symbolic links, so its a really bad idea to try to install any operating system on a VFAT volume. That's what you are suggesting by combining the two.

If we dig into recent history before UEFI, BIOS allows you to combine root and /boot is the way you suggest.
At runtime, the grub boot loader can read exactly one filesystem type but that filesystem type is selected at install time, not dictated by the firmware itself.
Here, merging boot and root works, most of the time.

The down side of making your kernel a UEFI program and having the UEFI firmware load it directly is that the kernel command line must be built into the kernel, so its a kernel rebuild to change it.

Do not reinstall. At least, not yet. You will come to this point again and still won't know what is wrong?

Did you turn off
Code:
CONFIG_EXT4_DEBUG=y
as I said in the edit to my post above?
As it was an edit, you may have missed it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Jul 30, 2019 9:46 pm    Post subject: Reply with quote

Re no separate boot. yes and no

Yes, you don't have to have a seperate boot partition, no you can't have one big root partition.
As Neddy says, you can't have root on VFAT and for UEFI you must have /boot/efi on VFAT
This leads me to this fstab:
Code:

LABEL=CT250MX_EFI          /boot/efi       vfat            auto,noatime    1 2
LABEL=CT250MX_PART2     /                   ext4            defaults,noatime  0 1
LABEL=WD5001_PART2      /video          ext4            nofail,auto,relatime  0 1
LABEL=DATA                      /data           ext4            nofail,auto,relatime  0 1

Notice that I'm telling (previous post) the kernel where load by PARUUID but mounting partitions by label. This is because the /bin/mount program does understand labels, while the kernel doesn't. Please correct me if I'm wrong, Neddy, but the kernel mounts root read only because it only has to read. It runs sbin/init from the partition it just mounted then somewhere in the boot process, depending on your init system, /bin/mount is called to mount partitions. In this case LABEL=CT250MX_PART2 is remounted rw per the /etc/fstab default as /bin/mount does understand labels.
So the partition layout on my SSD (a SATA Crucial CT250MX SSD) is:
partition 1 1.1G vfat mounted as /boot/efi holding refind and little else and
partition 2 245G ext4 mounted as root holding /boot as well. (no swap on this 16G RAM system)

Refind is intelligent enough to search all the partitions looking for kernels. See the notes in /boot/efi/EFI/BOOT/refind.conf

Lots of people put all the kernels in /boot/efi, making /boot vfat. I don't. I think ext4 is more reliable.
Which reminds me, did you use btrfs? If so, you had to use the btrfs useflag. It's not a default.

What DO you have on those seven partitions?


Last edited by Tony0945 on Tue Jul 30, 2019 9:54 pm; edited 3 times in total
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Tue Jul 30, 2019 9:46 pm    Post subject: What's left? Reply with quote

Ok, so I've removed a ton of irrelevant modules from my config, ran make modules_install, make install to update the kernel and rebooted (after unmounting). I got the same error unknown-block(259,7). Here is all the information I can think to include.

Here are some pictures of my errors, hopefully they are better than the other. https://imgur.com/gallery/ugmiyAL

Here's what my root partition (/dev/nvme0n1p7) looks like:
Code:
(chroot) sysresccd / # ls
bin   etc   lib64       mnt   root  stage3-amd64-20190724T214501Z.tar.xz  usr
boot  home  lost+found  opt   run   sys                                   var
dev   lib   media       proc  sbin  tmp


Here's my /etc/fstab/
Code:
/dev/nvme0n1p5   /boot       ext2    defaults,noatime     0 2
/dev/nvme0n1p6  none         swap    sw                   0 0
/dev/nvme0n1p7   /    ext4    noatime,discard              0 1
/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0


Here's my boot drive:
Code:
config-4.19.57-gentoo
config-4.19.57-gentoo.old
kernel
kernel-genkernel-x86_64-4.19.57-gentoo
lost+found
refind_linux.conf
System.map-4.19.57-gentoo
System.map-4.19.57-gentoo.old
System.map-genkernel-x86_64-4.19.57-gentoo
vmlinuz-4.19.57-gentoo
vmlinuz-4.19.57-gentoo.old


Here's my config file: https://pastebin.com/WuPnXAXT

Here's the inside of my refind_linux.conf:
Code:
"Boot using default options" "root=PARTUUID=e39e3043-087e-4bed-a087-21c6b6adbaf9 ro"


I saw and removed the CONFIG_EXT4_DEBUG=y line when you editted it in (I also removed all the other DEBUG lines I had included for the same reason you stated). I double checked my installation of rEFInd, which looks as it should be. One thing I don't understand is the (driver?) line in the kernel error. You can find it in the pictures at [0.726338] about halfway down the image after the nvme drive is first identified, but before the partitions are listed. I really really appreciate all of your support, I've learned a lot from this and I look forward to getting it working :)
Back to top
View user's profile Send private message
ijcon40
n00b
n00b


Joined: 27 Jul 2019
Posts: 18

PostPosted: Tue Jul 30, 2019 9:52 pm    Post subject: Reply with quote

To answer your partition question, here's an fdisk -l of my partitions:
Code:
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: KXG50ZNV512G TOSHIBA                   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C6191C3D-CBDE-436F-8226-5F5DCC536824

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     206847    204800   100M EFI System
/dev/nvme0n1p2    206848     239615     32768    16M Microsoft reserved
/dev/nvme0n1p3    239616  867045375 866805760 413.3G Microsoft basic data
/dev/nvme0n1p4 998117376 1000214527   2097152     1G Windows recovery environmen
/dev/nvme0n1p5 867045376  867250175    204800   100M Linux filesystem
/dev/nvme0n1p6 867250176  869347327   2097152     1G Linux swap
/dev/nvme0n1p7 869347328  998117375 128770048  61.4G Linux filesystem


/dev/nvme0n1p7 is my rootfs, /dev/nvme0n1p5 is my boot drive (although i may get rid of that at some point) and swap is swap, although I also don't really need it with the ample built ram. I'm not using btrfs, although there is a chance I'm missing a use flag or two in places, and I plan on fixing those when they present themselves, but as of right now, I don't think that I'm even getting to the point where the use flag plays a role in my boot process.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Jul 30, 2019 9:58 pm    Post subject: Reply with quote

Ah! Forgot you are dual booting. I only do that on one old BIOS boot system using grub that chain-loads windows.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum