View previous topic :: View next topic |
Author |
Message |
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Thu Dec 24, 2020 12:45 am Post subject: AMD using legacy BIOS? [SOLVED] |
|
|
I just built an AMD based machine and will soon be installing Gentoo. One thing for sure is that I want to use syslinux instead of grub 2...absolutely detest that whole generated config stuff in grub 2 and have been using syslinux on my old systems for years. I have no need for any dual boot etc, and was considering using legacy BIOS. However some experiences I had today are making me wonder about that.
I was experimenting with boot media...both USB thumb drives with various images, plus booting from physical CDs using an external USB burner I have (the new machine has no DVD/CD drive). When I switched the "Compatibility Support Module" settings in the setup to use legacy only, the horrific crap I saw happen was the most random, buggy stuff I've ever witnessed...almost can't even describe it. I even had USB keyboard lockups that required hitting the reset button...unimaginable. This is an ASrock X570 Phantom Gaming 4 motherboard with very recent firmware too, which should be really solid. No clue what that nightmare was all about. That pretty well scared me off of the legacy BIOS idea though I'm not sure what to think. The questions I have are:
1. Is anyone there using legacy BIOS for their Gentoo-only AMD machines?, and
2. Is anyone doing so with syslinux?
I see that EFI is clearly supported for syslinux:
https://wiki.gentoo.org/wiki/Syslinux#Setup_on_EFI_systems
Thanks in advance!
Tom
Last edited by tld on Wed Dec 30, 2020 12:41 am; edited 1 time in total |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Thu Dec 24, 2020 3:22 am Post subject: |
|
|
Legacy BIOS goodness, or not, depends entirely on your particular BIOS. My older AMD machines don't even have EFI baloney. But every EFI I've worked with is buggy in many different respect. But, my primary desktop is an HP Pavillion HPE that boots in legacy mode only, and I use GRUB, but it's not AMD.
I've only used syslinux on my old Libretto Pentium 1 mini palmtop.
You don't have to let GRUB autogenerate the grub.cfg. You can roll your own.
Apparently your firmware isn't so solid, or there is operator error somewhere. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Dec 24, 2020 4:22 am Post subject: |
|
|
Two AMD's, a Bulldozer and a Ryzen 2700X running rEFInd. Set it and forget it. No re-installing every time you rebuild a kernel. My first install was on the Bulldozer and I made some mistakes. The Ryzen went smoother. I didn't even have to use efibootmgr because of the excellent MSI BIOS. After installing via ebuild, I booted into the BIOS and saw the choice there and just used the BIOS to select it as the default boot. And don't put your kernels in the efi partition. Not needed, rEFInd will find them on an ext4 partition. No need for separate /boot either.
Strange spelling of REFInd is because that's how upstream spells it. The ebuild is refind.
Have zero experience with AsRock. I'm told is an el cheapo manufacturer. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2203
|
Posted: Thu Dec 24, 2020 10:18 am Post subject: Re: AMD using legacy BIOS? |
|
|
tld wrote: | ...absolutely detest that whole generated config stuff in grub 2... |
You don't have to use a generated grub.cfg - indeed the documentation somewhere mentions that the generator (initially at least) was an aide to building configs, not the only way. I use a static config that I hand coded using grub's scripting language. Here's a link to it in the Gentoo wiki.
That said, on a UEFI machine you can get away without any boot manager such as grub, rEFInd, etc. If you configure it right (using efibootmgr), your Gentoo will just be one of the boot options along with USB stick, CD ROM etc. And better, you should be able to have different Gentoos, in particular, Gentoo.new, Gentoo.old and default Gentoo. _________________ Greybeard |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Thu Dec 24, 2020 3:31 pm Post subject: |
|
|
Thanks for all the replies! I'm a bit confused because my total unfamiliarity with EFI.
Tony0945 wrote: | Two AMD's, a Bulldozer and a Ryzen 2700X running rEFInd. Set it and forget it. No re-installing every time you rebuild a kernel. My first install was on the Bulldozer and I made some mistakes. The Ryzen went smoother. I didn't even have to use efibootmgr because of the excellent MSI BIOS. After installing via ebuild, I booted into the BIOS and saw the choice there and just used the BIOS to select it as the default boot. And don't put your kernels in the efi partition. Not needed, rEFInd will find them on an ext4 partition. No need for separate /boot either.
Strange spelling of REFInd is because that's how upstream spells it. The ebuild is refind. | That sounds really nice...will have to look into that. I also notice that that's an option not mentioned in the handbook. Some of this threw me a bit, like the "re-installing every time you rebuild your kernel" statement...mainly because I'm used to BIOS setups where all I ever did was to edit /boot/extlinux/syslinux.cfg. I take it you're referring to doing stuff that copies the new kernel to the ESP?
Tony0945 wrote: | Have zero experience with AsRock. I'm told is an el cheapo manufacturer. | Definitely not what I want to hear given that ship's sailed. I see some mixed opinions on ASrock in general but this specific MB seems to be considered quite good.
Goverp wrote: | That said, on a UEFI machine you can get away without any boot manager such as grub, rEFInd, etc. If you configure it right (using efibootmgr), your Gentoo will just be one of the boot options along with USB stick, CD ROM etc. And better, you should be able to have different Gentoos, in particular, Gentoo.new, Gentoo.old and default Gentoo. | This is an interesting option too...I see this is mentioned in the handbook. Might consider that as well. I like minimalist approaches.
I'm sure I'll find this in the handbook, but when using EFI I assume you still have a boot partition mounted at /boot where the kernels get installed just as with BIOS systems? Clearly I have a lot to learn about this.
EDIT: Just to note...another issue for me is that Gentoo has done such a good job of allowing me to use old hardware that this is will be my first new install in 13 years (since building my MythTV systems). So despite using Gentoo for over 16 years I'm feeling a little noob-ish .
Tom |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Thu Dec 24, 2020 4:33 pm Post subject: |
|
|
tld wrote: | Thanks for all the replies! I'm a bit confused because my total unfamiliarity with EFI.
Tony0945 wrote: | Two AMD's, a Bulldozer and a Ryzen 2700X running rEFInd. Set it and forget it. No re-installing every time you rebuild a kernel. My first install was on the Bulldozer and I made some mistakes. The Ryzen went smoother. I didn't even have to use efibootmgr because of the excellent MSI BIOS. After installing via ebuild, I booted into the BIOS and saw the choice there and just used the BIOS to select it as the default boot. And don't put your kernels in the efi partition. Not needed, rEFInd will find them on an ext4 partition. No need for separate /boot either.
Strange spelling of REFInd is because that's how upstream spells it. The ebuild is refind. | That sounds really nice...will have to look into that. I also notice that that's an option not mentioned in the handbook. Some of this threw me a bit, like the "re-installing every time you rebuild your kernel" statement...mainly because I'm used to BIOS setups where all I ever did was to edit /boot/extlinux/syslinux.cfg. I take it you're referring to doing stuff that copies the new kernel to the ESP? |
I switched to UEFI on my 8350 a few years ago and when I put together my 3700x systems, I started right with UEFI.
My 8350 is on a M5A99FX and that took a little more work to set up, but my two 3700x systems are both on Prime X570-Pro motherboards and it was as simple as install and configure REFInd and it just works.
I created a /boot partition and formatted it FAT32.
When I install my kernel, it goes to /boot/EFI/Gentoo/linux-current.efi as well as /boot/EFI/Gentoo/linux-(version).efi so I have backup copies of previous kernels.
REFInd is set up to boot the linux-current by default, but I can select any of the previous kernels too. You'll need to make sure you have the EFI options selected in your kernel config... after that, it's just set it and forget it. _________________ Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Thu Dec 24, 2020 4:36 pm Post subject: |
|
|
tld wrote: | I'm sure I'll find this in the handbook, but when using EFI I assume you still have a boot partition mounted at /boot where the kernels get installed just as with BIOS systems? Clearly I have a lot to learn about this. | Never mind on this...I'm reading this which clarifies this I think:
https://wiki.gentoo.org/wiki/EFI_System_Partition
The "Default partitioning scheme" in the guide (including the BIOS boot partition) is a bit confusing. For a system using purely EFI that's not needed correct? Thanks!
Tom |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6222 Location: Dallas area
|
Posted: Thu Dec 24, 2020 4:41 pm Post subject: |
|
|
tld wrote: | tld wrote: | I'm sure I'll find this in the handbook, but when using EFI I assume you still have a boot partition mounted at /boot where the kernels get installed just as with BIOS systems? Clearly I have a lot to learn about this. | Never mind on this...I'm reading this which clarifies this I think:
https://wiki.gentoo.org/wiki/EFI_System_Partition
The "Default partitioning scheme" in the guide (including the BIOS boot partition) is a bit confusing. For a system using purely EFI that's not needed correct? Thanks!
Tom |
I only have an esp partition, no bios boot _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Thu Dec 24, 2020 4:48 pm Post subject: |
|
|
Thanks!
Tom |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1805 Location: South America
|
Posted: Thu Dec 24, 2020 4:53 pm Post subject: |
|
|
tld wrote: | The "Default partitioning scheme" in the guide (including the BIOS boot partition) is a bit confusing. For a system using purely EFI that's not needed correct? |
Despite the misleading title of the section, the shown partitioning scheme is just an example. It is there so that the Handbook can then give examples of command usage in later sections. With respect to the BIOS boot partition:
Quote: | What is the BIOS boot partition?
[...]
The BIOS boot partition is needed when a GPT partition layout is used with GRUB2 in BIOS/Legacy mode. It is not required when booting in EFI/UEFI mode. |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Dec 24, 2020 5:32 pm Post subject: |
|
|
Here is the layout on my MSI 2700x board
Code: |
Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 976773134 976566287 465.7G Linux filesystem
|
Code: | $ df -h |grep sda
/dev/sda1 99M 1.9M 97M 2% /boot/efi
| The other partition is root ('/'). That's it, aside from proc mounts, CIFS mounts and such.
No separate /boot, nothing but refind on the fat partition. refind finds the kernels by itself.
You might want a swap partition, but I have 32G RAM and never swap out. I never understood the RedHat recommendation for swap double the size of RAM. The more RAM I have, the more swap I need? Sounds backwards.
Read the upstream docs for more info as to how it works and background on EFI. http://www.rodsbooks.com/refind/
Merry Christmas! |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Thu Dec 24, 2020 5:37 pm Post subject: |
|
|
Tony0945 wrote: | You might want a swap partition, but I have 32G RAM and never swap out. I never understood the RedHat recommendation for swap double the size of RAM. The more RAM I have, the more swap I need? Sounds backwards.
Read the upstream docs for more info as to how it works and background on EFI. http://www.rodsbooks.com/refind/
Merry Christmas! | Merry Christmas to you too!!...and thanks everyone for the help!
Yea...I actually did create a swap partition based on some things I read but I actually have 64GB of RAM on this machine so it's probably beyond silly...but I have more disk than I'll use in a lifetime anyway.
Tom |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Thu Dec 24, 2020 5:53 pm Post subject: |
|
|
I have 32GB of RAM with a 32GB swap partition, mostly because I compile on tmpfs with 16 threads... even then, it barely ever swaps.
My original EFI install only had a 100 MB partition, but when I put my new systems together, I made it 1 GB... storage is cheap and I like having plenty of spare kernels around just in case something breaks. And all of my /boot is my FAT32 partition, I don't do a separate /boot and /boot/EFI. _________________ Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Dec 24, 2020 8:24 pm Post subject: |
|
|
saellaven wrote: | My original EFI install only had a 100 MB partition, but when I put my new systems together, I made it 1 GB... storage is cheap and I like having plenty of spare kernels around just in case something breaks. And all of my /boot is my FAT32 partition, I don't do a separate /boot and /boot/EFI. |
The kernels have to be in boot but a separate /boot is not needed. I don't like storing anythong on FAT, so I store only the minimum. |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Fri Dec 25, 2020 12:00 am Post subject: |
|
|
Tony0945 wrote: | saellaven wrote: | My original EFI install only had a 100 MB partition, but when I put my new systems together, I made it 1 GB... storage is cheap and I like having plenty of spare kernels around just in case something breaks. And all of my /boot is my FAT32 partition, I don't do a separate /boot and /boot/EFI. |
The kernels have to be in boot but a separate /boot is not needed. I don't like storing anythong on FAT, so I store only the minimum. |
I'm not a fan of FAT either, but the EFI specs call for it, at least for whatever the UEFI bios is handing things off too during POST.
In addition to /boot/EFI/Gentoo my kernels still exist in /usr/src/linux-* as well if I need to get to them that way. _________________ Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Dec 25, 2020 2:16 am Post subject: |
|
|
saellaven wrote: | I'm not a fan of FAT either, but the EFI specs call for it, at least for whatever the UEFI bios is handing things off too during POST. |
Only refind and it's tools need to be in the FAT EFI partition. The BIOS hands control to refind and refind looks around the computer for kernels. It presents what it finds and if no selection is made in the (configurable) timeout period, it loads the kernel with the latest timestamp and transfers control to the kernel. If you get a bad kernel you can select a different one at boot and then "touch" that kernel making it the new default. I use ten seconds for timeout. If you press a key in that period the timer stops. I think it stops if you move the mouse also. It's quite neat. this is all from the basic configuration. |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Fri Dec 25, 2020 2:39 pm Post subject: |
|
|
Tony0945 wrote: | Only refind and it's tools need to be in the FAT EFI partition. The BIOS hands control to refind and refind looks around the computer for kernels. It presents what it finds and if no selection is made in the (configurable) timeout period, it loads the kernel with the latest timestamp and transfers control to the kernel. If you get a bad kernel you can select a different one at boot and then "touch" that kernel making it the new default. I use ten seconds for timeout. If you press a key in that period the timer stops. I think it stops if you move the mouse also. It's quite neat. this is all from the basic configuration. | I've been reading several things about refind and it sounds really great. One aspect has me a little confused:
As far as it finding kernels on the system, are you saying that it finds the compiled binary kernels under /usr/src/*? The Gentoo wiki on refind says "rEFInd should be able to find a kernel if standard naming convention is used. This makes it compatible with (semi-) automatic kernel installation methods such as genkernel --install or make install without further configuration". To further confuse me...I've actually never even used the "make install" step and have always copied kernels with my own stuff...but it appears that "make install" copies the new kernel to the static file path /vmlinuz(?)...which of course would always be the newest kernel only. Given that you say you're not copying kernels to /boot, I figured the only other place to look was under the /usr/src/* directories(?).
Just to note, I've never used an initramfs which I'm assuming simplifies things. Thanks in advance for any clarification!
Tom |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Dec 25, 2020 3:40 pm Post subject: |
|
|
tld, I do copy the kernels to /boot
I build with a sctipt. Someone much more adept than I could probably have the script adjust grub. IIRC, that's what genkernel does or did.
Here's my script:
Code: | ~ $ cat `which buildmykernel`
#!/bin/bash
if [ "${USER}" = "tony" ] #forgot to su
then sudo su
fi
#test if running on a bare VT
if [ "$TERM" = linux ]; then
TERM=xterm #so make munuconfig will display correctly
fi
NPROC=$( nproc ) # run nproc to get the number of cores
#NPROC=$(( 2 * $(nproc) )) #only for systems with two threads per core
cd /usr/src/linux || { echo "Did you forget 'eselect kernel set' ?" >&2 && exit 255 ; }
if [ "$1" != "" ]; then
( cp "$1" .config && echo "Config is $1") || exit 255;
else
echo "Using present kernels built-in config"
zcat /proc/config.gz >.config
fi
# At this point we should compare kernel versions and make oldconfig if the base version has updated
make oldconfig
make menuconfig
make -j"${NPROC}" || { echo "make -j${NPROC} failed"; exit 1; }
make -j"${NPROC}" modules_install || { echo "make modules_install failed"; exit 2; }
make -j"${NPROC}" install && echo "Don't forget to update boot loader menu"
#i.e. virtualbox modules
echo "Building Out of Kernel modules"
emerge @module-rebuild
echo "Done"
|
The first "if" warns me of a bad habit I have of doing system work as "tony" instead of "root", not really part of the process, It just prevents permission failures later. I see I have a harmless typo in the note of the second if. I copied this one from my k10 which is still on grub-legacy. Someone more adept than I can probably automagicly determine the thread count, perhaps from /sys. If run bare the script uses the running kernel's built-in config. Optionally you can pass a parameter which is the filename of a specific config you want to start from instead. The "make install" line puts the final kernel in /boot. The note to update the menu is for grub or syslinux installs. It is meaningless for refind because that step will be done at boot time by refind itself. "emerge @module-rebuild" is a portage built-in but easy to overlook. At least, I find it so! Usually on an update "menuconfig" comes up and I just exit out, sometimes I actually want to change something. The "zcat /proc/config.gz" won't work unless your running kernel has CONFIG_IKCONFIG_PROC=y, a very useful option that takes up a minor amount of disk space. And, yes, in the past I have forgotten to run "eselect kernel set". |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Fri Dec 25, 2020 4:59 pm Post subject: |
|
|
Tony0945 wrote: | The "make install" line puts the final kernel in /boot. The note to update the menu is for grub or syslinux installs. It is meaningless for refind because that step will be done at boot time by refind itself. | OK...that makes much more sense. I also now see that I missed the fact your /dev/sda1 (EFI System) is mounted at /boot/efi, and not at /boot. So I now get that your kernels are in /boot but not on the EFI partition.
As I said, I never used the kernel's "make install" and for the life of me I couldn't find anything clarifying what it actually does (except for many referring to that /vmlinuz thing?). The fact that refind doesn't need anything edited for the new kernel and the fact that it just needs to be there is awesome.
I actually never heard of @module-rebuild. The only thing I have like that is the nvidia-drivers on my MythTV frontend, which I just always make sure to re-emerge.
Thanks again!
Tom |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Fri Dec 25, 2020 6:02 pm Post subject: |
|
|
I have a separate script for building my kernel, which then calls this script to install it.
You'll note I install the current kernel twice. rEFInd always defaults to linux-current.efi on my system, but I have all of my previous kernels available too, in case of emergency breakage (which actually happened a couple months ago).
I also store a copy of the kernel's .config in /root/kernel so I have an archive of those as well
Code: |
#!/bin/bash
# Copies bzImage to /boot/EFI/Gentoo/linux-(version)
# Copies System.map to /boot/System.map-(version)
# Saves a copy of the .config to /root/kernel for history
# Installs modules
LINUXSRC=/usr/src/linux
KVERSION=$(grep "^VERSION\ =" $LINUXSRC/Makefile | sed -e "s/VERSION\ = //")
KPATCH=$(grep "^PATCHLEVEL\ =" $LINUXSRC/Makefile | sed -e "s/PATCHLEVEL\ = //")
KSUB+=$(grep "^SUBLEVEL\ =" $LINUXSRC/Makefile | sed -e "s/SUBLEVEL\ = //")
KNAME=$KVERSION.$KPATCH.$KSUB
echo "Installing System.map and kernel plus archiving .config"
cp $LINUXSRC/arch/x86_64/boot/bzImage /boot/EFI/Gentoo/linux-$KNAME.efi
cp $LINUXSRC/arch/x86_64/boot/bzImage /boot/EFI/Gentoo/linux-current.efi
cp $LINUXSRC/System.map /boot/System.map-$KNAME
cp $LINUXSRC/.config /root/kernel/config-$HOSTNAME-$KNAME
echo "Installing modules"
cd $LINUXSRC
make modules_install
echo "Rebuilding modules"
emerge -1 @module-rebuild
|
_________________ Ryzen 3700X, Asus Prime X570-Pro, 64 GB DDR4 3200, GeForce GTX 1660 Super
openrc-0.17, ~vanilla-sources, ~nvidia-drivers, ~gcc |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Sun Dec 27, 2020 11:57 pm Post subject: |
|
|
Thanks everyone for the help, and thanks Tony0945 for the refind suggestion...I absolutely love that so far!
I was a little confused as to what I actually wanted in my /boot/refind_linux.conf. The default created by the refind-install was clearly not what I wanted (which is apparently expected when booted from the minimal install). I ended up with just this, which seems to work: Code: | cat /boot/refind_linux.conf
"Default" "root=/dev/sda3 rootfstype=ext4" | My first reboot failed, which I tracked down to having omitted CONFIG_SATA_AHCI from the kernel. After correcting that I'm not booted up! Cool. Thanks again!
Tom |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Dec 28, 2020 1:57 am Post subject: |
|
|
Code: | ~ $ cat /boot/refind_linux.conf
"Boot by PARTUUID" "root=PARTUUID=54fee329-ff75-4879-bdbb-93268b470f32 vga=0x365 net.ifnames=0 mitigations=off acpi_enforce_resources=lax "
"Boot by /dev/sdXn" "root=/dev/sda2 vga=0x365 net.ifnames=0 "
"Boot by /dev/sr0" "root=/dev/sr0 vga=0x365 net.ifnames=0 "
| Yje first line is the default. You have to use the GUI to get the others. I think the second line was from when I was startoing out. It's easy to mistype those hex numbers. You may not want mitigations off or the acpi command. I heartily recommend net.ifnames=0 if you only have one NIC in your box. If you have more than one, use a udev rule to assign your own names by MAC address.
And my server: Code: | ~ $ cat /boot/refind_linux.conf
#timeout 5
"Boot by PARTUUID" "net.ifnames=0 root=PARTUUID=280acabd-75cb-41f6-8322-a428a78bdf2a"
"Boot by /dev/sr0" "root=/dev/sr0 vga=0x365 net.ifnames=0 "
#"Boot by /dev/sdXn" "root=/dev/sda2 net.ifnames=0 "
| Only two. The second is in case I screw up badly enough to boot sysrescuecd.
EDIT: I'm leaving the typo in the first line. Those short words are easy to mistype also! |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1852
|
Posted: Mon Dec 28, 2020 5:26 am Post subject: |
|
|
Interesting. Thanks for that. The entry I have now does seem to work. As far as the net.ifnames=0, so far I've never needed that. I have a dummy file at /etc/udev/rules.d/80-net-name-slot.rules to force the ethN format names. Unless I'm mistaken, the MAC address of the onboard Ethernet wold never change correct?...and as a result that should remain as eth0?
Thanks for all the help! I actually just got X running on the new machine and working correctly with the amdgpu stuff as far as I can tell...getting there.
Tom |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Dec 28, 2020 2:58 pm Post subject: |
|
|
A short divergence into persistent names. "net.ifnames=0" is a kernel command. Having a blank udev rule is a udev convention. I think there is a higher likelihood of udev changing it's convention than the kernel changing without notice. If you rely on udev, then one day you might do a portage update, reboot and find you can't get to the internet. Even if the liikelihood of changing without warning is the same, I update portage every week. I update the kernel roughly monthly (when a new kernel becomes stable) and I always keep at least one old kernel handy. I can either select that at boot or run "touch" and the old becomes the new and thus refind's default.
YMMV. It's Gentoo. Your box, your way.
BTW, I use the kernel line AND a blank udev file. I do have a box with on-board and PCI board NIC's. No "net.ifnames at boot" and two udev rules by MAC, naming them "lan0" and "lan1". I could have used nic0 and nic1 or maybe obnic0 and pcinic0. And possibly obeth0 and pcieth0. I do know that ETH0 is the same as eth0. The kernel will display uppercase names but somewhere inside it ignores case. |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3007 Location: Edge of marsh USA
|
Posted: Mon Dec 28, 2020 5:39 pm Post subject: |
|
|
I've been getting along keeping my eth0 for many years with just:
Code: | $ ls -l /etc/udev/rules.d
total 0
lrwxrwxrwx 1 root root 9 May 24 2018 80-net-name-slot.rules -> /dev/null
lrwxrwxrwx 1 root root 9 May 24 2018 80-net-setup-link.rules -> /dev/null |
But, since I really don't want this to change, I've just added the following THIRD line to:
/etc/default/grub
Code: | # Append parameters to the linux kernel command line
#GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX="net.ifnames=0" |
I do use an auto generated grub.cfg, but I also keep settings in /etc/grub.d/40_custom and 41_custom along with a hand jammed /boot/grub/custom.cfg.
Reading further, at least some authorities seem to believe that biosdevname=0 may also be required. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|