Since I used Windows 8 from the very beginning(late 2011 with Developer Preview), I’m quite interested with the new Windows 8. Here I got a Surface Pro 128GB with Windows 8 Pro(not the Windows 8 Chinese Edition), and now it’s time to do something funny~
I searched for how to install Linux in Surface Pro, but only to find Ubuntu installation guide, so I decided to write my Fedora installation experience.
1. Preparation:
A flash disk: I use my 4-year-old Kingmax 8GB flash disk.
ISO files: I used a Windows 8 x64 ISO(not needed) and Fedora 18 x86_64 Live ISO
2. FORMAT THE DISK!!!
ATTENTION: ANY OPERATION TO YOUR DISK LEADS TO DATA LOSS, SO BACKUP ALL YOUR DATA BEFORE YOU DO THE NEXT STEP.
(Copied from http://www.eightforums.com/tutorials/15458-uefi-bootable-usb-flash-drive-create-windows.html)
(NOTE: Substitute # in the first command with the actual disk # from step 4 above. For example: select disk 4)// careful with this one! Don’t type the wrong number!!!
select disk #
- clean
- create partition primary
- format fs=fat32 quick
- active
- assign
- list volume
- exit
After you reformatted your drive, you can simply copy all the files in ISO to the root directory(K: in this example)
MBR code? No! You are using UEFI! So there is no need to fixmbr/bootsect/syslinux on your device.
2.x If you want to dual boot the installer, read this part
When I copied the files to flash disk, I found out that the only file that both Fedora and Windows8 have is \efi\boot\BOOTX64.efi .
Here is how to resolve it: rename the Windows one to the name “ms.efi” and keep the Fedora one. You may have a directory structure like this:
next, copy grub.cfg to grub-Copy.txt for backup; and edit grub.cfg;
the contents should be like this:
set default="0"
function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
}load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2set timeout=10
### END /etc/grub.d/00_header ###search --no-floppy --set=root -l 'F18'
### BEGIN /etc/grub.d/10_linux ###
menuentry 'F18-x86_64-Live-Desktop.is' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /isolinux/vmlinuz0 root=live:LABEL=F18 ro rd.live.image quiet rhgb
initrdefi /isolinux/initrd0.img
}
menuentry 'Verify and Boot Fedora-18-x86_64-Live-Desktop.is' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /isolinux/vmlinuz0 root=live:LABEL=Fedora-18-x86_64-Live-Desktop.is ro rd.live.image quiet rhgb rd.live.check
initrdefi /isolinux/initrd0.img
}menuentry "Windows x86_64 UEFI-GPT" {
search --fs-uuid --no-floppy --set=root XXXX-XXXX
chainloader (${root})/efi/boot/ms.efi
}
Don’t forget to rename your drive! I renamed to F18 and changed related entry. Thus the second entry has no function at all, it could only made an error. In the last menuentry, you have to set your own partition UUID, since this partition is in FAT32 format, it should have an ID with XXXX-XXXX format.
3. Disable Secure Boot
Before installing it, disable the secure boot, or you would see this:
So, power off your Surface, press and hold Volume+ and press the power button, then you booted into UEFI settings. For more information, visit: http://www.microsoft.com/Surface/en-US/support/warranty-service-and-recovery/how-to-use-the-bios-uefi
Here you can set Secure Boot Control to Disabled to disable secure boot.
4. Install Fedora
Sorry for no screenshot during installation
I formatted the backup partition and mounted as /;
also choose your ESP partition(usually /dev/sda2) and its mount point set to /boot/efi , but do NOT format it!
You have to press “Apply” button and back to the main installation window. You are expected to wait about 10 seconds to continue the installation(I guess they are formatting the partition in the background, so when partition is ready, you can continue)
After you installed it, reboot the computer and you would see GRUB2 boot menu here:
The lines in the center bottom is quite small…
Also, the original kernel has no driver for the Marvell Wi-Fi adapter, so I used my own USB Wi-Fi dongle to connect Internet.
yum update takes a long time, and it updated nearly 500 packages, of course, with kernel updated.
But here is a problem, I booted into the new kernel once, but found out the Marvell Wi-Fi adapter appears at least 3 times! And at this moment, the system freezed! I forced to shutdown Surface and restart it again, but I only got kernel panic:
The crash time is after showing plymouth and ready to show the login screen. Booting the kernel on runlevel 1 without any problem, but level 2-5 would be kernel panic. And the main stack is related to mwifix drivers. So, Wi-Fi adapter is really a problem.
So I changed back to original kernel, this time the Wi-Fi seems to work. Wi-Fi is mwlan0 and uap0, but they are only one device can connect to the Wireless network(in my case, the bottom one) and its connection is not stable, it says a kernel related event dropped the wireless.
In all, currently Fedora 18 cannot function very well. But I think this should be a software problem, hope to fix that someday…
about WiFi driver:
This is not fixed yet, the only way to get network connection on Surface Pro currently is to use USB WiFi Adapter instead. Also, to avoid crash, you can edit the /etc/modprobe.d/blacklist.conf and add the following(which to block all Marvell WiFi device):
blacklist mwifiex
blacklist mwifiex_usb
4.x Install Windows 8
Skip this part if you want to keep the original Windows 8(shipped with the device).
I replaced the original ones with a retail version, and you have to find all the drivers. The Wi-Fi adapter(Marvell) have no driver, but I have a USB Wi-Fi adapter(Tenda W311M) which driver automatically installed by system, so I connected to the Internet and using Windows Update to get the drivers. The system will be activated when you connected to the Internet.
5. Change UEFI boot settings
Now you may find that every time you get logged into Linux, how to change the default boot sequence? efibootmgr!
#: efibootmgr
BootCurrent: 0000
Timeout: 10 seconds
BootOrder: 0003,0000
Boot0000* Fedora
Boot0003* Windows Boot Manager
But this program runs under Fedora, I cannot find a program to set the timeout or boot sequence under Windows 8.
If you are in Linux, you may found it’s easy to boot into Windows with GRUB2:
In order to automatically generate Windows entry, you might need change /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.menuentry "Windows x86_64 UEFI-GPT" {
search --fs-uuid --no-floppy --set=root XXXX-XXXX
chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}
Again, XXXX-XXXX is your ESP partition UUID.
But if you are in Windows, you have to take the advanced reboot and “Use a device”, there you will found Fedora item and you can boot into Fedora after rebooting.
Another one I occasionally found out is, once you power on your Surface, you can press F7 to select boot device:
I did see a red AMI logo and says Press DEL or ESC to enter Setup. You can see it by press Tab key when Surface logo appears.
One that I cannot explained is that press F7 or DEL or ESC or Tab may sometimes no function at all.
5.1 add Linux boot entry on flash disk
If you run grub2-mkconfig when a Linux USB inserted, it can be recognized and added to the boot menu. But you have to change linux and initrd to linuxefi and initrdefi since you are using EFI. Here you can say it a Fedora To Go! Fedora can run without manual re-configuration on a different device! DPI is really a disappointing one…
Need help!
I removed linux partition and want to install another linux distribution. I created two entries using efibootmgr before, now it only shows using Windows 8's advanced restart and cannot see using bcdedit! The F7 method shows only "Windows Boot Manager" and "Enter Setup". If I want to install, there would be a failure when setting up bootmanagers. It seems cannot write to memory(maybe called NVRAM?)
6. Surface Pro features under Fedora 18
(Compared with the features listed in http://www.microsoft.com/surface/en-us/support/getting-started/get-to-know-your-surface-with-windows-8-pro)
Touchscreen
1080P works well, through the words are very small. But touch is like a **, only single touch and act like a mouse pointer. If you have a non-HID resistive touch screen, you would know that.
Surface Pen
Currently works like a mouse. Hover is supported. Eraser? You are dreaming!
Wi-Fi and Bluetooth antennas
You have to update kernel or something to make it ‘works’. But you never know when it became angry…
Two cameras—front and back
Cheese likes the back one, so I don’t know how to change the camera in cheese, front is not tested yet.
Microphone
Works.
Software
It's a paradox! There is no answer! Look! This place is going to blow up if I don't get back in my body!
Windows button
Press the Windows button just like press the Windows key on the keyboard, has force-feedback.
Sensors
Not tested yet. Which program can read sensors data?
Kickstand
Yes, I see you, and no, I don't care.
Ports
Full-size USB 3.0 port
USB 2.0 device works well, using ORICO USBHDD case(Samsung 830 in it) to test, raw read over 130MB/s.
microSDXC card slot
Tested using Toshiba EXCERIA TypeHD, raw read can reach over 70MB/s, far over normal USB2.0 readers(around 25MB/s) since it connected on the USB3.0 bus.
Charging port
Works. Both up and down.
mini DisplayPort
Tested. Working with adapters, not tested monitor that support display port
Power supply
Works. Sometimes?
After using for nearly a half year, when it attached in light-down-and-wire-up position, sometimes no power transmission(the system indicates using battery). The other way works fine.
Accessories
Touch Cover
Tested touch cover 1(the one original shipped with SurfaceRT), worked.
Type Cover
Works. Dual fingers gesture like scroll up and down is supported. This 6-pin port is not a rearrangement of USB’s 4-pin. Max volts between pins is ~2.85V
Surface video adapters
Tested. I have 2 kind of adapter, one is miniDP-DVI-DP-HDMI, another one is miniDP-VGA.
miniDP-VGA: workes pretty well, the frame rate can reach up to 120Hz if your monitor/projector supports it.
miniDP-DVI-DP-HDMI 3 output:
I tested HDMI output to ACER X1220H projector, the framerate can only go up to 75Hz, this is not a projector problem since when I connect the projector using IdeapadY450 HDMI port, 120Hz works fine.
Also tested HDMI output but attached HDMI-DVI cable and DVI monitor, can only work fine with that NOT 60Hz framerate. Again, this is not monitor error since it worked well with original graphic card's DVI output. Maybe if it is 60Hz and the converter just skip directly and send the signals out, and the chip on HDMI-DVI also lead to insufficient power.
DVI output to DVI monitor works well, no problems occurred like the miniDP-HDMI-DVI situation.
Conclusion: this maybe the adaptor problem since I used unofficial ones to test, or driver issue?
log:
updated on 2013Oct29
adaptors, fedora mwifiex driver issues. USB3.0.