LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-28-2018, 01:16 PM   #1
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Rep: Reputation: Disabled
Manually GRUB reconfiguration


I installed Windows 10 and Debian on the same computer.

Windows 10 was before encrypted by VeraCrypt, however after Debian instalation, GRUB create entry in boot menu only for Debian and Windows Bootloader

so I should add manually VeraCrypt Bootloader to grub's menu list.

Some informations about my configuration:

Code:
parted -l:
    
    Number  Start   End    Size    File system  Name                          Flags
     1      1049kB  524MB  523MB   ntfs         Basic data partition          hidden, diag
     2      524MB   628MB  104MB   fat32        EFI system partition          boot, esp
     3      628MB   645MB  16.8MB               Microsoft reserved partition  msftres
     4      645MB   103GB  104GB                Basic data partition          msftdata
     5      105GB   256GB  153GB
Code:
efibootmgr -v:
    
    BootCurrent: 0001
    Timeout: 1 seconds
    BootOrder: 0001,DC5B,0000
    Boot0000* Windows Boot Manager	HD(2,GPT,372f84ce-f811-4a58-adad-227679dbd5f2,0xfa000,0x31800)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.B.D.O.B.J.E.C.T.=.{.9.d.e.e.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.a.a.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
    Boot0001* debian	HD(2,GPT,372f84ce-f881-4a58-adf3-223378dbd5f2,0xfa000,0x31800)/File(\EFI\DEBIAN\GRUBX64.EFI)
    BootDC5B* VeraCrypt BootLoader (DcsBoot)	HD(2,GPT,372f84ce-f811-4a58-adf3-227378dbd5f2,0xfa000,0x31800)/File(\EFI\VERACRYPT\DCSBOOT.EFI)
I wanted to add entry for VeraCrypt Bootloader so I add:

Code:
    mounentry "Win10 VeraCrypt Bootloader"{
       insmod ntfs
       set rootnoverify=(hd0,3)
       chainloader (hd0,1)/EFI/VERACRYPT/DCSBOOT.EFI
    }
to /etc/grub.d/40_custom and ran "update-grub"

Unfortunately, when I run "Win10 VeraCrypt Bootloader" in GRUB's menu, I get:

Code:
    error:invalid file name '/EFI/VERACRYPT/DCSBOOT.EFI'.
What is wrong ?

Last edited by marcelo900; 04-28-2018 at 01:32 PM.
 
Old 04-28-2018, 02:36 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Your EFI partition where the veracrypt efi file is, is sda2 and your entries are pointing to sda3. Try adding also insmod part_gpt, might also need insmod chain.

Quote:
menuentry "Win10 VeraCrypt Bootloader"{
insmod ntfs
insmod part_gpt
insmod chain
set root='(hd0,gpt2)'
chainloader (hd0,2)/EFI/VERACRYPT/DCSBOOT.EFI
}
 
Old 04-28-2018, 03:17 PM   #3
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Your EFI partition where the veracrypt efi file is, is sda2 and your entries are pointing to sda3. Try adding also insmod part_gpt, might also need insmod chain.
Code:
menuentry "Win10 VeraCrypt Bootloader"{
insmod ntfs
insmod part_gpt
insmod chain
set root='(hd0,gpt2)'
chainloader (hd0,2)/EFI/VERACRYPT/DCSBOOT.EFI
}
Now, it returns error:

Code:
error: disk 'hd0,2' not found.
in this syntax the numeration is not from zero ?
 
Old 04-28-2018, 03:24 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,367

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Quote:
Now, it returns error:

Code:

error: disk 'hd0,2' not found.


you wouldn't to have tried it with a bootable usb plugged in?
 
Old 04-28-2018, 03:29 PM   #5
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
you wouldn't to have tried it with a bootable usb plugged in?
I do not understand.

indeed, my /boot partition is on outside bootable usb and it is plugged.
 
Old 04-28-2018, 03:40 PM   #6
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
If I open grub promt (by press C in grub menu) I can run ls command.

It shows:

Code:
(hd0) (hd0,gpt1) (hd1) (hd1,gpt5) (hd1,gpt4) (hd1,gpt3) (hd1,gpt2) (hd1,gpt1) (hd2)
 
Old 04-28-2018, 05:05 PM   #7
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
it works me (partially):

Code:
menuentry "Win10 VeraCrypt Bootloader"{
insmod ntfs
insmod part_gpt
insmod chain
set root='(hd1,gpt2)'
chainloader (hd1,2)/EFI/VERACRYPT/DCSBOOT.EFI
}
veracrypt asks for a password

Hovewer, after give password, windows try to start (logo and circle) and after a while it crashes (strange horizontal stripes instead of the login screen).
 
Old 04-28-2018, 05:29 PM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,367

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
The bootable usb maybe causing grub to mix up the disk order grub seeing the usb as hd0 and the internal drive as hd1.
I have a laptop that does that when a usb is inserted
 
Old 04-28-2018, 09:41 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Your ls output from Grub does not show a second partition on hd0 so hd1,2 should be right.

Quote:
Hovewer, after give password, windows try to start (logo and circle) and after a while it crashes (strange horizontal stripes instead of the login screen).
If you see the windows logo, you are not in Grub any longer but the windows/vercrypt bootloader and Grub won't be able to do anything about that. That means Grub has done it's job and chainloaded your windows or veracrypt boot file, it's a problem with windows or veracrypt.
 
Old 04-29-2018, 04:37 AM   #10
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
If you see the windows logo, you are not in Grub any longer but the windows/vercrypt bootloader and Grub won't be able to do anything about that. That means Grub has done it's job and chainloaded your windows or veracrypt boot file, it's a problem with windows or veracrypt.
I don't think so,

because if I start VeraCrypt loader from UEFI menu it works properly
 
Old 04-29-2018, 06:35 AM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,367

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
maybe editing the #GRUB_GFXMODE=640x480 line in /etc/default/grub will help.
 
Old 04-29-2018, 09:39 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
It might be the resolution setting so you could try some of the suggestions at the link below to edit /etc/default/grub with compatible resolution. I saw some posts which indicated the same problem but after 10-20 seconds, the garbled screen changed. Have you waited that long to see? Only other thing is the suggestion above.
 
Old 04-29-2018, 12:07 PM   #13
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
It might be the resolution setting
most likely, login screen is responsive to my mouse movement, it looks like:

https://cdn3.imggmi.com/uploads/2018...d2af5-full.png

Quote:
so you could try some of the suggestions at the link below to edit /etc/default/grub with compatible resolution.
could give me some advice, how I can check which resolution is compatible ?
 
Old 04-29-2018, 03:04 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
Sorry, I forgot to post the link I referred to earlier. It's below at the Mint forums, read the suggestions in the second post carefully. It explains how to get the resolution from windows/Linux although this is 7 not 8 or 10, don't know if that will matter.

https://forums.linuxmint.com/viewtopic.php?t=173945

Quote:
in this syntax the numeration is not from zero ?
The above quote is from your earlier post, GRUB2 counts physical hard drives from ZERO, partitions from one. In your initial post, you make a reference to a menu.lst file which is a Grub Legacy file and hasn't been used with Debian for years??

Quote:
indeed, my /boot partition is on outside bootable usb and it is plugged.
You should probably explain that in a little more detail. Boot partition for what? Debian, windows, your veracrypt thing?
Your ls output above 3 three drives, hd0 with one partition, hd1 with partitions (including the EFI) and an hd2 drive with no partitions. At the time you ran that command, the EFI partition was hd1,2. If you attach/remove a drive including a flash drive these can change. If you boot from an installed system it can show differently than booting from a flash drive.

Quote:
because if I start VeraCrypt loader from UEFI menu it works properly
I think you may have to be satisfied with that but no harm in trying things. I don't really know anything about veracrypt, other than it's an encryption tool. Since your are only using it with windows, why not add an entry in the windows bootloader?
 
Old 05-08-2018, 04:27 PM   #15
marcelo900
LQ Newbie
 
Registered: Apr 2018
Distribution: Debian GNU/Linux
Posts: 19

Original Poster
Rep: Reputation: Disabled
yancek, I solved this problem,

it works properly after instalation intel driver for display (device manager -> display -> update driver).

I've used the microsoft driver before, and that caused the problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Manually installing Grub dunraven23 Linux - Newbie 8 01-28-2010 11:48 AM
manually booting with GRUB fitzov Linux - General 2 04-12-2007 08:21 PM
Motherboard change impacts disk naming, requires grub reconfiguration? donv2 Linux - General 5 09-06-2006 12:45 PM
Help with grub reconfiguration corelover Linux - Software 4 05-04-2005 05:26 PM
installing grub manually abhinav_raj Linux - Software 3 03-22-2005 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration