3

I installed Arch Linux on my computer, but I also installed Slackware on another partition (/dev/sda5).

I would like to configure Grub2 from the Arch Linux installation through the /etc/grub.d/40_custom file to add Slackware to the menu list at boot.

I searched for quite some time on the Internet but failed to find an answer to whether I need to install Grub in Slackware too and what exactly to write in the config file.

Reading the full documentation of grub is too long.

I tried the following but during loading of Slackware, I have a kernel panic event saying something like "unable to find block":

menuentry "Slackware 14.0" {
        set root='hd0,msdos5'
        echo 'Loading Linux Slackware 14.0 ...'
        linux /boot/vmlinuz root=UUID=xxxXXxx-xx-XXX... ro acpi=off
}
4
  • 1
    The Arch Wiki has the example you are looking for...
    – jasonwryan
    Jun 6, 2013 at 23:33
  • Possible duplicated of: askubuntu.com/questions/62731/…
    – ramonovski
    Jun 6, 2013 at 23:35
  • As per the example given by jasonwryan, you need an initrd line. The initrd handles root=UUID=....
    – sourcejedi
    Jun 7, 2013 at 8:28
  • @sourcejedi: you should put your comment as an answer; This is the right one; I replaced the UUID by the traditional device name (/dev/sdx#) and it works fine. The initrd was not done and it needs the system to be booted with the same kernel to make it. Jun 7, 2013 at 15:13

2 Answers 2

2

On my Ubuntu system it suffices to run grub-mkconfig to find partitions with new installations. You could run (without the manual change):

grub-mkconfig | diff - /boot/grub/grub.cfg

to see if Arch Linux is capable of doing so as well. And if it is, run:

grub-mkconfig -o /boot/grub/grub.cfg
1
  • It's capable alright. :)
    – schaiba
    Jun 7, 2013 at 17:16
1

You are seeing that error because you have root=UUID=..., but no initrd line. The kernel doesn't have built-in support for root=UUID=.... It has to be handled by an initrd.

  • So you could just add an initrd line. Normally you should have an initrd generated during the install process.

Otherwise I think the problem is with your (Slackware) linux install, and you need to rescue it. OS install media often include very handy rescue systems. I strongly recommend obtaining such a rescue system when you install your OS, and keeping it around. (And check you would still have internet access, if you're not already confident about how to use the rescue system).

  • Or you could try not using the UUID. Instead, specify the device node for the root filesystem directly, such as root=/dev/sda1. You could put the UUID back after you finish bootstrapping / rescuing your system.

In your comment you present an interesting circular dependency. How to generate the initrd, if that process requires booting the exact same kernel? However I don't think that requirement makes any sense. (Consider the installer, kernel upgrades etc.) It should be quite possible from a matching rescue system, or when chrooted into the install from a newer rescue system...

You must be thinking of mkinitrd_command_generator.sh. I see elsewhere an example of invoking it for a specific kernel.

/usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/vmlinuz-generic-2.6.37.6

Hopefully this means it isn't limited to the current kernel, because that would be a bit useless.

2
  • slackware is shipped with a kernel named "huge"; everything in it is compiled as non-module. It doesn't need an initrd. Jun 8, 2013 at 13:56
  • Interesting. I see that isn't the recommended configuration. docs.slackware.com/slackbook:booting.
    – sourcejedi
    Jun 9, 2013 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .