SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I got a new Ideapad 330 laptop some time ago, installed Slackware 14.2 and it boots fine with Grub. Grub is installed into the MBR of the hard drive. BIOS is in legacy mode, no UEFI/gpt.
On one of the partitions of the same hard drive I later installed openSuse, skipping ther bootloader part. Then in Slackware, I added the following code to the grub config, so that it could boot Suse:
/etc/grub.d/12_suse:
#!/bin/sh
exec tail -n +3 $0
menuentry "SUSE sda2" {
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
echo 'Loading Suse ...'
linux /boot/vmlinuz root=/dev/sda2 ro
initrd /boot/initrd
}
(tried various combinations of the syntax)
Then I do:
sudo /usr/sbin/grub-mkconfig
sudo /usr/sbin/grub-install /dev/sda
(no errors)
No error messages but upon reboot, the grub menu only offers to boot my Slackware install, no trace of Suse in the menu.
This is the first time I'm using grub, have been sticking to lilo for the last 20 years.
What am I doing wrong here and how do I make grub boot Suse from the hard drive?
Not sure if the configuration is done differently on Slackware (or OpenSUSE), but here are a few thoughts.
Check whether the Grub config file contains the menuentry in the first place. It's normally /boot/grub/grub.cfg.
Usually, you add custom menuentries to 40_custom, at the end of the grub-mkconfig process. Perhaps 12_suse positions the menuentry at a stage in the config file where Grub is unable to recognize it as a menu point.
grub-install is the program that alters the MBR and puts Grub onto the disk, normally in the space between the MBR and the first partition (UEFI: In the EFI system partition). You should not have to run grub-install each time you change the Grub configuration, and who knows perhaps it interferes with your menuentry.
Last edited by berndbausch; 01-27-2020 at 07:19 PM.
This is a grub variable, and needs to establish the grub root, not the Linux root. Often doesn't matter but as you explicitly chose not to install grub there, you need to make this your Slack (grub) root location. Then rerun the mkconfig.
You only have to run grub-install once to install grub boot code into the mbr. Your suppose to run grub-mkconfig -o /boot/grub/grub.cfg anytime you want to make changes to the /boot/grub/grub.cfg.
In reality Slackware doesn't run grub-mkconfig with kernel updates, so unless your using the os-prober function to find other distros kernels, or using the actual kernel versions instead of vmlinuz, vmlinuz-huge and/or vmlinuz-generic you can edit the /boot/grub/grub.cfg directly and never run grub-mkconfig
Last edited by colorpurple21859; 01-27-2020 at 09:50 PM.
There is nothing wrong with the if opensuse is on the second partition.
Yup
Quote:
You only have to run grub-install once to install grub boot code into the mbr.
Right, and I thought so initially too. Only added this step when things didn't work
Quote:
Your suppose to run grub-mkconfig -o /boot/grub/grub.cfg anytime you want to make changes to the /boot/grub/grub.cfg.
In reality Slackware doesn't run grub-mkconfig with kernel updates, so unless your using the os-prober function to find other distros kernels, or using the actual kernel versions instead of vmlinuz, vmlinuz-huge and/or vmlinuz-generic you can edit the /boot/grub/grub.cfg directly and never run grub-mkconfig
Not sure if the configuration is done differently on Slackware (or OpenSUSE), but here are a few thoughts.
Check whether the Grub config file contains the menuentry in the first place. It's normally /boot/grub/grub.cfg.
Thaks, this really helped. The config did not contain the entry. Running "sudo grub-mkconfig -o /boot/grub/grub.cfg" instead of "sudo grub-mkconfig" solved the problem, and I got the menu entry. So I got another problem instead: when picking Suse sda2 from the grub menu, the thing still won't boot, complaining of an "unknown filesystem". guess it's something related to btrfs, and I see other people had similar problem. Will dig a bit deeper later tonight.
Quote:
Usually, you add custom menuentries to 40_custom, at the end of the grub-mkconfig process. Perhaps 12_suse positions the menuentry at a stage in the config file where Grub is unable to recognize it as a menu point.
I used 40_custom initially, but then tried 12_suse when things didn't work. The docs weren't clear enough for me on where I should put my stuff.
Quote:
grub-install is the program that alters the MBR and puts Grub onto the disk, normally in the space between the MBR and the first partition (UEFI: In the EFI system partition). You should not have to run grub-install each time you change the Grub configuration, and who knows perhaps it interferes with your menuentry.
: when picking Suse sda2 from the grub menu, the thing still won't boot, complaining of an "unknown filesystem". guess it's something related to btrfs, and I see other people had similar problem. Will dig a bit deeper later tonight.
replace
Code:
insmod ext2
with
Code:
insmod btrfs
in your config file should do the trick.
Last edited by colorpurple21859; 01-28-2020 at 10:36 AM.
Unfortunately, it's not as simple. I'm still getting "unknown filesystem" message, followed by "you need to load the kernel first".
I can't seem to find a good working example of the files in /etc/grub.d so I'm not going to waste my time on this any more. Will either reinstall Suse with ext4fs as root, or pick some other distro. (All I need is a 64 bit envoronment for Android development, no matter which distro)
did you edit /boot/grub/grub.cfg or your config file. If it was your config file then you need to run grub-mkconfig -o /boot/grub/grub.cfg again.
No I did not edit /boot/grub/grub.cfg by hand because it explicitly says it will be overwritten. So I guess the right way is to edit my config files then run grub-mkconfig, otherwise I risk ovewriting my changes at some later point.
Anyway, the problem with "unknown filesystem" was likely not related to grub, but rather to my Suse install. Because I tried booting Suse from my old usb install media and it failed! With a hugely informative message "Can not boot!", written in red. So I'm now in the process of overwriting the Suse install with Slackware64, will see how it works.
The only question that remains at this point is: can I boot Slackware64 with a 32-bit grub from my existing slackware 32 install? If not, I'll have to install the boot loader in the 64 bit OS.
Distros other than SLE and openSUSE seem to have been rejecting offering support for BTRFS to varying degrees. As a long time openSUSE user I've been rejecting it completely, as have a considerable number other long time openSUSE users who are support forum participants. IMO, BTRFS is basically about SLE support and snapper rollbacks, which naturally flow through to openSUSE along with other core components due to their synergistic relationship.
If you want to try opensuse again, two work arounds
1. Install opensuse grub to opensuse partition, create a custom grub entry to chainload from slackware
2. Create a /suse directory on the slackware partition, copy the kernel and initrd from opensuse /boot to the /suse on the slackware partition. Create a custom entry to boot the /suse/<suse kernel/initrd> in slackware. With this work around will have to copy the new kernel/initrd over every time there is a kernel update in opensuse.
Last edited by colorpurple21859; 02-02-2020 at 08:37 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.