Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Wols Lists

On 17/04/2023 19:26, Walter Dnes wrote:

   Now that the (no)multilib problem in my latest update has been solved,
I have a somewhat minor complaint.  Can I get etc-update to skip certain
files?  My latest emerge world wanted to "update"...

1) /etc/hosts (1)
2) /etc/inittab (1)
3) /etc/mtab (1)
4) /etc/conf.d/consolefont (1)
5) /etc/conf.d/hwclock (1)
6) /etc/default/grub (1)
7) /etc/ssh/sshd_config (1)

...hosts is critical for networking.  consolefont allows me tp use the
true text console with a readable font, etc, etc.  I have my reasons
for making certain settings, and keeping them that way.

I had it want to update grub. Which would have utterly borked my system 
the moment I updated my kernel.


Okay, the problem is where you mix user and system config in the same 
file, but this would have deleted lvm and mdadm from my boot config, 
rendering any kernel unbootable. :-(


Like it tried to update postfix many moons ago and would have destroued 
my mail config ...


Surely there's some way of fixing this ...

Cheers,
Wol



Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Wols Lists

On 17/04/2023 23:36, Peter Humphrey wrote:

On Monday, 17 April 2023 21:41:09 BST Wols Lists wrote:

On 17/04/2023 17:52, Mark Knecht wrote:

Later on a Kubuntu update found Windows, updated the EFI
stuff on the Windows drive and then, I see this morning,
erased everything out of the Kubuntu EFI partition but
left the partition there.


I had a similar problem trying to install SUSE to dual boot a laptop. I
made the mistake of letting Windows wipe the disk and install itself,
with the result I was left with a tiny EFI partition. I couldn't install
linux because there was no room.

My latest attempt (when I get gentoo video working) will be to *add*
Windows to a working system.


Can you not just resize the partition?


Not any more :-)

But I don't tend to do that sort of thing. Which is why my main (linux 
only) machine has pretty much all the disk in one huge raid partition 
with lvm on top ...


Cheers,
Wol



Re: [gentoo-user] Finally got a SSD drive to put my OS on

2023-04-17 Thread Dale
Mark Knecht wrote:
>
>
> On Mon, Apr 17, 2023 at 2:41 AM Wols Lists  > wrote:
> >
> > On 17/04/2023 02:14, Dale wrote:
> > > My current install is over a decade old.  My /boot partition is about
> > > 375MBs.  I should have made it larger but at the time, I booted CD/DVD
> > > media when needed.  I didn't have USB sticks at the time.  This
> time, I
> > > plan to make some changes.  If I put Knoppix and/or Gentoo LiveGUI in
> > > /boot, it will be larger.  Much larger.  Mark's idea is best tho. 
> If I
> > > can get Grub to work and boot it.
> >
> > If you dd your boot partition across, you can copy it into a larger
> > partition on the new drive, and then just expand the filesystem.
> >
> > So changing partition sizes isn't a problem if you want to just copy
> > your system drive onto a new disk.
> >
> > Cheers,
> > Wol
>
> I'm not sure I'd use dd in this case. If he's moving from an HDD with
> a 4K block size and a 4K file system block size to an SDD with a 16K 
> physical block size he might want to consider changing the filesystem 
> block size to 16K which should help on the write amplification side.
>
> Maybe dd can do that but I wouldn't think so.
>
> And I don't know that formatting ext4 or some other FS to 16K 
> really helps the write amplification issue but it makes sense to
> me to match the file system blocks to the underlying flash
> block size. Real speed testing would be required to ensure reading
> 16K blocks doesn't slow him down though.
>
> Just a thought,
> Mark


I still haven't got around to partitioning the drive or anything so I'm
glad you mentioned the block size.  I need to try and remember that.  It
may detect it itself but may not.  I'd rather fix it now than wish I did
later on.  I assume that setting is in the man page. 

Thanks for that tidbit.  Now to remember it.  :/

Dale

:-)  :-) 

P. s.  It's garden time for folks around here.  I been busy the past few
days.  Tractor and tiller too.


Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Frank Steinmetzger
Am Mon, Apr 17, 2023 at 02:27:53PM -0700 schrieb Mark Knecht:

> ;-) (And shame on you for being 'a few months' behind on your updates) ;-)

It’s my NAS (basically my media library), which only runs every few months 
due to its server hardware’s high power draw.

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

My computer waits faster!


signature.asc
Description: PGP signature


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Peter Humphrey
On Monday, 17 April 2023 21:41:09 BST Wols Lists wrote:
> On 17/04/2023 17:52, Mark Knecht wrote:
> > Later on a Kubuntu update found Windows, updated the EFI
> > stuff on the Windows drive and then, I see this morning,
> > erased everything out of the Kubuntu EFI partition but
> > left the partition there.
> 
> I had a similar problem trying to install SUSE to dual boot a laptop. I
> made the mistake of letting Windows wipe the disk and install itself,
> with the result I was left with a tiny EFI partition. I couldn't install
> linux because there was no room.
> 
> My latest attempt (when I get gentoo video working) will be to *add*
> Windows to a working system.

Can you not just resize the partition?

-- 
Regards,
Peter.






Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Jude DaShiell
If that works and I were to use chattr +i it might be useful to make a
list of what's now immuteable so later adjustments could be made when
appropriate.


-- Jude  "There are four boxes to be used in
defense of liberty: soap, ballot, jury, and ammo. Please use in that
order." Ed Howdershelt 1940.

On Mon, 17 Apr 2023, Frank Steinmetzger wrote:

> Am Mon, Apr 17, 2023 at 12:28:01PM -0700 schrieb Mark Knecht:
> > On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes  wrote:
> > >
> > >   Now that the (no)multilib problem in my latest update has been solved,
> > > I have a somewhat minor complaint.  Can I get etc-update to skip certain
> > > files?  My latest emerge world wanted to "update"...
> > >
> > > 1) /etc/hosts (1)
> > > 2) /etc/inittab (1)
> > > 3) /etc/mtab (1)
> > > 4) /etc/conf.d/consolefont (1)
> > > 5) /etc/conf.d/hwclock (1)
> > > 6) /etc/default/grub (1)
> > > 7) /etc/ssh/sshd_config (1)
> > >
> > > ...hosts is critical for networking.  consolefont allows me tp use the
> > > true text console with a readable font, etc, etc.  I have my reasons
> > > for making certain settings, and keeping them that way.
> > >
> > In my experience with all distros I go outside the distro for this
> > sort of issue. Put a copy somewhere, white a little script that
> > does a diff on the files you feel are important enough and run
> > a cron job hourly that looks for any differences.
>
> Isn’t that exactly what etc-update does? IIRC (my last Gentoo update was a
> few months ago), I select one of the files, and it lets me view a diff in
> vim (configurable) of my old version and the new one from the update. Then I
> can either merge the two files right in vim, or elect to keep the new or old
> file entirely.
>
>



Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Jude DaShiell
My guess is gentoo includes the chattr utility.  Does emerge respect
chattr +i /etc/hosts?


-- 
Jude 
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo.
Please use in that order."
Ed Howdershelt 1940.

On Mon, 17 Apr 2023, Frank Steinmetzger wrote:

> Am Mon, Apr 17, 2023 at 12:28:01PM -0700 schrieb Mark Knecht:
> > On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes  wrote:
> > >
> > >   Now that the (no)multilib problem in my latest update has been solved,
> > > I have a somewhat minor complaint.  Can I get etc-update to skip certain
> > > files?  My latest emerge world wanted to "update"...
> > >
> > > 1) /etc/hosts (1)
> > > 2) /etc/inittab (1)
> > > 3) /etc/mtab (1)
> > > 4) /etc/conf.d/consolefont (1)
> > > 5) /etc/conf.d/hwclock (1)
> > > 6) /etc/default/grub (1)
> > > 7) /etc/ssh/sshd_config (1)
> > >
> > > ...hosts is critical for networking.  consolefont allows me tp use the
> > > true text console with a readable font, etc, etc.  I have my reasons
> > > for making certain settings, and keeping them that way.
> > >
> > In my experience with all distros I go outside the distro for this
> > sort of issue. Put a copy somewhere, white a little script that
> > does a diff on the files you feel are important enough and run
> > a cron job hourly that looks for any differences.
>
> Isn’t that exactly what etc-update does? IIRC (my last Gentoo update was a
> few months ago), I select one of the files, and it lets me view a diff in
> vim (configurable) of my old version and the new one from the update. Then I
> can either merge the two files right in vim, or elect to keep the new or old
> file entirely.
>
>



Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 2:08 PM Frank Steinmetzger  wrote:
>
> Am Mon, Apr 17, 2023 at 12:28:01PM -0700 schrieb Mark Knecht:
> 
> > In my experience with all distros I go outside the distro for this
> > sort of issue. Put a copy somewhere, white a little script that
> > does a diff on the files you feel are important enough and run
> > a cron job hourly that looks for any differences.
>
> Isn’t that exactly what etc-update does? IIRC (my last Gentoo update was a
> few months ago), I select one of the files, and it lets me view a diff in
> vim (configurable) of my old version and the new one from the update.
Then I
> can either merge the two files right in vim, or elect to keep the new or
old
> file entirely.
>

It might do most of that, if it's working. If no bugs have been introduced
since the last time you used it, if the user has their eyes open and
doesn't make a mistake.

I do not know if it has an option to keep a copy somewhere safe, and
again, I run multiple distros and like a solution that, for me, works on
all distros.

To each his own.

;-) (And shame on you for being 'a few months' behind on your updates) ;-)


Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Frank Steinmetzger
Am Mon, Apr 17, 2023 at 12:28:01PM -0700 schrieb Mark Knecht:
> On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes  wrote:
> >
> >   Now that the (no)multilib problem in my latest update has been solved,
> > I have a somewhat minor complaint.  Can I get etc-update to skip certain
> > files?  My latest emerge world wanted to "update"...
> >
> > 1) /etc/hosts (1)
> > 2) /etc/inittab (1)
> > 3) /etc/mtab (1)
> > 4) /etc/conf.d/consolefont (1)
> > 5) /etc/conf.d/hwclock (1)
> > 6) /etc/default/grub (1)
> > 7) /etc/ssh/sshd_config (1)
> >
> > ...hosts is critical for networking.  consolefont allows me tp use the
> > true text console with a readable font, etc, etc.  I have my reasons
> > for making certain settings, and keeping them that way.
> >
> In my experience with all distros I go outside the distro for this
> sort of issue. Put a copy somewhere, white a little script that
> does a diff on the files you feel are important enough and run
> a cron job hourly that looks for any differences.

Isn’t that exactly what etc-update does? IIRC (my last Gentoo update was a 
few months ago), I select one of the files, and it lets me view a diff in 
vim (configurable) of my old version and the new one from the update. Then I 
can either merge the two files right in vim, or elect to keep the new or old 
file entirely.

-- 
Grüße | Greetings | Qapla’
Please do not share anything from, with or about me on any social network.

“I want to be free!” said the string puppet and cut its strings.


signature.asc
Description: PGP signature


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Lee
Never mix Windows with real OS's if you can avoid it. I have separate
machine for Windows.

Lee 

On Mon, Apr 17, 2023, 1:41 PM Wols Lists  wrote:

> On 17/04/2023 17:52, Mark Knecht wrote:
> > Later on a Kubuntu update found Windows, updated the EFI
> > stuff on the Windows drive and then, I see this morning,
> > erased everything out of the Kubuntu EFI partition but
> > left the partition there.
>
> I had a similar problem trying to install SUSE to dual boot a laptop. I
> made the mistake of letting Windows wipe the disk and install itself,
> with the result I was left with a tiny EFI partition. I couldn't install
> linux because there was no room.
>
> My latest attempt (when I get gentoo video working) will be to *add*
> Windows to a working system.
>
> Cheers,
> Wol
>
>


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mitch D.
You can probably use a portage hook to do it. I haven't tested it, but
something along the lines of creating a file at
"/etc/portage/env/sys-boot/grub" which contains an implementation of the
"post_pkg_postinst()" function. Then, you can copy the logic from the
ebuild to determine whether the version number has changed. Realistically
though, I'd probably skip the conditional logic and let the hook run
grub-install every time.

Some ebuilds print rather important messages, and if you're updating
software regularly, there shouldn't be tons of messages in
/var/log/portage/elog/summary.log. At the very least, I would configure it
to email me a copy of the messages so that I can review them as soon as I
can.

On Mon, Apr 17, 2023 at 4:26 PM Dr Rainer Woitok 
wrote:

> Mitch,
>
> On Monday, 2023-04-17 08:15:51 -0400, you wrote:
>
> > I just took a quick glance at the ebuild, and it looks like it should
> print
> > a reminder ("Re-run grub-install to update installed boot code!") every
> > time you upgrade from an older version to a newer one, but it also looks
> > like the reminder gets skipped if you're re-emerging the same version.
> >
> >
> https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/grub/grub-2.06-r4.ebuild#n314
>
> Thankyou very much for this information.   But is there anyone out there
> who skims through  tons of SUCCESSFUL emerge log files  after every rou-
> tine upgrade?   Personally,  I only check the logs in case of build fai-
> lures or conflicts.
>
> By the way, I only see this message in the build logs for versions 2.06-
> r4 and 2.06-r6, but not in older logs.  So maybe that's a rather new ad-
> dition to the ebuild file?
>
> Since I do my routine upgrades  via a script anyway,  I now retrieve the
> name of the most recent  Grub build log  before I really  start "emerge"
> and after "emerge" finished,  and if the two names differ  and the newer
> file contains this "Re-run ..." message,  I now run  "grub-install" from
> within this script.  Problem solved.
>
> But I have the vague feeling there should be a more foolproof solution.
>
> Sincerely,
>   Rainer
>


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Wols Lists

On 17/04/2023 17:52, Mark Knecht wrote:

Later on a Kubuntu update found Windows, updated the EFI
stuff on the Windows drive and then, I see this morning,
erased everything out of the Kubuntu EFI partition but
left the partition there.


I had a similar problem trying to install SUSE to dual boot a laptop. I 
made the mistake of letting Windows wipe the disk and install itself, 
with the result I was left with a tiny EFI partition. I couldn't install 
linux because there was no room.


My latest attempt (when I get gentoo video working) will be to *add* 
Windows to a working system.


Cheers,
Wol



Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 12:40 PM Lee  wrote:
>
> Really, etc update has a facility for skipping whatever files you want.
>
> Lee

>> In my experience with all distros I go outside the distro for this
>> sort of issue. Put a copy somewhere, white a little script that
>> does a diff on the files you feel are important enough and run
>> a cron job hourly that looks for any differences.
>>
>> HTH,
>> Mark

>
Absolutely really. It's not only about whether that option works today
but whether it keeps working in the future, assuming it really works
at all.

There's also the case of the machine going down, a disk corrupting,
etc. and how long it takes to find the notebook where supposedly
we had the notes about how we set things up.

And what about other machines using other distros?

I'm only offering what I do. I personally wouldn't run the cron job
but for all my machines part of my backups is a big list of config
files kept elsewhere on the network so that I don't have to
reconstruct that sort of config stuff. Add to Walter's list other
things like NFS exports and for old people like me it's just
easier to be prepared.

Just my POV.


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Dr Rainer Woitok
Mitch,

On Monday, 2023-04-17 08:15:51 -0400, you wrote:

> I just took a quick glance at the ebuild, and it looks like it should print
> a reminder ("Re-run grub-install to update installed boot code!") every
> time you upgrade from an older version to a newer one, but it also looks
> like the reminder gets skipped if you're re-emerging the same version.
> 
> https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/grub/grub-2.06-r4.ebuild#n314

Thankyou very much for this information.   But is there anyone out there
who skims through  tons of SUCCESSFUL emerge log files  after every rou-
tine upgrade?   Personally,  I only check the logs in case of build fai-
lures or conflicts.

By the way, I only see this message in the build logs for versions 2.06-
r4 and 2.06-r6, but not in older logs.  So maybe that's a rather new ad-
dition to the ebuild file?

Since I do my routine upgrades  via a script anyway,  I now retrieve the
name of the most recent  Grub build log  before I really  start "emerge"
and after "emerge" finished,  and if the two names differ  and the newer
file contains this "Re-run ..." message,  I now run  "grub-install" from
within this script.  Problem solved.

But I have the vague feeling there should be a more foolproof solution.

Sincerely,
  Rainer



Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Michael
On Monday, 17 April 2023 20:28:01 BST Mark Knecht wrote:
> On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes  wrote:
> >   Now that the (no)multilib problem in my latest update has been solved,
> > 
> > I have a somewhat minor complaint.  Can I get etc-update to skip certain
> > files?  My latest emerge world wanted to "update"...
> > 
> > 1) /etc/hosts (1)
> > 2) /etc/inittab (1)
> > 3) /etc/mtab (1)
> > 4) /etc/conf.d/consolefont (1)
> > 5) /etc/conf.d/hwclock (1)
> > 6) /etc/default/grub (1)
> > 7) /etc/ssh/sshd_config (1)
> > 
> > ...hosts is critical for networking.  consolefont allows me tp use the
> > true text console with a readable font, etc, etc.  I have my reasons
> > for making certain settings, and keeping them that way.
> 
> In my experience with all distros I go outside the distro for this
> sort of issue. Put a copy somewhere, white a little script that
> does a diff on the files you feel are important enough and run
> a cron job hourly that looks for any differences.
> 
> HTH,
> Mark

The emerge specific solution is to set the list in your CONFIG_PROTECT 
variable in /etc/make.conf, as per the example provided here:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/EnvVar





Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Lee
Really, etc update has a facility for skipping whatever files you want.

Lee 

On Mon, Apr 17, 2023, 12:28 PM Mark Knecht  wrote:

>
>
> On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes 
> wrote:
> >
> >   Now that the (no)multilib problem in my latest update has been solved,
> > I have a somewhat minor complaint.  Can I get etc-update to skip certain
> > files?  My latest emerge world wanted to "update"...
> >
> > 1) /etc/hosts (1)
> > 2) /etc/inittab (1)
> > 3) /etc/mtab (1)
> > 4) /etc/conf.d/consolefont (1)
> > 5) /etc/conf.d/hwclock (1)
> > 6) /etc/default/grub (1)
> > 7) /etc/ssh/sshd_config (1)
> >
> > ...hosts is critical for networking.  consolefont allows me tp use the
> > true text console with a readable font, etc, etc.  I have my reasons
> > for making certain settings, and keeping them that way.
> >
> In my experience with all distros I go outside the distro for this
> sort of issue. Put a copy somewhere, white a little script that
> does a diff on the files you feel are important enough and run
> a cron job hourly that looks for any differences.
>
> HTH,
> Mark
>


Re: [gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 11:26 AM Walter Dnes  wrote:
>
>   Now that the (no)multilib problem in my latest update has been solved,
> I have a somewhat minor complaint.  Can I get etc-update to skip certain
> files?  My latest emerge world wanted to "update"...
>
> 1) /etc/hosts (1)
> 2) /etc/inittab (1)
> 3) /etc/mtab (1)
> 4) /etc/conf.d/consolefont (1)
> 5) /etc/conf.d/hwclock (1)
> 6) /etc/default/grub (1)
> 7) /etc/ssh/sshd_config (1)
>
> ...hosts is critical for networking.  consolefont allows me tp use the
> true text console with a readable font, etc, etc.  I have my reasons
> for making certain settings, and keeping them that way.
>
In my experience with all distros I go outside the distro for this
sort of issue. Put a copy somewhere, white a little script that
does a diff on the files you feel are important enough and run
a cron job hourly that looks for any differences.

