Kernel Installation issues, 11.2, section 10.3.1
Hi out there
It's exciting: I'm getting closer and closer. I've managed two installations, on ThinkPads X200 and X230, and each one works, except ... I've had to improvise (cheat?) by manually moving files into place to get it past GRUB. I'm still a little vague, but if I remember it correctly, I had to move the vmlinuz file out of the boot directory on my boot partition, and then the system would boot. But it was different the first time (X230), where I didn't actually have a 'boot' directory on my Boot Partition at all. Sorry to be imprecise. Clearly I'm making mistakes, and am probably lucky I could get the system up. HOWEVER, I think I'm zeroing in the problem. At the three 'cp' commands at the end of section 10.3.1 I got the error message "no such file or directory" and frankly I can't work out what's going on here. What's with the "arch" image? Yes, I'm using Archlinux as my host system, but the book doesn't know that! Apologies: I copied the terminal output but lost it. Duh. I'll save it next time, perhaps, unless someone can help me solve the issue first. Nothing else SEEMS to be going wrong. Once again, apologies for not reporting this properly. If I hear nothing, I'll make a bigger effort to save the output. Somehow, I've managed to **** up my root password on the host system, so don't have proper root access. But I'm getting so close, it's tantalising. Thanks for all the help you experts dish out for us aspirants :) Don Pedro |
Traditionally, kernels and initrds are kept in /boot/, so this is where bootloaders traditionally to look for them. However, when a separate filesystem is employed to keep these and other boot files, they are expected to be in its root in order for the mounted filesystem to show them in a /boot/ directory while they are normally mounted. The traditional solution for this is a symlink of the current directory of a /boot/ filesystem to a subdirectory named boot:
Code:
# ls -l /boot/boot |
Hi Mr Mazda
What you say doesn't immediately solve my problem, and it occurs to me I'd really better make myself clearer. I'll do some thinking and try again. Thank you for your response. |
Quote:
Quote:
Quote:
|
Thanks colorpurple
Again, I realise I should have provided more informative details, and I will; I made a pig's breakfast over this post. To exacerbate, 'other life' has taken over the last couple of days which is why I've not had time to replace my original. But briefly, my grub.cfg was correct (I think!) and exactly as you suggested. My partitioning set up, too, was correct I think, though I noted the recent debate about GPT rather then MBR. It was an MBR table, with a 256M ext4 boot partition, a generous swap, and an ext4 root partition. What I was confused about was getting the 'file or directory not found' for each of the three cp commands on page 10.3.1 and the truth is I didn't really understand those commands, nor why the first one had the term "arch" in it. More later, and thanks for the response. Back soon. |
The cp commands are done while still in the kernel build directory after doing "make modules_install".
"arch" is a directory in the kernel build directory. The new bzImage will be in arch/x86/boot of the kernel build directory regardless of whether it is a 64bit or 32bit kernel. |
A fuller report (Don Pedro)
LFS Installation (ThinkPad X200)
Partition Table = Master Boot Record /dev/sda1 = 268 MB Ext4 Bootable /dev/sda2 = Swap /dev/sdae = 16 GB Ext4 After LFS installation: /dev/sda1 /grub/fonts /i386-pc /locale grub.cfg ** grubenv vmlinuz-5.19.2-lfs-11.2 I moved the vmlinuz out of the grub directory, after which LFS booted fine. /dev/sda3 /boot/grub/grub.cfg * Note that the layouts of the two occurences of 'grub.cfg' differ. * # Begin /boot/grub/grub.cfg ** set default=0 set timeout=5 insmod ext2 set root=(ahci0,msdos1) menuentry "GNU/Linux, Linux 5.19.2-lfs-11.2" { linux /vmlinuz-5.19.2-lfs-11.2 root=/dev/sda3 ro } ** set default=0 set timeout=5 insmod ext2 set root=(ahci0,msdos1) menuentry "GNU/Linux, Linux 5.19.2-lfs-11.2" { linux /vmlinuz-5.19.2-lfs-11.2 root=/dev/sda3 ro } ====== The original question of my post was regard to page 10.3.1 of the 11-2 book. On each of the 3 'cp' commands, terminal output was 'no such file or directory'. I ignored that and pressed ahead, but wondered if doing so was the reason for the initial boot failure, and the grub anomalies. I did/do not understand these commands and hoped someone could explain them. In particular, what is 'arch/x86/boot/bzimage'? After 'shutdown -r now' booting started but LFS would not progress past the GRUB screen, so I rebooted from the Host System (Archlinux) and moved the vmlinuz file OUT of the grub directory on the boot partition, where I had found it. After that the new system booted fine. |
Thanks colorpurple for explaining the 'arch' item.
|
I'm going to recast aspects of this question as a New Thread. Sorry if I've been confusing.
|
Quote:
the placement of these files into the /boot directory is arbitrary, as technically they can be placed anywhere accessible to the boot loader (grub) as long as the boot loader is appropriately informed of their location |
Quote:
eta: also please post output of pwd when you get the cp error |
Quote:
if /dev/sda1 is not mounted to /boot when you run grub-install then the grub files will be installed to /boot on the root file system partition which would be /dev/sda3/boot if /dev/sda1 is mounted to /boot when you on run grub-install then the grub files will be installed to the root level of /dev/sda1 since the /boot directory is on /dev/sda3 partition but its contents reside on /dev/sda1 partition eta: Quote:
|
Based on this, it looks like at one point the boot partition was mounted to /boot/grub and not /boot and maybe at one point installed grub without the boot partition mounted /boot.
Quote:
|
I've since managed to disentangle this, and (having started 'from scratch'!! again) had a success, which boots fine = doesn't need 'tinkering' with. Thanks to everyone, I've learned a lot in this process.
The 'from scratch' thing isn't really a joke. I've gone back and restarted quite a few times, but by now have evolved a 'script' which works. |
All times are GMT -5. The time now is 03:25 PM. |