LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS 7.4 Chapter 9.3 (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-7-4-chapter-9-3-a-4175478832/)

retux 09-27-2013 11:42 PM

LFS 7.4 Chapter 9.3
 
Hi

I am doing doing 64-bit LFS in VMware Workstation.

I have a separate partition /dev/sda3 formatted as ext2 for /boot.

I am upto Chapter 9.3 Rebooting the system.

When I reboot the system the GRUB menu appears with the LFS menu entry but when I press enter on the keyboard I get the error
Code:

error: invalid file name 'vmlinuz-3.10.10-lfs-7.4'. Press any key to continue
The /boot line of my fstab file is

/dev/sda3 /boot ext2 defaults,noatime 0 2

My /boot/grub/grub.cfg file is

Code:

#Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,3)
menuentry "GNU/Linux, Linux 3.10.10-lfs-7.4" {
        linux  vmlinuz-3.10.10-lfs-7.4 root=/dev/sda3 ro
}

Please help me fix this.

Firerat 09-28-2013 01:53 AM

/boot/vmlinuz-3.10.10-lfs-7.4 root=/dev/sda3

spiky0011 09-28-2013 02:14 AM

Hi retux

You say your boot partition is /dev/sda3 yet your grub.cfg shows root looking in partition /dev/sda3

My boot partition is /dev/sda1
grub.cfg
set root='(hd0,6)'
echo 'Loading Planet-Spike'
linux /boot/vmlinuz-3.2-lfs-7.0 root=/dev/sda6 ro quiet splash

It has the root on sda6

retux 09-28-2013 04:43 AM

1 Attachment(s)
My root partition is /dev/sda5.

I changed my grub.cfg to
Code:

set root=(hd0,5)
menuentry "GNU/Linux, Linux 3.10.10-lfs-7.4" {
        linux  /boot/vmlinuz-3.10.10-lfs-7.4 root=/dev/sda5 ro
}


Now when I select LFS in the grub menu I get a error
Code:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
and the Caps Lock and Scroll Lock lights on my keyboard start flashing.

I have attached a screenshot of the LFS boot with the error.

Please help me fix this.

spiky0011 09-28-2013 05:00 AM

Hi

I dont use vm at all so cant help with that,
If and when I get caught like you have, I enter from grub prompt comands,

Did you also note the part in chapter 8.3.1 the note about
"Device Drivers --->
Generic Driver Options --->
Maintain a devtmpfs filesystem to mount at /dev"
and set this?

retux 09-28-2013 05:42 AM

Yes I did set "Maintain a devtmpfs filesystem to mount at /dev" in Chapter 8.3.

I see there is a /boot directory on my / partition which looks the same as my /boot partition but doesn't have the grub subdirectory.

Is this normal ?

Firerat 09-28-2013 06:13 AM

your grub.cfg should be

Code:

set root=(hd0,5)
menuentry "GNU/Linux, Linux 3.10.10-lfs-7.4" {
        linux  vmlinuz-3.10.10-lfs-7.4 root=/dev/sda3 ro
}

http://www.linuxfromscratch.org/lfs/...er08/grub.html

before you do that, clean up the /boot dir on sda5 ( it should be empty as it is just a mountpoint )
then mount /dev/sda3 /boot
reinstall kernel
add grub.cfg
reinstall grub

that needs to be done while in the chroot

if you need help, while in the chroot
Code:

mount
ls /boot

post the output of the above

jimmy_page_89 09-28-2013 09:22 AM

It boots correctly, you have to mount your root partition.
Which filesystem are you using for your LFS root?
You have to enable it inside the configure of your kernel.
If in doubt, enable ext2, ext3 and ext4 in the Filesystem section.


All times are GMT -5. The time now is 02:45 AM.