I have a Sony Vaio SVS15 with Windows 7 64bits in which I have replaced the optical drive with an SSD on a drive caddy. My goal is to leave windows alone in the original hard drive (which is also SSD) and install Arch Linux on the second drive (in optical drive spot).

The installation of the new SSD went smoothly and it is correctly detected, formateable etc. I have installed Arch Linux there from a USB stick as described in this tutorial:

The problem I have is that when I start the computer it goes straight into Windows, whereas I have installed Arch after Windows. Both drives use GPT and Windows 7 64 bits supports UEFI.

My question is: Do you think the problem comes from the fact that Arch is on a SSD that is where the optical drive was? Or do you think it comes from how I have installed Arch/Grub?

This will help me a lot to search in one direction or another.

NB: In the boot order of the BIOS, there is still "optical drive", that is it didn't get modified when replacing it by an SSD. So the options are (in the order they are set at the moment):

  1. Internal Optical Disc Drive
  2. External Device
  3. Internal Hard Disk Drive
  4. Network



I have re-run the installation process in case I made some silly mistake. While I still can't get it to work, I have noticed a message while configuring Grub2 that might be relevant. The command I entered is:

grub-mkconfig -o boot/grub/grub.cfg

I had executed arch-chroot previously and had mounted in /boot the 512MiB EFI partition. When running the command I get a couple of warnings and a "bad magic number" message. It then says "done" so I'm not sure whether this is an error or not:

[root@archiso /]# grub-mkconfig -o boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image(s) in /boot: initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
[  171.937201] FAT-fs (md126p4): bogus number of reserved sectors
[  171.940041] squashfs: SQUASHFS error: Can't find a SQUASHFS superblock on md126p4
[  171.942729] EXT4-fs (md126p4): VFS: Can't find ext4 filesystem
[  171.945366] EXT4-fs (md126p4): VFS: Can't find ext4 filesystem
[  171.948756] EXT4-fs (md126p4): VFS: Can't find ext4 filesystem
[  171.955360] FAT-fs (md126p4): bogus number of reserved sectors
[  171.957919] ntfs: (device md126p4): read_ntfs_boot_sector(): Primary boot sector is invalid.
[  171.958986] ntfs: (device md126p4): read_ntfs_boot_sector(): Mount option error=recover not used. Aborting without trying to recover.
[  171.960112] ntfs: (device md126p4): ntfs_fill_super(): Not an NTFS volume.
[  171.965184] ufs: You didn't specify the type of your ufs filesystem
[  171.965184]
[  171.965184] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
[  171.965184]
[  171.965184] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[  171.970303] ufs: ufs_fill_super(): bad magic number
  • Hello; It sounds like it is the boot order in the BIOS. I am not failure with your BIOS, but you should be able to set your optical drive (new SSD) to bootable and select it with a key press on startup (Like F12...) or in addition to setting the "optical" drive as bootable move it up the boot order list so it is before the internal SSD.
    – jc__
    Jan 17, 2017 at 14:28
  • IT may require BIOS set to Legacy boot also.
    – jc__
    Jan 17, 2017 at 14:40
  • I don't have an option in the BIOS to set a drive to bootable, I can only change the order or change the boot mode from UEFI to Legacy. The Optical drive is already the first option in the list (I have updated the question with the actual ordering). I have tried setting the boot mode to Legacy as you suggested but then it doesn't find neither Windows nor Linux and just says "Operating System Not Found", which I think is normal since the partitions are GPT.
    – Borja
    Jan 17, 2017 at 16:05
  • When you ran the command grub-mkconfig -o boot/grub/grub.cfg what OS did you use to boot from? If USB would /boot/grub be on the USB? What is the mount point for the external SSD, /mnt/ssd/boot/grub? Also should you have a leading / in your path? grub-mkconfig -o /boot/grub/grub.cfg.
    – jc__
    Jan 18, 2017 at 14:18
  • 1
    Looking at the install instructions for UEFI/GPT, it uses the command grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=grub the directory esp is a FAT32 partition. So replace esp with the mount point for that partition. After you run the gub commands are you able to verify that the files were created where they should be?
    – jc__
    Jan 18, 2017 at 14:24

1 Answer 1


Reading the blog post at http://gpuenteallott.blogspot.co.uk/2012/12/dual-boot-windows-7-and-ubuntu-with-uefi.html, it seems this is a problem with Sony Vaio computers, for which Windows always boots ignoring any other OS installed, bypassing Grub. The author provides a solution which worked for me so I will describe it below.

NOTE1: I have actually tried this with Ubuntu instead of Arch Linux as I have decided to switch, but I believe the problem here had to do with how Windows was installed and not with the Linux version, so I would expect this to work with Arch as well. If it doesn't, the way I have been using both Arch Linux and Windows was by installing Arch Linux using an MBR partition, and then switching the BIOS between UEFI and Legacy to choose whether to run Windows or Arch. Whenever setting boot mode to UEFI, Windows would be launched, and whenever setting it to Legacy mode, Arch would be launched (each without being able to ever see the other OS). For practical purposes this was similar to the desired outcome with Grub, it just required the extra effort of pressing F2 when booting the laptop and navigating the BIOS menu every time I needed to switch.

  1. Install Windows then Linux.
  2. Boot into Windows and in the command line run:

    1. diskpart
    2. select volume [volume_number] (see NOTE2 at the end of the post)
    3. assign letter [any unused letter (usually different from C:)]
    4. B: (or whichever letter you just chose)
    5. cd EFI/Microsoft/Boot
    6. rename bootmgfw.efi bootmfgw.efi.old
  3. Reboot the computer, it should go straight into Linux since it won't find /EFI/Microsoft/Boot/bootmgfw.efi which we just renamed.

    1. Open terminal and type sudo gedit /etc/grub.d/11_Windows
    2. In the text file enter the code below, where you should replpace hd0 and gpt1 by the actual drive and volume in your situation. In my case it was set root='(hd0,gpt3).
#!/bin/sh -e
echo "Adding Windows 7">&2
cat << EOF
menuentry "Windows 7"{
set root='(hd0,gpt1)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi.old
  1. (continued)
    1. Save the file and close the editor
    2. Change the file permissions: sudo chmod a+x /etc/grub.d/11_Windows
    3. Update Grub so that the option we just defined appears in the list when booting the computer: sudo update-grub

That's it, now when you reboot your computer you should see on the menu both Linux and Windows.

NOTE2: In the tutorial from the link, the author picks the disk and partition instead of the volume, but in my case all I needed was to specify the volume (and actually it would not work otherwise). The volume number, disk number and partition number will depend on the computer and on how you installed the Windows provided by Sony. In my case it was volume 3. To find yours you will need to repeat the process (using remove letter [letter] each time to remove the letter you assigned) until you find the one that contains the /EFI folder that contains bootmgfw.efi. Type list volume/list disk/list partition to see the different options available.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .