Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Michael Shell
On Thu, 25 May 2017 10:52:28 -0600
Alan Feuerbacher  wrote:

> Grub, which loads vmlinuz-4.9.9-lfs-8.0 
> rEFInd, which loads grub, which loads vmlinuz-4.9.9-lfs-8.0 
> Each of the two methods results in the same kernel startup messages and 
> then a hang.


I would try booting directly to a root shell using grub:

https://askubuntu.com/questions/15284/how-to-boot-to-root-shell-when-grub-recovery-menu-fails-to-load-a-shell

linux init=/bin/sh

This way, you should be able to isolate kernel/keyboard problems from
system setup problems.


  Cheers,

  Mike Shell

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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Ken Moffat
On Thu, May 25, 2017 at 12:30:56PM -0600, Alan Feuerbacher wrote:
> On 5/25/2017 12:24 PM, Kuba wrote:
> > On Thu, 25 May 2017 12:19:53 -0600, Alan Feuerbacher
> >  wrote:

First, may I suggest that sendmail is probably not a mail server
which many people want to use.  It used to be horrendous to
configure.  I run postfix, which provides /usr/sbin/sendmail.

Just mentioning that in case it is something in sendmail that is
hanging.

> > > 
> > > I would do that if the system were up and running. But as I said, it
> > > hangs up at the login prompt.
> > 
> > How can you be sure it hangs? Maybe, as I said, it's just the keyboard?
> 
> The computer itself quits working -- I have to turn the power switch off and
> on to reboot to the host system.
> 

1. My thought process on trying to debug this

With traditional sysvinit, the kernel has invoked init and that has
gone into your chosen runlevel (probably runlevel 3?).  I suggest
that you begin by looking at the bootscript for sendmail, to see if
it starts multiple programs.  If it does, try adding messages
between them.

Alternatively, if sendmail really is running ok then the problem
would be with the *next* script (ordered by the SNN symlink
numbers).  But if that next script begins to execute, I would expect
it to report something.  So this sounds to me as if sendmail is not
completing.

If you have enabled MagicSysRQ in your kernel, and your keyboard has
a SysRq key (possibly on PrtScr - labels may differ slightly), you
can probably force a reboot.  For my desktops I think I use AltGr
e(right Alt) and PrintScreen - hit the magic key combination for your
keyboard, followed by s (sync), wait briefly, then use the magic key
combination followed by b (boot) or, at the end of the session o
(off).  These will do unclean shutdowns, so next boot will fsck, but
the Sync will update logs, particularly the system log and maybe the
mail log, boot log (boot log tends to be not very informative).

If you didn't enable that in your kernel config, wait a few minutes
so that the logs have hopefully sync'd.

2. Recommendations, now you know how I've got them:

As a first stage, from the host look at the LFS logs to see if there
is anything useful.  If there isn't, as root chmod 644
/mnt/lfs/etc/rc.d/init.d/sendmail so that you can read and edit it
but it will not automatically run.

If you are able to boot without sendmail, you should have a working
keyboard on several ttys : from one of those, root can try starting
sendmail, or just stepping through the invocation(s) in that
bootscript [ i.e. run commands directly ].

Alternatively, and if you have NOT booted this system in LFS before
you added the extra packages, perhaps you did not build the
(correct) keyboard driver (usb and PS/2 might be different, I'm not
sure).

ĸen
-- 
I live in a city. I know sparrows from starlings.  After that
everything is a duck as far as I'm concerned.  -- Monstrous Regiment
-- 
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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Alan Feuerbacher

On 5/25/2017 12:24 PM, Kuba wrote:

On Thu, 25 May 2017 12:19:53 -0600, Alan Feuerbacher
 wrote:

Try plugging in a thumb drive and see if any messages appear. Be sure
to crank up the logging level tho.


I would do that if the system were up and running. But as I said, it
hangs up at the login prompt.


How can you be sure it hangs? Maybe, as I said, it's just the keyboard?


The computer itself quits working -- I have to turn the power switch off 
and on to reboot to the host system.



Also, I believe you can change the logging level in the kernel config or
parameters.


How do I do that? A "make menuconfig" thing? Do you know what to configure?

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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Kuba
On Thu, 25 May 2017 12:19:53 -0600, Alan Feuerbacher
 wrote:
>> > Try plugging in a thumb drive and see if any messages appear. Be sure
>> > to crank up the logging level tho.
> 
> I would do that if the system were up and running. But as I said, it
> hangs up at the login prompt.