HTH,
Mark


[gentoo-user] Can some config files be automatically protected from etc-update?

2023-04-17 Thread Walter Dnes
  Now that the (no)multilib problem in my latest update has been solved,
I have a somewhat minor complaint.  Can I get etc-update to skip certain
files?  My latest emerge world wanted to "update"...

1) /etc/hosts (1)
2) /etc/inittab (1)
3) /etc/mtab (1)
4) /etc/conf.d/consolefont (1)
5) /etc/conf.d/hwclock (1)
6) /etc/default/grub (1)
7) /etc/ssh/sshd_config (1)

...hosts is critical for networking.  consolefont allows me tp use the
true text console with a readable font, etc, etc.  I have my reasons
for making certain settings, and keeping them that way.

-- 
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars.  Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer.  All
those moments, will be lost in time like tears in rain... time to die.



Re: [gentoo-user] Finally got a SSD drive to put my OS on

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 2:41 AM Wols Lists  wrote:
>
> On 17/04/2023 02:14, Dale wrote:
> > My current install is over a decade old.  My /boot partition is about
> > 375MBs.  I should have made it larger but at the time, I booted CD/DVD
> > media when needed.  I didn't have USB sticks at the time.  This time, I
> > plan to make some changes.  If I put Knoppix and/or Gentoo LiveGUI in
> > /boot, it will be larger.  Much larger.  Mark's idea is best tho.  If I
> > can get Grub to work and boot it.
>
> If you dd your boot partition across, you can copy it into a larger
> partition on the new drive, and then just expand the filesystem.
>
> So changing partition sizes isn't a problem if you want to just copy
> your system drive onto a new disk.
>
> Cheers,
> Wol

I'm not sure I'd use dd in this case. If he's moving from an HDD with
a 4K block size and a 4K file system block size to an SDD with a 16K
physical block size he might want to consider changing the filesystem
block size to 16K which should help on the write amplification side.

Maybe dd can do that but I wouldn't think so.

And I don't know that formatting ext4 or some other FS to 16K
really helps the write amplification issue but it makes sense to
me to match the file system blocks to the underlying flash
block size. Real speed testing would be required to ensure reading
16K blocks doesn't slow him down though.

Just a thought,
Mark


[gentoo-user] [SOLVED] Can I safely switch (no)multilib profile???

2023-04-17 Thread Walter Dnes
On Mon, Apr 17, 2023 at 09:48:09AM -0400, Walter Dnes wrote

>   The update is running.  I'll check the emerge results after I get back
> from some shopping and fish-n-chips.

  To answer the question in the subject... YES!  emerge update ran
smoothly, including etc-update and depclean.  I'm still baffled as to
how/why my profile got changed in the first place.  I've got another
minor complaint, but that'll be a separate thread.

-- 
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars.  Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer.  All
those moments, will be lost in time like tears in rain... time to die.



Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 10:11 AM Michael  wrote:
>
> On Monday, 17 April 2023 17:52:25 BST Mark Knecht wrote:
>
> > One thing I haven't decoded is why Windows is  and Kubuntu is 0003.
>
> See below ...
>
>
> > I now better understand Mitch D.'s point that the pointers to which OS
to
> > boot are not in a disk file, like the old grub configuration, but
rather in
> > Flash memory on the motherboard. I suppose the numbering is just the
> > luck of the draw, or that 0001 and 0002 were used at one time and no
longer
> > present, but that's just a guess.
>
> Exactly the latter, they are no longer present.  I copy kernel images
manually
> to /boot/EFI/Gentoo/ and run 'efibootmgr --create' to add entries to the
UEFI
> boot menu with my choice of labels.  They are added being numbered
> incrementally.  If I remove some of the older menu entries, their
> corresponding numbers are also removed and become available for any new
> bootable .efi images I may add in the future.
>
> In addition, if I boot with any USB drives attached, the UEFI firmware
will
> scan such devices and add any bootable images to the UEFI boot menu
stored in
> NVRAM, by numbering such images incrementally.  This will further
increase the
> numbers of boot menu entries, which once the USB devices are removed their
> entry number will become vacant and available to be reallocated.
>

Ah, so in that case if I booted the original Kubuntu install from a USB
stick
then possibly an entry was used doing that. I also used memtest86 prior
to the Kubuntu install so possibly that was an entry.

Anyway, it makes more sense now.

If you go back into the archives for this list, list December I asked a
question
"Duel boot - How to verify boot loader updates?". That was maybe a month
or two after I noticed the Kubuntu ESP being changed and the Windows
ESP being mounted instead. I just never finished the thread what with the
holidays and visitors, etc.

I appreciate the help so thanks and maybe the thread will help someone
else one of these days.

Cheers,
Mark


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Michael
On Monday, 17 April 2023 17:52:25 BST Mark Knecht wrote:

> One thing I haven't decoded is why Windows is  and Kubuntu is 0003.

See below ...


> I now better understand Mitch D.'s point that the pointers to which OS to
> boot are not in a disk file, like the old grub configuration, but rather in
> Flash memory on the motherboard. I suppose the numbering is just the
> luck of the draw, or that 0001 and 0002 were used at one time and no longer
> present, but that's just a guess.

Exactly the latter, they are no longer present.  I copy kernel images manually 
to /boot/EFI/Gentoo/ and run 'efibootmgr --create' to add entries to the UEFI 
boot menu with my choice of labels.  They are added being numbered 
incrementally.  If I remove some of the older menu entries, their 
corresponding numbers are also removed and become available for any new 
bootable .efi images I may add in the future.

In addition, if I boot with any USB drives attached, the UEFI firmware will 
scan such devices and add any bootable images to the UEFI boot menu stored in 
NVRAM, by numbering such images incrementally.  This will further increase the 
numbers of boot menu entries, which once the USB devices are removed their 
entry number will become vacant and available to be reallocated.






Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 8:18 AM Michael  wrote:
>
> On Monday, 17 April 2023 14:31:08 BST Mark Knecht wrote:

> > 2) The more complicated view with GUIDs and such:
> >
> > mark@science2:~$ efibootmgr -v
> > BootCurrent: 0003
> > Timeout: 1 seconds
> > BootOrder: 0003,
> > Boot* Windows Boot Manager
> >  HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF
> >
I\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.x...B.C.D.O.B.J.E.C.T.=.{.9.d.
> > e.a.8.6.2.c.-.5.c.d.d.-.4
> > .e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}
> > Boot0003* ubuntu
> >
 HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUN
> > TU \SHIMX64.EFI)
> > mark@science2:~$
>
> This shows the efibootmgr is using the first disk and boots the Windows
> BOOTMGFW.EFI, or Ubuntu's shimX64.efi from there.

OK, that part makes perfect sense and the files are there.

Additionally the GUID in each HD(...) entry matches the GUID on
/dev/nvme0n1p1
which has a type "EFI system partition" in fdisk. Good so far.



> > The 'problem' with this setup is that all of the grub/efibootmgr stuff
> > is on both drives
>
> Are you sure?

Yes, there is a directory but that directory, which did have a Kubuntu
boot image in the past, is now empty.

HISTORY. I bought the computer with Win 10 installed and a
second empty M.2 drive. To install Kubuntu I switched BIOS to
boot from that drive, installed Kubuntu which populated the EFI
directory with all of the stuff you're showing me. I did not know about
the efibootmgr at the time as this was my fist new MB in about 8
years.

Early on I went to Windows by changing BIOS because, for what
ever reason the Kubuntu install didn't see the Windows disk. I
am assuming that was probably me completely disabling it in
BIOS but I don't remember the details.

Later on a Kubuntu update found Windows, updated the EFI
stuff on the Windows drive and then, I see this morning,
erased everything out of the Kubuntu EFI partition but
left the partition there.

i
>
> This is where the ESP is mounted, but you'll find /boot directory is on
your /
> dev/nvme1n1p3 block device, along with your kernels, initrd images and
> vimlinuz symlinks.
>

Correct.

ESP? EFI System Partition possibly?


> Your GRUB EFI bootable image is on /dev/nvme0n1p1, under
/boot/efi/EFI/ubuntu/
>
> > tmpfs   3.2G   64K  3.2G   1% /run/user/1000
> > mark@science2:~$
>
> I would think Ubuntu installed GRUB on nvme0n1p1 ESP, which it detected by
> scanning your disks.  If your nvme0n1p1 fails and has to be removed, you
will
> need to create a new ESP somewhere on the ubuntu disk and then you can
> reinstall GRUB after you reboot with a LiveUSB, or while still running
ubuntu.

Understood. Thanks.

One thing I haven't decoded is why Windows is  and Kubuntu is 0003.

I now better understand Mitch D.'s point that the pointers to which OS to
boot are not in a disk file, like the old grub configuration, but rather in
Flash memory on the motherboard. I suppose the numbering is just the
luck of the draw, or that 0001 and 0002 were used at one time and no longer
present, but that's just a guess.

For anyone following along or reading later, there's an easily read web page
on things you can do with efibootmgr located here:

https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples

Also, the Windows app similar to efibootmgr (but untested by me) is
possibly called bootcfg.exe

- Mark


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mitch D.
Grub and Windows Boot Manager are bootloaders, and they can be "on" a
drive, but efibootmgr is not. Your EFI is part of your motherboard, and
efibootmgr is just a tool that helps you configure your EFI. The actual EFI
configuration is stored on your motherboard, not on either drive. For what
it's worth, I vaguely remember a similar tool available in Windows. If you
change your configuration in efibootmgr, you would see the changes in the
Windows tool, too, because you only have one EFI (which both tools can
access).

On Mon, Apr 17, 2023, 09:32 Mark Knecht  wrote:

>
>
> On Mon, Apr 17, 2023 at 4:57 AM Michael  wrote:
> >
> > On Monday, 17 April 2023 00:29:49 BST Arsen Arsenović wrote:
> > > Wol  writes:
> > > > On 16/04/2023 22:30, Mitch D. wrote:
> > > >> Wol, can you elaborate on why you think Grub is deprecated on EFI
> > > >> systems?
> > > >
> > > > Because EFI is a boot manager?
> > >
> > > That is not the case any more than the classic IBM PC boot procedure
> is.
> > > There is technical capability for UEFI firmware to act in such a
> manner,
> > > but, in practice, this is not at all the case.
> > >
> > > The technical capability comes from the fact that boot entities have a
> > > lil' bit of metadata attached to them.
> >
> > The ability of UEFI to boot linux kernels, as long as they are built
> with the
> > EFI boot stub enabled, may render 3rd party boot managers and their boot
> > loaders redundant.  However, as already mentioned below, the flexibility
> and
> > customisability of GRUB and other boot manager exceeds any UEFI firmware
> I've
> > come across.
> >
> >
> > > > Why chain-load boot managers?
> > >
> > > In theory, EFI implementations should provide boot
> > > managers. Unfortunately, in practice these boot managers are often so
> > > poor as to be useless. The worst I've personally encountered is on
> > > Gigabyte's Hybrid EFI, which provides you with no boot options
> > > whatsoever, beyond choosing the boot device (hard disk vs. optical
> disc,
> > > for instance). I've heard of others that are just as bad. For this
> > > reason, a good EFI boot manager—either standalone or as part of a boot
> > > loader—is a practical necessity for multi-booting on an EFI
> > > computer. That's where rEFInd comes into play.
> > >   - https://rodsbooks.com/refind/
> >
> > I've stopped using GRUB and have been using the UEFI firmware to boot
> directly
> > Gentoo for more than 10 years now.  Given I have also flashed some of the
> > MoBos' chipset with new UEFI firmware a dozen times or more, I have not
> > experienced any MoBo failures as yet.  Also, the ESP partition formatted
> with
> > FAT32 has remained quite resilient too.  No loss of data or fs
> corruption yet
> > (keeps fingers crossed and checks backups).
> >
> > My particular systems setup and use case suits this approach, but I
> appreciate
> > people who multiboot daily/frequently, or need to boot LiveISOs off the
> disk
> > may find GRUB and friends to be a more suitable solution.
> >
> >
>
> My needs are quite simple but efibootmgr, set up by the Kubuntu install
> on a separate M.2 from the Windows install the machine came with, works
> for
> me. I always start the day in Kubuntu, then reboot to Windows if I'm
> working
> on music:
>
> 1) The simple view of the two installations:
>
> mark@science2:~$ efibootmgr
> BootCurrent: 0003
> Timeout: 1 seconds
> BootOrder: 0003,
> Boot* Windows Boot Manager
> Boot0003* ubuntu
> mark@science2:~$
>
> 2) The more complicated view with GUIDs and such:
>
> mark@science2:~$ efibootmgr -v
> BootCurrent: 0003
> Timeout: 1 seconds
> BootOrder: 0003,
> Boot* Windows Boot Manager
>  HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF
>
> I\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4
> .e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}
> Boot0003* ubuntu
>  HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUNTU
> \SHIMX64.EFI)
> mark@science2:~$
>
> 3) To get to Windows I can choose it in the OS screen if I'm sitting there
> but the most reliable way for me to get from Kubuntu to Windows is to just
> tell the system to go to Windows at the next boot using a batch file in
> Kubuntu:
>
> mark@science2:~$ cat bin/RebootWindows
> sudo efibootmgr -n 
> reboot
> mark@science2:~$
>
> The 'problem' with this setup is that all of the grub/efibootmgr stuff
> is on both drives and I'm never sure which drive is being used at
> which time as I have Kubuntu on nvme1 and Windows boot
> manager on nvme0 which I'm never comfortable with but the
> Ubuntu stuff figured it out so I don't argue. Pity me if I ever have to
> do a reinstall.
>
> mark@science2:~$ df -h
> Filesystem  Size  Used Avail Use% Mounted on
> tmpfs   3.2G  3.7M  3.2G   1% /run
> /dev/nvme1n1p3  916G  622G  248G  72% /
> tmpfs16G   66M   16G   1% /dev/shm
> tmpfs   5.0M  4.0K  5.0M   1% 

Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Michael
On Monday, 17 April 2023 14:31:08 BST Mark Knecht wrote:

