Re: [lfs-support] Linux kernel doesn't see partitions
On Thu, Mar 26, 2020 at 6:50 PM Douglas R. Reno wrote: > > On 3/26/20 5:43 PM, Jason Gauthier wrote: > > > > On Thu, Mar 26, 2020 at 5:51 PM Douglas R. Reno < > ren...@linuxfromscratch.org> wrote: > >> >> On 3/26/20 3:03 PM, Jason Gauthier wrote: >> >> I'm to the point where grub needs to be installed. >> I've built LFS on a loopback device, so there isn't a physical drive to >> install grub to. >> >> I booted a debian recovery disk, and I installed and configured grub. >> Since I'm going to use this on a QEMU system I set the linux parameter to >> "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" >> >> Grub loads, and boots the kernel. But the kernel halts because it cannot >> find the root filesystem. Specifically, it says, "Please append a correct >> "root=" boot option; here are the available partitions: >> But there aren't any partitions listed. >> >> My grub.cfg: >> set default=0 >> set timeout=5 >> >> insmod ext2 >> set root=(hd0,1) >> >> menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { >> linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro >> } >> >> >> Appreciate any pointers. I "feel" like the kernel might not know about >> the disk subsystem, but I didn't deviate from compilation options, and I've >> been out of the kernel compilation game for a long time so I don't know >> what's even defaulted or modular anymore. >> >> >> Hi Jason, >> >> >> I've had something similar happen before. I presume because you're >> mentioning vda1 that you're using VirtIO disks? I have one system that uses >> those - it's a VM inside of a Proxmox instance far far away from me (which >> I rarely ever use now). Proxmox uses libvirt with Qemu IIRC. You'll want to >> ensure that the following options are built into your kernel: >> >> SCSI_VIRTIO=y >> >> VIRTIO_BLK=y >> >> VIRTIO_BLK_SCSI=y >> >> VIRTIO=y >> >> >> > Thank you! The trick was that NONE of this stuff was enabled by default, > and most of it should not be set to 'm'. I got the system booted! > Now, there isn't any network, but at least I've booted my first LFS. This > was fun, but I'm using this as a platform to help me build software for yet > another platform. > > There is a VIRTIO network adapter too: > > VIRTIO_NET=y > > See if that helps :) > > > Even easier fix. My debian VM's NICs are all "ens0", so I build LFS like that. This one was eth0. Simple fix and reboot. All is well! Don't care about graphics, output or anything. I just need a build platform. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Linux kernel doesn't see partitions
On 3/26/20 5:43 PM, Jason Gauthier wrote: On Thu, Mar 26, 2020 at 5:51 PM Douglas R. Reno mailto:ren...@linuxfromscratch.org>> wrote: On 3/26/20 3:03 PM, Jason Gauthier wrote: I'm to the point where grub needs to be installed. I've built LFS on a loopback device, so there isn't a physical drive to install grub to. I booted a debian recovery disk, and I installed and configured grub. Since I'm going to use this on a QEMU system I set the linux parameter to "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" Grub loads, and boots the kernel. But the kernel halts because it cannot find the root filesystem. Specifically, it says, "Please append a correct "root=" boot option; here are the available partitions: But there aren't any partitions listed. My grub.cfg: set default=0 set timeout=5 insmod ext2 set root=(hd0,1) menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro } Appreciate any pointers. I "feel" like the kernel might not know about the disk subsystem, but I didn't deviate from compilation options, and I've been out of the kernel compilation game for a long time so I don't know what's even defaulted or modular anymore. Hi Jason, I've had something similar happen before. I presume because you're mentioning vda1 that you're using VirtIO disks? I have one system that uses those - it's a VM inside of a Proxmox instance far far away from me (which I rarely ever use now). Proxmox uses libvirt with Qemu IIRC. You'll want to ensure that the following options are built into your kernel: SCSI_VIRTIO=y VIRTIO_BLK=y VIRTIO_BLK_SCSI=y VIRTIO=y Thank you! The trick was that NONE of this stuff was enabled by default, and most of it should not be set to 'm'. I got the system booted! Now, there isn't any network, but at least I've booted my first LFS. This was fun, but I'm using this as a platform to help me build software for yet another platform. There is a VIRTIO network adapter too: VIRTIO_NET=y See if that helps :) Also, if you're using VIRTIO graphics, try this to get a framebuffer: VIRTIO_PCI=y VIRTIO_IOMMU=y VIRTIO_BALOON=y DRM_VIRTIO_GPU=y There are others in the VIRTIO section, but I'm not sure if they are needed or not in your configuration. It looks like at some point they added a Virtio Drivers section under Device Drivers, but I'm not sure what that requires. The VIRTIO-based system I have is running 4.19. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Linux kernel doesn't see partitions
On Thu, Mar 26, 2020 at 5:51 PM Douglas R. Reno wrote: > > On 3/26/20 3:03 PM, Jason Gauthier wrote: > > I'm to the point where grub needs to be installed. > I've built LFS on a loopback device, so there isn't a physical drive to > install grub to. > > I booted a debian recovery disk, and I installed and configured grub. > Since I'm going to use this on a QEMU system I set the linux parameter to > "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" > > Grub loads, and boots the kernel. But the kernel halts because it cannot > find the root filesystem. Specifically, it says, "Please append a correct > "root=" boot option; here are the available partitions: > But there aren't any partitions listed. > > My grub.cfg: > set default=0 > set timeout=5 > > insmod ext2 > set root=(hd0,1) > > menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { > linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro > } > > > Appreciate any pointers. I "feel" like the kernel might not know about > the disk subsystem, but I didn't deviate from compilation options, and I've > been out of the kernel compilation game for a long time so I don't know > what's even defaulted or modular anymore. > > > Hi Jason, > > > I've had something similar happen before. I presume because you're > mentioning vda1 that you're using VirtIO disks? I have one system that uses > those - it's a VM inside of a Proxmox instance far far away from me (which > I rarely ever use now). Proxmox uses libvirt with Qemu IIRC. You'll want to > ensure that the following options are built into your kernel: > > SCSI_VIRTIO=y > > VIRTIO_BLK=y > > VIRTIO_BLK_SCSI=y > > VIRTIO=y > > > Thank you! The trick was that NONE of this stuff was enabled by default, and most of it should not be set to 'm'. I got the system booted! Now, there isn't any network, but at least I've booted my first LFS. This was fun, but I'm using this as a platform to help me build software for yet another platform. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Linux kernel doesn't see partitions
On 3/26/20 3:03 PM, Jason Gauthier wrote: I'm to the point where grub needs to be installed. I've built LFS on a loopback device, so there isn't a physical drive to install grub to. I booted a debian recovery disk, and I installed and configured grub. Since I'm going to use this on a QEMU system I set the linux parameter to "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" Grub loads, and boots the kernel. But the kernel halts because it cannot find the root filesystem. Specifically, it says, "Please append a correct "root=" boot option; here are the available partitions: But there aren't any partitions listed. My grub.cfg: set default=0 set timeout=5 insmod ext2 set root=(hd0,1) menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro } Appreciate any pointers. I "feel" like the kernel might not know about the disk subsystem, but I didn't deviate from compilation options, and I've been out of the kernel compilation game for a long time so I don't know what's even defaulted or modular anymore. Hi Jason, I've had something similar happen before. I presume because you're mentioning vda1 that you're using VirtIO disks? I have one system that uses those - it's a VM inside of a Proxmox instance far far away from me (which I rarely ever use now). Proxmox uses libvirt with Qemu IIRC. You'll want to ensure that the following options are built into your kernel: SCSI_VIRTIO=y VIRTIO_BLK=y VIRTIO_BLK_SCSI=y VIRTIO=y The crypto and GPU drivers are rather important too if you're not going to be using the Qemu defaults, but focus on getting your system booting before worrying about those. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Linux kernel doesn't see partitions
On 3/26/20 3:03 PM, Jason Gauthier wrote: I'm to the point where grub needs to be installed. I've built LFS on a loopback device, so there isn't a physical drive to install grub to. I booted a debian recovery disk, and I installed and configured grub. Since I'm going to use this on a QEMU system I set the linux parameter to "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" Grub loads, and boots the kernel. But the kernel halts because it cannot find the root filesystem. Specifically, it says, "Please append a correct "root=" boot option; here are the available partitions: But there aren't any partitions listed. My grub.cfg: set default=0 set timeout=5 insmod ext2 set root=(hd0,1) menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro } Appreciate any pointers. I "feel" like the kernel might not know about the disk subsystem, but I didn't deviate from compilation options, and I've been out of the kernel compilation game for a long time so I don't know what's even defaulted or modular anymore. That's a bit tricky. grub is finding (hd0,1), but the kernel is not recognizing the device as vda. My best guess is to try root=/dev/sda1, but it depends on the options used by qemu. Another issue is that the kernel doe not have the right drivers installed. On the debian recovery disk, look at /lib/modules//modules.builtin I'll note that when I use qemu, I install a regular distro and build inside qemu. I do use a separate /boot partition. I then just edit the distro's grub.cfg. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Linux kernel doesn't see partitions
Le 26/03/2020 à 21:03, Jason Gauthier a écrit : > I'm to the point where grub needs to be installed. > I've built LFS on a loopback device, so there isn't a physical drive to > install grub to. > > I booted a debian recovery disk, and I installed and configured grub. > Since I'm going to use this on a QEMU system I set the linux parameter to > "linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro" > > Grub loads, and boots the kernel. But the kernel halts because it cannot find > the root filesystem. Specifically, it says, "Please append a correct "root=" > boot option; here are the available partitions: > But there aren't any partitions listed. > > My grub.cfg: > set default=0 > set timeout=5 > > insmod ext2 > set root=(hd0,1) > > menuentry "GNU/Linux, Linux 5.5.3-lfs-9.1" { > linux /boot/vmlinuz-5.5.3-lfs-9.1 root=/dev/vda1 ro > } > > > Appreciate any pointers. I "feel" like the kernel might not know about the > disk subsystem, but I didn't deviate from compilation options, and I've been > out of the kernel compilation game for a long time so I don't know what's even > defaulted or modular anymore. > Clearly, /dev/vdax is not how disks appear normally, even with qemu... So your kernel may be lacking some otpion to access (virtual?) disks. Actually, I do not understand exactly what you have done for installing grub and booting linux. Where and how have you installed grub? What is the format of the qemu disk? Have you run qemu for booting the kernel? Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style