Changing the "set root="hd0,msdos3' to msdo1 and no other change also
produced the grub rescue> prompt.  However that may be because my LFS build
along with all its /boot/grub/...  /etc/grub.d/... files are all contained
in sda3 per the LFS instructions.  

At the time the drive was initially prepared I didn't create a separate
100MB boot partition.  I just put Lubuntu in sda1 and the MBR pointed to it.
It was my expectation (perhaps erronesously) that after LFS was built in
sda3 and grub-install executed it would reset the MBR to point to sda3's
/boot/grub/...,kernel, etc and from that point forward the drive would boot
exclusively to LFS in sda3.   That has not been the case in my situation. 

For the sake of simplicity I'd like to keep the content of LFS's sda3
partition and Lubuntu's sda1 separate. The reason is that once LFS is
booting I no longer need the host OS or its partition, and the other is that
I believe the LFS documentation assumes they are separate.   It's helpful
for now if I can stay close to LFS documentation. 

Is it possible to configure the drive to boot to LFS (sda3) only without
putting LFS's kernel or other files into Lubuntu's sda1? Or can I
reconfigure the boot drive with a separate 100MB boot partition now and boot
only to LFS?   Basically do multi-boot and follow LFS grub instructions for
handling separate /boot partition?

Thanks,

Richard






-----Original Message-----
From: lfs-support [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Sunday, January 18, 2015 3:00 PM
To: [email protected]
Subject: lfs-support Digest, Vol 217, Issue 1

Send lfs-support mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.linuxfromscratch.org/listinfo/lfs-support
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of lfs-support digest..."


Today's Topics:

   1. Help:  LFS 7.6 Fail To Boot ([email protected])
   2. Re: Help:  LFS 7.6 Fail To Boot (Ken Moffat)


----------------------------------------------------------------------

Message: 1
Date: Sat, 17 Jan 2015 19:04:40 -0500
From: <[email protected]>
To: <[email protected]>
Subject: [lfs-support] Help:  LFS 7.6 Fail To Boot
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

First I want to say that LFS is a masterful piece of work.  I remain in awe
of the effort as I complete each chapter.

Unfortunately, when I got to Chapter 9.3 "shutdown -r now" LFS didn't boot.
Instead I get a grub rescue> prompt. 

 

Host System Info:

-          Dell Dimension 9200 Intel Quad Core Q6600 (~10 years old)

-          Host OS 64 bit Lubuntu 14.01

-          Partition Table msdos, not GPT

-          Boot files currently in host OS sda1 (not dedicated /boot
partition)

-          Lubuntu on sda1.  Swap sda5.

 

Target LFS:

-          64 bit only

-          On sda3, shares Swap (sda5)

 

Everything appeared to go well up to Chap. 8 - Making LFS System Bootable.
At kernel build I was

Careful to use "make defconfig" first and to select the two recommended
Generic Driver Option settings.

Examination of the saved .config file confirmed those settings.  Also
enabled most Kernel settings related

To SATA/PATA support. 

 

After executing grub-install and creating the modified grub.cfg for my
config I followed the remaining steps to restart.  I expected to see a login
prompt for LFS but instead get grub rescue prompt. 

 

I've examined the support-posts (particularly the recent Fail To Boot
thread), kernel options and Grub2 documentation but I still don't see what I
missed.  Best I can determine is that Grub doesn't see
vmlinuz-3.16.2-lfs-7.6 and or/necessary files on the LFS(sda3) partition to
begin initramfs.  When the "grub-install" command was issued it delivered a
successful response.  

 

Using a live "boot-repair" CD I can restore the boot loader to boot to the
Lubuntu host but I cannot manually boot to LFS(sda3) under any
circumstances.  The live CD shows sda3 flag is set to boot, but it doesn't
see files it expects on sda3 to begin booting. 

 

What could I have missed that prevents LFS 7.6 from booting?  I've
recompiled the kernel numerous times enabling more components but it hasn't
made any difference.  Also installed the grub2-beta from the errata page.
It installed fine and also delivered a successful message when grub-install
was issued, but it didn't solve the problem. 

 

I'm hoping it's an embarrassingly simple oversight, but it's one I haven't
been able to find. 

 

Thanks in advance.  Richard.

 

fstab: [manually typed here]

 

# file system                      mount-point                      type
options                                 dump                    fsck

#
order

/dev/sda3                           /
ext4                       defaults                               1
1

/dev/sda5                           swap
swap                     pri=1                                      0
0

proc                                       /proc
proc                       nosuid,noexec,nodev    0
0

sysfs                                      /sys
sysfs                      nosuid,noexec,nodev    0
0

devpts                                  /dev/pts
devpts                  gid=5, mode=620             0
0

tmpfs                                    /run
tmpfs                    defaults                               0
0

devtmpfs                            /dev
devtmpfs            devtmpfs mode=0755, nosuid   0              0

 

#End /etc/fstab

 

grub.cfg [manually typed here]

#Begin /boot/grub/grub.cfg

set default=0

set timeout=5

insmod part_msdos

insmod ext2

set root='hd0,msdos3'

menuentry "GNU/Linux, , Linux 3.16.2-lfs-7.6" {

linux   /boot/vmlinuz-3.16.2-lfs-7.6 root=/dev/sda3 ro

}

Using the live Boot-Repair CD to profile sda it showed the following info
about the host OS partition (sda1) and LFS partition (sda3).  This suggests
the LFS partition not ready to boot, as far as I can determine. 

 

=================== PARTITIONS & DISKS:========

sda1       : sda,     not-sepboot,     grubenv-ok        grub2,   grub-pc ,
update-grub,     64,          

with-boot,          is-os,     not--efi--part,   fstab-without-boot,
fstab-without-efi,            no-nt,   

no-winload,        no-recov-nor-hid,            no-bmgr,
notwinboot,       apt-get,                grub-install,        with--

usr,        fstab-without-usr,           not-sep-usr,       standard,
not-far,                /mnt/boot-sav/sda1.

 

sda3       : sda,     maybesepboot,                no-grubenv        nogrub,
no-docgrub,       no-update-grub,              

32,          no-boot,              no-os,   not--efi--part,
part-has-no-fstab,           part-has-no-fstab,           no-nt,   no-

winload,               no-recov-nor-hid,            no-bmgr,
notwinboot,       nopakmgr,          nogrubinstall,    no---usr,


part-has-no-fstab,           not-sep-usr,       standard,
not-far,                /mnt/boot-sav/sda3.

 

sda         : not-GPT,           BIOSboot-not-needed, has-no-EFIpart,
not-usb,               has-os, 2048 

sectors * 512 bytes

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/2015011
7/fd42cf46/attachment-0001.html>

------------------------------

Message: 2
Date: Sun, 18 Jan 2015 01:03:39 +0000
From: Ken Moffat <[email protected]>
To: LFS Support List <[email protected]>
Subject: Re: [lfs-support] Help:  LFS 7.6 Fail To Boot
Message-ID: <20150118010339.GA15376@milliways>
Content-Type: text/plain; charset=utf-8

On Sat, Jan 17, 2015 at 07:04:40PM -0500, [email protected] wrote:
> First I want to say that LFS is a masterful piece of work.  I remain 
> in awe of the effort as I complete each chapter.
> 
> Unfortunately, when I got to Chapter 9.3 "shutdown -r now" LFS didn't
boot.
> Instead I get a grub rescue> prompt. 
> 
[...]
> 
> -          Boot files currently in host OS sda1 (not dedicated /boot
> partition)
> 
> -          Lubuntu on sda1.  Swap sda5.
> 

 That shows that the following line in grub.cfg is your problem.
> 
> set root='hd0,msdos3'

 Note that this is not the same thing as the root= arguments appended to the
'linux' lines : those tell the kernel specified in that line where it should
find it's '/'.  This one is to tell grub where to look for kernels.  Try
setting it back to hd0,msdos1.

> 
> menuentry "GNU/Linux, , Linux 3.16.2-lfs-7.6" {
> 
> linux   /boot/vmlinuz-3.16.2-lfs-7.6 root=/dev/sda3 ro
> 

 And just to be clear, if grub's root is hd0,msdos1 then all of your kernels
need to be in the *lubuntu* /boot directory.  Before you fixed up grub.cfg
again, it could not find any kernel - that suggests you had correctly moved
the lfs kernel to lubuntu's /boot, or at least not put it in LFS's /boot, so
adding that stanza for LFS will hopefully be enough for grub to find it.

 Then, you will get to find out if your kernel's .config is adequate for
*your* hardware.

?en
--
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.


------------------------------

Subject: Digest Footer

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


------------------------------

End of lfs-support Digest, Vol 217, Issue 1
*******************************************

-- 
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