How can you be sure it hangs? Maybe, as I said, it's just the keyboard?
Also, I believe you can change the logging level in the kernel config or
parameters.

> Perhaps there's a way to check apart from a running system? Maybe in
> the chroot build environment?

I'm thinking about a kernel issue, so no.

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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Alan Feuerbacher

On 5/25/2017 11:59 AM, Kuba wrote:

On Thu, 25 May 2017 11:51:51 -0600, Alan Feuerbacher



Keyboard is USB.

How would I test if the USB subsystem works?


Try plugging in a thumb drive and see if any messages appear. Be sure
to crank up the logging level tho.


I would do that if the system were up and running. But as I said, it 
hangs up at the login prompt.


Perhaps there's a way to check apart from a running system? Maybe in the 
chroot build environment?


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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Kuba
On Thu, 25 May 2017 11:51:51 -0600, Alan Feuerbacher
 wrote:
> This is NOT systemd, but the regular old LFS system. However, I had
> booting issues with a systemd LFS several weeks ago, but I never could
> get past the boot issues. Hence, my latest attempt with non-systemd.

Oh, I thought it was because of some earlier messages mentioning it.

> Keyboard is USB.
> 
> How would I test if the USB subsystem works?

Try plugging in a thumb drive and see if any messages appear. Be sure
to crank up the logging level tho.

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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Alan Feuerbacher

On 5/25/2017 11:41 AM, Kuba wrote:

On Thu, 25 May 2017 10:52:28 -0600, Alan Feuerbacher
 wrote:

LFS seems to boot up to the "komodo login:" prompt, and then hangs.
Every kernel message shows [ OK ] on the right side of the screen. The
last is for "Starting sendmail". The NIC seems to come alive.


It seems to be a common issue with systemd, possibly while booting by
EFI. Is the keyboard you are using USB or PS/2? Maybe the USB subsystem
in the kernel just doesn't work? Try using a PS/2 keyboard, they're
great for debugging. Apart from that I'm out of ideas since I'm using
the good ol' sysvinit.


This is NOT systemd, but the regular old LFS system. However, I had 
booting issues with a systemd LFS several weeks ago, but I never could 
get past the boot issues. Hence, my latest attempt with non-systemd.


Keyboard is USB.

How would I test if the USB subsystem works?

My new ASUS TUF MB has no PS/2 input. I have a PS/2 keyboard, but I'd 
have to use a PS/2 to USB adapter, which defeats the purpose.


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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Kuba
On Thu, 25 May 2017 10:52:28 -0600, Alan Feuerbacher
 wrote:
> LFS seems to boot up to the "komodo login:" prompt, and then hangs.
> Every kernel message shows [ OK ] on the right side of the screen. The
> last is for "Starting sendmail". The NIC seems to come alive.

It seems to be a common issue with systemd, possibly while booting by
EFI. Is the keyboard you are using USB or PS/2? Maybe the USB subsystem
in the kernel just doesn't work? Try using a PS/2 keyboard, they're
great for debugging. Apart from that I'm out of ideas since I'm using
the good ol' sysvinit.

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


[lfs-support] Booting from EFI Hints

2017-05-25 Thread Alan Feuerbacher
Since yesterday, I installed quite a bit more BLFS software, plus the 
rEFInd boot manager from RodsBooks. Sendmail is now installed.


LFS seems to boot up to the "komodo login:" prompt, and then hangs. 
Every kernel message shows [ OK ] on the right side of the screen. The 
last is for "Starting sendmail". The NIC seems to come alive.


So at this point, I can boot using two methods:

Grub, which loads vmlinuz-4.9.9-lfs-8.0

rEFInd, which loads grub, which loads vmlinuz-4.9.9-lfs-8.0

Each of the two methods results in the same kernel startup messages and 
then a hang.


It's as if something is wrong with the vmlinuz image.

I tried the EFI stub loader method but probably didn't do it properly.

Ideas?

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


Re: [lfs-support] Booting from EFI Hints

2017-05-25 Thread Alan Feuerbacher

On 5/23/2017 4:43 PM, Ken Moffat wrote:
> On Tue, May 23, 2017 at 02:40:03PM -0600, Alan Feuerbacher wrote:
>>
>> However, I'm getting conceptually stuck at how to boot with my EFI
>> motherboard (Asus TUF Mark 1), using the lfs-uefi.txt hint mentioned 
in the

