How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
superchook
Posts: 51
Joined: Mon Dec 23, 2019 9:57 pm
Location: Sydney, Australia
Has thanked: 15 times
Been thanked: 4 times

How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

Post by superchook »

Last Sunday (16th. January) in another thread on this forum viewtopic.php?t=3360&start=100 I described how I triple boot this computer (Windows, Linux Mint and Fatdog64) using the grub 2 boot loader provided by Linux Mint. I concluded that posting with the comment "I have since come to think that not running Fatdog from its own partition is a bit dangerous as you could easily damage the Mint installation from Fatdog. Next time I will use a separate partition."
Today I tried to do just that using my ASUS F402W laptop with 4GiB RAM and a 64GB EMMC solid state drive. ( I can dig out more of the specs if it is relevant).
First I booted from a Linux Mint 20.3 DVD and selected Install. During the install I allowed the installer to use the entire hard drive. Once the installation was complete I rebooted into Mint removing the DVD and running the updates.
Next I booted from a Fatdog USB and inspected the hard drive using Gparted. There was a small primary Fat partition sda1 and the remainder of the disk was an ext4 extended partition sda5 containing Linux Mint.
Using Gparted I reduced sda5 and created a 16GB ext3 partition sda6 for Fatdog initially or other Pups I may try later. Into this partition I copied fatdog.png and created a directory fatdog64-812 into which I copied vmlinuz and initrd from the USB.
Now there remains the problem of creating a suitable 40_custom in etc/grub.d/ of sda5 similar to that used in this computer. I tried using a modified version of the one in this computer but with the "linux" and "initrd" lines altered to
linux /dev/sda6/fatdog64-812/vmlinuz rootfstype=ramfs
and
initrd /dev/sda6/initrd
before rebooting into Mint and running sudo update-grub.
On rebooting once more the laptop boots straight into Mint without offering any other choice. Can anyone suggest what I should use for custom_40 or what else I am doing wrong?
TIA
Ken

Last edited by superchook on Tue Jan 25, 2022 11:39 am, edited 2 times in total.
User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: Help requested regarding dual booting

Post by Phoenix »

You cannot use character devices in GRUB. Rather GRUB presents two options: a) select the partition to used as 'root' (that is initial) via UUID b) use its own naming convention such as (hd0,msdos1) etc etc.

I prefer searching by UUID as its easier.

Code: Select all

 search --no-floppy --set=root --fs-uuid 9E3E-7F1C

This will be the first line in your menu entry, you may obtain the UUID via GParted and selecting partition information via right-clicking, or using blkid on the partition.

EDIT: Full snippet just in case.

Code: Select all


menuentry 'Bionicpup64 8.0' {
  search --no-floppy --set=root --fs-uuid 9E3E-7F1C
  linux /vmlinuz
  initrd /initrd.gz
}

IRC: firepup | Time to hack Puppy!

baldronicus
Posts: 80
Joined: Sat Aug 29, 2020 6:55 am
Has thanked: 43 times
Been thanked: 15 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?

Post by baldronicus »

Edited to remove incomplete, misleading and unhelpful info. Please go straight past this to the posts by Superchook and Davids45. The following is being left here as it relates to TerryH's post. The "tag" symbols are meant to be text, ":label" followed by another separator ":", but I don't how to get around it in the main text. Thank you to TerryH for the work around advice. Thanks.

Last edited by baldronicus on Wed Jan 26, 2022 10:35 pm, edited 3 times in total.
TerryH
Posts: 658
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 164 times
Been thanked: 164 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?

Post by TerryH »

When you post you can "Disable smilies¨ in the Options. :label:

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

superchook
Posts: 51
Joined: Mon Dec 23, 2019 9:57 pm
Location: Sydney, Australia
Has thanked: 15 times
Been thanked: 4 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

Post by superchook »

With help provided by Phoenix and especially davids45 I have been able to achieve booting an OS contained on a separate partition from the one containing Mint on this computer.
The 40_custom is as shown below
#!/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.
insmod png
background_image /fatdog.png
set timeout=10

menuentry "Start Fatdog64-812" {
echo Loading ...
linux /fatdog64-812/vmlinuz rootfstype=ramfs
initrd /fatdog64-812/initrd
echo Booting ...
}
menuentry "Start Bionic64-80" {
search --no-floppy --set=root --fs-uuid 75a15bb9-1628-4ea4-80e2-6ea79a4940bb
linux /bionicpup64-80/vmlinuz psubdir=/bionicpup64-80 pmedia=usbhd pfix=fsck
initrd /bionicpup64-80/initrd.gz
echo Booting ...
}

Fatdog is installed in the root directory belonging to Mint and bionicpup is in it's own partition.
On bootup there is a menu offering Linux Mint, (two entries), Windows, Fatdog and Bionicpup.

My remaining problem is that on my ASUS laptop the SSD is partitioned like a traditional HDD and the two partitions being used for Mint and any other OS are sda5 and sda6.
Mint is on sda5 and Fatdog on sda6 but the computer boots straight into Mint without displaying a menu to allow booting into Fatdog. I think the solution is buried somewhere in the various grub configuration files but where?

baldronicus
Posts: 80
Joined: Sat Aug 29, 2020 6:55 am
Has thanked: 43 times
Been thanked: 15 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

Post by baldronicus »

Hi @superchook . Cool. It is good that you have it working.
It probably won't help, but is there a timeout setting option in the GRUB2 config for the Mint on the second laptop? It may (I am running off the top of my head again, which is always unreliable) be under /etc/defaults/grub (or something like that). Thanks.

User avatar
davids45
Posts: 56
Joined: Mon Jul 06, 2020 2:09 am
Location: Chatswood, NSW
Has thanked: 1 time
Been thanked: 8 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

Post by davids45 »

G'day superchook,

Perhaps you can look at /etc/default/grub (text-file)?
When I got lucky with my W10+Mint+Puppies converting of my Acer W10 laptop, this file enabled me to set the number for the default OS on the displayed start-up list ("GRUB_DEFAULT" - was '0' (Mint) but I set it to '4' for BionicPup8), and to set the time ("GRUB_TIMEOUT") before the default began booting (was '5' but I reset this to '10'). Is Mint's timeout 0 on your computer?

Here's my Acer's file (etc/default/grub):

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=4
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

I had to run 'update-grub' afterwards to update the new settings.

David S.

superchook
Posts: 51
Joined: Mon Dec 23, 2019 9:57 pm
Location: Sydney, Australia
Has thanked: 15 times
Been thanked: 4 times

Re: How to configure Grub after partitioning, then installing Linux Mint and Fatdog?(Solved)

Post by superchook »

Thank you davids45! Your last post contained the answer to the lack of a menu allowing me to select another OS.
The solution was to boot into Mint and edit /etc/default/grub in two places and then run update-grub.
The edits were to change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu and
GRUB_TIMEOUT=0 to GRUB_TIMEOUT=10
cheers,
Ken

Post Reply

Return to “FatDog64”