<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dual Boot with Windows 10 and Debain 10</title>
<style>
code.command {
    font-weight: bold;
}
code.filename {
    background-color: #F0F0F0;
}
pre.file {
    border-style: dashed;
    border-width: 1px;
    padding: 1em;
    background-color: #F0F0F0;
}
</style>
</head>
<body>

<h1>Dual Boot with Windows 10 and Debian 10</h1>
<p>
2020-05-29<br />
by Gernot WALZL
</p>

<h2>Partitioning Scheme</h2>

<h3>GUID Partition Table (GPT)</h3>
<pre>
Device              Start        End   Sectors   Size Type
/dev/nvme0n1p1       2048     206847    204800   100M EFI System
/dev/nvme0n1p2     206848     239615     32768    16M Microsoft reserved
/dev/nvme0n1p3     239616  524527615 524288000   250G Microsoft basic data
/dev/nvme0n1p4  524527616 1476120575 951592960 453,8G Microsoft basic data
/dev/nvme0n1p5 1476120576 2000408575 524288000   250G Linux filesystem
</pre>
<p>
If hibernation should be supported in Debian, swap space is required.<br />
The size of the swap partition should be (at least) the size of installed RAM.
</p>

<h3>Shared Data Partition</h3>

<h4>Windows</h4>
<p>
Fast startup is some kind of hibernation.<br />
If the same file is touched from Windows and Debian, it is likely that<br>
changes to a file get lost without any notification.<br />
To disable fast startup in Windows do the following:
</p>
<ol>
<li>Start <code>powercfg.cpl</code></li>
<li>Click <em>Choose what the power buttons do</em></li>
<li>Click <em>Change settings that are currently unavailable</em></li>
<li>Uncheck <em>Turn on fast startup</em></li>
<li>Click <em>Save changes</em></li>
</ol>

<h4>Debian</h4>
<p>
To automatically mount the shared data partition do the following:
</p>
<p>
List UUIDs of existing partitions:<br />
<code class="command">blkid</code>
</p>
<p>
Add the shared data partition to the file system table
<code class="filename">/etc/fstab</code>:
</p>
<pre class="file">
UUID=6095C9DC13718A17  /mnt/ntfs  ntfs-3g  gid=users,fmask=113,dmask=002  0  0
</pre>
<p>
Add user <em>johndoe</em> to group <em>users</em>:<br />
<code class="command">usermod -aG users johndoe</code>
</p>

<h2>Timezone (optional)</h2>
<p>
Having the real-time clock (RTC) on the mainboard running in<br />
coordinated universal time (UTC) has the following advantages and drawbacks:
</p>
<p>
Pro: The switch to summer time will not happen twice (Debian & Windows).<br />
This causes a wrong time to be displayed if the time is not synchronized<br />
automatically.
</p>
<p>
Con: Time is shown in UTC in BIOS.<br />
A scheduled startup at a specific time will ignore the summer time switch.
</p>

<h4>Debian</h4>
<p>
<code class="command">timedatectl set-local-rtc 0</code>
</p>

<h4>Windows</h4>
<p>
<code class="filename">RealTimeIsUniversal.reg</code>
</p>
<pre class="file">
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
</pre>

</body>
</html>