-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindow.linux
73 lines (46 loc) · 1.66 KB
/
window.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
rem == CreatePartitions-UEFI.txt ==
rem == These commands are used with DiskPart to
rem create four partitions
rem for a UEFI/GPT-based PC.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=128
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == b. Create space for the recovery tools ===
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
shrink minimum=500
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 4. Recovery partition ======================
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" #rem for bios use set id=27
gpt attributes=0x8000000000000001
list volume
exit
Linux recovery
Once you are on the Live desktop, open a terminal and execute these commands :
$ sudo mount /dev/sdXY /mnt
$ sudo mount /dev/sdXX /mnt/boot/efi
$ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
$ sudo chroot /mnt
# grub-install /dev/sdX
# update-grub
# exit
ref: https://askubuntu.com/questions/831216/how-can-i-reinstall-grub-to-the-efi-partition