Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub install problem
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Thu Feb 09, 2023 9:41 pm    Post subject: Grub install problem Reply with quote

In the handbook, under installing grub, it says:

Code:

Install

Next, install the necessary GRUB files to the /boot/grub/ directory via the grub-install command. Presuming the first disk (the one where the system boots from) is /dev/sda, one of the following commands will do:

    When using BIOS:

    root #grub-install /dev/sda


I am thinking maybe my BIOS is set for UEFI instead of plain old fashoined boot. I did not want to reboot my box in the middle of the installaion just to look at the BIOS menus to see. Is this most likely the reason I am getting:

Code:

(chroot) livecd ~ # grub-install /dev/sda
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
(chroot) livecd ~ #


If so, then I need to shut the new installation down, adjust the BIOS setting, and reboot then chroot to try it again. I just didn't want to reboot if that is not the problem anyway.

I suspect something did not install correctly earlier or I would not be missing that shell script file.

What is the problem here, and what should I do about it?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1682

PostPosted: Thu Feb 09, 2023 9:43 pm    Post subject: Re: Grub install problem Reply with quote

Moriah wrote:

I am thinking maybe my BIOS is set for UEFI instead of plain old fashoined boot. I did not want to reboot my box in the middle of the installaion just to look at the BIOS menus to see. Is this most likely the reason I am getting:

Code:

(chroot) livecd ~ # grub-install /dev/sda
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
(chroot) livecd ~ #


That error occurs when booted into Legacy BIOS/CSM mode and GRUB_PLATFORMS="pc" is not set when building grub. (since no --target is included)
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Thu Feb 09, 2023 9:49 pm    Post subject: Re: Grub install problem Reply with quote

Moriah wrote:
I did not want to reboot my box in the middle of the installaion just to look at the BIOS menus to see.

You can always check (even in the middle of your installation) if you did an UEFI boot or a CSM boot. Check if /sys/firmware/efi exists ;-) If yes, you did an UEFI boot and your BIOS setting is: CSM disabled. Another way is to check with "mount" if efivarfs is mounted.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Thu Feb 09, 2023 9:53 pm    Post subject: Reply with quote

So can I just add GRUB_PLATFORMS="pc" to /etc/portage/make.conf and then re-emerge grub?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Thu Feb 09, 2023 10:24 pm    Post subject: Reply with quote

Yes, that did the trick. OK, on to configuration...

Thanks for the help. :D
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Fri Feb 10, 2023 10:30 pm    Post subject: Reply with quote

When I got the the grub-mkconfig -o /boot/grub/grub.cfg step, my output did not mention any initrd, yet I had one. I figured maybe the handbook was slightly out of step with the current grub-mkconfig, so went ahead and tried to reboot the system anyway, which, of course, did not work. :?

What could have caused grub-mkconfig to not find my initrd? Here is my /boot directory:

Code:

  /ssh:root@moses:/mnt/gentoo/boot:
  total used in directory 18416 available 22.5 MiB
  drwxr-xr-x  4 root root     1024 Feb  9 20:45 .
  drwxr-xr-x 20 root root      297 Feb  6 17:01 ..
  -rw-r--r--  1 root root  5710248 Feb  7 02:22 System.map-5.15.88-gentoo
  -rw-r--r--  1 root root   129164 Feb  7 02:22 config-5.15.88-gentoo
  drwxr-xr-x  6 root root     1024 Feb 10  2023 grub
  -rw-r--r--  1 root root  1764557 Dec 30  2014 initramfs-5.15.88-gentoo.tar.gz
  -rw-r--r--  1 root root 11159328 Feb  7 02:22 kernel-5.15.88-gentoo
  drwx------  2 root root    12288 Feb  5 15:36 lost+found


and here is my /boot/grub directory:

Code:

  /ssh:root@moses:/mnt/gentoo/boot/grub:
  total used in directory 17 available 22.5 MiB
  drwxr-xr-x 6 root root 1024 Feb 10  2023 .
  drwxr-xr-x 4 root root 1024 Feb  9 20:45 ..
  drwxr-xr-x 2 root root 1024 Feb  9 22:22 fonts
  -rw------- 1 root root 4436 Feb 10  2023 grub.cfg
  -rw-r--r-- 1 root root 1024 Feb  9 22:22 grubenv
  drwxr-xr-x 2 root root 6144 Feb  9 22:22 i386-pc
  drwxr-xr-x 2 root root 1024 Feb  9 22:22 locale
  drwxr-xr-x 3 root root 1024 Feb  9 22:22 themes


The grub.cfg file was autogenerated, as described in the handbook.

I have not installed a fresh system from scratch for a number of years, and previously I always used good old fashioned grub, which is now called lregacy grub, so this is all using grub2 (or whatever it is now called), and I find it frustrating that it is so much mor complicated, given that I am just trying to do essentially the same thing I have always done, but now with a newer, fancier, snazzed up grub that solves many problems for some people in certain situations, I am sure, but just creates problems for me.

Can somebody give me a clue what went wrong that it did not detect my initrd?

Could it be that my initramfs is compressed, and the new grub does not support that? It is a hand built initramfs that allow me to boot from a / filesystem that is under4 lvm control.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Fri Feb 10, 2023 11:02 pm    Post subject: Reply with quote

Moriah wrote:
Can somebody give me a clue what went wrong that it did not detect my initrd?

Could it be that my initramfs is compressed, and the new grub does not support that? It is a hand built initramfs that allow me to boot from a / filesystem that is under4 lvm control.

I dont think it is because it is compressed. Maybe grub cannot find it because of the name. I took a look into /etc/grub.d/10linux and found:
Code:
  initrd_real=
  for i in "initrd.img-${version}" "initrd-${version}.img" \
           "initrd-${alt_version}.img.old" "initrd-${version}.gz" \
           "initrd-${alt_version}.gz.old" "initrd-${version}" \
           "initramfs-${version}.img" "initramfs-${alt_version}.img.old" \
           "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
           "initrd-${alt_version}" "initramfs-${alt_version}.img" \
           "initramfs-genkernel-${version}" \
           "initramfs-genkernel-${alt_version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
           "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
    if test -e "${dirname}/${i}" ; then
      initrd_real="${i}"
      break
    fi
  done

Maybe try to give your initrmafs an other name. Another way could be to set the command line parameter "initrd=..." manually into grub configuration => https://wiki.gentoo.org/wiki/GRUB#Setting_configuration_parameters
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1682

PostPosted: Fri Feb 10, 2023 11:20 pm    Post subject: Reply with quote

Moriah wrote:
Code:

  /ssh:root@moses:/mnt/gentoo/boot:
  -rw-r--r--  1 root root  1764557 Dec 30  2014 initramfs-5.15.88-gentoo.tar.gz


.tar.gz? How was this initramfs created? It cannot be a tar archive. Only CPIO and compressed CPIO images are supported.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Fri Feb 10, 2023 11:24 pm    Post subject: Reply with quote

This initrd was stolen from the backup image of the machine I am rebuilding on a new hardware platform. That old machine used the original grub to boot, and that old grub did support .tar.gz files. I will try untarring and gzipping this file and making a cpio image with the same contents.

Thanks for the information.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Sat Feb 11, 2023 12:30 am    Post subject: Reply with quote

grknight wrote:
.tar.gz? How was this initramfs created? It cannot be a tar archive. Only CPIO and compressed CPIO images are supported.

I think it is an initrd and not an initramfs.

@Moriah:
It could be used the same way as it would be an initrmafs (kernel needs only: initrd=...), so I think it would be easier to rename it, instead rebuilding.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 1:23 am    Post subject: Reply with quote

I made a cpio archive as follows:

Code:

(chroot) livecd / # cd /usr/src
(chroot) livecd /usr/src # find initramfs
initramfs
initramfs/bin
initramfs/bin/busybox
initramfs/bin/lvm
initramfs/dev
initramfs/dev/console
initramfs/dev/sda
initramfs/dev/sda1
initramfs/dev/sda2
initramfs/dev/urandom
initramfs/etc
initramfs/lib
initramfs/mnt
initramfs/mnt/root
initramfs/proc
initramfs/root
initramfs/sbin
initramfs/sys
initramfs/init
(chroot) livecd /usr/src # find initramfs | cpio -o > initramfs-5.15.88-gentoo
6904 blocks
(chroot) livecd /usr/src # ls -la
total 3456
drwxr-xr-x  4 root root     109 Feb 10 14:17 .
drwxr-xr-x 13 root root     173 Feb 10 14:01 ..
-rw-r--r--  1 root root       0 Jan 29 13:51 .keep
drwxr-xr-x 11 root root     133 May  4  2011 initramfs
-rw-r--r--  1 root root 3534848 Feb 10 14:19 initramfs-5.15.88-gentoo
lrwxrwxrwx  1 root root      20 Feb  6 19:05 linux -> linux-5.15.88-gentoo
drwxr-xr-x 26 root root    4096 Feb  6 20:29 linux-5.15.88-gentoo
(chroot) livecd /usr/src # cp initramfs-5.15.88-gentoo /boot/
(chroot) livecd /usr/src # ls -la /boot/
total 21883
drwxr-xr-x  4 root root     1024 Feb 10 14:20 .
drwxr-xr-x 20 root root      297 Feb  6 12:01 ..
-rw-r--r--  1 root root  5710248 Feb  6 21:22 System.map-5.15.88-gentoo
-rw-r--r--  1 root root   129164 Feb  6 21:22 config-5.15.88-gentoo
drwxr-xr-x  6 root root     1024 Feb 10  2023 grub
-rw-r--r--  1 root root  3534848 Feb 10 14:20 initramfs-5.15.88-gentoo
-rw-r--r--  1 root root  1764557 Dec 30  2014 initramfs-5.15.88-gentoo.tar.gz
-rw-r--r--  1 root root 11159328 Feb  6 21:22 kernel-5.15.88-gentoo
drwx------  2 root root    12288 Feb  5 10:36 lost+found


But when I tried to do grub-mkconfig, I get:

Code:

(chroot) livecd ~ # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/kernel-5.15.88-gentoo
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
(chroot) livecd ~ #


Which looks like it still isn't finding my initrd.

What's wrong?

OOPS! SORRY! I did not see that last post before this one. Let me rename it and see what happens...

Code:

(chroot) livecd ~ # cd /boot/
(chroot) livecd /boot # mv initramfs-5.15.88-gentoo initrd-5.15.88-gentoo
(chroot) livecd /boot # cd
(chroot) livecd ~ # grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/kernel-5.15.88-gentoo
Found initrd image: /boot/initrd-5.15.88-gentoo
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
(chroot) livecd ~ #


COOL !!! It found it. Now to see if it will boot...

It doesn't :(

I do not even see anything that looks like grub is even starting. I am booting originally from a usb stick with a gentoo minimal install image on it, and I wait 15 seconds without hitting CR and it says "Booting from local disk..." and that's all that happens. Looks like grub is not getting control at all.

So I yanked the USB stick out and powered down and back up, and then it looked like grub started to run, but promptly the screen went blank.

SO I rebooted from the usb stick again, and here I sit, befuddled. :(
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 2:00 am    Post subject: Reply with quote

I am using a kvp-over-ip thru a kvm switch to talk to this machine, since it is actually a headless machine otherwise. Because of that, I was able to capture, using xv, the split second when it showed grub trying to run. Once I saw what was being displayed -- for only a second at most -- I saw that it was grub ver 2.06, and ther were 2 choices on the menu:

Code:

*Gentoo GNU/Linux
 Advanced options for Gentoo GNU/Linux


If I knew how to paste an image into this forum, I could show exactly what is on the screen.

Anyway, so I hit cursor-down-arrow and the screen stayed up till I hit CR, then it died again, but only after a very brief split second of a few lines of something possibly trying to boot.

So I tried several times and was finally able to capture the next screen after grub tries to boo the kernel. It looks like this:

Code:

  Booting `Gentoo GNU/Linux'

Loading Linux 5.15.88-gentoo ...
Loading initial ramdisk ...


And that's all she wrote...
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 2:02 am    Post subject: Reply with quote

So here is the contents of the initrd's init file:

Code:

#!/bin/busybox sh

echo Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
sleep 5

echo creating devices
echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
sleep 5

echo doing vgscan
lvm vgscan --mknodes
sleep 5

echo doing vgchange
lvm vgchange -a y
sleep 5

echo mounting root
#ls -la /mnt
#ls -la /dev/gentoo
mount /dev/gentoo/rootfs /mnt/root
#mount /dev/mapper/gentoo-rootfs /mnt/root
sleep 5

echo unmounting /proc and /sys
umount /proc
umount /sys
sleep 5

echo doing the pivot root
exec switch_root /mnt/root /sbin/init

echo OPS!
sleep 30



I see no sign that thsi script actually tries to run.

Likewise, the "advanced options" choice does the same thing.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Sat Feb 11, 2023 9:53 am    Post subject: Reply with quote

Moriah wrote:
So I tried several times and was finally able to capture the next screen after grub tries to boo the kernel. It looks like this:

Code:

  Booting `Gentoo GNU/Linux'

Loading Linux 5.15.88-gentoo ...
Loading initial ramdisk ...


And that's all she wrote...


:lol:

Moriah,

if your init would be wrong, you would see error messages or even a kernel panic. grub also tell you it is loading your kernel AND your initramfs ... so ... I think you have a completely different problem now - we had very often in the past here:

Your system starts, but you dont see anything, because of missing framebuffer configuration (or wrong graphics adapter configuration). Please check this out:
https://wiki.gentoo.org/wiki/Framebuffer#Early_framebuffer_drivers
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 12:32 pm    Post subject: Reply with quote

Aha! Yes, that is very possible. Since this is a headless system, I never configured any of that. I did install X and a vnc server, and emacs, and all that works, but I never configured any stuff to display X or a frame buffer on the actual machine itself. I alway install vnc and emacs very early in the installation process because I do not like using nano, and I have other machines I can ssh from into the new machine and I can run a vnc viewer there, so I will try that later today when I get a chance. Right now, I have other commitments first. Thanks for the tip!
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21708

PostPosted: Sat Feb 11, 2023 4:18 pm    Post subject: Reply with quote

Moriah wrote:
If I knew how to paste an image into this forum, I could show exactly what is on the screen.
The forums do not support uploading images. You can host them elsewhere and link to them as any external document, or you can capture the content as text and embed the text. I prefer when people do the latter, as it makes it possible to quote and search.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 6:31 pm    Post subject: Reply with quote

My kvm-over-ip uses a frame grabber to grab the vga output signal, and then serve it with its built-in vnc server. I can view it with a vnc viewer, but its just a bitmap raster, so I cannot capture text from it. I have been just manually transcribing the text that I can see on the vnc viewer. The good thing is I can capture the image with xv and freeze it, so if I am quick I can capture a fleeting screen so I can read it in the captured image.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 7:20 pm    Post subject: Reply with quote

Regarding the framebuffer, I have the BIOS set for legacy boot, not UEFI.

The handbook says "Enable EFI stub support, EFI variables and EFI Framebuffer in the Linux kernel if UEFI is used to boot the system (CONFIG_EFI, CONFIG_EFI_STUB, CONFIG_EFI_MIXED, CONFIG_EFI_VARS, and CONFIG_EFI_FB): "

Nowhere else is "framebuffer" mentioned, other than in the Enable support for UEFI example.

So what kind of framebuffer do I need, and why does the handbook not mention it? The only display I am using, other that vnc with its internal X-server, is the motherboard resident vga. Do I need to configure somethng for the vga that I missed?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Sat Feb 11, 2023 7:41 pm    Post subject: Reply with quote

Framebuffer is always needed for text output - independent if you do an UEFI boot or legacy. Try VESA and simple (as fallback).
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 7:43 pm    Post subject: Reply with quote

I kept booting repeatedly, trying to capture whatever I could, and I caught a very interesting capture that come up so quickly that I only see it occasionally before it disappears. Here is the essence of the first few lines:

Code:

[    0.180724] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap c0000020e60262 ec
ap f0101a
[    0.180769] Initramfs unpacking failed: invalid magic at start of compressed
archive
blah blah blah...


So it is not making sense of my initramfs. It says it can't unpack it. Well of course not! It isn't compressed. Somebody earlier said a .tar.gz wouldn't work, and that it only supports cpio and compressed cpio, so I made a non-compressed cpio archive.

OK, what options do I need to provide to cpio to make an archive that grub2 can understand? Here is what I used:

Code:

(chroot) livecd /usr/src # find initramfs | cpio -o > initramfs-5.15.88-gentoo

_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4241
Location: Bavaria

PostPosted: Sat Feb 11, 2023 8:01 pm    Post subject: Reply with quote

I think you are misssin: --format=newc

Maybe this helps: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Initramfs_Overview#External_CPIO_archive_with_a_directory

Of course you can use a compressed CPIO archive (if it is enabled in kernel).
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 9:37 pm    Post subject: Reply with quote

YE-HA !!! :D

System is booted and I got the login prompt!
But it is not accepting my passwd. :o

At least I got it to boot. Let me look into this...
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 9:48 pm    Post subject: Reply with quote

DUH! I forgot to run passwd after the chroot. :oops:

So I ran it, and SURPRISE! Big Brother is trying to make me follow his password rules. BAH HUMBUG!
How do I force it to let me choose my preferred root password anyway?

And I don't want to be forced to change it according to big brother's rules either. I'm root! Its my system, and I make the rules.

I could maybe see this approach for some IT department at some big international company, because they want to be like Microsoft and pester people with this stupid stuff.

Can I maybe install a different (older?) passwd program?
Is there a USE flag to override this behavior?
Don't tell me its for my own good. I determine my own good, not some power hungry developer.

Besides, this system is behind multiple firewalls on a private local lan with firewalled nat access to the internet.

Or can I just restore the /etc/shadow file from the previos incarnation of this system that I am building the replacement for?
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21708

PostPosted: Sat Feb 11, 2023 10:48 pm    Post subject: Reply with quote

See How to force passwd to accept easy passwords ? for a thread where another user violently disagreed with the defaults, and received advice on how to override them to enable use of weak passwords.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2366
Location: Kentucky

PostPosted: Sat Feb 11, 2023 11:28 pm    Post subject: Reply with quote

I decided to use a more complex root password, and then I was able to reboot and login as root.

The reason for my sucumbing to the password police was because I will be using this system's disk drive as a master that I will clone 4 more copies from, since I bought 5 identical machine last weekend. After those machine are set up, I will need to customize them with a new hostname and different /etc/passwd and /etc/shadow files copied from backups of the old version of those machines.

The is what happens when you have a lot of ancient hardware and you decide to upgrade it all at once. :mrgreen:

After the passwd/shadow copies, I will restore /home and a few other user-data directories, and emerge other needed packages, but at leats all the new machine will be bootable without going thru the entire installation process again.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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