How have you encrypted a Windows/MX Linux dual-boot PC?

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#11 Post by gbhollr »

PArt 1.jpg
Here is the partition table as it was after I encrypted Windows 10 with Veracrypt.
For some reason, both partitions are "unknown" (and possibly encrypted) even thought I explicitly chose to just encrypt the Windows partition as opposed to the entire drive. If I remember right, this wasn't how it turned out last time.
Part 2.jpg
I deleted the second partition.
Part 3.jpg
I created the new partitions which you laid out.
Part 4.jpg
I added the "boot" flag to the boot partition and switched "swapon" on the swap partition, which I didn't do last time.
Part 5.jpg
Here is how I set the installation up.
sda6 (labelled "root") as the root.
The root as the home directory.
sda7 (labelled "swap") as the swap.
sda5 (labelled "boot") as the boot.
You do not have the required permissions to view the files attached to this post.

User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#12 Post by gbhollr »

Part 6.jpg
This time, the installation progressed much more than last time.
I believe, among other things, it could be because I switched the swap partition on.
Part 7.jpg
I chose to install GRUB for Linux and Windows with "MBR" selected.
Part 9.jpg
Installation was finished. I rebooted the system.
Part 10.jpg
Both MX Linux and Windows 10 are found in the GRUB menu.
Part 11.jpg
However, Windows 10 was broken. I attempted a startup repair but nothing worked.
You do not have the required permissions to view the files attached to this post.

User avatar
fehlix
Developer
Posts: 10375
Joined: Wed Apr 11, 2018 5:09 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#13 Post by fehlix »

gbhollr wrote: Sun Mar 17, 2019 1:20 pm However, Windows 10 was broken. I attempted a startup repair but nothing worked.
Post the content of /boot/grub/grub.cfg
probably the win entries might get adjusted - not sure never installed win encrypted.
EDIT: I meant /boot/grub/grub.cfg :lipsrsealed:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#14 Post by gbhollr »

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 [ "${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 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_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
else
  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
fi
    font="/grub/unicode.pf2"
fi

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

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
else
  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
fi
insmod png
if background_image /grub/.background_cache.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'MX 18 Continuum' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-a2ba2b2f-5995-4730-8c48-f363fe144d47' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
	else
	  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
	fi
	echo	'Loading Linux 4.19.0-1-amd64 ...'
	linux	/vmlinuz-4.19.0-1-amd64 root=UUID=a2ba2b2f-5995-4730-8c48-f363fe144d47 ro  quiet splash
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-4.19.0-1-amd64
}
submenu 'Advanced options for MX 18 Continuum' $menuentry_id_option 'gnulinux-advanced-a2ba2b2f-5995-4730-8c48-f363fe144d47' {
	menuentry 'MX 18 Continuum, with Linux 4.19.0-1-amd64' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-advanced-a2ba2b2f-5995-4730-8c48-f363fe144d47' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
		else
		  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
		fi
		echo	'Loading Linux 4.19.0-1-amd64 ...'
		linux	/vmlinuz-4.19.0-1-amd64 root=UUID=a2ba2b2f-5995-4730-8c48-f363fe144d47 ro  quiet splash
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-4.19.0-1-amd64
	}
	menuentry 'MX 18 Continuum, with Linux 4.19.0-1-amd64 (systemd)' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-init-systemd-a2ba2b2f-5995-4730-8c48-f363fe144d47' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
		else
		  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
		fi
		echo	'Loading Linux 4.19.0-1-amd64 ...'
		linux	/vmlinuz-4.19.0-1-amd64 root=UUID=a2ba2b2f-5995-4730-8c48-f363fe144d47 ro  quiet splash init=/lib/systemd/systemd
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-4.19.0-1-amd64
	}
}

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

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4d5a8f54-9e15-46bd-8855-40679c143952
	else
	  search --no-floppy --fs-uuid --set=root 4d5a8f54-9e15-46bd-8855-40679c143952
	fi
	linux16	/memtest86+.bin
}
fi
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-3608DE0808DDC6D1' {
	insmod part_msdos
	insmod ntfs
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3608DE0808DDC6D1
	else
	  search --no-floppy --fs-uuid --set=root 3608DE0808DDC6D1
	fi
	parttool ${root} hidden-
	drivemap -s (hd0) ${root}
	chainloader +1
}
### 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/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.
### 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 ###
Last edited by gbhollr on Sun Mar 17, 2019 2:46 pm, edited 1 time in total.

User avatar
fehlix
Developer
Posts: 10375
Joined: Wed Apr 11, 2018 5:09 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#15 Post by fehlix »

