Dual boot problem "Kernel too old"
- BeagleBrainz
- Offline
- User is blocked
- Posts: 1437
- Thank you received: 570
This is my setup a little complicated
Win7 on /dev/sda2
Mint 18.2 on /dev/sda3
Mint 19.2 with a RT_PREEMPT installation of Linuxcnc on /dev/sda6
Mint 19.2 with a RTAI installation of Linuxcnc on /dev/sda7
Win7 (not shown) and Mint 19.2 RT_PREMPT and Mint 19.2 RTAI are chainloaded from the 18.3 Mint grub loader.
When I installed each version of 19.2 I installed grub to /dev/sda6 RT_PREEMPT & grub to /dev/sda7 for RTAI
So when I boot, the grub version installed to /dev/sda (Mint 18.3) is loaded gives me the option the usual entries (as if Mint 18.3 was the only OS) plus the following chainloaded entries.
Windows 7
Linux Mint 19.2 Tina RT_PREEMPT (19.2) on /dev/sd6
Linux Mint 19.2 Tina RTAI (19.2) on /dev/sd7
When I select either of the Mint 19.2 options I'm take to a secondary grub Menu (ie grub is reloaded with a new grub.cfg from the relevant partiton)
This is a snippet from my /etc/grub.d/40_custom on The Mint 18.3 partiton
menuentry 'Linux Mint 19.2 Tina RT_PREEMPT (19.2) on /dev/sd6' {
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
chainloader +1
}
menuentry 'Linux Mint 19.2 Tina RTAI (19.2) on /dev/sd7' {
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
chainloader +1
}
In my /etc/default/grub on the Mint 18.3 partition I have this line
GRUB_OS_PROBER_SKIP_LIST="fa56f8aa-d049-4177-b662-4bc2da5b96b3@/dev/sda6 b15b6017-7c55-47eb-983a-b4510370a224@/dev/sda7"
This prevents grub probing /dev/sda6 & /dev/sad7 and adding the kernel entries them to the grub list.
Obliviously the versions of /etc/default/grub on the other partitions have similar entries but modified to suit.
And /etc/grub.d/40_custom on the other partitions have entries to chainload the other ones.
What this does is when I install a new kernel or do a update-grub it only updates the kernel entries for the partiton it is run on. The chainloader entries stay the same. And the entries on the chainloaded partition stay the same.
So I guess if you reinstall the Wheezy grub loader to /dev/whezzy-install-partion rather than /dev/sda (assuming sda is your boot disk) and modify the ubuntu grub config not to run os-prober on the wheezy partiton and just chaiload it you should be ok.
I know this sounds confusing, but I'll put it down and let you ask questions so you understand your way. This makes sense to me, maybe not to others.
Please Log in or Create an account to join the conversation.
Ok but let me try to write down your aproach adapted to mine.
In my case root of Ubuntu is on sda8 and root of wheezy is sda7.
Now I would reinstall grub from wheezy ( I will be able to find out how) to sda7.
In ubuntu sda8 I would make a new file looking like that in /etc/grub.d/40_custom
menuentry 'LinuxCNC on /dev/sda8' {
insmod part_msdos
insmod ext4
set root='hd0,msdos8'
chainloader +1
}
does that entry invokes something similar done grub shell as it is proposed here?
www.linux.com/training-tutorials/how-res...ooting-grub-2-linux/
grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
grub> boot
Now in the second part of your answer I am strugeling a bit.What does grub probing mean.
Just guessing in my case I would enter something like this to
GRUB_OS_PROBER_SKIP_LIST="fa56f8aa-d049-4177-b662-4bc2da5b96b3@/dev/sda7"
of course hash code (right term?) I would adapt to the correct one from my wheezy instalation.
So when I do this entry in Ubuntu and do a kernel update it would prevent it to affect my wheezy installation. right?
thanks again for taking the time
Felix
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Offline
- User is blocked
- Posts: 1437
- Thank you received: 570
Those entries are the UUID of each partition followed by the Linux device name. The grub docs explain it.
Yeah so you have to adapt the entries to suit your machine, blkid will list partition names and UUIDs plus a few other bits.
If you search google for grub_os_prober_skip_list you find some better explanations.
How many OSs are on the HDD ?
Chainloading basically calls the routine on the boot record of the partition specified.
The grub docs on line are a good read. I’d recommend you take a look at them for each version of grub you have as there might be some differences in syntax. Just remember to install one version of grub to the installation or partition that is usually mounted as boot, if you have a separate boot partition.
Just to be sure can you post up your partition scheme and where each partition is mounted for each OS ?
Please Log in or Create an account to join the conversation.
sda
├─sda1 vfat DISK1_VOL1 2B21-4D2B
├─sda2
├─sda5 swap 449eee23-ace8-4de2-a810-34f978b50f82
├─sda6 vfat 81FA-F12D /boot/efi
├─sda7 ext4 5e0dd327-314c-4d92-b225-6f8f017f97c1 /
├─sda8 ext4 e56c53ff-3c1a-4bcf-8733-3962fa82c831
└─sda9 ext4 da898f84-6319-4b8d-adc7-78c6471d2a7c
As far as I remember sda8 is root of wheezy and sda9 is home
I added to /etc/grub.d/40_custom the entry
menuentry 'LinuxCNC on /dev/sda8' {
insmod part_msdos
insmod ext4
set root='hd0,msdos8'
chainloader +1
}
but got the error message that it's not proper efi bootable
there are two OS Ubuntu and and Wheezy
Sorry that I can't tell you more. Maybe it's a bit over my abilities. I will have a look on it tomorow again.But then tend to give up on it
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Offline
- User is blocked
- Posts: 1437
- Thank you received: 570
Rebooted the new install
Used gparted to umount and delete the EFI or ESP partition (you may have to install gparted)
Installed grub-pc via apt as superuser
A Text window should pop up asking you where you want to install grub I picked /dev/sda
Run update-grub as superuser
Reboot, you should now be booting via BIOS (I had to change this in the VM setup)
Once rebooted I ran
dpkg -l | grep "efi"
ran update-grub again as superuser (this will remove the UEFI\EFI setup entry)
Unfortunately I don't have a PC I can test this method out on to give detailed instructions.
Are you using Linuxcnc to run a machine or just for simulation ?
Please Log in or Create an account to join the conversation.
So in my case I would boot into Ubuntu. Via gparted I would delete the partition
sda6 vfat 81FA-F12D /boot/efi
then install grub-pc
install it
update-grub
reboot
after reboot
remove all grub "efi" packages
update-grub
Could try that.
I will use it to control my CNC in future. But have to use double because my daughter need it to do homeschooling during the quarantine.
Please Log in or Create an account to join the conversation.
help.ubuntu.com/community/UEFI
There it says
Converting Ubuntu into Legacy mode
Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn't work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward -- you'll need to use the computer's built-in boot manager to switch between OSes, and some computer's have such poor boot managers that this may be impossible.
If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.
Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.
Untick the "Separate /boot/efi partition" option
Click the "Apply" button.
Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in UEFI or Legacy mode" paragraph above).
Hope it helps someone.
And @Platinum Boarder
Thank you so much for your effor
Felix
Please Log in or Create an account to join the conversation.
- BeagleBrainz
- Offline
- User is blocked
- Posts: 1437
- Thank you received: 570
To tell the truth we both learnt something.
Please Log in or Create an account to join the conversation.