Using dual-boot Sparky-Linux x2 to manage updates

Solved
PyroPyro Posted messages 124 Registration date   Status Member Last intervention   -  
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   -

Hello everyone

I am on an "old" version of Sparky, v.6.7, and I would like to update my version to v.7.4 so I can "organize" the update on my PC...

I do have both systems on my PC, but I can't get both boot options with Grub?

My boot only offers version 6.7...

Let me explain why I am doing this update, over time and with all my tinkering, I have started to weigh down the system and even create errors...

- I have to boot with SuperGrub otherwise the choice to boot into v.6.7 is impossible, unless there is the same version or a higher one on the PC... Even if it’s empty, that’s also partly why I’m leaning towards v.7.4!

So since I’m going to get my hands dirty to try to "repair" and "clean" with the same version, I might as well upgrade the machine... Hence testing version 7.4!

How can I get Grub to show both boot choices at startup?

Thank you for the upcoming help and have a great day everyone

11 answers

  1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     

    Hello,

    Are you sure that both Sparky installations are on separate partitions? Can you report your partition table?

    sudo parted -l

    If that’s the case, you just need to:

    1) Boot into Linux
    2) Edit as root (e.g., with sudo) using the text editor of your choice (e.g., nano) the file /etc/default/grub or equivalent that defines GRUB_DISABLE_OS_PROBER and set this variable to false :

    # If your computer has multiple operating systems installed, then you # probably want to run os-prober. However, if your computer is a host # for guest OSes installed via LVM or raw disk devices, running # os-prober can cause damage to those guest OSes as it mounts # filesystems to look for things. GRUB_DISABLE_OS_PROBER=false

    3) Regenerate grub using:

    sudo update-grub

    However, why install both Sparkys side by side?

    • Generally, we just migrate the existing system to a newer version, or at worst, reinstall a recent system over the old one while keeping /home.
    • I have the impression that you want to test before migrating, but this precaution could make things much more complicated for you. Normally, migration goes relatively well and is always a good thing (because the system is newer and the software is more modern, more complete, and ideally more reliable). If the migration goes badly, a reinstallation while keeping /home is still possible.
    • A more practical way to test another system is to install it on a USB stick. You can prepare such a live USB using for example unetbootin or rufus.

    Good luck

    0
  2. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Hello and thank you for your help Mamiemando

    Here’s the partition table:

    Model: ATA TOSHIBA DT01ACA0 (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number  Start   End     Size    File system     Name  Flags  1      1049kB  234MB   233MB   fat32                 boot, esp  2      234MB   51.1GB  50.9GB  ext4            root  5      51.1GB  76.5GB  25.4GB  ext4            root  6      76.5GB  102GB   25.4GB  ext4            root  4      102GB   108GB   6553MB  linux-swap(v1)        swap  3      108GB   500GB   392GB   ext4

    My apologies, I’m going out with my kids to do some shopping and I’ll be back to test all this... I’ll keep you posted.

    Thanks again for the help
    Have a nice day

    0
  3. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     

    Hello,

    Thank you for the initial order feedback, we can indeed see several ext4 partitions which suggest that you have installed multiple systems. At this stage I think that grub only displays one OS (the one that runs update-grub) because currently, GRUB_DISABLE_OS_PROBER=true. We will see in your first message if my hypothesis is correct ;-)

    Happy shopping :-)

    0
  4. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Thanks to you for the good shopping

    I have a small issue, the file you mentioned is not found in the grub file you're talking about? & v or regarding the initial grub, the are visible (v.7.4, 6.7 & 6.6 for "taking control again..."), but only 6.6 is "accessible" with a connection, the others are floundering shamefully!

    As for the comment lines for grub, I had hoped to sort it out yesterday with:

    sudo apt purge grub grub-pc grub-common -y && sudo apt install grub-pc -y

    ... but that doesn't resolve them... sniff!

    Regarding the "bizarre" choice of keeping so much proximity between my two versions...., the fear of losing everything... Which is also silly since I have a backup of all my /home... But I have on my partition the applications for the kids, school, hobbies..., I'm probably worrying stupidly but.... Stress is hard...

    Thanks to you for your help, both received and to come!

    It would be nice to help me again on this subject, thank you in advance:

    What worried me about putting a newer system on mine, still the same, the fear of losing everything... Moreover, I've messed around so much on my system that it would annoy me to pick it up with a nice new version and a "crappy" /home

    0
  5. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     

    Hello,

    I understand your concerns and I respect them ;-) A home can’t be bad (at worst, it contains outdated application profiles, easily deletable). The important thing is, as you do, to back up the files that matter to you on another drive from time to time.

    Regarding grub, you need to tell me more about the configuration files you have. Since Sparky is based on Debian, in theory, you’re only supposed to modify /etc/default/grub. This generates, following the command sudo update-grub, various configuration files in /boot (which you’re not supposed to modify manually). To start, does the file /etc/default/grub exist on your end, and if so, what does it contain?

    For your information, here’s what my /etc/default/grub contains:

    # 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=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="" # If your computer has multiple operating systems installed, then you # probably want to run os-prober. However, if your computer is a host # for guest OSes installed via LVM or raw disk devices, running # os-prober can cause damage to those guest OSes as it mounts # filesystems to look for things. GRUB_DISABLE_OS_PROBER=false # 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_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" 

    Note that in my case, I have a dual boot Windows-Linux so I MUST set GRUB_DISABLE_OS_PROBER=false, otherwise GRUB does not show Windows in its list, but the problem is the same if it’s a dual boot with Linux (as in your case).

    You can display the installed grub packages with the following command:

    dpkg -l | grep grub | awk '{print $1, $2, $3}'

    Here’s the result on my end:

    ii grub-common 2.06-13+deb12u1 ii grub-efi-amd64 2.06-13+deb12u1 ii grub-efi-amd64-bin 2.06-13+deb12u1 ii grub-efi-amd64-signed 1+2.06+13+deb12u1 ii grub2-common 2.06-13+deb12u1

    Thank you for reporting the result you get on your side.

    Note (not related to your problem): Note that among this list, there are grub-efi-* packages. Like you, I have an EFI partition (used for Secure boot). Strictly speaking, you should also install these packages, even though in your case it’s not essential, as Linux does not impose enabling Secure boot (unlike modern Windows).

    Good luck

    0
  6. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Hello and thanks again for your message

    I’ve noted it on my desk but I have quite a busy day and I can’t take care of it right away! As soon as I can, I'll keep you updated.

    Thanks again for your help and have a great day to you and your loved ones

    0
  7. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Response from 10.07.24

    Hi and thanks again for your help

    1 - "A home cannot be corrupted (at worst, it contains outdated application profiles that are easily removable)"
        * I would appreciate help on this topic to have an application that takes care of the cleaning? Or another way?

    2 - "Is the file /etc/default/grub?"
        * Yes, and in the same "default" folder I also have: 1 grub.d folder, "the" grub file, and 1 grub.ucf-dist file
    *** The "grub" file contains:
    # 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=0
    GRUB_TIMEOUT=5
    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"

    3 - "dpkg -l | grep grub | awk '{print $1, $2, $3}'"
        * ii grub-common 2.06-3~deb11u6
          ii grub-efi 2.06-3~deb11u6
          ii grub-efi-amd64 2.06-3~deb11u6
          ii grub-efi-amd64-bin 2.06-3~deb11u6
          ii grub-efi-amd64-signed 1+2.06+3~deb11u6
          ii grub-efi-amd64-signed-template 2.06-3~deb11u6
          ic grub-pc 2.06-3~deb11u5
          ii grub2-common 2.06-3~deb11u6
          ii sparky-grub-theme 0.1.5
     4 - "Like you, I have an EFI partition (used for Secure boot). In all
          strictness, you should also install these packages
         * Can you help me with this topic, I'm having a misunderstanding?

    thank you for your great help and good luck

    0
  8. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Sorry, I forgot to tell you, upon reviewing the topic, I have a USB key to boot, "Ventoy," with 31 ISOs on it, which works perfectly... And with lots of apps on it...

    0
  9. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     

    In response to #7

    1) Applications that create user profiles store their data in a hidden file/folder, which is actually just a file whose name starts with "." File explorers allow you to toggle the visibility of hidden files. The location of the profile depends on the application. Some examples:

    • KDE applications generally store their profile in ~/.config, as does chromium
    • Gnome applications generally store their profile in ~/.gnome, as does chromium
    • Firefox and Thunderbird store their profile in ~/.mozilla
    • vim stores its profile in ~/.vim
    • etc...

    In itself, it is not a problem to keep a profile during an update. Software is supposed to have backward compatibility, which means that what worked before should continue to work. However, it can happen that this is not the case. It is only in such situations that cleaning up to start with a fresh profile becomes useful.

    2) On Debian and distributions derived from it (including Ubuntu and Mint), the base configuration file (deployed during package installation) can be enriched by additional user-defined configuration files (you). By convention, these additional files are stored in a folder bearing the same name as the base file suffixed with ".d". In other words, the /etc/default/grub file can be enriched by configuration files defined in /etc/default/grub.d/. Here, grub also requires that the configuration file be suffixed with ".cfg". There are therefore two ways to proceed:

    • either add the line GRUB_DISABLE_OS_PROBER=false directly in /etc/default/grub (not a very clean but acceptable version)
      sudo gedit /etc/default/grub &
    • or create a file, let's say /etc/default/grub.d/multiboot.cfg and write GRUB_DISABLE_OS_PROBER=false in it:

      sudo gedit /etc/default/grub.d/multiboot.cfg &

    Once that's done, regenerate grub:

    sudo update-grub

    Example:

    (mando@cenedra) (~) # sudo update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-6.1.0-22-amd64 Found initrd image: /boot/initrd.img-6.1.0-22-amd64 Found linux image: /boot/vmlinuz-6.1.0-21-amd64 Found initrd image: /boot/initrd.img-6.1.0-21-amd64 Found linux image: /boot/vmlinuz-6.1.0-20-amd64 Found initrd image: /boot/initrd.img-6.1.0-20-amd64 Found linux image: /boot/vmlinuz-6.1.0-18-amd64 Found initrd image: /boot/initrd.img-6.1.0-18-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for UEFI Firmware Settings ... done

    3) Ok, that looks good to me.

    4) Generally, you don't have anything more to do, as the grub-efi-amd64 package is already installed. It allows your Linux system to be registered in the EFI partition (the one marked esp in #2, thus /dev/sda1), making it bootable when Secure Boot is enabled in your BIOS. As a reminder, modern Windows systems (W10, W11) require Secure Boot to be enabled.

    0
  10. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Hello and thank you for all these great explanations (copy of your message in my "Galere" folder...)

    This will surely not be my last trouble with "Grub & Co"...

    Thanks also for the commands to add a line or a folder...

    However, I've changed my PC a bit, I now have Sparky 6.7, Debian 11.6 & Sparky 7.4...

    (((

    dpkg -l | grep grub | awk '{print $1, $2, $3}'
    ii grub-common 2.06-3~deb11u6
    ii grub-efi-amd64-bin 2.06-3~deb11u6
    ii grub-efi-amd64-signed 1+2.06+3~deb11u6
    ii grub-efi-amd64-signed-template 2.06-3~deb11u6
    ii grub-pc 2.06-3~deb11u6
    ii grub-pc-bin 2.06-3~deb11u6
    ii grub2-common 2.06-3~deb11u6

    ))) Lol!

    But no worries, I have the 3 choices at boot working...

    Thanks again for your help and have a great day to you and your loved ones

    ps: I still haven't received a reply from boot-repair...

    small question for the habit...: I have a Windows application, the only one, it's a portable app about cinema, that I've kept since the beginning of my "linuxarisation", I can't start it anymore with either wine-stable or Playonlinux? Do you have any idea? Thanks

    0
    1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
       

      Hello,

      • Well, if you've solved your GRUB problem, that's the main thing :-)
      • Regarding boot-repair, I didn't understand what you were referring to. In essence, boot-repair is only used to diagnose and redeploy GRUB based on its installation (notably, the partitioning, any potential use of LVM, etc.). So ultimately, it just runs update-grub under the conditions suited to your installation.
      • As for your question about wine, since it's unrelated to the initial topic, open a new thread specifying which distribution you are using, which application it is about, and how you installed wine and/or playonlinux.

      Best of luck!

      0
  11. PyroPyro Posted messages 124 Registration date   Status Member Last intervention   3
     

    Hello and thank you

    Yes, regarding grub, it smells "better"... About "Boot-Repair", someone had told me to send the result to boot-repair and wait for a response... But anyway, the grub issue is resolved! So it works at least in part...

    Regarding Wine & Playonlinux, you're right and I'm sorry..., I'll start a new thread!

    ((( https://forums.commentcamarche.net/forum/affich-38071124-souci-d-ouverture-d-un-exe-sur-sparky?kO48zP9lKTmhXOyS3XgR62Qb5vu83tvc6Rpk6Gyysew&nbsp%3B= )))

    Thank you for all the help and very clear explanations

    Have a good day

    0
    1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
       

      Okay, let's meet on your new thread, good luck :-)

      0