NOTE: Currently this post is easily my most disorganized to date. There is a ton of information here, and unfortunately I'm not exactly sure what data is important, or not - and I can't explain how things work. The significant positive point is that it does work. ;-)
I can't believe it is even necessary to document this. After 30 years of PCs they continue to make things pointlessly difficult and challenging.
I have an Lenovo Thinkpad X1 Carbon with a 240 GB SSD. Windows 7 is amusing and all, but I really prefer Linux. Between UEFI, Secure Boot, GPT, etc... this has proved to be much more challenging than I had initially anticipated. I guess the point that will exemplify my frustration - I don't know why I need all these stupid partitions, restore partitions. I really did not have much of an issue with a BIOS and 4 partition drive to run my 2 OSes.
This method will rely on the Fedora Grub boot loader. I am not sure if this will wreak havoc on patching the Windows installation... I... shall see.
Select UEFI only under startup. (may not be necessary/worthwhile)
Boot the system again and hit enter (again). Then hit F12 and select the USB CDROM as your boot device.
Proceed with the Windows Installation until you get to the partitioning section.
Hit Shift-F10 (command prompt)
type diskpart <enter>
clean <enter>
new gpt <enter>
quit <enter>
Create a New Partition using a size to host your Windows Installation (leave enough room for your Linux install - Otherwise, you can resize Windows 7 after the install is done).
-- If you create this single partition and attempt to proceed, the installer will create the other necessary partitions. The exact number that would have made a Linux install impossible on a BIOS-based system (imagine that?)
Proceed with the Windows install
Let the Fedora installer do it's thing - then select the disk layout utility
Use the existing Windows-created EFI System Partition - just mount it as /boot/efi
Now - I need to figure out how to get Grub to recognize Windows is installed. Otherwise, I have to use the UEFI bootloader to select a different partition to boot from (and hope that works).
This guy does some magic with EFI and the bootloader and I'm not sure what even took place. I would... like to clean up the end result (which is a Windows and 3 linux boot options) I'll be curious to see how it handles Linux kernel patches.
http://www.rodsbooks.com/refind/
[root@neo fedora]# parted /dev/sda print
Model: ATA INTEL SSDSCMMW24 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot
2 106MB 240MB 134MB Microsoft reserved partition msftres
3 240MB 147GB 147GB ntfs Basic data partition
4 147GB 147GB 210MB ext4
5 147GB 240GB 93.0GB lvm
what is interesting
/boot - ext4 (obviously not used by Windows)
/boot/efi - vfat
/boot/efi/EFI/fedora
/boot/efi/EFI/Microsoft
I can't believe it is even necessary to document this. After 30 years of PCs they continue to make things pointlessly difficult and challenging.
I have an Lenovo Thinkpad X1 Carbon with a 240 GB SSD. Windows 7 is amusing and all, but I really prefer Linux. Between UEFI, Secure Boot, GPT, etc... this has proved to be much more challenging than I had initially anticipated. I guess the point that will exemplify my frustration - I don't know why I need all these stupid partitions, restore partitions. I really did not have much of an issue with a BIOS and 4 partition drive to run my 2 OSes.
This method will rely on the Fedora Grub boot loader. I am not sure if this will wreak havoc on patching the Windows installation... I... shall see.
Install Microsoft Windows 7
Boot the system and hit Enter when prompted to enter the BIOS.Select UEFI only under startup. (may not be necessary/worthwhile)
Boot the system again and hit enter (again). Then hit F12 and select the USB CDROM as your boot device.
Make sure you select GPT for your disk partition table.
(Why Windows would not default to GPT is a mystery to me)Proceed with the Windows Installation until you get to the partitioning section.
Hit Shift-F10 (command prompt)
type diskpart <enter>
clean <enter>
new gpt <enter>
quit <enter>
Restart the install
At this point, you may or may not need to either restart the install, or pretend to quit and then proceed (to force it to reread the disk). I believe I was able to click cancel (once) which took me back a few steps.Create a New Partition using a size to host your Windows Installation (leave enough room for your Linux install - Otherwise, you can resize Windows 7 after the install is done).
-- If you create this single partition and attempt to proceed, the installer will create the other necessary partitions. The exact number that would have made a Linux install impossible on a BIOS-based system (imagine that?)
Proceed with the Windows install
Install Fedora 18
Boot from the Fedora 18 x86_64 media.Let the Fedora installer do it's thing - then select the disk layout utility
Use the existing Windows-created EFI System Partition - just mount it as /boot/efi
Now - I need to figure out how to get Grub to recognize Windows is installed. Otherwise, I have to use the UEFI bootloader to select a different partition to boot from (and hope that works).
Install rEFInd - BootLoader Manager
The answer... rEFIndThis guy does some magic with EFI and the bootloader and I'm not sure what even took place. I would... like to clean up the end result (which is a Windows and 3 linux boot options) I'll be curious to see how it handles Linux kernel patches.
http://www.rodsbooks.com/refind/
Results
What my drive actually looks like[root@neo fedora]# parted /dev/sda print
Model: ATA INTEL SSDSCMMW24 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 106MB 105MB fat32 EFI system partition boot
2 106MB 240MB 134MB Microsoft reserved partition msftres
3 240MB 147GB 147GB ntfs Basic data partition
4 147GB 147GB 210MB ext4
5 147GB 240GB 93.0GB lvm
[root@neo fedora]# blkid
/dev/sda1: UUID="7C09-562E" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="13a969d6-8bc4-4cec-9144-33770117acec"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="ecb8342d-b43d-4f11-b567-7fc01e931dd6"
/dev/sda3: LABEL="Windows 7" UUID="A6580D72580D4293" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6626a4f0-ec44-4674-9a98-46c5ff1b26af"
/dev/sda4: UUID="91cc27d1-30ee-4a10-875c-dc2fba07b302" TYPE="ext4" PARTUUID="43222132-defc-4510-9872-3ae53ea23715"
/dev/sda5: UUID="MfEhIn-1Igb-J7sX-AZZf-1JlM-UvWh-fljkDV" TYPE="LVM2_member" PARTUUID="65e39e72-a59e-419a-b46d-62a7106beb8b"
/dev/mmcblk0: PTTYPE="dos"
/dev/mmcblk0p1: LABEL="X1CARBON" UUID="6417-6B2C" TYPE="vfat"
/dev/mapper/vg_neo-swap: UUID="f8d08fe6-b311-4456-b447-84fb6f47de96" TYPE="swap"
/dev/mapper/vg_neo-root: UUID="568cc30f-4441-4a6a-b063-5343279817a2" TYPE="ext4"
/dev/mapper/vg_neo-home: UUID="f32c98ed-9b32-4d67-9295-ae00d8d983a5" TYPE="ext4"
[root@neo fedora]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 2.3M 3.9G 1% /dev/shm
tmpfs 3.9G 5.4M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/vg_neo-root 20G 5.6G 13G 31% /
tmpfs 3.9G 172K 3.9G 1% /tmp
/dev/sda4 194M 37M 147M 20% /boot
/dev/sda1 96M 30M 67M 31% /boot/efi
/dev/mapper/vg_neo-home 59G 541M 55G 1% /home
/dev/mmcblk0p1 120G 75G 45G 63% /run/media/jradtke/X1CARBON
what is interesting
/boot - ext4 (obviously not used by Windows)
/boot/efi - vfat
/boot/efi/EFI/fedora
/boot/efi/EFI/Microsoft
/boot/efi/EFI/refind
Create a GUID Partition Table Partition on a Raw Disk
To create a GPT partition on a raw disk by using the Diskpart utility:- At a command prompt, type: diskpart to start the Diskpart utility: "Diskpart version 0.0" is displayed as well as a Diskpart prompt.
- At the prompt, type: list to list the mounted hard drive volumes.
- At the prompt, type: select x (where x is the number of the hard disk drive that you want to convert to GPT). The following information is displayed: "Selected Disk = x".
- At the prompt, type: new gpt to add the GPT information into the non-volatile RAM (NVRAM).
NOTE: This step does not create the GPT partition information. - At the prompt, type: create name="efi system partition" type=efisys Size=102 to create the Extensible Firmware Interface (EFI) partition.
NOTE: The name can be anything you want, but if the name has spaces in it, the name must have quotes around it. The type must equal either Efisys, Msres, or Msdata. If a size is not specified, the partition uses the remaining unpartitioned space. To install Windows XP, the Msdata partition must contain at least 2 gigabytes (GB) of free space. - At the prompt, type: create name="microsoft reserved" type=msres Size=31 to create the MSR partition.
- At the prompt, type: create name="basic data" type=msdata to create a partition for the remaining unpartitioned space.
- At the prompt, type: inspect to display the partition information.
- At the prompt, type: exit to quit the Diskpart utility.
hmm nice dude but i followed this tutorial with live images... http://joshstaivin.blogspot.in/2013/09/install-fedora-with-windows-7-dual-boot.html
ReplyDeleteThis comment has been removed by the author.
ReplyDelete