> My needs are quite simple but efibootmgr, set up by the Kubuntu install
> on a separate M.2 from the Windows install the machine came with, works for
> me. I always start the day in Kubuntu, then reboot to Windows if I'm working
> on music:
> 
> 1) The simple view of the two installations:
> 
> mark@science2:~$ efibootmgr
> BootCurrent: 0003
> Timeout: 1 seconds
> BootOrder: 0003,
> Boot* Windows Boot Manager
> Boot0003* ubuntu
> mark@science2:~$
> 
> 2) The more complicated view with GUIDs and such:
> 
> mark@science2:~$ efibootmgr -v
> BootCurrent: 0003
> Timeout: 1 seconds
> BootOrder: 0003,
> Boot* Windows Boot Manager
>  HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF
> I\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.x...B.C.D.O.B.J.E.C.T.=.{.9.d.
> e.a.8.6.2.c.-.5.c.d.d.-.4
> .e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}
> Boot0003* ubuntu
>  HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUN
> TU \SHIMX64.EFI)
> mark@science2:~$

This shows the efibootmgr is using the first disk and boots the Windows 
BOOTMGFW.EFI, or Ubuntu's shimX64.efi from there.


> 3) To get to Windows I can choose it in the OS screen if I'm sitting there
> but the most reliable way for me to get from Kubuntu to Windows is to just
> tell the system to go to Windows at the next boot using a batch file in
> Kubuntu:
> 
> mark@science2:~$ cat bin/RebootWindows
> sudo efibootmgr -n 
> reboot
> mark@science2:~$
> 
> The 'problem' with this setup is that all of the grub/efibootmgr stuff
> is on both drives 

Are you sure?


> and I'm never sure which drive is being used at
> which time as I have Kubuntu on nvme1 and Windows boot
> manager on nvme0 which I'm never comfortable with but the
> Ubuntu stuff figured it out so I don't argue. Pity me if I ever have to
> do a reinstall.
> 
> mark@science2:~$ df -h
> Filesystem  Size  Used Avail Use% Mounted on
> tmpfs   3.2G  3.7M  3.2G   1% /run
> /dev/nvme1n1p3  916G  622G  248G  72% /
> tmpfs16G   66M   16G   1% /dev/shm
> tmpfs   5.0M  4.0K  5.0M   1% /run/lock
> /dev/nvme0n1p1   96M   32M   65M  33% /boot/efi

This is where the ESP is mounted, but you'll find /boot directory is on your /
dev/nvme1n1p3 block device, along with your kernels, initrd images and 
vimlinuz symlinks.

Your GRUB EFI bootable image is on /dev/nvme0n1p1, under /boot/efi/EFI/ubuntu/

> tmpfs   3.2G   64K  3.2G   1% /run/user/1000
> mark@science2:~$

I would think Ubuntu installed GRUB on nvme0n1p1 ESP, which it detected by 
scanning your disks.  If your nvme0n1p1 fails and has to be removed, you will 
need to create a new ESP somewhere on the ubuntu disk and then you can 
reinstall GRUB after you reboot with a LiveUSB, or while still running ubuntu.






Re: [gentoo-user] Can I safely switch (no)multilib profile???

2023-04-17 Thread Walter Dnes
On Sun, Apr 16, 2023 at 06:56:35PM -0400, Walter Dnes wrote
> 
>   ***I CAN'T EVEN BUILD THE CURRENT GLIBC ON MY MACHINE***.  It looks
> more and more like somewhere somehow my profile selection got changed
> after my previous glibc update.
> 
>   I regularly back up incrementally to two large standalone backup
> drives.  Every so often, I tarball my $HOME dir and push the copy over
> to my "hot backup" machine.  I intend to do that tonight, followed by
> selecting profile...
> 
> [15]  default/linux/amd64/17.1/no-multilib (stable)
> 
> ...and then running...
> 
> emerge --changed-use --deep --update @world

  Having backed up, I selected the no-multilib (stable) profile.  I
checked out how glibc would build...


[x8940][root][~] emerge -pv1 glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 3.33 s.

[ebuild U  ] sys-libs/glibc-2.36-r7:2.2::gentoo [2.36-r5:2.2::gentoo] 
USE="multiarch ssp (static-libs) -audit -caps (-cet) -compile-locales (-crypt) 
(-custom-cflags) -doc -gd -hash-sysv-compat -headers-only (-multilib*) 
-multilib-bootstrap -nscd -perl% -profile (-selinux) (-stack-realign*) -suid 
-systemd -systemtap -test (-vanilla)" 0 KiB


  The forced (multilib) flag has changed to forced (-multilib).  The
other USE flag change is (-stack-realign).

emerge -pv --changed-use --deep --update @world

calls for glibc to to be updated (-multilib*) and (-stack-realign*)

  In addition, the profile change appears to cause 5 rebuilds...
sys-libs/ncurses (-stack-realign*)
sys-apps/sandbox (-32*)
virtual/libcrypt (-32*)
sys-libs/libxcrypt (-32*)
sys-devel/gcc (-multilib*)

  The update is running.  I'll check the emerge results after I get back
from some shopping and fish-n-chips.

