Discussion:
[gentoo-user] OFF TOPIC Need Ubuntu network help
(too old to reply)
Dale
2023-10-16 08:00:01 UTC
Permalink
Howdy,

I finally got through with my backup restore.  I had shutdown the NAS
box with Ubuntu on it since I was done with it.  I wanted to do some
updates and check some other stuff, still learning how Ubuntu works, so
I rebooted it.  I didn't hook up the drives with my backups on them
since I don't need them to update and such.  The network not only
doesn't come up, it is just plain dead.  The LEDs on the card are out,
the router shows no connection either, not even as inactive.  I did a
LOT of searching.  Found others with similar problems but nothing
helped.  I found one thread that was recent and exactly my problem.  It
appears that after some attempts to figure it out, the guru trying to
help ran out of ideas.  I'll post a link below.  [1]  It's kinda hard to
post info since I have no way to get it from the NAS box to my main rig
since the network isn't working.  That said, when I run lshw -C network,
it shows it as being disabled.  It looks just like the thread linked below.

Since this is a built in network port and there is a history of issues
with those things with me, I installed a PCIe network card.  It shows up
the same way, disabled.  I rebooted the router just in case.  I also
checked the BIOS to be sure it was enabled there, some glitch or
something could have disabled it.  It shows up as enabled.  I checked
the cable but then I thought of a way to rule out hardware.  I booted a
Knoppix system that I have on the Ventoy USB stick.  I still love that
thing.  :-D  The network came up and worked just fine without me doing a
single thing.  I tried another image, can't recall which, and the
network worked in it too.  I then said to heck with it, pulled out a
spare hard drive and put it in place of the current drive with Ubuntu on
it.  I then tried to install Debian.  Guess what, the network doesn't
work with it either.  So, boot from USB image, network works.  Boot from
a hard drive, network dead. 

Since the Ubuntu forums are no help, searching didn't help, my last
resort is to ask here, on a Gentoo forum.  :/  I figure there may be a
few people here that use Ubuntu on some system and are familiar with
this.  Given it works on Knoppix and such, it has to be something
related to Ubuntu and I guess Debian as well.  I downloaded both those
images a while back.  My first instinct, the updates broke something. 
What's odd, it doesn't work with the USB Debian/Ubuntu images either and
it worked fine before when I installed from it. 

Anyone here have ideas?  Keep in mind, that thing uses systemd.  I
thought I hated that before.  I truly hate that thing now.  Trying to
figure out how to restart something is like pulling teeth with no pain
meds.  Heck, I have to google just to find out what the name of the
service is because most make no sense.  Still, I'd like to get it
working.  If not, the 770T may end up with Gentoo yet.

[1]  https://ubuntuforums.org/showthread.php?t=2483647

Thanks.

Dale

:-)  :-) 
Wols Lists
2023-10-16 08:10:02 UTC
Permalink
Post by Dale
Anyone here have ideas?  Keep in mind, that thing uses systemd.  I
thought I hated that before.  I truly hate that thing now.  Trying to
figure out how to restart something is like pulling teeth with no pain
meds.
systemctl restart servicename?

I like systemd, but given my battles with other stuff, I feel your pain.
Having had to WRITE a service file, though, oh I'm so glad I wasn't
messing with SystemV or stuff like that!

Just be warned - I feel about apt stuff just like you feel about systemd ...


But anyways. Does your hard disk kernel have the appropriate module for
the network card loaded? I can't remember the name of the systemd
networking service, but did you "systemctl enable" it?

Oh, and I think it fires up DHCP by default so you don;'t need to enable
any of that stuff.

Hopefully those tips will get you somewhere - this is what I remember
from enabling systemd on gentoo...

Cheers,
Wol
Dale
2023-10-16 08:30:01 UTC
Permalink
Post by Wols Lists
Post by Dale
Anyone here have ideas?  Keep in mind, that thing uses systemd.  I
thought I hated that before.  I truly hate that thing now.  Trying to
figure out how to restart something is like pulling teeth with no
pain meds.
systemctl restart servicename?
I like systemd, but given my battles with other stuff, I feel your
pain. Having had to WRITE a service file, though, oh I'm so glad I
wasn't messing with SystemV or stuff like that!
Just be warned - I feel about apt stuff just like you feel about systemd ...
But anyways. Does your hard disk kernel have the appropriate module
for the network card loaded? I can't remember the name of the systemd
networking service, but did you "systemctl enable" it?
Oh, and I think it fires up DHCP by default so you don;'t need to
enable any of that stuff.
Hopefully those tips will get you somewhere - this is what I remember
from enabling systemd on gentoo...
Cheers,
Wol
I tried to restart a couple things I found during my searches but most
of them no longer exist.  It seems they change names pretty often.  I've
tried to find anything that looks like network to restart but I can't
tell what is what.  I found out it has netplan installed.  I tried a few
things with it but thing is, since it shows as disabled, there's no
device to restart or even start to begin with. 

I looked, the modules are loaded.  I checked both cards and they are
there.  I used lspci -k to get the module names and then lsmod and grep
to see if they listed as loaded.

To be honest, the network has worked fine ever since the install.  Heck,
for a while, the NAS box didn't even have a monitor or keyboard.  I just
power it up, wait a little while, ssh in from my main rig.  From there I
could do anything I needed to.  This time, I had to drag out the monitor
and keyboard to see what is going on. 

I'm kinda stuck.  Since it doesn't work when booting the USB install
image, I can't even just reinstall and start over.  This is plenty odd. 

Dale

:-)  :-)
Michael
2023-10-16 10:30:01 UTC
Permalink
Well, you're probably gonna have to spam us some more info.
On the working knoppix boot, spam lspci showing what driver is loaded. then
spam it on ubuntu to verify if it's loaded there as well.
dmesg for the relevant parts on both would also help.
I'd make sure ubuntu has linux-firmware installed, could simply be failing
if it's missing.
ifconfig could show if it is loaded and just doesn't have an ip assigned, if
the mac address says 00:00:00:00:00 that'd be a different problem.
[snip ...]

From what I recall Ubuntu has been chopping & changing its network scripts on
a regular basis. So in the first instance check what you're running on this
system:

systemctl status systemd-networkd

or

systemctl status NetworkManager

I think the server version does not have NetworkManager and as your thread
says, netplan is now (since early 2023?) used to configure the network
connections:

netplan status

If netplan is running with renderer networkd, check the contents of your /etc/
netplan/01-netcfg.yaml, which you list your ethernet NIC and include "dhcp4:
yes", then run:

sudo netplan generate
sudo netplan apply

You may have to also restart networkd service:

sudo systemctl restart systemd-networkd

If the above does not work, you'll need to fish for error messages in dmesg
and by running journalctl.
Dale
2023-10-16 17:00:02 UTC
Permalink
Post by Michael
Well, you're probably gonna have to spam us some more info.
On the working knoppix boot, spam lspci showing what driver is loaded. then
spam it on ubuntu to verify if it's loaded there as well.
dmesg for the relevant parts on both would also help.
I'd make sure ubuntu has linux-firmware installed, could simply be failing
if it's missing.
ifconfig could show if it is loaded and just doesn't have an ip assigned, if
the mac address says 00:00:00:00:00 that'd be a different problem.
[snip ...]
From what I recall Ubuntu has been chopping & changing its network scripts on
a regular basis. So in the first instance check what you're running on this
systemctl status systemd-networkd
or
systemctl status NetworkManager
I think the server version does not have NetworkManager and as your thread
says, netplan is now (since early 2023?) used to configure the network
netplan status
If netplan is running with renderer networkd, check the contents of your /etc/
sudo netplan generate
sudo netplan apply
sudo systemctl restart systemd-networkd
If the above does not work, you'll need to fish for error messages in dmesg
and by running journalctl.
This is the problem.  The only place it shows up is where it shows it is
disabled.  I can't get a status or anything of it anywhere else because
it doesn't exist.  I didn't see anything in dmesg, since it doesn't
exist, nor can I check it with netplan, again, since it doesn't exist. 
At that point, it's as if the network isn't even there at all as
hardware.  I did look in the netplan config file, it looks just like
what others have posted except that since it finds no network card, it
lists no device as being found.  I did remember and had installed
ifconfig.  It showed nothing but the lo network.  Nothing else.

Here's another interesting point.  Before I went to take a nap, I
shutdown the rig.  Just a normal shutdown.  After I read the replies
here, I booted the machine back up.  Guess what, the network is working
again.  So, now I can login and copy and paste some info.  Here goes.


***@nas:~# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp3s0:
      dhcp4: true
  version: 2
***@nas:~#


I don't recall the enp3s0 being listed when it was not working.  I
assume it gets added when it detects it during the boot process.  The
rest looks the same.

This is from dmesg, using grep to narrow the info down a bit. 


***@nas:~# dmesg | grep enp3
[    2.603140] r8169 0000:03:00.0 enp3s0: renamed from eth0
[  103.795108] r8169 0000:03:00.0 enp3s0: Link is Down
[  106.016319] r8169 0000:03:00.0 enp3s0: Link is Up - 1Gbps/Full - flow
control rx/tx
[  106.016353] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
***@nas:~#


When I looked for that before, it returned nothing.  I even dropped down
to only looking for 'enp' to see if it saw either card since I installed
a PCIe card.  It didn't.  I didn't know you could run 'netplan status'
and not specify a device so I never ran that.  I'll try to remember that
because I suspect this could happen again.  I guess that is like ifconfig. 

Mark, the command nmcli you listed isn't installed on this machine as it
uses netplan.  It seems netplan is new so maybe it is a little buggy
right now.  I read that if I have netplan, I shouldn't install other
network managers, tools like ifconfig to see things is OK but don't use
those to "manage" the network.  The use of two network managers can and
likely will cause a clash.  That said, I do have ip and route
installed.  Given it is working now, well, no need posting the working
results.  ;-)  Since Michael mentioned that netplan is new, that
explains why I wasn't getting many hits when searching.  It's new. 
There likely isn't many hits to find when searching, yet. 

Anyway, at the moment it is working but given this development, I may
install Gentoo when I get a chance.  I need something that I can work
with when it isn't working.  If nothing else, I need to be able to get
info so I can get help.  Heck, when it didn't work, I didn't even know
what tool it used to manage the network at all.  It took me hours just
to find that out.  Add in the systemd thingy, I'm not real pleased.  I
do like that it only takes a few minutes to install, update and such
tho.  Plus, I may be able to get the encryption stuff to work better. 
I'll be making my own kernel. 

Thanks for the help.  I suspect it just may stop working again tho.  I'm
not to trusting.

Dale

:-)  :-) 
Neil Bothwick
2023-10-16 18:20:01 UTC
Permalink
This is the problem.  The only place it shows up is where it shows it is
disabled.  I can't get a status or anything of it anywhere else because
it doesn't exist.  I didn't see anything in dmesg, since it doesn't
exist, nor can I check it with netplan, again, since it doesn't exist. 
Try "journalctl -b -p err". If that doesn't help, try "journalctl -b" but
that will have a lot of info.
--
Neil Bothwick

Walk softly and carry a fully charged phazer.
Mark Knecht
2023-10-16 18:30:02 UTC
Permalink
On Mon, Oct 16, 2023 at 9:56 AM Dale <***@gmail.com> wrote:
<SNIP>
Post by Dale
Mark, the command nmcli you listed isn't installed on this machine as it
uses netplan. It seems netplan is new so maybe it is a little buggy
right now. I read that if I have netplan, I shouldn't install other
network managers, tools like ifconfig to see things is OK but don't use
those to "manage" the network. The use of two network managers can and
likely will cause a clash. That said, I do have ip and route
installed. Given it is working now, well, no need posting the working
results. ;-) Since Michael mentioned that netplan is new, that
explains why I wasn't getting many hits when searching. It's new.
There likely isn't many hits to find when searching, yet.
<SNIP>

netplan isn't new. It's been in Ubuntu since 16.04 LTS which was
2015. What is new is making it the default way of handling
networks. I don't find it buggy and I don't know why you cannot find
help in Google. I'm finding 100's of things to look at without going
to 'Ask Ubuntu'

netplan status is nice because it shows who rendered a network
whether netplan did it or not.

It is possible to have multiple renderers on the machine but you
do have to configure things so they don't collide. I do not
recommend you do anything like that.

For my Kubuntu desktops I actually use System Settings to
set fixed ip addresses but I do agree that cli configuration
for Ubuntu Server can be confusing. However, complaining
about systemd in this day and age seems pointless. It's here
and it isn't going away.
Dale
2023-10-17 00:40:01 UTC
Permalink
Post by Mark Knecht
<SNIP>
Post by Dale
Mark, the command nmcli you listed isn't installed on this machine as it
uses netplan.  It seems netplan is new so maybe it is a little buggy
right now.  I read that if I have netplan, I shouldn't install other
network managers, tools like ifconfig to see things is OK but don't use
those to "manage" the network.  The use of two network managers can and
likely will cause a clash.  That said, I do have ip and route
installed.  Given it is working now, well, no need posting the working
results.  ;-)  Since Michael mentioned that netplan is new, that
explains why I wasn't getting many hits when searching.  It's new.
There likely isn't many hits to find when searching, yet.
<SNIP>
netplan isn't new. It's been in Ubuntu since 16.04 LTS which was 
2015. What is new is making it the default way of handling 
networks. I don't find it buggy and I don't know why you cannot find
help in Google. I'm finding 100's of things to look at without going
to 'Ask Ubuntu' 
netplan status is nice because it shows who rendered a network
whether netplan did it or not.
It is possible to have multiple renderers on the machine but you 
do have to configure things so they don't collide. I do not 
recommend you do anything like that.
For my Kubuntu desktops I actually use System Settings to 
set fixed ip addresses but I do agree that cli configuration
for Ubuntu Server can be confusing. However, complaining 
about systemd in this day and age seems pointless. It's here
and it isn't going away.
When I was searching for the problem I was having, I think I only found
one or two that mentioned netplan.  The rest were about other older
tools that I didn't have installed.  The bad thing, without a network, I
couldn't install anything.  Since I couldn't find info on what tools I
did have, I asked here. 

I still recall when systemd first started.  There was and likely still
is a lot of people who don't like, even if they're forced to use it.  I
did read up on it some.  To me, it sound like a mess.  Having had to
deal with it first hand, it's worse.  I'm not putting my true feelings
on it on the internet.  Let's just say I don't like it.  It comes close
to hal.  Older users of this list might remember that.  I got trees and
ropes, at the time, I just needed the dev that created hal.  When that
thing died, the only thing that could have made me happier, winning a
massive lottery and/or someone finding a cure for cancer. 

While I'm sure systemd is here to stay, I still have options.  I'm
seriously thinking of installing Gentoo on that thing.  At least then if
it breaks, I can post a thread that isn't off topic. o_O  I also just
put a pretty large CPU cooler on that thing.  Should compile without so
much as a mild fever. 

I'm going to boot it up here shortly.  Just to see if the network
works.  If not, I'm 100% sure Gentoo is coming quick.  All I have to do
is swap to a different drive. 

Neil, I tired that command journalctl but not sure about the options. 
It either returned a lot or nothing related.  I'll make note of the
systemctl command.  If Ubuntu survives, I may need it one day.  ;-) 
That's a big if tho. 

Thanks to all for the help. 

Dale

:-)  :-) 
Neil Bothwick
2023-10-17 07:30:01 UTC
Permalink
Post by Dale
While I'm sure systemd is here to stay, I still have options.  I'm
seriously thinking of installing Gentoo on that thing.  At least then if
it breaks, I can post a thread that isn't off topic. o_O  I also just
put a pretty large CPU cooler on that thing.  Should compile without so
much as a mild fever.
You could have compiled the whole system several times over in the time
you've been trying to fix this. Even when you do fix it, you'll still
have an unfamiliar experience. Sticking with what you know is often best,
unless you treat it as a learning experience.
Post by Dale
Neil, I tired that command journalctl but not sure about the options. 
It either returned a lot or nothing related.  I'll make note of the
systemctl command.  If Ubuntu survives, I may need it one day.  ;-) 
If it returned nothing with -p err, nothing logged an error since the
last boot, which is odd considering something is broken. without -p err,
you get everything from the system log, it's like doing "cat
/var/log/messages" but only since the last reboot. You could pipe that
through grep, searching for the name of your network interface.
--
Neil Bothwick

Snacktrek, n.:
The peculiar habit, when searching for a snack, of constantly
returning to the refrigerator in hopes that something new will have
materialized.
Mark Knecht
2023-10-17 18:00:01 UTC
Permalink
On Tue, Oct 17, 2023 at 9:41 AM Dale <***@gmail.com> wrote:
<SNIP>
Well, the 770T now has Gentoo on it. As usual, my fresh built kernel
booted the very first time without error and every thing worked.
Sometimes, things go right. ROFL I have to say tho, I wish they would
split the install docs into two parts. One for old BIOS and one for the
efi thingy. It was confusing in a couple places but I got there. Maybe
some color coding would help???
<SNIP>

Congrats. I hope it goes well.

There are still times I wish I was running Gentoo - the documentation,
camaraderie and deep technical knowledge of the group, but I just
don't have time or patience to iron out issues with applications when
Gentoo isn't a supported distro. Still, for something like a NAS box it
makes sense if everything you run is sour\ce code coming from the
Gentoo code stores.

Cheers,
Mark
Grant Edwards
2023-10-17 18:30:01 UTC
Permalink
I to find Gentoo to be much better documented. There were places where
the old BIOS and efi info got a little confusing but eventually I
figured it out. I been trying to think of a way to color code the docs
but I can't figure out a sensible way. You got BIOS and efi, openrc and
systemd and several other smaller things that one has to decide on and
take different steps. One would run out of colors or the colors
themselves would get confusing. I can't think of a better way.
In theory, a wee bit of CSS and Javascript along with some radio
buttons would allow the reader to make a few choices and then see
an installation manual that only shows the relevent sections.

I still miss being able to view the installation manual as a single
HTML page. I find the "chopped up" format difficult to use: I can't
easily search for things, and the bit I'm looking for never seems to
be in the section where I think it's going to be.

--
Grant
Neil Bothwick
2023-10-17 19:50:01 UTC
Permalink
I just realized, my new rig will almost certainly be efi.  I kinda dread
that.  At least it is well documented tho.  Should be easy enough.  I
hope.  o_O
EFI is much simpler to work with. for one thing, you don't need the
monster that GRUB has become.
--
Neil Bothwick

"Do you reply to our surveys.?"
[X]Never [ ]Always [ ]Sometimes
Neil Bothwick
2023-10-18 07:40:01 UTC
Permalink
Post by Neil Bothwick
EFI is much simpler to work with. for one thing, you don't need the
monster that GRUB has become.
While I kinda dread it, it does seem that quite a while ago, it has
become much easier.  I noticed as I went through the install of Gentoo,
there didn't seem to be a lot of stuff to do with efi.  One might could
think it is quicker and simpler as you say.  I recall when it first came
out.  It was complicated but I think most of that was because it was new
and the documentation was not quite there yet.  After all this time tho,
that shouldn't be a problem. 
It's a bridge I'll have to cross tho.  It looks easy enough.  Biggest
thing is partitioning the drive differently.  Gotta remember that.  O_O 
If you usually use a separate partition for /boot, all you need to do
differently is set its partition type to EF00 and format it with FAT
instead of ext2.

Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
--
Neil Bothwick

leep is an excellent way of listening to an opera. - James Stephens
(1882-1950)
Michael
2023-10-18 10:10:02 UTC
Permalink
Post by Neil Bothwick
Post by Neil Bothwick
EFI is much simpler to work with. for one thing, you don't need the
monster that GRUB has become.
While I kinda dread it, it does seem that quite a while ago, it has
become much easier. I noticed as I went through the install of Gentoo,
there didn't seem to be a lot of stuff to do with efi. One might could
think it is quicker and simpler as you say. I recall when it first came
out. It was complicated but I think most of that was because it was new
and the documentation was not quite there yet. After all this time tho,
that shouldn't be a problem.
It's a bridge I'll have to cross tho. It looks easy enough. Biggest
thing is partitioning the drive differently. Gotta remember that. O_O
It is a relatively simple bridge to cross. Use gdisk to partition the drive,
which if you've used fdisk before you'll find it quite similar. If you prefer
it fdisk will work too, but make sure first you create a GUID Partition Table
(GPT) and not an MBR table.

You can also use sgdisk to create a 1GB EFI System Partition (type 0xEF00) in
a single command, as your first partition in an empty disk; e.g.:

sgdisk -n 1:2048:2068470 -t 1:ef00 -c 1:"ESP-Boot" /dev/sda

Then format it:

mkfs.fat -v -F 32 -n ESP /dev/sda1

mount it as mnt/gentoo/boot and 'mkdir /mnt/gentoo/boot/EFI', to store at a
later stage your kernel/initrd in it, before you continue with the rest of
your installation. That's all there is to it.
Post by Neil Bothwick
If you usually use a separate partition for /boot, all you need to do
differently is set its partition type to EF00 and format it with FAT
instead of ext2.
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR", although I've
seen it mentioned in the interwebs as "protective GPT", which I think is more
accurate. It uses the first sector (LBA 0) to store an MBR table showing the
whole disk, or 2TB if smaller, as an MBR partition. This is the first
partition on the disk, typically 1 MiB in size. It is meant to stop 20 year
old partitioning tools from messing up a GPT partitioning scheme because they
can't see it. Arguably nobody uses Windows 98 these days, so it should be
safe to not have a protective MBR on your GPT disks.
Grant Edwards
2023-10-18 14:00:02 UTC
Permalink
Post by Michael
Post by Neil Bothwick
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR", although I've
seen it mentioned in the interwebs as "protective GPT", which I think is more
accurate. It uses the first sector (LBA 0) to store an MBR table showing the
whole disk, or 2TB if smaller, as an MBR partition. This is the first
partition on the disk, typically 1 MiB in size. It is meant to stop 20 year
old partitioning tools from messing up a GPT partitioning scheme because they
can't see it. Arguably nobody uses Windows 98 these days, so it should be
safe to not have a protective MBR on your GPT disks.
The protective MBR and the BIOS boot partition are two different,
unrelated things. The BIOS boot partition is a real partition (usually
1-2MB in size) that's present in the GPT parition table. It's used by
Grub as a place to store its files. It must be the first partition,
and it doesn't have a real filesystem (grub uses some sort of private
filesystem):

$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 980 PRO 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E81DD16A-A5AE-3C4A-AD3C-26DF2985827A

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 6143 4096 2M BIOS boot
/dev/nvme0n1p2 6144 134219775 134213632 64G Linux filesystem
/dev/nvme0n1p3 134219776 976773134 842553359 401.8G Linux filesystem
Dale
2023-10-18 17:50:02 UTC
Permalink
Post by Grant Edwards
Post by Michael
Post by Neil Bothwick
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR", although I've
seen it mentioned in the interwebs as "protective GPT", which I think is more
accurate. It uses the first sector (LBA 0) to store an MBR table showing the
whole disk, or 2TB if smaller, as an MBR partition. This is the first
partition on the disk, typically 1 MiB in size. It is meant to stop 20 year
old partitioning tools from messing up a GPT partitioning scheme because they
can't see it. Arguably nobody uses Windows 98 these days, so it should be
safe to not have a protective MBR on your GPT disks.
The protective MBR and the BIOS boot partition are two different,
unrelated things. The BIOS boot partition is a real partition (usually
1-2MB in size) that's present in the GPT parition table. It's used by
Grub as a place to store its files. It must be the first partition,
and it doesn't have a real filesystem (grub uses some sort of private
$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 980 PRO 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E81DD16A-A5AE-3C4A-AD3C-26DF2985827A
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 6143 4096 2M BIOS boot
/dev/nvme0n1p2 6144 134219775 134213632 64G Linux filesystem
/dev/nvme0n1p3 134219776 976773134 842553359 401.8G Linux filesystem
I usually use cgdisk, or cfdisk, but they all do the same thing.  Just a
different interface.  As long as all this is documented, I'll just
follow it and it should work.  After all, efi has been around for a long
while now.  I'm sure millions of people have it installed, likely
billions. 

I do wonder, can one still put things like memtest, Knoppix and such in
that thing?  I'm sure it can be done but never seen it mentioned.  I
started to put it on the old 770T but didn't now that I have that Ventoy
USB thing. 

It's going to be a while before I have to do this.  I still haven't
found a mobo.  Not one I really like anyway. 

Dale

:-)  :-) 
Neil Bothwick
2023-10-18 18:50:01 UTC
Permalink
I usually use cgdisk, or cfdisk, but they all do the same thing.  Just a
different interface.  As long as all this is documented, I'll just
follow it and it should work.  After all, efi has been around for a long
while now.  I'm sure millions of people have it installed, likely
billions. 
I do wonder, can one still put things like memtest, Knoppix and such in
that thing?  I'm sure it can be done but never seen it mentioned.  I
started to put it on the old 770T but didn't now that I have that Ventoy
USB thing. 
Do you mean booting from the ISO images? That's a GRUB thing, it doesn't
matter how it is loaded, EFI or MBR.

However, being able to do away with GRUB is, to me, a bigger benefit than
not being able to boot ISOs is a drawback. Use either systemd-boot (it
doesn't need systemd) or rEFInd.
--
Neil Bothwick

"Of course, I could switch back to Windows. At least there, if I have a
problem, I don't suffer under the illusion that I could ever fix it." -
Unknown (paraphrased)
Dale
2023-10-18 23:30:01 UTC
Permalink
Post by Neil Bothwick
Post by Dale
I usually use cgdisk, or cfdisk, but they all do the same thing.  Just a
different interface.  As long as all this is documented, I'll just
follow it and it should work.  After all, efi has been around for a long
while now.  I'm sure millions of people have it installed, likely
billions. 
I do wonder, can one still put things like memtest, Knoppix and such in
that thing?  I'm sure it can be done but never seen it mentioned.  I
started to put it on the old 770T but didn't now that I have that Ventoy
USB thing. 
Do you mean booting from the ISO images? That's a GRUB thing, it doesn't
matter how it is loaded, EFI or MBR.
However, being able to do away with GRUB is, to me, a bigger benefit than
not being able to boot ISOs is a drawback. Use either systemd-boot (it
doesn't need systemd) or rEFInd.
On my main rig, BIOS type, in my /boot I have memtest.  Grub adds a
entry for it.  I guess I could also but Knoppix or something in there as
well.  I was just wondering if that is still a option with efi.  I'd
think it is.  After all, it's like like being able to boot either Linux
or windoze.  Lots of people dual boot and I'm sure efi hasn't changed
that. 

I kinda like grub myself.  Sort of miss the old one but still.  It does
work well even if it does install a lot of kitchen appliances.  ;-) 

Dale

:-)  :-) 
Neil Bothwick
2023-10-19 12:00:01 UTC
Permalink
Post by Neil Bothwick
Do you mean booting from the ISO images? That's a GRUB thing, it
doesn't matter how it is loaded, EFI or MBR.
However, being able to do away with GRUB is, to me, a bigger benefit
than not being able to boot ISOs is a drawback. Use either
systemd-boot (it doesn't need systemd) or rEFInd.
On my main rig, BIOS type, in my /boot I have memtest.  Grub adds a
entry for it.  I guess I could also but Knoppix or something in there as
well.  I was just wondering if that is still a option with efi.  I'd
think it is.  After all, it's like like being able to boot either Linux
or windoze.  Lots of people dual boot and I'm sure efi hasn't changed
that. 
Oh yes, you can boot memtest because that's a ramdisk image, it's only
ISOs that are restricted to Grub. Having said that, many live distros can
be booted from any bootloader if you copy the files from the ISO. I
always have SystemRescue in my /boot partition.
--
Neil Bothwick

Linux users do it without paying a Bill
Michael
2023-10-18 18:40:01 UTC
Permalink
Post by Grant Edwards
Post by Michael
Post by Neil Bothwick
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR", although
I've seen it mentioned in the interwebs as "protective GPT", which I
think is more accurate. It uses the first sector (LBA 0) to store an MBR
table showing the whole disk, or 2TB if smaller, as an MBR partition.
This is the first partition on the disk, typically 1 MiB in size. It is
meant to stop 20 year old partitioning tools from messing up a GPT
partitioning scheme because they can't see it. Arguably nobody uses
Windows 98 these days, so it should be safe to not have a protective MBR
on your GPT disks.
The protective MBR and the BIOS boot partition are two different,
unrelated things. The BIOS boot partition is a real partition (usually
1-2MB in size) that's present in the GPT parition table. It's used by
Grub as a place to store its files.
Yes, this is needed on GPT disks when installed on BIOS MoBos.
Post by Grant Edwards
It must be the first partition,
and it doesn't have a real filesystem (grub uses some sort of private
I'm not sure it uses any filesystem. I understood it uses a raw sector jump
from the MBR to the GPT partition type 0xEE.
Post by Grant Edwards
$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 980 PRO 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E81DD16A-A5AE-3C4A-AD3C-26DF2985827A
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 6143 4096 2M BIOS boot
/dev/nvme0n1p2 6144 134219775 134213632 64G Linux filesystem
/dev/nvme0n1p3 134219776 976773134 842553359 401.8G Linux filesystem
This links explains the combos of BIOS vs. EFI MoBos and MBR vs. GPT partition
table schemes:

https://askubuntu.com/questions/500359/efi-boot-partition-and-biosgrub-partition
Grant Edwards
2023-10-18 21:10:01 UTC
Permalink
Post by Michael
Post by Grant Edwards
The protective MBR and the BIOS boot partition are two different,
unrelated things. The BIOS boot partition is a real partition (usually
1-2MB in size) that's present in the GPT parition table. It's used by
Grub as a place to store its files.
Yes, this is needed on GPT disks when installed on BIOS MoBos.
There is a way to install Grub on GPT disks without it, but it takes
extra work and isn't worth it. You have to lock certain files in place
under /boot/grub so that block-lists can be embedded in sector 0.

All of the disk label utilities I've seen recently will, by default,
leave a sizable empty space between the primary GPT table and the
start of the first partition (which typically starts at a 1MB offset
from the start of the disk). I've never understood why Grub won't use
that space they way it will use the empty space between an MBR and the
first partition.
Post by Michael
Post by Grant Edwards
It must be the first partition, and it doesn't have a real
I'm not sure it uses any filesystem. I understood it uses a raw sector jump
from the MBR to the GPT partition type 0xEE.
I've read a couple vague but differing descriptions of it. One
description specifically referred to "files" (plural) and some sort of
grub-private-internal filesystem. However, it could be that it's
nothing but a single "file" starting at block 0 in that partition.
Whatever it is, it seems to be "opaque" in that Grub puts stuff in
that partition, Grub later uses that stuff, and nobody else needs to
know or care what it is or how it's organized. I haven't looked
through the Grub source code to try to see inside the black box...

--
Grant
Dale
2023-10-18 22:30:01 UTC
Permalink
Post by Grant Edwards
Post by Michael
Post by Grant Edwards
The protective MBR and the BIOS boot partition are two different,
unrelated things. The BIOS boot partition is a real partition (usually
1-2MB in size) that's present in the GPT parition table. It's used by
Grub as a place to store its files.
Yes, this is needed on GPT disks when installed on BIOS MoBos.
There is a way to install Grub on GPT disks without it, but it takes
extra work and isn't worth it. You have to lock certain files in place
under /boot/grub so that block-lists can be embedded in sector 0.
All of the disk label utilities I've seen recently will, by default,
leave a sizable empty space between the primary GPT table and the
start of the first partition (which typically starts at a 1MB offset
from the start of the disk). I've never understood why Grub won't use
that space they way it will use the empty space between an MBR and the
first partition.
Post by Michael
Post by Grant Edwards
It must be the first partition, and it doesn't have a real
I'm not sure it uses any filesystem. I understood it uses a raw sector jump
from the MBR to the GPT partition type 0xEE.
I've read a couple vague but differing descriptions of it. One
description specifically referred to "files" (plural) and some sort of
grub-private-internal filesystem. However, it could be that it's
nothing but a single "file" starting at block 0 in that partition.
Whatever it is, it seems to be "opaque" in that Grub puts stuff in
that partition, Grub later uses that stuff, and nobody else needs to
know or care what it is or how it's organized. I haven't looked
through the Grub source code to try to see inside the black box...
--
Grant
I used cgdisk and GPT for my disk even tho it is small, only 300GBs or
so, mostly out of habit.  The grub install failed and I did a search.  I
found this and it worked. 



grub-install fails with "grub-install: warning: this GPT partition label
contains no BIOS Boot Partition; embedding won't be possible."  Using
parted command.

# parted /dev/sda
# set 1 boot off
# set 1 bios_grub on
# q

# then install grub.  This happens on drives where GPT is used instead
of MBR.



This may be something you want to make note of.  I guess it changes the
way grub sees it or something.  Anyway, it worked fine after that so may
be worth making a note of in case one of you ever needs it. 

Dale

:-)  :-) 

P. S.  My off topic Ubuntu thread is covering a lot of strange things. 
LOL 
Neil Bothwick
2023-10-18 23:10:01 UTC
Permalink
Post by Dale
I used cgdisk and GPT for my disk even tho it is small, only 300GBs or
so, mostly out of habit.  The grub install failed and I did a search.  I
found this and it worked. 
grub-install fails with "grub-install: warning: this GPT partition label
contains no BIOS Boot Partition; embedding won't be possible." 
Simple answer, don't use GRUB :-)

Seriously, GRUB is a bootloader, EFI is a bootloader. You are using one
bootloader to load another bootloader before booting the system.

rEFIind and systemd-boot are both boot managers, they work with the EFI
bootloader - or you can boot a kernel directly without a boot manager,
but I prefer not to do that as it gives no opportunity to edit options
when booting.

If you like simple, here is a config file I use with systemd-boot

version 6.1.57-gentoo
linux /vmlinuz-6.1.57-gentoo
options root=/dev/sda3 panic=10 net.ifnames=0 i915.enable_ips=0

That's it! There is a separate file for each menu entry, but they are
this simple. There's also a global loader.conf, that runs to a massive 2
lines here!
--
Neil Bothwick

If you catch an exploding manhole cover, you can keep it.
Dale
2023-10-19 04:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Dale
I used cgdisk and GPT for my disk even tho it is small, only 300GBs or
so, mostly out of habit.  The grub install failed and I did a search.  I
found this and it worked. 
grub-install fails with "grub-install: warning: this GPT partition label
contains no BIOS Boot Partition; embedding won't be possible." 
Simple answer, don't use GRUB :-)
Seriously, GRUB is a bootloader, EFI is a bootloader. You are using one
bootloader to load another bootloader before booting the system.
rEFIind and systemd-boot are both boot managers, they work with the EFI
bootloader - or you can boot a kernel directly without a boot manager,
but I prefer not to do that as it gives no opportunity to edit options
when booting.
If you like simple, here is a config file I use with systemd-boot
version 6.1.57-gentoo
linux /vmlinuz-6.1.57-gentoo
options root=/dev/sda3 panic=10 net.ifnames=0 i915.enable_ips=0
That's it! There is a separate file for each menu entry, but they are
this simple. There's also a global loader.conf, that runs to a massive 2
lines here!
Right now, I'm still using BIOS type boot.  I've read where you and a
couple others use something else and they do sound good but I just
haven't got the nerve up to switch.  When I build a new rig, I'll likely
get into some other boot manager.  In a way I kinda dread it but on the
other hand, I just might like it.  You and several others make the other
options sound really good. 

That config kinda reminds me of the old grub.  A title line, location of
kernel and then options.  Sounds easy enough.  The new grub config is
almost impossible to config by hand.  They had to make a tool to do it. 
That says a lot there.  ;-) 

I wish I could build the new rig tomorrow.  Gotta buy the stuff first
tho.  Well, first, I gotta find a good mobo I like.  I got a CPU cooler
in.  I got video cards, cables and such in route.  Next month, case. 
Next month, likely a power supply and maybe a couple other small
things.  Then comes the big things.  Mobo, CPU and memory.  Ka ching.  $$$$

Dale

:-)  :-)
Michael
2023-10-19 08:50:02 UTC
Permalink
Post by Neil Bothwick
Post by Dale
I used cgdisk and GPT for my disk even tho it is small, only 300GBs or
so, mostly out of habit. The grub install failed and I did a search. I
found this and it worked.
grub-install fails with "grub-install: warning: this GPT partition label
contains no BIOS Boot Partition; embedding won't be possible."
If you are booting a BIOS MoBo, or an EFI MoBo in 'BIOS Legacy' mode, from a
disk which contains a GPT partitioning scheme, then you will need a separate
partition created as type 'BIOS Boot Partition' for GRUB to install its
core.img:

GRUB's Stage 1 boot.img is still installed in sector 0 on a GPT disk, same as
on a disk with an MBR partition table. However, on a GPT disk GRUB's Stage
1.5 core.img with all its filesystem drivers has to be installed in a
partition of its own, because unlike an MBR disk sectors 1 to 62 are not empty
but contain the GPT header and the GPT partition list. Without its filesystem
drivers GRUB won't be able to access its modules in its Stage 2 filesystem,
which is stored in the OS /boot/ partition, or its grubx64.efi UEFI
executable.

It helps to get straight before you start an installation what combo of MoBo
and type of disk partition tables you intend to use:

BIOS Vs EFI
MBR Vs GPT
Post by Neil Bothwick
Simple answer, don't use GRUB :-)
Seriously, GRUB is a bootloader, EFI is a bootloader. You are using one
bootloader to load another bootloader before booting the system.
rEFIind and systemd-boot are both boot managers, they work with the EFI
bootloader - or you can boot a kernel directly without a boot manager,
but I prefer not to do that as it gives no opportunity to edit options
when booting.
I like rEFIind, but I recall it needs/needed a separate /boot partition if you
are running LVM/RAID.
Post by Neil Bothwick
If you like simple, here is a config file I use with systemd-boot
version 6.1.57-gentoo
linux /vmlinuz-6.1.57-gentoo
options root=/dev/sda3 panic=10 net.ifnames=0 i915.enable_ips=0
That's it! There is a separate file for each menu entry, but they are
this simple. There's also a global loader.conf, that runs to a massive 2
lines here!
Right now, I'm still using BIOS type boot. I've read where you and a
couple others use something else and they do sound good but I just
haven't got the nerve up to switch. When I build a new rig, I'll likely
get into some other boot manager. In a way I kinda dread it but on the
other hand, I just might like it. You and several others make the other
options sound really good.
That config kinda reminds me of the old grub. A title line, location of
kernel and then options. Sounds easy enough. The new grub config is
almost impossible to config by hand. They had to make a tool to do it.
That says a lot there. ;-)
Not really, the GRUB developers were trying to make maintaining a boot manager
simpler by scripting the process and offering to hook it up from binary
distros' kernel install scripts. Anyway, you can still write the
configuration by hand if you follow the GRUB2 syntax. You do not need to run
GRUB's grub-mkconfig script to automatically update the grub.cfg file if you
prefer to do it manually, but it is certainly simpler to use it since it is
already there for you.
Dale
2023-10-19 14:50:02 UTC
Permalink
Post by Michael
Post by Neil Bothwick
Post by Dale
I used cgdisk and GPT for my disk even tho it is small, only 300GBs or
so, mostly out of habit. The grub install failed and I did a search. I
found this and it worked.
grub-install fails with "grub-install: warning: this GPT partition label
contains no BIOS Boot Partition; embedding won't be possible."
If you are booting a BIOS MoBo, or an EFI MoBo in 'BIOS Legacy' mode, from a
disk which contains a GPT partitioning scheme, then you will need a separate
partition created as type 'BIOS Boot Partition' for GRUB to install its
GRUB's Stage 1 boot.img is still installed in sector 0 on a GPT disk, same as
on a disk with an MBR partition table. However, on a GPT disk GRUB's Stage
1.5 core.img with all its filesystem drivers has to be installed in a
partition of its own, because unlike an MBR disk sectors 1 to 62 are not empty
but contain the GPT header and the GPT partition list. Without its filesystem
drivers GRUB won't be able to access its modules in its Stage 2 filesystem,
which is stored in the OS /boot/ partition, or its grubx64.efi UEFI
executable.
It helps to get straight before you start an installation what combo of MoBo
BIOS Vs EFI
MBR Vs GPT
When I did the install on the old 770T, I used GPT, out of habit to be
honest.  I have very few small drives here.  Heck, I'm up to buying 18TB
drives now.  Anyway, grub gave me a error when I tried to install it.  I
searched and found the sequence of commands that I posted in another
reply.  It uses parted.  Anyway, it worked after that.  Thing is, by the
time you get to the part about installing grub, you have also installed
most of the OS.  Going back and using MBR means reinstalling.  I plan to
check into those parted commands and see what it does and if I can grasp
it.  :/
Post by Michael
Post by Neil Bothwick
Simple answer, don't use GRUB :-)
Seriously, GRUB is a bootloader, EFI is a bootloader. You are using one
bootloader to load another bootloader before booting the system.
rEFIind and systemd-boot are both boot managers, they work with the EFI
bootloader - or you can boot a kernel directly without a boot manager,
but I prefer not to do that as it gives no opportunity to edit options
when booting.
I like rEFIind, but I recall it needs/needed a separate /boot partition if you
are running LVM/RAID.
I have /boot on ext2, / on ext4 and rest on LVM on my main system.  On
the 770T rig, I have /boot on ext2 I think and everything else on ext4. 
I don't think I used LVM on it.  I even put /usr and /var on the /
partition.  I didn't get fancy or anything.  I did put /home on its own
partition.  I'm not sure why really. 

