[ltp] Dual-boot with Windows 10

cr cr at orcon.net.nz
Sun Apr 25 10:54:40 CEST 2021


On Fri, 23 Apr 2021 13:53:09 +0200
Joerg Bruehe <joerg.bruehe at web.de> wrote:

> Hi Chris!
> 
> 
> On 23.04.21 11:46, cr wrote:
> > On Fri, 23 Apr 2021 09:57:29 +0200
> > Joerg Bruehe <joerg.bruehe at web.de> wrote:
> > 
> >> [[ proposal: use a virtual machine ]]
> >   
> >>> However, in this laptop Windows has been a bit greedy thus:
> >>> (according to Gparted):
> >>> /dev/sda1	ntfs	Recovery	499MiB	hidden
> >>> /dev/sda2	fat32			100MiB	boot
> >>> /dev/sda3	Unknown			16MiB
> >>> msftres /dev/sda4	ntfs			465GiB
> >>>
> >>> ... so the bulk of Windoze is in /dev/sda4 so I can't create an
> >>> extended partition there without blowing Windows away.   Which I
> >>> will do if I have to, but is there an easy way around this?
> >>
> >> I have no info how important the first three partitions are for
> >> Windows and what would happen in case you remove them. But even if
> >> that were possible, you would still have to shrink sda4 and either
> >> move it to the end of the disk (let it remain sda4) or leave it
> >> where it starts now and rename it sda3.
> >>
> >> None of that looks nice and easy to me.
> > 
> > James pointed out that under UEFI the four-partition limit doesn't
> > apply.   So I think I can just leave /sda1 to /sda3 alone,
> > shrink /sda4, and create /sda5 onwards for Linux use.   I'll give
> > that a try, anyway, and see what happens.   Since it's a new-to-me
> > machine,  I have no data at risk yet.   The worst I can do is wreck
> > Windows and start again with Linux only.
> 
> TTBOMK, you can't do it this way: Most probably, your disk has a MBR 
> partition table, and this won't support a fifth primary partition.
> 
> All my further remarks are based on that assumption, so you should
> first check whether it is a MBR partition table or a new GPT one.
> Linux fdisk, parted, ... should tell that.
> 
> 
> If it is a MBR table, there are at least three aspects:
> 
> The first question is whether your machine really has UEFI firmware.
> Maybe it has, but if it hasn't I don't believe you can change that.
> 
> The next question is whether there is a way to convert the disk:
>  From all I have read, the new GPT (the partition table introduced
> with EFI, which doesn't have the limit of four primary partitions) is 
> completely different from the traditional MBR partition table.
> Sure it is possible to write a GPT onto an existing disk, overwriting 
> the MBR table, but is it possible to do that in place?
> You need to backup the contents of all partitions, I fear, and to 
> restore it into new partitions once you have created them via the GPT.
> 
> And the third issue is whether you can transform a Windows 10 
> installation from BIOS boot to UEFI boot. If I remember the articles 
> correctly, that is at least complicated, maybe impossible. It might 
> require you to re-install Windows.
> 
> I won't claim this to be impossible, but it is sure more complicated 
> than just shrinking the Windows partition and putting Linux behind it.
> 
> 
> I just get an idea of which I don't know whether it is possible:
> Can Windows use a logical partition for its C: system disk?
> If so, you might be able to shrink the Windows file system, remove
> the existing primary sda4 (just the partition definition), create a
> new extended sda4 partition (probably starting a bit earlier on the
> disk), and then create a logical sda5 (inside sda4) that just covers
> the shrunken C: file system. Everything after that (still within
> sda4) would be more logical partitions for Linux.
> 
> But before you take that route, make sure Windows can run from a
> logical partition - I really don't know.
> 
> > 
> > So many thanks for the offer of help but I'm probably okay.
> 
> I wish you success!
> 
> 
> Regards
> 
> Jörg

Okay, update:   I decided it was getting too messy to leave Windows in
place, if I need it in future I'll try the VM method.    (I do have a
L440 which is dual-boot, but Win10 seems to want to mess with the boot
order any time I run it).

So I repartitioned the whole disc, decided to use UEFI, and (after a
false start as I failed to realise EFI demands its own boot directory)
I did this:
sda1	600MB	Fat32	EFI
sda2	40GB	ext4	root (Debian)
sda3	40GB	ext4	spare
sda4	16GB	swap
sda5,6 	200GB each ext3	data

and installed Debian 10.9 in it.   

This all works *except* there's a problem with the screen and
keyboard/mouse freezing after a while, I suspect because I'm getting an
error 'Firmware bug:  IOAPIC not in IVRS table'   which is related to
IOMMU.   There's no way to disable IOMMU in the BIOS settings so I may
just have to do it in Grub.   But I don't think that has any relation to
BIOS vs UEFI.

(I tried Linux Mint Debian Ed (LMDE4) for comparison which runs ok (but
slowly) off a live USB, I'd install it in the spare partition but its
installer demands a bootable partition to install it in so I'm not sure
if it's UEFI-aware.   I'm starting to think I should have stuck with
'Legacy' BIOS boot.)   

Thanks for the advice so far.

Chris





More information about the Linux-Thinkpad mailing list