You are not logged in.

#1 2022-05-09 23:22:41

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

[On hold]Cannot boot Lithium 2.1 (32-bit host)

We lost power this weekend and several of my PC's went down. When power came back, all the PC's were ok, except my main file server. I re-installed Bunsenlabs Linux, using Lithium 2.1. The installation apparently went ok, but when I tried to boot the system, I got the following error message:

   error: file '/boot/grub/i386-pc/normal.mod' not found.
   Entering rescue mode ...

I have tried re-installing several times, but with no progress. I am looking for suggestions on how to get this PC in a bootable mode.

I also brought up Bunsenlabs live from a CDROM and then mounted the root file system of the PC. I changed directory to the root directory of that file system. From there I changed directory to ./boot/grub. I ran "file *" and the results were:

  grub.cfg:       ASCII text
  unicode.pf2:    GRUB2 font "Unifont Regular 16"

The i386-pc directory is not there.

I have tried using Boot-Rescue, but I am getting an error message with it (I am pursuing that issue in a different forum).

Jim A.

Last edited by jjanderson5 (2022-05-16 13:35:15)

Offline

#2 2022-05-10 00:45:01

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

The installation apparently went ok, but when I tried to boot the system, I got the following error message:

   error: file '/boot/grub/i386-pc/normal.mod' not found.
   Entering rescue mode ...

