Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind). |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-12-2012, 10:38 PM
|
#1
|
Member
Registered: Dec 2004
Posts: 42
Rep:
|
Sony VAIO S and EFI troubles
I bought a new Sony Vaio S series laptop. It uses Insyde H2O BIOS EFI, and trying to install Linux on it is driving me crazy.
Code:
root@kubuntu:~# parted /dev/sda print
Model: ATA Hitachi HTS72756 (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition hidden
2 274MB 20.8GB 20.6GB ntfs Basic data partition hidden, diag
3 20.8GB 21.1GB 273MB fat32 EFI system partition boot
4 21.1GB 21.3GB 134MB Microsoft reserved partition msftres
5 21.3GB 342GB 320GB ntfs Basic data partition
6 342GB 358GB 16.1GB ext4 Basic data partition
7 358GB 374GB 16.1GB ntfs Basic data partition
8 374GB 640GB 266GB ntfs Basic data partition
What is surprising is that there are 2 EFI system partitions on the disk. The sda2 partition is a 20gb recovery partition which loads windows with a basic recovery interface. This is accessible by pressing the "ASSIST" button as opposed to the normal power button. I presume that the sda1 EFI System Partition (ESP) loads into this recovery.
The sda3 ESP has more fleshed out entries for Microsoft Windows, which actually goes into Windows 7 (as confirmed by bcdedit.exe on Windows). Ubuntu is installed on sda6, and while installation I chose sda3 as my boot partition. The installer correctly created a sda3/EFI/ubuntu/grubx64.efi application.
The real problem: for the life of me, I can't set it to be the default! I tried creating a sda3/startup.nsh which called grubx64.efi, but it didn't help -- on rebooting, the system still boots into windows. I tried using efibootmgr, and that shows as it it worked:
Code:
root@kubuntu:~# efibootmgr
BootCurrent: 0000
BootOrder: 0000,0001
Boot0000* EFI USB Device
Boot0001* Windows Boot Manager
root@kubuntu:~# efibootmgr --create --gpt --disk /dev/sda --part 3 --write-signature --label "GRUB2" --loader "\\EFI\\ubuntu\\grubx64.efi"
BootCurrent: 0000
BootOrder: 0002,0000,0001
Boot0000* EFI USB Device
Boot0001* Windows Boot Manager
Boot0002* GRUB2
root@kubuntu:~# efibootmgr
BootCurrent: 0000
BootOrder: 0002,0000,0001
Boot0000* EFI USB Device
Boot0001* Windows Boot Manager
Boot0002* GRUB2
However, on rebooting, as you guessed, the machine rebooted directly back into Windows.
The only things I can think of are:
1. The sda1 partition is somehow being used
2. Overwrite /EFI/Boot/bootx64.efi and /EFI/Microsoft/Boot/bootmgfw.efi with grubx64.efi [but this seems really radical].
Can anyone please help me out? Thanks -- any help is greatly appreciated, as this issue is driving me crazy!
|
|
|
06-13-2012, 12:24 AM
|
#2
|
Member
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342
Rep:
|
I amongst many, would NEVER ever again buy ANY computer that has "Insyde H20" marked on it anywhere.
However, that answer is not very helpful.
If you have another HD kicking around on an old laptop, why not fire it in and do a complete ( ie not dual boot ) installation of Linux. Cut the troubleshooting way down that way.
Also, I am willing to bet that the problem lay in the space before partition 1, the area from 0 - to 1049kB that is not listed on your partition table.
Last edited by ceyx; 06-13-2012 at 12:27 AM.
|
|
|
06-13-2012, 05:55 AM
|
#3
|
Member
Registered: Dec 2004
Posts: 42
Original Poster
Rep:
|
Quote:
Originally Posted by ceyx
I amongst many, would NEVER ever again buy ANY computer that has "Insyde H20" marked on it anywhere.
However, that answer is not very helpful.
If you have another HD kicking around on an old laptop, why not fire it in and do a complete ( ie not dual boot ) installation of Linux. Cut the troubleshooting way down that way.
Also, I am willing to bet that the problem lay in the space before partition 1, the area from 0 - to 1049kB that is not listed on your partition table.
|
I guess I am learning that the hard way But how would you know that a computer will use Insyde H2O beforehand?
I have another hd, but I am not sure how that will help -- I do actually want to dual boot.
Hmm.. that's something I didn't think of. What could that 1049kb do to hijack the bootloader?
|
|
|
06-13-2012, 09:19 AM
|
#4
|
Member
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342
Rep:
|
Quote:
how would you know that a computer will use Insyde H2O beforehand?
|
It should be clearly marked on the cardboard shipping box, and also in the documentation which is available on the web before purchase. But you are right, it is exactly how I learned the hard way too. Unfortunately, it seems the learning is always about the ways Microsoft is locking down "its" market. ( Microsoft owns that Sony, not you )
Quote:
but I am not sure how that will help
|
There would be no Windows system to protect with just Linux on it. If it worked, it would point to some parameter that is being used incorrectly by you or the partition editor used. If it doesn't, it is could point to the BIOS and "vendor lockin". Cut the problem in two this way.
Quote:
What could that 1049kb do to hijack the bootloader
|
That area is where the MBR is, master boot record. It may not be writeable ( BIOS parameter ? - have a look )
If you really want to keep Windows and are not really sure what is up, I recommend using the spare HD and the Gparted utility which should be available to Kubuntu. Actually, if you have the time, try the spare HD, Gparted and a vanilla Ubuntu or Debain. Experiment and find out what is going on before you really trash Windows accidentially.
|
|
|
06-13-2012, 11:37 PM
|
#5
|
Member
Registered: Dec 2004
Posts: 42
Original Poster
Rep:
|
I was eventually able to solve this. I replaced the EFI/Microsoft/boot/bootmgfw.efi with the grub64.efi. I renamed the former to bootmgfw.efi.old and used grub to add a menu option to chainload into it.
This implies that the firmware is hardcoded to look for the microsoft windows bootloader, and does not respect efibootmgr settings, or startup.nsh. That's really terrible.
Thank you so much for your suggestions, ceyx
|
|
1 members found this post helpful.
|
06-13-2012, 11:48 PM
|
#6
|
Member
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342
Rep:
|
Good Work ! Save us all the pain in the future
|
|
|
07-17-2012, 06:39 AM
|
#7
|
LQ Newbie
Registered: Nov 2004
Posts: 5
Rep:
|
Rohan - thanks for the posted solution. One issue that I am having with it is that using this approach I lose ability to resume Windows 7 from hibernation. Can you comment on whether that is a problem for you or not?
|
|
|
07-17-2012, 06:55 AM
|
#8
|
Member
Registered: Dec 2004
Posts: 42
Original Poster
Rep:
|
Yes, unfortunately I had the same problem. I wasn't able to find a solution. If you do find one, please let me know
|
|
|
07-18-2012, 07:54 PM
|
#9
|
LQ Newbie
Registered: Nov 2004
Posts: 5
Rep:
|
OK, so I got it to work. Had to learn more about UEFI and H20 BIOS then I ever wished to Looks like the failure to come-out-of hibernation issue is a GRUB problem, I don't think it passes the expected environment when chain-loading the Windows boot manager - don't know exactly which variable is wrong, but the advice on the net seems to basically not use GRUB as a UEFI boot manager at all, and so I heeded that advice.
The brief summary is - I installed/booted the EFI shell and proved that I can boot Windows by calling bootmgfw.efi directly from the shell, and when I did so I could resume form hibernation without a problem. Then I installed rEFInd boot manager and switched to using it to multi-boot between Win7, Fedora and the EFI shell (the latter proved to be tremendously useful, so good to have it around and be able to boot into it). With that, both Windows and Linux can properly resume from hibernation.
Here are the gory details.
In order to boot shell/rEFInd on power up, had to figure out exactly how the BIOS picks the one EFI it chooses to boot. What I see is that its order of preference seems to be:
a. \EFI\Microsoft\Boot\bootmgfw.efi
b. \EFI\redhat\grub.efi - might be based on what Linux installation writes via efibootmgr into the EFI environment
c. \EFI\Boot\bootx64.efi
I.e., you remove a - it moves on to b, and so on. By default on my machine, bootx64.efi contained an exact copy of Windows bootmgfw.efi. As you found out before, regardless of what you write with efibootmgr, rebooting the machine changes that - so seems like the BIOS does its own scan/enumeration and rewrites those settings to its own liking.
So, what I did was:
- move bootmgfw.efi up a level to \EFI\Microsoft - eliminates a.
- renamed redhat directory to rh - eliminiates b.
- replaced bootx64.efi with what I wanted the machine to boot - i.e. with rEFInd EFI
- copied rEFInd config file int \EFI\Boot as well
- created a separate \EFI\Shell and copied the shell EFI there
This ensured that the EFI getting booted was in fact c., which is rEFInd boot manager
Unlike the BIOS/GRUB/Windows boot manager, rEFInd does an intelligent scan and presents all the EFIs it finds for you to select for booting. It found EFIs for Windows (Windows boot manager), Linux (GRUB), shell and self and presented them as a menu. You can further customize it in great detail by tweaking its config file. I.e., it does what a properly designed H20 should have been doing in the first place.
Thats all there is to it. See if this works for you. Good luck!
Last edited by luchnkov; 07-18-2012 at 08:16 PM.
|
|
1 members found this post helpful.
|
07-18-2012, 09:27 PM
|
#10
|
Member
Registered: Dec 2004
Posts: 42
Original Poster
Rep:
|
Thanks for the detailed solution You're right, I certainly learnt a lot more about EFI than I never needed to!
I did try rEFInd, but the problem was that the graphical menu was horribly broken for me. I did think of installing the shell and tweaking the config, but at that point I gave up trying to wrangle with it
|
|
|
07-23-2012, 04:03 PM
|
#11
|
Member
Registered: Oct 2005
Location: HousTon TX, US
Distribution: Ubuntu 7.10, Opensuse 10.2
Posts: 45
Rep:
|
Hi guys.. I too bought a new sony viao with this same bios and setup.. Believe its the same hard drive too. However I never tried installing my distro along windows 7. I actually just replaced my hard drive and installed Fedora 17, which is actually the only distro that recognized my EFI bios and configured boot all by itself. Because when I tried installing opensuse, ubuntu and not sure what else I tried, it will never boot. I will always get this error message OPERATING SYSTEM NOT FOUND. Another way I was able to install openSUSE was to go into the bios and change boot mode from EFI to LEGACY. which I belive changes to old way of booting and then I was able to install openSUSE 12.1..
I definetly did not know that insyde h20 was so hard to configure.. When I was shopping around for my new laptop, I look at many and looked up all the hardware to see what was most compatible with the kernel.. I tried a few laptops that I liked but couldn't keep for the lack of support.. Among some of them because of the dual graphic thing.. Gosh I hated that and its very difficult finding anything with single gp not being intel.. I, however failed to look up bios.. didn't think of it much.
Anyway after a few months of looking I finally settled with a new ivy bridge vaio with hd4000 gp. Low res but i really don't need high res much while on my laptop. I have a large display so Im good with that. Luckly I have no need for a windows partition on my personal computer, as we use an HP at work, so I replaced my hard drive to keep the factory one intact in case of warranty or whatnot and installed Fefora 17 using whole drive and it boots perfect under EFI, all my hardware is supported but memory card slots. But a simple kernel compile does the job.. Anyways its good to know you worked out your boot problem. Kudos
|
|
|
07-23-2012, 04:19 PM
|
#12
|
Member
Registered: Dec 2004
Posts: 42
Original Poster
Rep:
|
jncarlos: Strange, because I tried openSUSE, and ubuntu both, and their liveusb sticks booted just fine. Maybe the way you created the livestick (or livecd) was different? You need to tell the UEFI to boot from optical drive first, and press F11 during boot. Also, the boot media needs to have an "EFI" folder in the top level, with a proper efi boot binary in the correct location(s). Both ubuntu and suse have it just right.
Yes, Insyde H2O is not only difficult to configure, but also doesn't follow the standards. I love the laptop, except for this crappy part, which makes it manufacturer-owned rather than user-owned.
|
|
|
11-23-2012, 12:30 AM
|
#13
|
LQ Newbie
Registered: Nov 2012
Posts: 1
Rep:
|
This step was immensely helpful to me and my new Vaio Z3. The issue that I am having is that after replacing bootmgfw.efi with grubx64.efi and renaming, it boots directly to grub console. I dont even get a menu where i can chose ubuntu. I tried putting a grub.cfg file next to the new bootmgfw.efi(grubx64.efi), no go?
Any ideas how i can get the renamed grubx64.efi to find all the rest of the grub stuff outside of the ESP in my linux parition?
Or do i have to put it all in /EFI/Microsoft/Boot on ESP?
Thank you!
|
|
|
12-24-2012, 11:19 AM
|
#14
|
LQ Newbie
Registered: Jan 2003
Distribution: Debian, Ubuntu, Solaris
Posts: 24
Rep:
|
Quote:
Originally Posted by rohandhruva
Thanks for the detailed solution You're right, I certainly learnt a lot more about EFI than I never needed to!
I did try rEFInd, but the problem was that the graphical menu was horribly broken for me. I did think of installing the shell and tweaking the config, but at that point I gave up trying to wrangle with it
|
I know the answer comes a little late but I think it's worth mentioning ... I had the same issue with the graphical menu with rEFInd and found that the problem was that the 'icons' folder wasn't located in the same folder of the EFI file that the system uses to boot; I've moved the 'icons' folder to that location and the menu worked perfectly after that.
|
|
|
05-09-2013, 10:39 AM
|
#15
|
LQ Newbie
Registered: May 2013
Posts: 3
Rep:
|
Best practice to install linux side by side with Windows
Thanks so much for everyone who has contributed to this thread. My new VAIO Model S has a 750GB magnetic disk and my partition table is slightly different than what was described previously:
Code:
ubuntu@ubuntu:~$ sudo parted /dev/sda print
Model: ATA Hitachi HTS72757 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition hidden
2 274MB 1819MB 1546MB ntfs Basic data partition hidden, diag
3 1819MB 2092MB 273MB fat32 EFI system partition boot
4 2092MB 2226MB 134MB Microsoft reserved partition msftres
5 2226MB 731GB 729GB ntfs Basic data partition
6 731GB 750GB 19.0GB ntfs Basic data partition hidden, diag
ubuntu@ubuntu:~$
Now that I've read the whole thread, here is what I think I need to do to create a dual boot Windows 8/Ubuntu environment:
1. Install Ubuntu 13.04 amd64.
I should tell it I want a dual boot environment and that it should install the boot environment into partition 3. I will shrink partition 5 and create a ext4 and swap partitions in the newly created space.
2. After finishing installation, I should expect that it won't properly boot Linux.
At this point I should follow Luchnkov's instructions in post #9 for installing the rEFInd boot manager (with toshiro's suggestion in post #14 for making the menu work properly). This should allow it to find the .efi file for GRUB and allow me to boot from it as well as the original windows environment.
Does that sound right?
One question I still have: How do I find the EFI shell .efi in order to follow Luchnkov's instruction "created a separate \EFI\Shell and copied the shell EFI there"?
|
|
|
All times are GMT -5. The time now is 03:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|