LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Building a linux first partition table from scratch that windows 10 will play nicely inside of. (https://www.linuxquestions.org/questions/linux-general-1/building-a-linux-first-partition-table-from-scratch-that-windows-10-will-play-nicely-inside-of-4175675692/)

algray 05-22-2020 12:35 AM

Building a linux first partition table from scratch that windows 10 will play nicely inside of.
 
This thread is a follow-on to one which recently resolved.

https://www.linuxquestions.org/quest...es-4175675561/

Now that I have resolved the competing partition tables. I need to set-up a new partition table on a computer which came with windows installed (see that thread for more details).

I am under the impression that Windows will auto-recognize my motherboard and auto-load the install key. So i should be able to put it into any partition (not like the install Windows first guidance I'd been hearing in the past).

My research to date tells me that I will need the following.
- a system EFI partition (FAT32) - 1Gb is plenty but in my non space constrained environment, adding extra doesn't hurt
- a boot partition ext4 works - 10Gb is more than any forums say I would need but systems are getting bigger over time and drive space is not a constraint on this device.
- I plan to have 4 partitions and 1 swap drive, placed between 2 & 3, for accessibility (though that consideration seems to be no longer relevant with SSDs).
- windows will be installed in one of those partitions. Hopefully it will recognize my hardware and approve the key automatically.

Does this make sense?
Are there any other general guidelines to follow in this case?

I will try the windows install on a partition before making a new partition table.

syg00 05-22-2020 04:51 AM

STOP.

If you can boot Win10, create a system image on a USB. Then you can be assured that you can wipe the disk and re-install, because it is *your* Win10 recovery image.
After that, as I think I said, clean the disk, create a gpt partition and do the recovery - no need to create partitions. You seem determined to make thinks more complex than needed - that leads to more confusion and later problems.

sxy 05-22-2020 10:20 AM

Hi,

I think 200M for the EFI partition and 1G for /boot should be more than sufficient in most cases. Of course, as you said, it won't hurt to have large EFI and /boot partitions since you have enough space on your disk.

If you're planning to reinstall Windows, I'd strongly suggest you download the iso image with the media creation tool in Windows environment, since current Windows iso images downloaded in Linux may have files larger than 4G that FAT formatted drives cannot handle, and that you'll need tools like wimlib to split them.

It's better to install Windows first, or chances are you'll need to reconfigure the bootloader with a live cd/usb.

BW-userx 05-22-2020 12:04 PM

If you have EFI and some other systems installed before windows 10 it will NOT install due to the EFI already being in use by another. You’re definitely going to have to delete anything in Boot and EFI first if you’re going to even try to install it on another partition then the first one.

Of course following all of the other advice too. Having the boot install usb stick and nothing else on the drive. Then just let windows partition it on installation.

jefro 05-22-2020 07:07 PM

"Windows will auto-recognize my motherboard and auto-load the install key" This generally is only if your key is in Bios. Some Lenovos do that. I'd think magic jellybean would still be useful.

There is usually one or more hidden partitions that might be useful to not only copy but to know the exact point on the drive.


"NOT install due to the EFI already being in use" I don't get that just yet. Do you mean keys?

I still don't get the testdisk deal after you created partitions.

Not sure why one doesn't let the OS's create and format partitions.

algray 05-22-2020 07:50 PM

Quote:

Originally Posted by syg00 (Post 6125988)
STOP.
If you can boot Win10, create a system image on a USB. Then you can be assured that you can wipe the disk and re-install, because it is *your* Win10 recovery image.

I was not able to boot Win10. As I looked deeper i realized that the Windows10 partition was had been partially overwritten by my earlier dd command.

Quote:

I think 200M for the EFI partition and 1G for /boot should be more than sufficient in most cases. Of course, as you said, it won't hurt to have large EFI and /boot partitions since you have enough space on your disk.
I have had /boot fill up on me in the past. Maybe that was an easily correctable issue and I just didn't have the knowledge at the time. In any case, I've given myself extra room this time.

-----------------
So here's what happened
-----------------

Windows wouldn't install onto what testdisk had written (an MBR). But I was able to arrive at a EFI system partition that satisfied Windows using these instructions

I put:
- BIOS BOOT in sectors 34-2048 (512B)
- boot/efi in sectors 4096-1004096 (488MiB), *I know there is a gap, but Im paranoid now*

*For anyone following this later, make sure to back-up and BE CAREFUL, as the fellow says, it's easy to screw up!

In my case, I had an existing EFI partition and linux distro located in the middle of the drive (which I was using). So while gdisk allowed me to write the partitions, it would not allow the partprobe command and I had to skip steps 4 & 5.
By the time I got to step 8, the system was very unhappy and insisting I reboot. On reboot, Windows was willing to install into my selected partition.

I installed windows using the tool they provide on their website. It did not prompt me for a key or give me any other requirements to verify. So that worked.

I placed windows in the last free space of the drive. With that now working I cleared out the last of the cruft from my old filesystem (the original EFI and last linux distro) and was successfully able to install and boot Mint in the first free space after /boot. I then installed a swap drive after mint so I have space for 2 to 3 more partitions.

And I have a working system again :hattip:

Assuming it holds up well, I will do something similar next time I get a new computer so I'm not having to work around the base windows installation all the time.

Thanks everyone for the feedback!


All times are GMT -5. The time now is 09:32 PM.