On Mon, Dec 21, 2020 at 11:21:17PM -0600, Brian Hagen wrote:
> Hello:
> 
>     I got all the through LFS 9.1 without a hitch, got ready to boot
> into the new system, and ... boot failure. Here is what I have:
> 

Only commenting on part of this -

> bootup screen:
> 
> GNU GRUB version 2.04
> 
> *GNU/Linux, Linux 5.5.3-lfs-9.1
> 
> 1) When I select the entry to start the GRUB loader, it reads:
> 
> ===================================
> 
> error: no such partition.
> 

Odd, grub has been installed on the drive, if it can't find the
kernel it will report something like 'no such file', and the root=
gets passed to the kernel.

Googling for this message suggests that you have altered the
partition layout since grub was installed, and that the only way to
recover is to use a rescue disk.

> <NL>
> 
> press any key to continue...
> 
> ===================================
> 
> 2) selecting 'e' to edit the command line presents this:
> 
> =================================
> 
> setparams 'GNU/Linux, Linux 5.5.3-lfs-9.1'
> 
> <NL>
> 
> linux /boot/vmlinuz-5-5-3-lfs-9.1 root=/dev/sda2 ro
> 

You told grub to pass sda2 to the kernel, but from what you say
below that should have been sda1.

> =================================
> 
> When I use a rescue disk, fdisk /dev/sda appears as:
> 
> /dev/sda1 Linux
> 
> /dev/sda2 extended
> 
> /dev/sda5 Linux swap
> 

Any linux system can only be on sda1 if those are the only
partitions.

Unless you have spare space on the disk, that is an unusual
partitioning scheme - on dos-style partitions you can have up to 4
(primary) partitions.  That was found to not be enough, so 'extended
partitions' were invented.  If a partition is 'extended' it can
contain one or more other partitions (so normally an extended
partition will contain at least two other partitions, or a partition
plus unpartitioned space).

That implies that you should change the root= entry in grub to
/dev/sda1.  But since grub doesn't like the currnet setup, that is
not going to be helpful at this point.

> ====================
> 
> fsck /dev/sda1: "/dev/sda1 has unsupported features(s): metadata_csum
> 
> fsck /dev/sda2: "attempt to read block from filesystem resulted in short
> read while trying to open /dev/sda2
> 

Let me guess - your recovery disk's e2fsck is older than what you
used to create the filesystem on /dev/sda1 and there are features it
doesn't understand.

For sda2 - you cannot fsck partitions, only filesystems.  That is an
extended partition so it does not have a filesystem, instead it
contains a partition and that (sda5) is a swap partition so it too
does not have a filesystem.


> ===================
> 
> Does this mean that it was a mistake to start with a /dev/sda that had
> an extended partition? If so, maybe it will be necessary to reformat
> /dev/sda without one. The previous swap partition was /dev/sda5.
> 
> I don't know where anything went wrong. Should I have selected a
> different partition for installing during the LFS GRUB process? At this
> point, unless I can figure out how to get the new system to boot into
> LFS, I will have to reinstall the host OS and start all over. Even then,
> how to prevent the very last stage from going wrong again.
> 
> So close to success ...
> 
> Brian
> 

There is nothing wrong with using extended partitions.  But it is
generally better to keep the host system around until LFS has been
successfully booted.  In particular, it lets you chroot to the new
system if there are problems such as an insufficient kernel config
(missing drivers or missing filesystems, or for wifi missing
firmware).

Also, if you intend to _use_ the LFS system then there will come a
time when you want to replace it with a newer one so in general
people need at least two partitions for systems, as well as
(perhaps) partitions for /boot and /home (/home can be shared across
multiple LFS versions, sharing it with distro where the UID differs
is a lot harder).

ĸen
-- 
(The Balancing Monks) use small brass weights, none of them bigger
than a fist. They work. Well, obviously they work. The world has not
tipped up yet.             -- The Thief Of Time
-- 
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

Reply via email to