-- 
I've seen things, you people wouldn't believe; Gopher, Netscape with
frames, the first Browser Wars.  Searching for pages with AltaVista,
pop-up windows self-replicating, trying to uninstall RealPlayer.  All
those moments, will be lost in time like tears in rain... time to die.



Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mark Knecht
On Mon, Apr 17, 2023 at 4:57 AM Michael  wrote:
>
> On Monday, 17 April 2023 00:29:49 BST Arsen Arsenović wrote:
> > Wol  writes:
> > > On 16/04/2023 22:30, Mitch D. wrote:
> > >> Wol, can you elaborate on why you think Grub is deprecated on EFI
> > >> systems?
> > >
> > > Because EFI is a boot manager?
> >
> > That is not the case any more than the classic IBM PC boot procedure is.
> > There is technical capability for UEFI firmware to act in such a manner,
> > but, in practice, this is not at all the case.
> >
> > The technical capability comes from the fact that boot entities have a
> > lil' bit of metadata attached to them.
>
> The ability of UEFI to boot linux kernels, as long as they are built with
the
> EFI boot stub enabled, may render 3rd party boot managers and their boot
> loaders redundant.  However, as already mentioned below, the flexibility
and
> customisability of GRUB and other boot manager exceeds any UEFI firmware
I've
> come across.
>
>
> > > Why chain-load boot managers?
> >
> > In theory, EFI implementations should provide boot
> > managers. Unfortunately, in practice these boot managers are often so
> > poor as to be useless. The worst I've personally encountered is on
> > Gigabyte's Hybrid EFI, which provides you with no boot options
> > whatsoever, beyond choosing the boot device (hard disk vs. optical disc,
> > for instance). I've heard of others that are just as bad. For this
> > reason, a good EFI boot manager—either standalone or as part of a boot
> > loader—is a practical necessity for multi-booting on an EFI
> > computer. That's where rEFInd comes into play.
> >   - https://rodsbooks.com/refind/
>
> I've stopped using GRUB and have been using the UEFI firmware to boot
directly
> Gentoo for more than 10 years now.  Given I have also flashed some of the
> MoBos' chipset with new UEFI firmware a dozen times or more, I have not
> experienced any MoBo failures as yet.  Also, the ESP partition formatted
with
> FAT32 has remained quite resilient too.  No loss of data or fs corruption
yet
> (keeps fingers crossed and checks backups).
>
> My particular systems setup and use case suits this approach, but I
appreciate
> people who multiboot daily/frequently, or need to boot LiveISOs off the
disk
> may find GRUB and friends to be a more suitable solution.
>
>

My needs are quite simple but efibootmgr, set up by the Kubuntu install
on a separate M.2 from the Windows install the machine came with, works for
me. I always start the day in Kubuntu, then reboot to Windows if I'm working
on music:

1) The simple view of the two installations:

mark@science2:~$ efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,
Boot* Windows Boot Manager
Boot0003* ubuntu
mark@science2:~$

2) The more complicated view with GUIDs and such:

mark@science2:~$ efibootmgr -v
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0003,
Boot* Windows Boot Manager
 HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EF
I\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4
.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}
Boot0003* ubuntu
 HD(1,GPT,2052c843-0057-494a-a749-e8ec3676514a,0x800,0x32000)/File(\EFI\UBUNTU
\SHIMX64.EFI)
mark@science2:~$

3) To get to Windows I can choose it in the OS screen if I'm sitting there
but the most reliable way for me to get from Kubuntu to Windows is to just
tell the system to go to Windows at the next boot using a batch file in
Kubuntu:

mark@science2:~$ cat bin/RebootWindows
sudo efibootmgr -n 
reboot
mark@science2:~$

The 'problem' with this setup is that all of the grub/efibootmgr stuff
is on both drives and I'm never sure which drive is being used at
which time as I have Kubuntu on nvme1 and Windows boot
manager on nvme0 which I'm never comfortable with but the
Ubuntu stuff figured it out so I don't argue. Pity me if I ever have to
do a reinstall.

mark@science2:~$ df -h
Filesystem  Size  Used Avail Use% Mounted on
tmpfs   3.2G  3.7M  3.2G   1% /run
/dev/nvme1n1p3  916G  622G  248G  72% /
tmpfs16G   66M   16G   1% /dev/shm
tmpfs   5.0M  4.0K  5.0M   1% /run/lock
/dev/nvme0n1p1   96M   32M   65M  33% /boot/efi
tmpfs   3.2G   64K  3.2G   1% /run/user/1000
mark@science2:~$


[gentoo-user] Re: updating /boot directory EFI

2023-04-17 Thread Nikos Chantziaras

On 16/04/2023 21:44, Wol wrote:

On 16/04/2023 15:22, Nikos Chantziaras wrote:

On 16/04/2023 07:01, the...@sys-concept.com wrote:

After installing new kernel how to update /boot EFI directory?


You don't need to. You only need to do that when you want to reinstall 
GRUB itself into the EFI partition. The kernel is installed in /boot, 
not into the EFI partition.



And if grub isn't installed?


It is.


Basically you have a choice. Install grub into EFI, and use grub as your 
boot manager. Or ditch grub (the recommended route) and use EFI as your 
boot manager.


EFI can't boot my ISO images (sysrescuecd and memtest86+.)




Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Mitch D.
I just took a quick glance at the ebuild, and it looks like it should print
a reminder ("Re-run grub-install to update installed boot code!") every
time you upgrade from an older version to a newer one, but it also looks
like the reminder gets skipped if you're re-emerging the same version.

https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/grub/grub-2.06-r4.ebuild#n314

I don't see a USE flag to automate the process after all, so I must have
been misremembering. It might be difficult to automate, and perhaps more
importantly, it's not always reversible. Installing grub to an MBR will
clobber anything else that was previously there. Another challenge is for
portage to reliably identify the target device. For example, using software
RAID, grub-install probably needs to be run multiple times, once targeting
each physical disk. Overall, I think it's possible, but it's not trivial,
and it would probably need a config file.

Should you worry? Probably not. Version 2.04 was stabilized in January
2020, so the version number has only increased once since then, maybe twice
if you originally installed Gentoo in 2019. The rest of the upgrades were
ebuild revisions. Since ebuild revisions can include patches and have other
important corrections, I would rerun grub-install if I were you, but I
wouldn't say it's urgent.

On Mon, Apr 17, 2023, 05:55 Dr Rainer Woitok 
wrote:

