Linux from scratch - Can't boot in.

xypher

New Member
Joined
Nov 10, 2019
Messages
3
Reaction score
0
Credits
0
Hello guys, its the first time I'm trying to install linux from scratch following the official guide.

I've done the installation process without any errors but I can't see to boot in the system. When compiling the kernel i get these 3 odd lines:

Code:
c
awk: arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape s
equence `\:' is not a known regexp operator
awk: arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=arch/x86/lib/x
86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a
known regexp operator


In file included from arch/x86/kernel/head64.c:35:
In function 'sanitize_boot_params',
   inlined from 'copy_bootdata' at arch/x86/kernel/head64.c:391:2:
./arch/x86/include/asm/bootparam_utils.h:40:3: warning: 'memset' offset
[197, 448] from the object at 'boot_params' is out of the bounds of re
ferenced subobject 'ext_ramdisk_image' with type 'unsigned int' at offs
et 192 [-Warray-bounds]
  40 |   memset(&boot_params->ext_ramdisk_image, 0,
     |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41 |          (char *)&boot_params->efi_info -
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42 |    (char *)&boot_params->ext_ramdisk_image);
     |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/bootparam_utils.h:43:3: warning: 'memset' offset
[493, 497] from the object at 'boot_params' is out of the bounds of re
ferenced subobject 'kbd_status' with type 'unsigned char' at offset 491
[-Warray-bounds]
  43 |   memset(&boot_params->kbd_status, 0,
     |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  44 |          (char *)&boot_params->hdr -
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  45 |          (char *)&boot_params->kbd_status);
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Could this be the reason my system can't boot? If so, what can i do to fix it? I would appreciate some help, thanks.
 


G'day xypher, and Welcome to linux.org

Your first time with Linux, and you have chosen Arch Linux.......you are a brave man !....definite learning curve there !

Someone with experience in that particular distro will along soon(ish)

Have fun !
 
Ouch :confused: - beyond my paygrade, but G'day @xypher and welcome to linux.org, as my fellow Aussie has just said.

"Soon" might be hopeful but likely next 24.

We have a pretty good "think tank" we are building up, and some such as @JasKinasis , @JulienCC and a few others might be of assistance. By my mentioning them, they will be made aware.

LFS is on my To Do list for next year, so I will watch with interest.

Good Luck!

Chris Turner
wizardfromoz
 
@xypher - From what I can see - those are just warnings from the compiler, NOT error messages. If any of them were errors - the kernel would fail to build.

So your inability to get your system to boot is definitely NOT related to those compiler warnings. It is more likely to be some other configuration, or installation/deployment related problem.

But it's been many years since I attempted a Linux From Scratch installation - so I don't know what to suggest offhand.

All I can say for definite is:
There's absolutely nothing in your post that gives any clue to the reason for the failure.
 
Hi,

I agree with @JasKinasis, this is not related. The warnings are caused by a trick from the devs but its not going to break anything (unless someone adds a fields in the boot params struct between ext ramdisk img and efi info, or between kbd_status and hdr).

You should focus on the "I can't see to boot in the system" problem. What is happening, which part of the boot process fails, what is displayed ?
 
Thanks for your replies.

So I assume the kernel has built succesfully then.. maybe its a misconfiguration in the grub/boot settings? When i try to do "shutdow -r now" my virtual machine turns off, turns back on and i get a message of "Guru meditation" and the screen goes black. I'm using Virtualbox.

My disk layout is as it follows:
Code:
Disk /dev/ram0: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 8 MiB, 8388608 bytes, 16384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 1.99 GiB, 2111905792 bytes, 4124816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
Disk model: VBOX HARDDISK   
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: dos
Disk identifier: 0x3c5dc0aa

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1          2048  2000895  1998848  976M 82 Linux swap / Solaris
/dev/sda2       2000896 16777215 14776320    7G 83 Linux

And the grub.cfg that i have configured is:
Code:
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd0,2)

menuentry "GNU/Linux, Linux 5.2.8-lfs-9.0" {
        linux   /boot/vmlinuz-5.2.8-lfs-9.0 root=/dev/sda2 ro
}
EOF

From what i have understand reading and watching some tutorials, the first "set root=(hd0,2)" points at the partition where the kernel resides. In my case it will be /dev/sda2, hence hd0,2. The second root points at the boot entry, which in my case is the same partition as my root file system so its /dev/sda2.

Am I doing this wrong?

Thanks for your patience.
 
Update - Sorry guys, since this error occured I tried to install the part 6 again, it didn't work and abandoned it.

I've been searching for this guru mediatation error and it seems like it's something to do with virtualbox itself and the solution i found is to reducing the amount of RAM (i reduced the core counts too) assinged to the the virtual machine. Good thing, my machine turned on and i got into the boot screen, after selecting my boot partition my kernel starts loading and I get the next error message:


Code:
kernel panic unable to mount root fs on unknown-block(0 0)

I've been searching and it seems something do with updating initramfs so right now I'm booting my VM with a live cd and trying to install and update the initramfs.

If someone has knowledge about this error and could guide me throught the process the help would be greatly appreciated.

Thanks.
 
It could be due to a problem with initramfs but it could also be a problem with you grub command.
There is no "initrd" in your grub config to tell which memory image to use. Are you sure this is good ?

 

Members online


Top