OK, first: Can you please edit the last post, mark/highlight the text of grub.cfg
and click an </> code-tag-icon.
This would make the long post more readable.
Now, remember I asked to save/store MBR:
Open MX Boot repair and backup MBR ( just safety measure , to restore MBR in case of issues)
as this is bios-booting, it might come now handy to have this backup-mbr ready, which could be used for chainloading into encrypted windows. Alternative we need to hunt for a veracrypt bootloader file on the unencrypted system-reserved partition.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#16 Post by gbhollr »

Yeah, while I was installing MX Linux I forgot to backup the MBR... Sorry.
I'll be sure to try again later next week.

So how would one look for that bootloader file in the reserve partition?

User avatar
fehlix
Developer
Posts: 10375
Joined: Wed Apr 11, 2018 5:09 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#17 Post by fehlix »

gbhollr wrote: Sun Mar 17, 2019 2:47 pm So how would one look for that bootloader file in the reserve partition?
Simplest probably open Disk manager in MX and mount the first partition /dev/sda1
open terminal and with that partition and run a simple file list like this

Code: Select all

ls -l
On bios system they might have similar file like they have on UEFI system. They do place the VeraCrypt bootloader on EFI-partions here: \EFI\VeraCrypt\DcsBoot.efi.
But I'm not sure in BIOS-mode, in worst case they placed the whole Veracrypt bios-botloader into MBR+post-MBR-gap.
BTW: Is you real system UEFI or BIOS?
If UEFI, you might consider to run the simulation in VirtualBox also in UEFI mode.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#18 Post by gbhollr »

So here's what I found from the reserved partition...

Code: Select all

[b]johndoe@mx:/media/System_Reserved[/b]
[i]$ ls -l[/i]
total 417
drwxrwxrwx 1 root root   8192 Mar 17  2019 Boot
-rwxrwxrwx 1 root root 408342 Jan  7 20:05 bootmgr
-rwxrwxrwx 1 root root      1 Sep 15  2018 BOOTNXT
-rwxrwxrwx 1 root root   8192 Mar 17  2019 BOOTSECT.BAK
drwxrwxrwx 1 root root      0 Mar 17  2019 Recovery
-rwxrwxrwx 1 root root      0 Mar 17  2019 Recovery.txt
drwxrwxrwx 1 root root      0 Mar 17 10:26 System Volume Information
[b]johndoe@mx:/media/System_Reserved[/b]
[i]$ cd Boot[/i]
[b]johndoe@mx:/media/System_Reserved/Boot[/b]
[i]$ ls -l[/i]
total 1216
-rwxrwxrwx 1 root root  24576 Mar 17  2019 BCD
-rwxrwxrwx 1 root root  32768 Mar 17  2019 BCD.LOG
-rwxrwxrwx 1 root root      0 Mar 17  2019 BCD.LOG1
-rwxrwxrwx 1 root root      0 Mar 17  2019 BCD.LOG2
drwxrwxrwx 1 root root      0 Mar 17  2019 bg-BG
-rwxrwxrwx 1 root root  65536 Mar 17  2019 BOOTSTAT.DAT
-rwxrwxrwx 1 root root  18944 Sep 15  2018 bootuwf.dll
-rwxrwxrwx 1 root root 100152 Jan  7 20:05 bootvhd.dll
drwxrwxrwx 1 root root      0 Mar 17  2019 cs-CZ
drwxrwxrwx 1 root root      0 Mar 17  2019 da-DK
drwxrwxrwx 1 root root      0 Mar 17  2019 de-DE
drwxrwxrwx 1 root root      0 Mar 17  2019 el-GR
drwxrwxrwx 1 root root      0 Mar 17  2019 en-GB
drwxrwxrwx 1 root root      0 Mar 17  2019 en-US
drwxrwxrwx 1 root root      0 Mar 17  2019 es-ES
drwxrwxrwx 1 root root      0 Mar 17  2019 es-MX
drwxrwxrwx 1 root root      0 Mar 17  2019 et-EE
drwxrwxrwx 1 root root      0 Mar 17  2019 fi-FI
drwxrwxrwx 1 root root   4096 Mar 17  2019 Fonts
drwxrwxrwx 1 root root      0 Mar 17  2019 fr-CA
drwxrwxrwx 1 root root      0 Mar 17  2019 fr-FR
drwxrwxrwx 1 root root      0 Mar 17  2019 hr-HR
drwxrwxrwx 1 root root      0 Mar 17  2019 hu-HU
drwxrwxrwx 1 root root      0 Mar 17  2019 it-IT
drwxrwxrwx 1 root root      0 Mar 17  2019 ja-JP
drwxrwxrwx 1 root root      0 Mar 17  2019 ko-KR
drwxrwxrwx 1 root root      0 Mar 17  2019 lt-LT
drwxrwxrwx 1 root root      0 Mar 17  2019 lv-LV
-rwxrwxrwx 1 root root 992272 Jan  7 20:05 memtest.exe
drwxrwxrwx 1 root root      0 Mar 17  2019 nb-NO
drwxrwxrwx 1 root root      0 Mar 17  2019 nl-NL
drwxrwxrwx 1 root root      0 Mar 17  2019 pl-PL
drwxrwxrwx 1 root root      0 Mar 17  2019 pt-BR
drwxrwxrwx 1 root root      0 Mar 17  2019 pt-PT
drwxrwxrwx 1 root root      0 Mar 17  2019 qps-ploc
drwxrwxrwx 1 root root      0 Mar 17  2019 qps-plocm
drwxrwxrwx 1 root root      0 Mar 17  2019 Resources
drwxrwxrwx 1 root root      0 Mar 17  2019 ro-RO
drwxrwxrwx 1 root root      0 Mar 17  2019 ru-RU
drwxrwxrwx 1 root root      0 Mar 17  2019 sk-SK
drwxrwxrwx 1 root root      0 Mar 17  2019 sl-SI
drwxrwxrwx 1 root root      0 Mar 17  2019 sr-Latn-RS
drwxrwxrwx 1 root root      0 Mar 17  2019 sv-SE
drwxrwxrwx 1 root root      0 Mar 17  2019 tr-TR
drwxrwxrwx 1 root root      0 Mar 17  2019 uk-UA
drwxrwxrwx 1 root root      0 Mar 17  2019 zh-CN
drwxrwxrwx 1 root root      0 Mar 17  2019 zh-TW
[b]johndoe@mx:/media/System_Reserved/Boot[/b]
[i]$ cd ..[/i]
[b]johndoe@mx:/media/System_Reserved[/b]
[i]$ cd Recovery[/i]
[b]johndoe@mx:/media/System_Reserved/Recovery[/b]
[i]$ ls -l[/i]
total 0
drwxrwxrwx 1 root root 0 Mar 17  2019 Logs
drwxrwxrwx 1 root root 0 Mar 17 10:31 WindowsRE
[b]johndoe@mx:/media/System_Reserved/Recovery[/b]
[i]$ cd WindowsRE[/i]
[b]johndoe@mx:/media/System_Reserved/Recovery/WindowsRE[/b]
[i]$ ls -l[/i]
total 391876
-rwxrwxrwx 1 root root   3170304 Sep 15  2018 boot.sdi
-rwxrwxrwx 1 root root      1113 Mar 17 10:31 ReAgent.xml
-rwxrwxrwx 1 root root 398105833 Jan  7 19:57 Winre.wim
[b]johndoe@mx:/media/System_Reserved/Recovery/WindowsRE[/b]
[i]$ cd ..[/i]
[b]johndoe@mx:/media/System_Reserved/Recovery[/b]
[i]$ cd Logs[/i]
[b]johndoe@mx:/media/System_Reserved/Recovery/Logs[/b]
[i]$ ls -l[/i]
total 5
-rwxrwxrwx 1 root root   72 Mar 17  2019 BootUX (1).sqml
-rwxrwxrwx 1 root root  120 Mar 17  2019 BootUX (2).sqml
-rwxrwxrwx 1 root root 1358 Mar 17  2019 Reload.xml
[b]johndoe@mx:/media/System_Reserved/Recovery/Logs[/b]
[i]$ cd ../..[/i]
[b]johndoe@mx:/media/System_Reserved[/b]
[i]$ cd "System Volume Information"[/i]
[b]johndoe@mx:/media/System_Reserved/System Volume Information[/b]
[i]$ ls -l[/i]
total 20
-rwxrwxrwx 1 root root 20480 Mar 17 10:26 tracking.log
[b]johndoe@mx:/media/System_Reserved/System Volume Information[/b]
$ 
My host computer's pretty old so I'm sure its BIOS.

User avatar
fehlix
Developer
Posts: 10375
Joined: Wed Apr 11, 2018 5:09 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#19 Post by fehlix »

Looks like, we need to keep the VeraCrypt BIOS-MBR intact.
So instead of install MX Grub into MBR do install into the PBR of the MX-boot partition.
VeraCrypt does provide it's own chainloader to boot into the MX-Linux Boot partition or to boot into it's veracrypted installed OS.
:puppy:
EDIT: In addition, if you have created a veracrypt recovery media, you might be able to boot into win and mx-linux,
and probably also re-cover the lost veracrypt-mbr.
You would first need to boot into MX Linux and install GRUB also into the PBR of mx-linux boot partition.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
gbhollr
Posts: 104
Joined: Wed Mar 13, 2019 1:18 pm

Re: How have you encrypted a Windows/MX Linux dual-boot PC?

#20 Post by gbhollr »

Okay, but when I install MX Linux again from scratch, how do I install the GRUB into the PBR?
If you check my screenshots again, I could only choose the MBR to install GRUB in.

Post Reply

Return to “General”