This weekend was very hard for my netbook. I installed three Linuxes on it:
- Gentoo because I love it;
- Ubuntu because it has good support for hardware out of the box and contains recent software;
- Fedora because I want to investigate how it configures systemd.
Well, Gentoo was a bad choice for a netbook. I compile software during two days and still about 100 packages remain. Really, I don’t want something extraordinary: I just install XFCE and teTeX.
Firstly, I had three partitions (one home and two root partitions for Linuxes), but when I decided to install three distros, I preferred to archive my Gentoo and Fedora, partition the disk, and unpack two distros while Ubuntu was installed using chroot.
As you see, the way how I install Linux is quite unusual 🙂
That’s nice that GRUB2 generates its config basing on installed distros. There are some problems, however.
grub2-mkconfig generates a config that allows _every_ available kernel to boot with the any distro. This is usually undesired since different kernels belong to different distros.
If we run Debian (vmlinuz-3.2.0-4-amd64) and Gentoo (vmlinuz-3.8.13-gentoo-05.23).
grub2-mkconfig will allow it to boot with vmlinuz-3.2.0-4-amd64. This boot will fail since vmlinuz-3.2.0-4-amd64 requires a lot of kernel modules.
grub.cfg doesn’t contain invalid items now. Ubuntu and Gentoo booted without problems, but Fedora disallowed login on ttys and X.
When I enter the correct password on tty and press Enter, something flashes on the screen and I see the greeting again. I have recorded a video to see the text: “no shell: permission denied”. It was quite easy to google it.
The solution proposed by Sauron was:
If it’s selinux that’s breaking things boot with the installer in rescue mode, mount your current system, cd /mnt/sysimage and then ‘touch .autorelabel’ and then reboot to your normal system.
I preferred a simper way. I just added
selinux=0 to command line of my kernel, booted, and logged in without problems.