So, then the installation did not go well... No relevant info in logs /var/log/installer/*?

Instead of reinstalling system, you can try to in chroot reinstall grub2 and update grub.

For help with chroot se post: Chroot help-script

Just for the sake of it, maybe you should before you mount your system disks, search for badblocks (see "man badblocks")?


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#3 2022-05-10 13:49:52

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

@rbh

Thank you for your reply. I am slowly working through it. Currently, I am running 'badblocks'.

I looked at your script, but have not tried to run it yet. I have made a copy and edited it with comments which I hope are accurate. If they are accurate, feel free to add them to your script. If they are not accurate, I hope you can help correct any misinterpretations. Note that I have '????' where I definitely don't understand why that line exists.

Commented chroot script:

echo ""
echo "  Press ENTER to continue or CTRL+C to abort..."
echo ""
read stdin

# /srv/chroot is the directory which will serve as the
# temporary 'root' directory
mkdir -p /srv/chroot  # -p = --parents (no error if existing, make parent directories as needed)
export MY_CHROOT=/srv/chroot

# sda3 is an example here. Enter the device that is the physical device where "/" will exist
#   In this example, /srv/chroot will be at /dev/sda3
mount -rw /dev/sda3 $MY_CHROOT # -rw = --read-write

# sda2 is an example here. It is the device (you must specify the real device on your
# host, not sda2),  where the grub boot directoy will exist.
# In this case, the boot directory will be at /srv/chroot/boot on the device /dev/sda2
mount -rw /dev/sda2 $MY_CHROOT/boot

# The following 'mount' commands map the named directories, i.e. proc, dev, etc.,
# from the /srv/chroot directory to the live version of each directory.
mount -o bind -t proc /proc $MY_CHROOT/proc # -o = --options -t = --types
mount -o bind /dev $MY_CHROOT/dev
mount -t devpts /dev/pts $MY_CHROOT/dev/pts
mount -t sysfs /sys $MY_CHROOT/sys
mount -o bind /tmp $MY_CHROOT/tmp

## ???? Log the chroot ????
echo "/srv/chroot" > /etc/debian_chroot

Offline

#4 2022-05-10 14:51:34

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

I have made a copy and edited it with comments which I hope are accurate. If they are accurate, feel free to add them to your script. If they are not accurate, I hope you can help correct any misinterpretations.

You have turned the mountings of / and boot the wrong way.

Maybe better write:

# Mount root-partition (/)
# In this example /dev/sda3 vill be mounted at /srv/chroot 
mount -rw /dev/sda3 $MY_CHROOT # -rw = --read-write

# Mount boot partition if boot files are on own boot partition
# In this case, the boot partion /dev/sda2 will be mounted at /srv/chroot/boot
mount -rw /dev/sda2 $MY_CHROOT/boot
jjanderson5 wrote:

# The following 'mount' commands map the named directories, i.e. proc, dev, etc.,

No, /etc is not remapped. Only /proc/pts and /dev. They are  pseudo filesystems changed at bootup. If you when in live environment, mount /dev/sda3 under /mnt (when badblocks has run), you will se that /mnt/proc is empty. /mnt/dev, has much less devices than /dev (be it when booted live session or your standard system).

## ???? Log the chroot ????
echo "/srv/chroot" > /etc/debian_chroot

No, it is for telling your host it is running a chrooted system.
See https://askubuntu.com/questions/372849/ … nal-prompt


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#5 2022-05-13 15:22:24

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

Thank you to rbh! I have been able to chroot so that I am now rooted to the boot partition.

When I look at this partition, the /boot directory is empty. I am now trying to figure up how to populate that directory properly so that I can boot. Reading different webpages, it looks like the best way to go would be to run:

    grub-install

But grub-install does not exist on the BunsenLabs live CDROM I am running and I have not found a way to grab 'grub-install' from the internet and to install it on the root file system. Is there a way to do this? I am still looking, but no luck yet.

Offline

#6 2022-05-14 12:53:03

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

A bit more progess. I found that after I 'chroot' and then mount the root partition of my PC on the live disk as /mnt/rootdisk, I can find grub-install at /mnt/rootdisk/usr/sbin/grub-install.

I then entered the following command:

grub-install --root-directory=/boot /dev/sdb1

I then rebooted and the machine booted with the following screen:

                   

GNU GRUB version 2.02+dfsg1-20+deb10u4

   Minimal BASH-like line editing is supported. For the first word, TAB
   lists possible command completions. Anywhere else TAB lists possible
   device or file completions.

grub>

I am thinking that either:
  1) my grub-install command is wrong
      or
  2) The contents of the /boot directory is not correct.

I'm inclined to think item 2, i.e. the contents of /boot is the problem and will investigate further.

Offline

#7 2022-05-14 18:10:59

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

Thank you to rbh! I have been able to chroot so that I am now rooted to the boot partition.

I do not know what  "rooted to the boot partition" is. Maybe you misunderstood?
You should mount your root partition (/dev/sda3?) to /srv/chroot and your boot partition to /srv/chroot/boot.

When I look at this partition, the /boot directory is empty.

Before you had some files and the grub directory on the boot partition...

I am now trying to figure up how to populate that directory properly so that I can boot. Reading different webpages, it looks like the best way to go would be to run:
    grub-install

It is to my knowledge only way to install grub.

But grub-install does not exist on the BunsenLabs live CDROM

No, but if you chroot to your system, it will be available. If it is not available in your system, you have managed to severly misshandled your installation.

I have not found a way to grab 'grub-install' from the internet and to install it on the root file system. Is there a way to do this?

On the menu, jgmenu => Help and Resources => Debian, choose link to "Package Search".  Fill in "grub-install", choose "Descriptions", choose "oldstable", if still on Buster. Choose "Search". Scroll down to "Download grub-installer" and choose i386. Choose to download from nearest server. But, the package is not installable in the live environment...


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#8 2022-05-14 18:28:28

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

A bit more progess. I found that after I 'chroot' and then mount the root partition of my PC on the live disk as /mnt/rootdisk, I can find grub-install at /mnt/rootdisk/usr/sbin/grub-install.

So, you did not use the help-script? Did you mount your boot partition under /mnt/rootdisk/boot?

I then entered the following command:
grub-install --root-directory=/boot /dev/sdb1

If you chroot, grub-installer knows that your boot partion is mounted under /.../boot and you do not need the argument "--root-directory=". The last argument to grub-install, the [INSTALL_DEVICE], should not be to a partition, but to the whole disk, if the system where you reinstall grub, is the sole OS. And did realey your harddisk turn up as sdb? You checked with command "lsblk -f" and/or "fdisk -l"?

Assuming your disk is sda, when booted live session and you have run chroot, to reinstall grub the command is:

grub-install /dev/sda

Then, you have to update grub:

update-grub2

Check that the script says it found linux image and initrd image under directory /boot/


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#9 2022-05-14 18:34:30

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

My apologies. I made progress yesterday and I thought I had posted my latest progress. Yesterday, I ran grub-install as follows:

   grub-install --root-directory=/boot /dev/sdb1

where /dev/sdb1 is the partition that I want to boot from. I then tried a re-boot and the system booted up to a prompt:

   grub >

I see from your recent post that I should run update-grub2. I will give that a try and post the results.

Offline

#10 2022-05-14 19:46:33

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

A step closer.


I ran upgrade-grub2. Following is the output:

Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
File descriptor 3 (/home/user/.config/jgmenu/hooks) leaked on lvs invocation. Parent PID 2758: /bin/sh
File descriptor 5 (pipe:[30765]) leaked on lvs invocation. Parent PID 2758: /bin/sh
File descriptor 6 (pipe:[30765]) leaked on lvs invocation. Parent PID 2758: /bin/sh
  WARNING: Device /dev/loop0 not initialized in udev database even after waiting 10000000 microseconds.
  WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.
  WARNING:    [18 more WARNING lines like the one above.]  ...
Found unknown Linux distribution on /dev/sda5
grub background_image is BL default, setting text colors
done

When I rebooted, the BL boot screen appeared:

Title:
     "GNU GRUB vesion 2.02+dfsg1-20+dev10u4
       

A Block Window With Red Text and the BunsenLabs logo icon in the middle

The window text where the boot choices normally are is:
        High Contrast Text

Text at the bottom of the window is the standard BL instructions:

           ^
   Use the | and | keys to select which entry is highlighted.
                 V

   Press enter to boot the selected OS, ...

I assume the grub configuration has not been created properly.

Offline

#11 2022-05-15 09:35:50

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

I see from your recent post that I should run update-grub2. I will give that a try and post the results.

Command grub2 and grub is the same. Command "man grub2" and "man grub" says:

update-grub, update-grub2 - stub for grub-mkconfig

command ls -l update-grub2, outputs:

lrwxrwxrwx 1 root root 11 11 jul  2021 /usr/sbin/update-grub2 -> update-grub

// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#12 2022-05-15 11:59:46

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,513

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

jjanderson5 wrote:

A step closer.

Does not seems so to me.

I ran upgrade-grub2.

No, you run update-grub2. You must pay attention to such details...

File descriptor 3 (/home/user/.config/jgmenu/hooks) leaked on lvs invocation. Parent PID 2758: /bin/sh

I have not seen any such error before. When booting from grml live iso, I do not get it. But, it does not seems to be important error.

WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.

Also new for me, but neither seems do be damaging error.

But, did you get any error about /dev/sdb? I asked you befor, but you did not answer: are you sure sdb is the harddisk you want to boot from?
Do you have two harddisks or is /dev/sdb an removable device you want to boot from?
Update-grub did not report that it found image in /boot/?
Then you are doing something wrong.

If you now has updateed grub for wrong device, maybe you installed grub to wrong device, when installing system?

If you only have one harddisk  it would probabley be named /dev/sda, when booting live session. What are you booting from? CD-rom, USB-stick or what?
In live session, what is the result of command

# fdisk -l

Found unknown Linux distribution on /dev/sda5

Have you examined the content of /dev/sda5? That is not your system?

To fix grub, without total reinstallation, you have to:
1 Mount root partition.
2 Mount boot partition if it is on own partition.
3 Mount pseudo file systems
4 Chroot to your system
5 Install grub.
If /dev/sdb1 not is you boot partition redo the grub-install command.
6 Update grub

But, you must be certain about which device/partition(s) to handle.

Use the | and | keys to select which entry is highlighted.
   Press enter to boot the selected OS, ...

You have the whole menu, or is it missing?

I assume the grub configuration has not been created properly.

The main grub configuration is /boot/grub/grub.cfg. When in live session, you can compare grub.cfg on your broken system, with the grub.cfg on the live system.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#13 2022-05-16 13:34:20

jjanderson5
Member
Registered: 2016-05-10
Posts: 130

Re: [On hold]Cannot boot Lithium 2.1 (32-bit host)

@rbh

It has been a busy weekend. I did some thinking and I am going to put my work on this PC on hold. I have a spare PC and I am going to replace the current PC, my LAN server, with the spare. I'm pretty sure I can have my LAN up and back to normal in a few hours.

With my LAN functional, I can work on the problem PC more casually. I definitely want to bring it back into operation so that I have a spare in place. My starting point will be to review your last two posts.

Offline

Board footer

Powered by FluxBB