Unable to dual-boot trisquel and guix, no grub menu

1 reply [Last post]
pigeon_lover
Offline
Joined: 05/31/2021
leo@capy:~$ lsblk
NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda              8:0    0 111,8G  0 disk  
├─sda1           8:1    0   953M  0 part  /boot
├─sda2           8:2    0  18,6G  0 part  
│ └─sda2_crypt 253:0    0  18,6G  0 crypt /
├─sda3           8:3    0    10M  0 part  
├─sda4           8:4    0  19,5G  0 part  
└─sda5           8:5    0  72,7G  0 part  
sr0             11:0    1  1024M  0 rom   
leo@capy:~$ sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
leo@capy:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-135-generic
Found initrd image: /boot/initrd.img-5.4.0-135-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
done

Hello, I have a 120GB SSD on a lenovo T400 with default bios. First I have made a clean install of trisquel-mini 10.0.1 with encryption on /dev/sda2 using the graphical interface and a /boot partition on /dev/sda1, it works normally. Then I have created a bios_grub partition using gparted and

sudo parted /dev/sda set 3 bios_grub on

and installed the latest guix version from here on /dev/sda4 without encryption, it also works.
I have got some trouble booting trisquel again, since it boots guix directly, but by using the trisquel-mini live dvd I have managed to do so

su
cryptsetup luksOpen /dev/sda2 trisquel
open partion using pcmanfm
mount -o bind /proc /media/trisquel/<UUID>/proc
mount -o bind /dev /media/trisquel/<UUID>/dev
mount -o bind /sys /media/trisquel/<UUID>/sys
chroot /media/trisquel/<UUID> /bin/bash
mount /dev/sda1 /boot
grub-install /dev/sda
update-grub

Now only trisquel boots, no grub menu. I have repeated the update-grub on the installed trisquel, but with no success. What is wrong? It only prompts the password box and enters trisquel.

My plan is to dual-boot trisquel and a temporary distro, both encrypted and also a data partition, also encrypted. Is there a better way to achieve this?

pigeon_lover
Offline
Joined: 05/31/2021

So, after several tries I successfully dual-booted trisquel-mini 10.0.1 and pureos 10 kde.

  • trisquel-mini luks2 encrypted
  • pureos not encrypted
  • data partition encrypted

It works fine, it boots into the grub menu containing trisquel and pureos, for trisquel it asks for the partition passphrase and for pureos it just prompts the login.

This solution definitely has more steps than needed, but it worked. It mainly follows this: https://askubuntu.com/questions/1134998/booting-19-04-from-luks-system-drive

  1. Install trisquel by creating /boot and luks2 encrypted partitions using the manual partition menu
  2. Inside trisquel, create a bios_grub partition using gparted and parted: sudo parted /dev/sda set 3 bios_grub on
  3. Install pureos 10, asking not to install a boot-loader, manual partition menu
  4. Inside pureos enter chroot and update grub:
  5. 1. sudo su
    2. cryptsetup open /dev/sda2 sda2_crypt
    3. mount /dev/mapper/sda2_crypt /mnt
    4. mount --bind /dev /mnt/dev
    5. mount --bind /sys /mnt/sys
    6. mount --bind /proc /mnt/proc
    7. mount /dev/sda1 /mnt/boot
    8. chroot /mnt
    9. fdisk -l
    10. blkid
    11. nano /etc/fstab        # changing the partition name and UUID if necessary
    12. nano /etc/crypttab     # changing the partition name and UUID if necessary
    13. nano /etc/default/grub # editing this line:
        GRUB_CMDLINE_LINUX="rd.luks.name=<UUID>=cryptroot root=/dev/mapper/sda2_crypt"
    14. grub-install /dev/sda
    15. update-grub
    16. reboot

I would edit the first post, but it seems that I can't do that.