Cannot boot on new installation

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
Beaufix
Posts: 7
Joined: 29. Mar 2020, 13:10

Cannot boot on new installation

Post by Beaufix »

Hi everyone,

I'm not sure whether my question belongs to this thread or to the live-cd thread. I used the Salix Live-cd 14.2 to install salix into a SDCARD 32Go with the graphic installer tool. I've selected the grub method and all went fine, no error, then trying to boot it, got the 4 pinguins, and error message:

Code: Select all

 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown bloc(0,0)
and a trace dump. Then system halt. I also tried to use lilo instead of grub with no more success. I don't want to install Salix into the local hard drive as there is windows 10 on it and I absolutely need it for some other work, so I need to install Salix on an external drive. I'm stuck there. Many thanks in advance for any help.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Cannot boot on new installation

Post by gapan »

The kernel does not include the necessary modules to boot from an SD card. You'll have to load the modules separately. If you want to do that, you'll have to create an appropriate initrd.img that will include the necessary modules for your hardware and load it in your lilo.conf (or grub configuration).
Image
Image
User avatar
Beaufix
Posts: 7
Joined: 29. Mar 2020, 13:10

Re: Cannot boot on new installation

Post by Beaufix »

gapan wrote: 29. Mar 2020, 18:37 The kernel does not include the necessary modules to boot from an SD card. You'll have to load the modules separately. If you want to do that, you'll have to create an appropriate initrd.img that will include the necessary modules for your hardware and load it in your lilo.conf (or grub configuration).
Thank you for your answer. I also tried to install Salix into an external usb drive and the problem is the same, it doesn't seems like a problem related to the SDcard...
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Cannot boot on new installation

Post by mimosa »

The reason is the same, and the solution. I think there might even be some help with the details on the wiki ...

It's not by any means an insurmountable task to dual boot with Windows, and I'm sure you would get some good help with it on this forum. The thing is to proceed carefully at first. But I understand your caution.
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: Cannot boot on new installation

Post by gapan »

Yes, indeed the reason is similar for the external USB drive, as mimosa said. In this case you'd need USB media support in the kernel, which is also a module.
Image
Image
User avatar
Beaufix
Posts: 7
Joined: 29. Mar 2020, 13:10

Re: Cannot boot on new installation

Post by Beaufix »

Understood. Well, I have absolutely no clues on how to build initrd.img ... Can I download one anywhere ? I can have ubuntu or mint installed on usb external drive, how can I use it to build a Salix initrd.img ? Do you have a step by step guide ? Many thanks for your help.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Cannot boot on new installation

Post by mimosa »

There are two steps: building an initrd to provide the missing module at boot, and hooking it up with your bootloader.

Here are some instructions about how to make the initrd:
https://docs.slackware.com/howtos:slack ... or_generic
Make sure you use the right kernel number, which can be checked by

Code: Select all

uname -r
Because you are using the Live you installed from, everything is the same in both environments, so you can do all this in relative comfort; but if you were booting from a different Linux, you could build the initrd inside the chroot. It's important to have everything you want to be able to use actually plugged in when building the initrd.

Then establish the location of your device and mount it to a temporary directory, for example by running lsblk. You want the root directory /, not the separate /boot partition (though you will need to mount that too to put the initrd in the right place and tell the bootloader about it). In fact on second thoughts, it may be best to do that first:

Code: Select all

mkdir -p /mnt/boot/efi
mount /dev/sdb1 /mnt/boot/efi # whatever the right partiition is
cp initrd.gz /mnt/boot/efi/EFI/Salix-Xfce-14.2/
And edit elilo.conf to tell the bootloader it is there:

Code: Select all

notepad /mnt/boot/efi/EFI/Salix-Xfce-14.2/elilo.conf
This initrd allows you to boot with the generic kernel (slimmer than the default 'huge' kernel) but for simplicity, I suggest sticking with the latter.
Here is my elilo.conf (yours will probably be different, especially the root partition):

Code: Select all

mimosa[~]$ cat /boot/efi/EFI/Salix-Xfce-14.2/elilo.conf
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
        label=vmlinuz
        read-only
        append="root=/dev/sdb2 vga=normal ro"