>> LFS book, ch. 8.4.1.

SNIP

>> Two sticking points:
>>
>> 1. I assume that with my present setup, I should use /dev/sdd rather 
than
>> /dev/sda, because I DON'T want to change the Fedora boot stuff. 
Rather, I
>> want to be able to boot directly from the LFS disk. Ultimately, I 
want to

>> use a boot manage like RodsBooks' rEFTnd (which I successfully installed
>> on /dev/sdb). And if I remove all disks, but /dev/sdd, I want to boot
>> directly from that.
>
> I think you are correct.  The hint probably assumes one drive.

So far, I've gone with the assumption to install to /dev/sdd, apparently 
successfully. But see below. Also, I have five disks installed, all 
running and all with different Linuxes in various states, so I have to 
be very careful keeping track of which disk is which.


>> 2. Do I use the LFS book's instructions on partitioning a strictly 
MBR boot

>> setup, or make GPT partitions? See the information and discussion below.
>
> I think you have to use GPT partitions for UEFI.

That's what I've done now.

>> Here is my first cut at /etc/fstab for systemd on /dev/sdc:
>> # file system  mount-point  type options dump  fsck
>> #  order
>>
>> /dev/sdc4 /ext4defaults1 1
>> /dev/sdc3 /bootext4defaults1 2
>> /dev/sdc1 /boot/efivfatdefaults0 2
>> /dev/sdc5 /opt ext4defaults1 2
>> /dev/sdc6 /homeext4defaults1 2
>> /dev/sdc2 swap swappri=1   0 0
>
> I think that looks reasonable.

Ok, here is the new one, after converting to GPT using gdisk:

/dev/sdd4 /ext4defaults1 1
/dev/sdd1 /boot/efivfatdefaults0 1
/dev/sdd3 /bootext4defaults1 2
efivarfs  /sys/firmware/efi/efivars  efivarfs  defaults  01
/dev/sdd5 /opt ext4defaults1 2
/dev/sdd6 /homeext4defaults1 2
/dev/sdd2 swap swappri=1   0 0


> Personally, I long-ago stopped giving /opt its own filesystem:  if
> '/' is big enough, I can rename directories in /opt for testing a
> newer version.

Perhaps this can be included in the discussion of partitioning schemes 
in the LFS book.


>> Question: has anyone on the LFS staff besides the authors (Dan 
McGhee, Kevin

>> M. Buckley) gone through all this? I'm happy to be a guinea pig,
>> because I'm learning a lot.
>
> LOL.  The phrase "staff" used to be used in BLFS - but who is paying
> us ?

Payment is perhaps the satisfaction of a job well done.

I suppose I could have reverted to my Long Island upbringing and said 
"Youse LFS guys".


> I don't know for certain, but I suspect most of the editors
> have been able to disable UEFI on new machines.  My personal opinion
> of UEFI is still "There be dragons."

That's for sure!

On this new machine of mine, I've disabled Secure Boot (had to remove a 
Key) but I'm using UEFI boot, since disabling it means enabling the old 
CSM Legacy boot in the Bios.


> I suspect I might have to learn more about it for my next machine.

I don't think we will have much choice, given that the industry is going 
that way.


I'm thinking that in the long term, I might try installing LFS with 
Secure Boot, ala the material in RodsBooks. The lfs-uefi.txt hint 
mentions this as a good resource.


> No timescale for that, I started using gimp-2.9 on my photo-editing
> machine and discovered it was underpowered (2.9 seemed to only use 1
> core, and the xcf files are a lot bigger) - but meanwhile I'm using
> 2.8 on my development machine and that is ok.  So for me there is no
> rush to get my first ryzen.

Well I had no choice, since my old Windows machine died, and I 
repurposed the old Linux machine for Windows. Meanwhile I bought new 
hardware for Linux, since I'm dumping Windows ASAP.


> I don't think Dan or Kevin have posted on the lists recently, so you
> are probably somewhat on your own.

Ok.

> Being a guinea pig can be fun,
> but less so if hardware gets damaged.  So please think carefully
> about what you are doing at each step (but I imagine the worst thing
> is likely to be a trashed partition, which you can recreate from a
> working system such as fedora).

Already been there. Grub trashed my Fedora boot partition when I used it 
wrongly first time around.



Apparently I messed up sending the above yesterday, so here it is again. 
Sorry if it's a duplicate.


Alan

--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscr