How do I dual boot Linux Mint and F96-CE-4 using grub2?(Solved)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

How do I dual boot Linux Mint and F96-CE-4 using grub2?(Solved)

Post by keniv »

I had decided to buy a cheap 240GB SSD in order to give my old DEll Vostro 230 a bit of a boost. I mentioned this to my son in law and he had a little used 500GB SSD with some windows directories on it which he gave me. I currently had two "rust" drives on the machine one of which contained Linux Mint and the other contained my Pups, Dogs and a copy of Easy OS. These drives were booted separately. The Mint drive was booted using it's grub2 and the puppy one using grub4dos. I thought with the SSD I would install Mint to one partition and the Pups etc to a second partition both formatted to ext4 and boot all of them using the version of grub2 installed by Mint. I deleted the windows directories before reformatting the drive. As I had a lot of room now I gave Mint around a 200GB ext4 partition. I successfully installed Linux Mint 21.1 to this partition. I made another 200GB ext4 partition to contain the Pups etc. This left about 65GB unallocated. I had done something similar in the past when I only had one "rust" drive. Again I had a Mint partition and a Pup etc partition. I used "Grub Customiser" to help write the Pup boot stanzas to grub2. This worked well for me but I've read that Grub Customiser is no longer supported as it allegedly causes problems. I installed the files for F96-CE_4 in a directory of the same name on the Pups partition with a view to booting this OS as a test. I looked in the forum for instructions as to how to do this and found this thread.

viewtopic.php?t=988

Bellow is the menuentry script I used.

Code: Select all

menuentry 'Puppy Linux - F96-CE_4' {
  search --no-floppy --fs-uuid --set=root 4af42c9e-ef64-4453-a3c3-96da260b25e0
  linux /F96-CE_4/vmlinuz pmedia=atahd psubdir=/F96-CE_4
  initrd /F96-CE_4/initrd.gz
}

This was added to/etc/grub.d/40_custom the contents of which are shown below.

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Puppy Linux - F96-CE_4' {
  search --no-floppy --fs-uuid --set=root 4af42c9e-ef64-4453-a3c3-96da260b25e0
  linux /F96-CE_4/vmlinuz pmedia=atahd psubdir=/F96-CE_4
  initrd /F96-CE_4/initrd.gz

I ran sudo update-grub then shutdown and rebooted. I did not see a boot menu showing both Mint and F96-CE_4 but only a blank screen then the Linux Mint boot up symbol which eventually booted to the Mint desktop. On further reading I thought the command perhaps should be sudo update-grub2 but this made no difference.

Below is a quote from a post further down this thread.

But instead of using the custom40 file which requires a grub update from the command line to be made operational, I place the code in a custom.cfg file in the /boot/grub folder. As it is not a BASH executable but a text file, it only contains the GRUB2 code, in fact, as many as required. The new code(s) will automatically be picked up in the GRUB process and displayed in the boot menu.

In addition, this method makes for a very quick process to add a new frugal Puppy OS or modify the existing GRUB2 script.

I am unsure about trying this method so have not. However, I have looked inside the existing /boot/grub/grub.cfg file and at the very bottom it does contain my menuentry as shown above. You may be able to tell that I don't use grub2 much so any help as to how I can use the Mint version of grub2 to boot F96-CE_4 would be much appreciated.

Regards,

Ken.

Last edited by keniv on Mon Jun 26, 2023 5:55 pm, edited 2 times in total.
User avatar
wizard
Posts: 1989
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2655 times
Been thanked: 693 times

Re: How to dual boot Linux Mint and F96-CE-4 using grub2

Post by wizard »

Hi Ken,
Even though those are the preferred ways to add an entry, I find direct editing is more expedient.

wizard

Big pile of OLD computers

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: How to dual boot Linux Mint and F96-CE-4 using grub2

Post by fredx181 »

keniv wrote: Sun Jun 18, 2023 5:26 pm

......
This was added to/etc/grub.d/40_custom the contents of which are shown below.

Code: Select all

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Puppy Linux - F96-CE_4' {
  search --no-floppy --fs-uuid --set=root 4af42c9e-ef64-4453-a3c3-96da260b25e0
  linux /F96-CE_4/vmlinuz pmedia=atahd psubdir=/F96-CE_4
  initrd /F96-CE_4/initrd.gz

....

Regards,

Ken.

Not sure if it's because of how you pasted the above code (in the post), but I see it's missing a last line with ending bracket "}" so should be:

Code: Select all

menuentry 'Puppy Linux - F96-CE_4' {
  search --no-floppy --fs-uuid --set=root 4af42c9e-ef64-4453-a3c3-96da260b25e0
  linux /F96-CE_4/vmlinuz pmedia=atahd psubdir=/F96-CE_4
  initrd /F96-CE_4/initrd.gz
}

edit: not sudo update-grub2, just sudo update-grub
edit: and is the UUID correct ? (i.e. of the partition where your F96-CE_4 folder is located)

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by keniv »

@fredx181

Not sure if it's because of how you pasted the above code (in the post), but I see it's missing a last line with ending bracket "}" so should be:

Yep that's my bad copy and pasting. The original has the"}" bracket. I've attached a copy of the /boot/grub/grub.cfg file which is very long. You can see it at the very bottom and it looks to me to be correct. I don't know why it hasn't been picked up by grub.

Code: Select all

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrusnot sudo update-grub2
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
else
  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if [ ${grub_platform} != pc ]; then
      set linux_gfx_mode=keep
    elif hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 21.1 Cinnamon' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
	else
	  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
	fi
	linux	/boot/vmlinuz-5.15.0-75-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro  quiet splash 
	initrd	/boot/initrd.img-5.15.0-75-generic
}
submenu 'Advanced options for Linux Mint 21.1 Cinnamon' $menuentry_id_option 'gnulinux-advanced-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-75-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-75-generic-advanced-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-75-generic ...'
		linux	/boot/vmlinuz-5.15.0-75-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-75-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-75-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-75-generic-recovery-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-75-generic ...'
		linux	/boot/vmlinuz-5.15.0-75-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-75-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-73-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-73-generic-advanced-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gptEven though those are the preferred ways to add an entry, I find direct editing is more expedient.
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-73-generic ...'
		linux	/boot/vmlinuz-5.15.0-73-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-73-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-73-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-73-generic-recovery-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-73-generic ...'
		linux	/boot/vmlinuz-5.15.0-73-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-73-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-56-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-56-generic-advanced-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-56-generic ...'
		linux	/boot/vmlinuz-5.15.0-56-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro  quiet splash 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-56-generic
	}
	menuentry 'Linux Mint 21.1 Cinnamon, with Linux 5.15.0-56-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.0-56-generic-recovery-b26c0686-bea9-42f2-a68a-d90afe5d9176' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  b26c0686-bea9-42f2-a68a-d90afe5d9176
		else
		  search --no-floppy --fs-uuid --set=root b26c0686-bea9-42f2-a68a-d90afe5d9176
		fi
		echo	'Loading Linux 5.15.0-56-generic ...'
		linux	/boot/vmlinuz-5.15.0-56-generic root=UUID=b26c0686-bea9-42f2-a68a-d90afe5d9176 ro recovery nomodeset dis_ucode_ldr 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.15.0-56-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Puppy Linux - F96-CE_4' {
  search --no-floppy --fs-uuid --set=root 4af42c9e-ef64-4453-a3c3-96da260b25e0
  linux /F96-CE_4/vmlinuz pmedia=atahd psubdir=/F96-CE_4
  initrd /F96-CE_4/initrd.gz
}
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

not sudo update-grub2

Thanks for confirming that.

and is the UUID correct ? (i.e. of the partition where your F96-CE_4 folder is located)

Yes just checked again and it's correct.

@wizard

Even though those are the preferred ways to add an entry, I find direct editing is more expedient.

As you can see I've attached a copy of /boot/grub/grub.cfg with the dire warning at the top "DO NOT EDIT THIS FILE" which I must say put me off a bit. Would you be good enough to suggest what I should edit it to from what's shown in the attachment.

Thanks to you both for the replys,

Ken.

User avatar
wizard
Posts: 1989
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2655 times
Been thanked: 693 times

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by wizard »

Ken,
Attached is the grub.cfg I use to boot Gallium (Xubuntu) and Puppy on my Chromebooks. Look at lines 128-136, of course you'll have to adjust for your hardware and Puppy.

wizard

Attachments
grub.cfg.gz
remove fake .gz
(8.52 KiB) Downloaded 37 times

Big pile of OLD computers

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by keniv »

@wizard
My thread got moved as it was in the wrong place and I was a bit worried it might have got lost but your reply confirms that's not the case. Thanks for the copy of your grub.cfg file. I've made a copy of my own .cfg file and renamed it as grubk.cfg so as not to confuse it with yours or my original. I've added my F96-CE_4 boot stanza in a similar fashion to the way yours is added to your grub.cfg file. The lines in my file (attached) are from 126-132. Could you have a look at them and see if they look OK to you. I also noticed that line 129 in yours contains insmod fat. I'm not sure what this is for and have left it out of mine. Do I need this? In mine lines 312-321 contains the stuff I got after editing /etc/grub.d/40_custom and then running sudo update-grub. Would this have to be removed?
I've also added the output of running blkid in a terminal to give an idea of the partitions I have.

Code: Select all

ken@ken-Vostro-230:~$ blkid
/dev/sda4: UUID="4af42c9e-ef64-4453-a3c3-96da260b25e0" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b1e71361-0079-4885-919e-32d1c6021e1b"
/dev/sda2: UUID="5E7E-A393" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="62d2a04f-3e57-4f87-9969-1db15d68f4ab"
/dev/sda3: UUID="b26c0686-bea9-42f2-a68a-d90afe5d9176" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bd1ef3a6-0b30-43ba-b447-d33e36ee908d"

I don't have an efi system but Mint installed this anyway and I wonder if this is an issue. I hope this helps.

Regards,

Ken.

Attachments
grubk.cfg.gz
remove fake .gz
(11.27 KiB) Downloaded 28 times
User avatar
wizard
Posts: 1989
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2655 times
Been thanked: 693 times

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by wizard »

Ken,
-No, don't think you need "insmod".
-Grub2 works on both EFI and MBR.
-"DO NOT EDIT THIS FILE" = always make a backup before you start messing with grub.cfg. Down side of manual editing is if you then run update-grub your manual edits disappear.
-remove the code that update-grub inserted.

I looked at your grub.cfg, you did not say if you tried it and what resulted. You did omit some of the switches from the example grub.cfg I sent.

wizard

Big pile of OLD computers

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by keniv »

@wizard

I looked at your grub.cfg, you did not say if you tried it and what resulted.

You may have gathered that I was a bit worried about editing grub.cfg. I also wondered why my boot stanza appeared in the grub.cfg after editing /etc/grub.d/40_custom and sudo update-grub yet did not appear in the menu. I had not actually seen the menu but I put this down to it containing only Linux Mint. I also had a look at the Linux Mint forum which lead me to this https://easylinuxtipsproject.blogspot.c ... b.html#ID9
This made me think that the grub boot menu may not be visible. I scrolled down to Making the Grub boot menu permanently visible and followed the instructions.
After rebooting the boot menu appeared and I was able to boot into a fresh frugal install of F96-CE_4. I made some setup changes and saved. I can now boot both Linux Mint and F96-CE_4 (with persistance) so it looks like the problem is solved.

Down side of manual editing is if you then run update-grub your manual edits disappear.

I'll try a frugal install of another puppy and run sudo update-grub again but as this is not technically a manual edit I'm hoping that I won't lose the F96-CE_4 entry.

You did omit some of the switches from the example grub.cfg I sent.

These switch/switches fsckp TZ=XXX-8 I don't remember seeing before and don't know for what they're used. Can you tell me what they're for?
Can I just thank you for the help you've given me with this.

Regards,

Ken.

User avatar
wizard
Posts: 1989
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2655 times
Been thanked: 693 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by wizard »

Glad it's up and running for you, other switches don't matter now. You might document the steps you used, will help others who will read the topic.

Thanks
wizard

Big pile of OLD computers

User avatar
bigpup
Moderator
Posts: 7002
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 913 times
Been thanked: 1531 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by bigpup »

Yes, please help the Puppy community and make us a how to do it.

You can make a topic on what you exactly did.

Post it in the How-To -> Boot section of the forum.

This issue comes up about every week or so, and we suggest what needs to be done.
But no one ever gives complete feedback on exactly what they did to get it working.
Plus duel booting with other Linux OS's and the boot loader they use, sometimes is different.

So a good How you did it with Linux Mint will be very useful info for others. :thumbup:

Thanks!

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
wiak
Posts: 4082
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 65 times
Been thanked: 1208 times
Contact:

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by wiak »

keniv wrote: Sun Jun 18, 2023 5:26 pm

On further reading I thought the command perhaps should be sudo update-grub2 but this made no difference.

update-grub2 is usually just a symlink to update-grub

Similar information (including KL examples) also provided recently here: viewtopic.php?p=91698#p91698

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by keniv »

@wiak
Thanks for the information on update-grub2 and the link which I found useful as I had wondered if I added other menuentrys whether I should leave a line between each entry or not and this answers that question though perhaps it doesn't matter.

Regards,

Ken.

Geek3579
Posts: 269
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 81 times
Been thanked: 68 times

Re: How to dual boot Linux Mint and F96-CE-4 using grub2

Post by Geek3579 »

wizard wrote: Sun Jun 18, 2023 6:05 pm

Hi Ken,
Even though those are the preferred ways to add an entry, I find direct editing is more expedient.

wizard

I like direct editing too, but in a more convenient way. Using 40_custom requires a sudo update-grub to fix changes, which is annoying if you are tweaking a boot code and getting it to work, needing to boot into the host OS just to run grub-update.

I make a text file in /boot/grub called custom.cfg ( not an executable file, just a text file...) which sits alongside the grub.cfg file.
In that custom.cfg I can add any number of frugal boot, ISO, weedog or other scripts and there is no need to update grub. The changes appear on next boot. This apparently does not work unless the grub script has the facility to read the file, but I have found no problem where I have attempted to use it.

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by keniv »

@Geek3579

Using 40_custom requires a sudo update-grub to fix changes, which is annoying if you are tweaking a boot code and getting it to work, needing to boot into the host OS just to run grub-update.

I agree the above is a bit of a faff. However my problem with the above was that the menu does not seem to be made visible by default. This is alright if you're only booting one OS but I would have thought it would have been made visible by default once more OSs were added to grub.cfg. I am definitely a GUI rather than CLI man so previously I used Grub Customizer to do this but this seems to have been withdrawn due to it's ability to screw up grub.cfg. I never had a problem with it.

I make a text file in /boot/grub called custom.cfg ( not an executable file, just a text file...) which sits alongside the grub.cfg file.

I already have Mint and 3 Pups installed using the 40_custom method but I intend to add another pup so I'll give your method a try.

Regards,

Ken.

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: How I dual boot Linux Mint and F96-CE-4 using grub2

Post by fredx181 »

keniv wrote: Tue Jun 20, 2023 5:43 pm

@wizard

I looked at your grub.cfg, you did not say if you tried it and what resulted.

You may have gathered that I was a bit worried about editing grub.cfg. I also wondered why my boot stanza appeared in the grub.cfg after editing /etc/grub.d/40_custom and sudo update-grub yet did not appear in the menu. I had not actually seen the menu but I put this down to it containing only Linux Mint. I also had a look at the Linux Mint forum which lead me to this https://easylinuxtipsproject.blogspot.c ... b.html#ID9
This made me think that the grub boot menu may not be visible. I scrolled down to Making the Grub boot menu permanently visible and followed the instructions.
....
....
Regards,

Ken.

To summarize what I think you did: editing /etc/default/grub:
- Change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu
- Change GRUB_TIMEOUT=0 to GRUB_TIMEOUT=5
- Run: sudo update-grub
Right ?

I have a similar Grub2 setup, but with a "Zorin" Linux install.
Strange thing was that the Grub2 Menu does show for me and had GRUB_TIMEOUT_STYLE=hidden, so actually no need for me to change that.
Later I found that in my grub.cfg there's a line set timeout_style=menu, I guess that explains why it shows the Menu.

Geek3579 wrote:

I make a text file in /boot/grub called custom.cfg ( not an executable file, just a text file...) which sits alongside the grub.cfg file.
In that custom.cfg I can add any number of frugal boot, ISO, weedog or other scripts and there is no need to update grub. The changes appear on next boot.

That works nicely and indeed adding entries in custom.cfg can be done from any OS (as root) and sudo update-grub is NOT required that way. Thanks.

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by keniv »

@fredx181

To summarize what I think you did: editing /etc/default/grub:
- Change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu
- Change GRUB_TIMEOUT=0 to GRUB_TIMEOUT=5
- Run: sudo update-grub
Right ?

Correct.

Later I found that in my grub.cfg there's a line set timeout_style=menu, I guess that explains why it shows the Menu.

My grub.cfg has line 111 set timeout_style=menu and line 116 set timeout =5 but I don't know whether they were there before I made the changes above but I guess not as the menu did not appear without the changes. Interesting that you didn't have a problem with Zorin Linux. I'd be interested to know if anybody else has had a similar problem recently with Linux Mint though this may not be the forum on which to ask this question.

Regards,

Ken.

User avatar
fredx181
Posts: 3089
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 376 times
Been thanked: 1316 times
Contact:

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by fredx181 »

keniv wrote:

My grub.cfg has line 111 set timeout_style=menu and line 116 set timeout =5 but I don't know whether they were there before I made the changes above but I guess not as the menu did not appear without the changes. Interesting that you didn't have a problem with Zorin Linux. I'd be interested to know if anybody else has had a similar problem recently with Linux Mint though this may not be the forum on which to ask this question.

The grub.cfg you posted earlier doesn't have set timeout_style=menu so it's added after you made the change in /etc/default/grub .

It may not have anything to do with Linux Mint. When I installed Zorin, I had already a Debian full install, so that was added to grub.cfg too and I guess that it changes automatically then to timeout_style=menu because of more than one full install exists. (not sure though).
edit: btw, when running update-grub, it checks for full installed Linux OS's, not for frugal installs.

keniv
Posts: 656
Joined: Mon Jul 13, 2020 2:18 pm
Location: Scotland
Has thanked: 110 times
Been thanked: 67 times

Re: How do I dual boot Linux Mint and F96-CE-4 using grub2?

Post by keniv »

@fredx181

The grub.cfg you posted earlier doesn't have set timeout_style=menu so it's added after you made the change in /etc/default/grub .

Yes should have thought of that coupled with the fact that I also kept a copy of the original grub.cfg file :oops:

edit: btw, when running update-grub, it checks for full installed Linux OS's, not for frugal installs.

That's useful to know.

Regards,

Ken.

Post Reply

Return to “Users”