You just need to add this line to the indented stanza:

Code: Select all

  initrd = initrd.gz
Now we chroot into the installation and update the bootloader:

Code: Select all

mkdir /mnt/chroot
mount /dev/sdb2 /mnt/chroot # whatever the right partiition is
cd /mnt/chroot
mount -t proc /proc proc/
mount --bind /sys sys/
mount --bind /dev dev/
chroot /mnt/chroot /bin/bash
Mount the boot partition inside the chroot:

Code: Select all

lsblk
mkdir -p /boot/efi
mnt /dev/sdXY /boot/efi # choose the right partition (it is conceivable it will look different inside the chroot)
Update the bootloader:

Code: Select all

[code]eliloconfig
Answer yes to both questions (though once you have it working you may prefer to boot with rEFInd).

Full disclosure: this is just from memory and what I hope are reliable sources, and I haven't tested it. But hopefully it is mostly right and others can add corrections as needed!
User avatar
Beaufix
Posts: 7
Joined: 29. Mar 2020, 13:10

Re: Cannot boot on new installation

Post by Beaufix »

mimosa wrote: 30. Mar 2020, 08:58 There are two steps: building an initrd to provide the missing module at boot, and hooking it up with your bootloader.
...
Full disclosure: this is just from memory and what I hope are reliable sources, and I haven't tested it. But hopefully it is mostly right and others can add corrections as needed!
Many thanks ! So this is for elilo and I had made a Salix installation with grub, so I guess I will have to re-install Salix from the live-cd and select lilo instead of grub, or simply use the Salix iso text installer, and then apply your solution by booting with the live-cd and update mine new Salix installation as explained. I will work on it as soon as possible.

I was secretly hoping that I could download an initrd.img from somewhere... Maybe it will be a good idea for future releases to have an initrd.img able to boot on external drives :-)
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Cannot boot on new installation

Post by mimosa »

I'm sure you could do it with Grub, too - but I will leave that up to you! Whatever your bootloader, you need to do two things: inform the bootloader of the existence of the initrd, and actually update the bootloader so it uses that information.

That's probably as straightforward as putting the initrd in place - I'm not sure exactly where this should be, for grub - and running update-grub. But I haven't used grub in a long time.

The whole thing sounds like a terrible faff but it's actually quite straightforward. By the way it's important that you have everything you want to be able to use plugged in when building the initrd - so perhaps the SD card and the external hard drive.

Something I forgot - before updating the bootloader, you need to mount the boot partition inside the chroot as well. I'll edit my post above to reflect this.
User avatar
Beaufix
Posts: 7
Joined: 29. Mar 2020, 13:10

Re: Cannot boot on new installation

Post by Beaufix »

mimosa wrote: 30. Mar 2020, 08:58 There are two steps: building an initrd to provide the missing module at boot, and hooking it up with your bootloader.

Here are some instructions about how to make the initrd:
https://docs.slackware.com/howtos:slack ... or_generic
Make sure you use the right kernel number, which can be checked by

Code: Select all

uname -r
I installed a new Salix from the text-mode installer ISO into an external USB hard drive and I did a setup for lilo, just to be sure once again.

ok, step 1, I've tried to build the initrd as explained but it didn't work. When running the command:

Code: Select all

/usr/share/mkinitrd/mkinitrd_command_generator.sh
system don't give me the expected answer, and replies:

Code: Select all

/usr/share/mkinitrd/mkinitrd_command_generator.sh
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:

mkinitrd -c -k 4.4.29 -f  -r none -u -o /boot/initrd.gz
...and there is no "-m ..." things with a list of modules. I'm stuck here.

Meanwhile, I had another idea: Maybe I could run Salive live-cd in persistent mode written into an ext4 partition, and then remaster Salix ?! Salix have nearly all the tools I need for my work except chromium (because of some modules), thunderbird (because of mail archives) and teamviewer (because of remote internet work). If you know of a documentation on how to remaster Salix I will take it too :-)

I just checked my computer octane benchmark is around 25000, that's a way lot more than windows !
You're genious, guys 8-)
Post Reply