> Mitch,
>
> On Sunday, 2023-04-16 07:16:09 -0400, you wrote:
>
> > ...
> > "grub-install" copies Grub from your Gentoo installation to your hard
> drive
> > / SSD / etc. This has nothing to do with your kernel, it only involves
> > Grub. Rerun this command when you emerge updates to Grub.
>
> Is this really necessary to be done manually?  Shouldn't this be the job
> of the Grub ebuild?   My gut feeling is that having to look out for Grub
> updates and then to manually run "grub-install" every time is not really
> Gentoo-like ...
>
> To be honest,  I've run this  command once during  my initial Gentoo in-
> stall three and a half years back, but never since.  And according to my
> logs I've since then upgraded Grub ten times  and rebuilt it four times.
> Should I worry?  Can this be automated?
>
> > ...
> > NOTE: if I remember correctly, there are USE flags that can be enabled to
> > automatically run grub-install and grub-mkconfig when updates are
> installed
> > for Grub and for kernels, respectively.
>
> Checking the USE flags  for Grub and Portage  I didn't find anything for
> automatically running "grub-install".  Where else to look?
>
> Sincerely,
>   Rainer
>


Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Michael
On Monday, 17 April 2023 00:29:49 BST Arsen Arsenović wrote:
> Wol  writes:
> > On 16/04/2023 22:30, Mitch D. wrote:
> >> Wol, can you elaborate on why you think Grub is deprecated on EFI
> >> systems?
> > 
> > Because EFI is a boot manager?
> 
> That is not the case any more than the classic IBM PC boot procedure is.
> There is technical capability for UEFI firmware to act in such a manner,
> but, in practice, this is not at all the case.
> 
> The technical capability comes from the fact that boot entities have a
> lil' bit of metadata attached to them.

The ability of UEFI to boot linux kernels, as long as they are built with the 
EFI boot stub enabled, may render 3rd party boot managers and their boot 
loaders redundant.  However, as already mentioned below, the flexibility and 
customisability of GRUB and other boot manager exceeds any UEFI firmware I've 
come across.


> > Why chain-load boot managers?
> 
> In theory, EFI implementations should provide boot
> managers. Unfortunately, in practice these boot managers are often so
> poor as to be useless. The worst I've personally encountered is on
> Gigabyte's Hybrid EFI, which provides you with no boot options
> whatsoever, beyond choosing the boot device (hard disk vs. optical disc,
> for instance). I've heard of others that are just as bad. For this
> reason, a good EFI boot manager—either standalone or as part of a boot
> loader—is a practical necessity for multi-booting on an EFI
> computer. That's where rEFInd comes into play.
>   - https://rodsbooks.com/refind/

I've stopped using GRUB and have been using the UEFI firmware to boot directly 
Gentoo for more than 10 years now.  Given I have also flashed some of the 
MoBos' chipset with new UEFI firmware a dozen times or more, I have not 
experienced any MoBo failures as yet.  Also, the ESP partition formatted with 
FAT32 has remained quite resilient too.  No loss of data or fs corruption yet 
(keeps fingers crossed and checks backups).

My particular systems setup and use case suits this approach, but I appreciate 
people who multiboot daily/frequently, or need to boot LiveISOs off the disk 
may find GRUB and friends to be a more suitable solution.





Re: [gentoo-user] Can I safely switch (no)multilib profile???

2023-04-17 Thread netfab
Le 17/04/23 à 12:06, Dr Rainer Woitok a tapoté :
> Walter's problems triggered me  to check what profile was selected on
> my own rig:
> 
># eselect profile show
>Current /etc/portage/make.profile symlink:
>  default/linux/amd64/17.1/desktop
># eselect profile list
>!!! Error: Failed to get a list of valid profiles
>exiting
>#
> 
> Anybody having an explanation?  What to check?
> 

Is the following file readable ?

> $ ls -l $(portageq get_repo_path / gentoo)/profiles/profiles.desc





Re: [gentoo-user] Can I safely switch (no)multilib profile???

2023-04-17 Thread Dr Rainer Woitok
Greetings,

On Sunday, 2023-04-16 18:56:35 -0400, Walter Dnes wrote:

> On Sun, Apr 16, 2023 at 01:29:46AM -0400, Walter Dnes wrote
> >   When I installed Gentoo on my desktop PC, I could've sworn that I
> > selected...
> > 
> > [15]  default/linux/amd64/17.1/no-multilib (stable)
> > 
> > ...as the profile.  ***THINGS HAVE BEEN WORKING FINE FOR A COUPLE OF
> > YEARS.***

Walter's problems triggered me  to check what profile was selected on my
own rig:

   # eselect profile show
   Current /etc/portage/make.profile symlink:
 default/linux/amd64/17.1/desktop
   # eselect profile list
   !!! Error: Failed to get a list of valid profiles
   exiting
   #

Anybody having an explanation?  What to check?

Any pointers welcome ...

Sincerely,
  Rainer



Re: [gentoo-user] updating /boot directory EFI

2023-04-17 Thread Dr Rainer Woitok
Mitch,

On Sunday, 2023-04-16 07:16:09 -0400, you wrote:

> ...
> "grub-install" copies Grub from your Gentoo installation to your hard drive
> / SSD / etc. This has nothing to do with your kernel, it only involves
> Grub. Rerun this command when you emerge updates to Grub.

Is this really necessary to be done manually?  Shouldn't this be the job
of the Grub ebuild?   My gut feeling is that having to look out for Grub
updates and then to manually run "grub-install" every time is not really
Gentoo-like ...

To be honest,  I've run this  command once during  my initial Gentoo in-
stall three and a half years back, but never since.  And according to my
logs I've since then upgraded Grub ten times  and rebuilt it four times.
Should I worry?  Can this be automated?

> ...
> NOTE: if I remember correctly, there are USE flags that can be enabled to
> automatically run grub-install and grub-mkconfig when updates are installed
> for Grub and for kernels, respectively.

Checking the USE flags  for Grub and Portage  I didn't find anything for
automatically running "grub-install".  Where else to look?

Sincerely,
  Rainer



Re: [gentoo-user] Finally got a SSD drive to put my OS on

2023-04-17 Thread Wols Lists

On 17/04/2023 02:14, Dale wrote:

My current install is over a decade old.  My /boot partition is about
375MBs.  I should have made it larger but at the time, I booted CD/DVD
media when needed.  I didn't have USB sticks at the time.  This time, I
plan to make some changes.  If I put Knoppix and/or Gentoo LiveGUI in
/boot, it will be larger.  Much larger.  Mark's idea is best tho.  If I
can get Grub to work and boot it.


If you dd your boot partition across, you can copy it into a larger 
partition on the new drive, and then just expand the filesystem.


So changing partition sizes isn't a problem if you want to just copy 
your system drive onto a new disk.


Cheers,
Wol