I'll look into rEFIind then.  If you like it, it has to be good.  ;-) 
Post by Michael
Post by Neil Bothwick
If you like simple, here is a config file I use with systemd-boot
version 6.1.57-gentoo
linux /vmlinuz-6.1.57-gentoo
options root=/dev/sda3 panic=10 net.ifnames=0 i915.enable_ips=0
That's it! There is a separate file for each menu entry, but they are
this simple. There's also a global loader.conf, that runs to a massive 2
lines here!
Right now, I'm still using BIOS type boot. I've read where you and a
couple others use something else and they do sound good but I just
haven't got the nerve up to switch. When I build a new rig, I'll likely
get into some other boot manager. In a way I kinda dread it but on the
other hand, I just might like it. You and several others make the other
options sound really good.
That config kinda reminds me of the old grub. A title line, location of
kernel and then options. Sounds easy enough. The new grub config is
almost impossible to config by hand. They had to make a tool to do it.
That says a lot there. ;-)
Not really, the GRUB developers were trying to make maintaining a boot manager
simpler by scripting the process and offering to hook it up from binary
distros' kernel install scripts. Anyway, you can still write the
configuration by hand if you follow the GRUB2 syntax. You do not need to run
GRUB's grub-mkconfig script to automatically update the grub.cfg file if you
prefer to do it manually, but it is certainly simpler to use it since it is
already there for you.
The one thing I like about the new grub, if the kernel is named wrong,
the init thingy is named wrong or some other problem with the config, it
will tell you when you run the script.  I always check to make sure it
finds both the kernel and init thingy in sets.  I have three kernels I
think and one init thingy for each.  They should list in pairs.  If I
name one wrong, it will miss it.  With the old grub, you found out you
messed up when you rebooted and it fails to load. 

I need to search youtube and check into some of this new stuff. 

Dale

:-)  :-) 
Neil Bothwick
2023-10-19 15:40:01 UTC
Permalink
Post by Michael
I like rEFIind, but I recall it needs/needed a separate /boot
partition if you are running LVM/RAID.
I have /boot on ext2, / on ext4 and rest on LVM on my main system.  On
the 770T rig, I have /boot on ext2 I think and everything else on ext4.
If you are using EFI, you need a FAT partition as the ESP, so you may as
well make that /boot to keep things simple.
--
Neil Bothwick

An expert is nothing more than an ordinary person away from home.
Dale
2023-10-19 19:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Dale
Post by Michael
I like rEFIind, but I recall it needs/needed a separate /boot
partition if you are running LVM/RAID.
I have /boot on ext2, / on ext4 and rest on LVM on my main system.  On
the 770T rig, I have /boot on ext2 I think and everything else on ext4.
If you are using EFI, you need a FAT partition as the ESP, so you may as
well make that /boot to keep things simple.
Yea.  I read somewhere that is the correct way.  I think that is picked
because everything, including Linux, can read that file system.  I think
I read somewhere that the mobo has to be able to read that and it's not
like mobos on their own have a lot of space for BIOS stuff or whatever
what EFI mobos use is called. 

I'll likely watch some youtube videos and read some howtos shortly
before the mobo, CPU and such start coming in.  No need doing that now. 
I have trouble remembering what I went to the kitchen for.  :/

Dale

:-)  :-) 
Neil Bothwick
2023-10-19 12:00:01 UTC
Permalink
That config kinda reminds me of the old grub.  A title line, location
of kernel and then options.  Sounds easy enough.  The new grub config
is almost impossible to config by hand.  They had to make a tool to
do it. That says a lot there.  ;-) 
GRUB2 was designed to be able to create a config for anything
automatically, such as from an installer. It does that very well, but is
total overkill for Gentoo-like people that like to stay in control.
Incidentally, systemd-boot can also generate and update boot menu entries
automatically with "bootctl install" and "bootctl update" although I have
never tried either.
--
Neil Bothwick

STATUS QUO is Latin for "the mess we're in."
Peter Humphrey
2023-10-19 15:10:01 UTC
Permalink
Post by Neil Bothwick
Incidentally, systemd-boot can also generate and update boot menu entries
automatically with "bootctl install" and "bootctl update" although I have
never tried either.
Yes, that's what I use. Once your kernel is complete, with ramdisk etc., make
a copy of /boot somewhere, then "bootctl install", copy the loader.conf from
your copy, then "bootctl update".

Older versions of bootctl used to create a /boot/<nn>/ directory, where nn was
a 32-digit hex number, in which we were supposed to put our boot entries: far
too complex for Gentoo, so I just deleted that directory.
--
Regards,
Peter.
Neil Bothwick
2023-10-19 12:00:01 UTC
Permalink
That config kinda reminds me of the old grub.  A title line, location of
kernel and then options.  Sounds easy enough.  The new grub config is
almost impossible to config by hand.  They had to make a tool to do it. 
That says a lot there.  ;-) 
GRUB2 was designed to be able to create a config for anything
automatically, such as from an installer. It does that very well, but is
total overkill for Gentoo-like people that like to stay in control.
--
Neil Bothwick

Keep your words soft and sweet in case you have to eat them.
Wols Lists
2023-10-29 11:30:01 UTC
Permalink
Post by Dale
That config kinda reminds me of the old grub.  A title line, location of
kernel and then options.  Sounds easy enough.  The new grub config is
almost impossible to config by hand.  They had to make a tool to do it.
That says a lot there.  ;-)
GRUB2 was designed to be able to create a config for anything
automatically, such as from an installer. It does that very well, but is
total overkill for Gentoo-like people that like to stay in control.
Such a shame it doesn't work. :-)

I tried to install SUSE dual boot, and it broke the installer - NOTHING
would boot. I needed a rescue disk to fix the mess ...

Cheers,
Wol

Grant Edwards
2023-10-19 19:40:01 UTC
Permalink
Post by Dale
That config kinda reminds me of the old grub.  A title line, location of
kernel and then options.  Sounds easy enough.  The new grub config is
almost impossible to config by hand.  They had to make a tool to do it. 
That says a lot there.  ;-) 
Manually configuring Grub2 for a single OS is pretty trivial. Here's
a typical grub.cfg file:

-----------------------------grub.cfg------------------------------------
timeout=10
default=0

root (hd0,0)

menuentry vmlinuz-5.15.135-gentoo {
linux /boot/vmlinuz-5.15.135-gentoo root=/dev/sda1
}

menuentry vmlinuz-5.10.76-gentoo-r1 {
linux /boot/vmlinuz-5.10.76-gentoo-r1 root=/dev/sda1
}
------------------------------------------------------------------------

If you want to get fancy and use labels and UUIDs, it looks like this

------------------------------grub.cfg----------------------------------
search --no-floppy --label ROOT --set root

timeout=10
default=0

menuentry vmlinuz-5.15.135-gentoo {
linux /boot/vmlinuz-5.15.135-gentoo root=PARTUUID=fd96ac2d-5521-c043-9fdb-5067b48fb063
}

menuentry vmlinuz-5.15.127-gentoo {
linux /boot/vmlinuz-5.15.127-gentoo root=PARTUUID=fd96ac2d-5521-c043-9fdb-5067b48fb063
}
------------------------------------------------------------------------

Most distros add 2 or 3 layers of obsfucation on top of grub.cfg with
scripts upon scripts upon scripts that read a dozen or so config files
and automagically detect kernels and initrds and other OSes and then
generate a grub.cfg file containing many hundreds of lines of stuff.

If you just boot one OS with a "main" kernel and a "backup" kernel,
then all you need is what you see above.
Peter Humphrey
2023-10-19 11:50:01 UTC
Permalink
Post by Neil Bothwick
If you like simple, here is a config file I use with systemd-boot
version 6.1.57-gentoo
linux /vmlinuz-6.1.57-gentoo
options root=/dev/sda3 panic=10 net.ifnames=0 i915.enable_ips=0
That's it! There is a separate file for each menu entry, but they are
this simple. There's also a global loader.conf, that runs to a massive 2
lines here!
Just to expand this in case it helps someone, and because the wiki article on
systemd-boot is not very helpful:

I like to keep one recent kernel along with the current one, as fallback. I
also have a small rescue partition on the same disk, and that also has two
kernels.

The main system has a choice of three boot options: standard, no X and no
network, and the rescue system the same but without the no-X.

That gives the following structure on this machine:

# ls -1 /boot/v*
/boot/vmlinuz-6.1.46-gentoo
/boot/vmlinuz-6.1.46-gentoo-rescue
/boot/vmlinuz-6.1.57-gentoo
/boot/vmlinuz-6.1.57-gentoo-rescue

# tree -L 3 /boot/loader
/boot/loader
├── entries
│ ├── 06-gentoo-rescue-6.1.46.conf
│ ├── 07-gentoo-rescue-6.1.46.nonet.conf
│ ├── 08-gentoo-rescue-6.1.46.conf
│ ├── 09-gentoo-rescue-6.1.46.nonet.conf
│ ├── 30-gentoo-6.1.57.conf
│ ├── 32-gentoo-6.1.57.nox.conf
│ ├── 34-gentoo-6.1.57.nonet.conf
│ ├── 40-gentoo-6.1.46.conf
│ ├── 42-gentoo-6.1.46.nox.conf
│ └── 44-gentoo-6.1.46.nonet.conf
├── loader.conf
└── random-seed

The random seed was put there by systemd-boot.

I think I have most eventualities covered. (Hah!)
--
Regards,
Peter.
Neil Bothwick
2023-10-18 17:50:01 UTC
Permalink
Post by Michael
Post by Neil Bothwick
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR",
although I've seen it mentioned in the interwebs as "protective GPT",
which I think is more accurate. It uses the first sector (LBA 0) to
store an MBR table showing the whole disk, or 2TB if smaller, as an MBR
partition. This is the first partition on the disk, typically 1 MiB in
size. It is meant to stop 20 year old partitioning tools from messing
up a GPT partitioning scheme because they can't see it. Arguably
nobody uses Windows 98 these days, so it should be safe to not have a
protective MBR on your GPT disks.
You need it if your hardware doesn't support EFI booting.
--
Neil Bothwick

The human mind ordinarily operates at only ten per cent of its capacity
... the rest is overhead for the operating system.
Michael
2023-10-18 18:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Michael
Post by Neil Bothwick
Oh, and if you use GPT, you no longer need the MBR compatibility
partition, or whatever its called. I no longer need it so I can't
remember the exact name.
Man pages of partitioning tools refer to it as "Protective MBR",
although I've seen it mentioned in the interwebs as "protective GPT",
which I think is more accurate. It uses the first sector (LBA 0) to
store an MBR table showing the whole disk, or 2TB if smaller, as an MBR
partition. This is the first partition on the disk, typically 1 MiB in
size. It is meant to stop 20 year old partitioning tools from messing
up a GPT partitioning scheme because they can't see it. Arguably
nobody uses Windows 98 these days, so it should be safe to not have a
protective MBR on your GPT disks.
You need it if your hardware doesn't support EFI booting.
Yes, quite right, a 4TB disk on a BIOS MoBo would need a GPT partitioning
scheme to access all 4TB, but with an old MoBo you'd use a BIOS Boot Partition
and GRUB as mentioned by Grant.
Mark Knecht
2023-10-17 19:40:01 UTC
Permalink
Post by Mark Knecht
<SNIP>
Well, the 770T now has Gentoo on it. As usual, my fresh built kernel
booted the very first time without error and every thing worked.
Sometimes, things go right. ROFL I have to say tho, I wish they would
split the install docs into two parts. One for old BIOS and one for the
efi thingy. It was confusing in a couple places but I got there. Maybe
some color coding would help???
<SNIP>
Congrats. I hope it goes well.
There are still times I wish I was running Gentoo - the documentation,
camaraderie and deep technical knowledge of the group, but I just
don't have time or patience to iron out issues with applications when
Gentoo isn't a supported distro. Still, for something like a NAS box it
makes sense if everything you run is sour\ce code coming from the
Gentoo code stores.
Cheers,
Mark
Ubuntu had a few points where it waited for a while. A couple times, it
had a two minute wait which makes the boot time pretty long.

I suspect that's a bit of a red herring. Ubuntu's default kernel builds
support for pretty much everything in the Linux hardware universe so
there's a lot of probing around for hardware you don't have and then a
whole lot of modules once you're up and running. My desktop machine has 115
modules showing up in lsmod. If you put a little bit of time into your
kernel development then I suspect the boot time would become much closer to
what you see on Gentoo.

After all, the kernel is the kernel. It doesn't belong to Gentoo or Ubuntu.
We're all running, more or less, the same kernel source code and I suspect,
by the time it gets to machine code, pretty much the same bits for
identical hardware.

None the less I'm happy you're up and running.
Mark Knecht
2023-10-17 22:30:01 UTC
Permalink
This wasn't the kernel. It was doing something else. I googled for it
and others had the same issue but I never found where there was a fix. Odd
thing is, it didn't do it every time. Just most of the time. When I was
having network problems, it added a few more wait times. Once it took
about 5 minutes from grub to a login prompt.
I get that the installation is gone so we'll likely never know what
happened but that said I would have thought sudo dmesg after a login would
have probably shown if something weird was holding up giving you a login
opportunity.

Strange to me that you didn't investigate it.

I have 4 Ubuntu-based machines here and over the last 6 years I've never
seen a 1 minute delay to login, much less 5 minutes.

When I look in the kernel ring buffer on my desktop machine I see most
everything done in 14 seconds from power-on. After that there are some
delays on the order of 90 seconds for a wireless network I don't actually
use much to be authenticated, and then a few apparmor comments out around 5
minutes, but none of that impairs normal login.

I think you are better off running Gentoo. You do you, right?

I hope the new setup works well for you.

- Mark
Grant Edwards
2023-10-18 03:20:01 UTC
Permalink
Post by Mark Knecht
I have 4 Ubuntu-based machines here and over the last 6 years I've
never seen a 1 minute delay to login, much less 5 minutes.
I see it all the time. Two minutes is the most common delay that I run
into, but I've seen longer. The two-minute delay I frequently run into
has usually got something to do with networking. For example, if one
of the links is down, Ubuntu is really fond of waiting a couple
mintues for it to come up before it finishes booting. [If it doesn't
wait for all the network interfaces, how is it going to do all that
cloudy crap nobody really wants?]

People have been complaining about that one for years and years and
years. There have been countless web pages written about it with
almost as many different answers/suggestions. Here's a recent one:

https://devicetests.com/fix-waiting-for-network-configuration-error-ubuntu-startup

The really fun part is that since the methods used for configuring the
network on Ubuntu change with the seasons, 95% of the suggested fixes
you find are irrelevent even if they were on-target at one point.

I've run into various other (less common) causes of Ubuntu boot
delays, but it's usually waiting for "network configuration".

And then there are the delays during shutdown...

And how about the stupid #@$% "modem manager" that mucks with serial
ports looking for dial-up modems. Yea, that still needs to be
installed and enabled by default on every Ubuntu install on the
planet...

--
Grant
Neil Bothwick
2023-10-18 07:40:01 UTC
Permalink
Post by Grant Edwards
Post by Mark Knecht
I have 4 Ubuntu-based machines here and over the last 6 years I've
never seen a 1 minute delay to login, much less 5 minutes.
I see it all the time. Two minutes is the most common delay that I run
into, but I've seen longer. The two-minute delay I frequently run into
has usually got something to do with networking. For example, if one
of the links is down, Ubuntu is really fond of waiting a couple
mintues for it to come up before it finishes booting. [If it doesn't
wait for all the network interfaces, how is it going to do all that
cloudy crap nobody really wants?]
There are different ways of waiting for the network to come up in
systemd, depending on your needs. Is lo enough, do you need an external
network connection available, or do you need one up and working, do you
have more than one network connection. It seems like Ubuntu is taking the
safest-for-all approach of waiting for all network interfaces to be fully
configured.
Post by Grant Edwards
The really fun part is that since the methods used for configuring the
network on Ubuntu change with the seasons, 95% of the suggested fixes
you find are irrelevent even if they were on-target at one point.
But change is good and new is better, no matter what it breaks, isn't it? ;-)
--
Neil Bothwick

If you can't be kind, be vague.
Rich Freeman
2023-10-18 14:30:01 UTC
Permalink
On Tue, Oct 17, 2023 at 11:15 PM Grant Edwards
Post by Grant Edwards
For example, if one
of the links is down, Ubuntu is really fond of waiting a couple
mintues for it to come up before it finishes booting. [If it doesn't
wait for all the network interfaces, how is it going to do all that
cloudy crap nobody really wants?]
I think the intent is to prevent dependency issues, though IMO that
would be better avoided by just setting dependencies on the systemd
units. However, many distros try to abstract systemd behind a wall of
distro configuration in part because they wanted to the original
transition to systemd to be seamless.

I have a bunch of ubuntu hosts that have dual NICs and they just love
to take forever to boot. This is despite having only one entry in
/etc/netplan and having it have "optional: true" set. networkctl
shows one interface as "configuring" even after the system is up for
days.

Hmm, might even be a systemd-networkd bug. I see ubuntu created
/run/systemd/network/10-netplan-alleths.network and it contains
"RequiredForOnline=no".

Oh well, I rarely reboot so it just hasn't been on the top of my list
of things to fix.

Honestly, I'd prefer if it just let me configure networkd directly.
I'm sure there is some way to do that, but I feel like if I do then
I'll have to read the release notes every time there is a new release
to make sure it isn't going to break it. If you're going to run a
distro like Ubuntu I've found it is generally best to just figure out
the "Ubuntu Way" and do it their way. If that isn't adequate, the
easier solution is to just use a more appropriate distro.
--
Rich
Grant Edwards
2023-10-18 14:50:01 UTC
Permalink
Post by Rich Freeman
Oh well, I rarely reboot so it just hasn't been on the top of my
list of things to fix.
I don't really care much on the Ubuntu servers I maintain because they
are rarely rebooted, and their network interfaces are always up.

A couple weeks ago I was testing/troubleshooting some PCI-express
board prototypes which meant rebooting dozens of times a day. I threw
Ubuntu server on a spare machine for that, but the 2-minute delay
drove me nuts. After futzing around for a while, I did get Ubuntu to
boot in a timely fashion [but it meant I had to manually configure one
of the network interfaces with 'ip' when I wanted to use it].

However, I never could get the serial console to work acceptably on
Ubuntu. It worked fine during the kernel boot, but once systemd
started up, the serial console got shut down. I wasted hours trying
to figure out how to fix that before I gave up on Ubuntu.

I finally ended up installing Gentoo/openrc, and then it only took a
few minutes to figure out how to keep the serial console working.

--
Grant
Neil Bothwick
2023-10-17 19:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Dale
Neil, I tired that command journalctl but not sure about the
options. It either returned a lot or nothing related.  I'll make
note of the systemctl command.  If Ubuntu survives, I may need it
one day.  ;-) 
If it returned nothing with -p err, nothing logged an error since the
last boot, which is odd considering something is broken. without -p
err, you get everything from the system log, it's like doing "cat
/var/log/messages" but only since the last reboot. You could pipe that
through grep, searching for the name of your network interface.
Well, I didn't search for err.  I followed some other advice I found
while searching.
Adding -p err means you only see error messages sent to the system log,
skipping the reams of info stuff. I always run "journalctl -b -p err"
after booting a new kernel, it tells me instantly if I've made a screw up.

Of course, if I screw up really badly, the thing doesn't even boot...
--
Neil Bothwick

I am Zaphod of Borg. Now, where's the coolest place to be assimilated...
Peter Humphrey
2023-10-18 12:00:01 UTC
Permalink
Maybe some color coding would help???
Not only that, but judicious use of colour would help a great deal. Having
everything in monochrome is no help at all. Neither is showing a numbered list
of contents but no sign of the numbers in the text, so that the ranking of
headings and subheadings is lost.

I've tried to raise a bugzilla entry on this but was rebuffed.
--
Regards,
Peter.
Dale
2023-10-18 19:00:01 UTC
Permalink
Post by Peter Humphrey
Maybe some color coding would help???
Not only that, but judicious use of colour would help a great deal. Having
everything in monochrome is no help at all. Neither is showing a numbered list
of contents but no sign of the numbers in the text, so that the ranking of
headings and subheadings is lost.
I've tried to raise a bugzilla entry on this but was rebuffed.
It could be that they would have to make use of additional tools and
they don't want too.  It could even be a security thing.  Still, it
needs something because sometimes, you think you still doing one thing
then find out you have went into another step you don't need.  I also
thought I was done with one but later realized I missed a bit.  It's
just not real clear when you switching from one path to another.  Thing
is, there are quite a few paths, the biggest being BIOS or efi, systemd
or openrc but there is some other minor ones. 

On one of the things I missed, I only realized I missed it because I've
installed Gentoo several times. If I was a noobie, I might not have
known until I tried to boot and something didn't work.  I can't recall
what it was tho. 

If you tried and they showed no interest, I guess it isn't going to
happen anytime soon.  :/

Dale

:-)  :-) 

P. S.  Back to working on my fuel drums.  What should be a one day
project is taking me several days.  I need more coal on the fire to
build up steam.
Neil Bothwick
2023-10-16 18:20:01 UTC
Permalink
Post by Dale
Post by Wols Lists
Anyone here have ideas?  Keep in mind, that thing uses systemd.  I
thought I hated that before.  I truly hate that thing now.  Trying to
figure out how to restart something is like pulling teeth with no
pain meds.
systemctl restart servicename?
I like systemd, but given my battles with other stuff, I feel your
pain. Having had to WRITE a service file, though, oh I'm so glad I
wasn't messing with SystemV or stuff like that!
I tried to restart a couple things I found during my searches but most
of them no longer exist.  It seems they change names pretty often.  I've
tried to find anything that looks like network to restart but I can't
tell what is what.
systemctl list-unit-files

will show all unit files installed on the system, although I don't find
that service names change. However, Ubuntu may decide to use a different
service to manage things from time to time.
--
Neil Bothwick

System halted - hit any Microsoft employee to continue.
Mark Knecht
2023-10-16 14:30:01 UTC
Permalink
Post by Dale
Howdy,
I finally got through with my backup restore. I had shutdown the NAS
box with Ubuntu on it since I was done with it. I wanted to do some
updates and check some other stuff, still learning how Ubuntu works, so
I rebooted it. I didn't hook up the drives with my backups on them
since I don't need them to update and such. The network not only
doesn't come up, it is just plain dead. The LEDs on the card are out,
the router shows no connection either, not even as inactive. I did a
LOT of searching. Found others with similar problems but nothing
helped. I found one thread that was recent and exactly my problem. It
appears that after some attempts to figure it out, the guru trying to
help ran out of ideas. I'll post a link below. [1] It's kinda hard to
post info since I have no way to get it from the NAS box to my main rig
since the network isn't working. That said, when I run lshw -C network,
it shows it as being disabled. It looks just like the thread linked
below.
Post by Dale
Since this is a built in network port and there is a history of issues
with those things with me, I installed a PCIe network card. It shows up
the same way, disabled. I rebooted the router just in case. I also
checked the BIOS to be sure it was enabled there, some glitch or
something could have disabled it. It shows up as enabled. I checked
the cable but then I thought of a way to rule out hardware. I booted a
Knoppix system that I have on the Ventoy USB stick. I still love that
thing. :-D The network came up and worked just fine without me doing a
single thing. I tried another image, can't recall which, and the
network worked in it too. I then said to heck with it, pulled out a
spare hard drive and put it in place of the current drive with Ubuntu on
it. I then tried to install Debian. Guess what, the network doesn't
work with it either. So, boot from USB image, network works. Boot from
a hard drive, network dead.
Since the Ubuntu forums are no help, searching didn't help, my last
resort is to ask here, on a Gentoo forum. :/ I figure there may be a
few people here that use Ubuntu on some system and are familiar with
this. Given it works on Knoppix and such, it has to be something
related to Ubuntu and I guess Debian as well. I downloaded both those
images a while back. My first instinct, the updates broke something.
What's odd, it doesn't work with the USB Debian/Ubuntu images either and
it worked fine before when I installed from it.
Anyone here have ideas? Keep in mind, that thing uses systemd. I
thought I hated that before. I truly hate that thing now. Trying to
figure out how to restart something is like pulling teeth with no pain
meds. Heck, I have to google just to find out what the name of the
service is because most make no sense. Still, I'd like to get it
working. If not, the 770T may end up with Gentoo yet.
[1] https://ubuntuforums.org/showthread.php?t=2483647
Thanks.
Dale
:-) :-)
Dale,
Sorry for your problems. I have a bunch of Kubuntu and
Ubuntu Server machines here so maybe I can help.

First, I am NOT understanding your situation completely. I
have a suspicion that possibly you didn't configure a status
ip and something has changed it. That happened to me once
with Ubuntu Server and also with Kubuntu

1) Does your Ubuntu machine have a keyboard and monitor?

2) If it does lets try a couple of commands to get a baseline
and have you post results back

ip l show

route -n

ip r

sudo ifconfig

nmcli device

ping www.yahoo.com

(change enp5s0 as needed)
ip l show enp5s0 | grep --color -w UP


Let's start with that and see where it leads.
Loading...