[EXPLAINED] UPDATE 4 2015-01-10: UEFI Dual boot with Win8

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

[EXPLAINED] UPDATE 4 2015-01-10: UEFI Dual boot with Win8

Postby paultgg » Jan 8th, '14, 07:54

SUPER IMPORTANT UPDATE 4: I am an ee-dee-oth. Simplest way to get this going is (1), get your Windows setup, (2) shrink your windows partition (in windows) to make room for Linux, (3) turn off secure boot, (4) install refind IN WINDOWS using the instructions on the refind site (http://www.rodsbooks.com/refind/installing.html#windows), (5) install Mageia to the empty space (refind should pick up linux automatically! You should then be able to customize refind by mounting your EFI partition (for me, the command was "mount /dev/sda2 /path/to/a/folder/I/made), and editing the refind.conf file.

So you can pretty much ignore the rest of this post...

UPDATE: Forgot to mention that I also mounted /boot to point to the EFI partition in step 4... kind of important... my bad.
UPDATE 2: Tried this on another X202e. Didn't pick up the Linux boot options. Fix was to add the ext4 driver to the /boot/EFI/tools/drivers folder on the EFI partition, and uncomment the "scan_driver_dirs" line in refind.conf (which I found in /boot/EFI/Microsoft/Boot). Use whichever driver for whichever file system you're using. (You can download the zip file here: http://www.rodsbooks.com/refind/getting.html)
UPDATE 3: Forgot to state that Secure Boot needs to be disabled. Whoops. Also kind of important.

I have an Asus X202e laptop, which doesn't allow BIOS-style (MBR) booting when there's a EFI partition on the hard drive (which means most of the instructions I found, including the ones on the Magiea site, don't work). Here's how I was able to dual-boot Windows 8 and Mageia 3 on a UEFI system.

In short:
Get efibootmgr and rEFInd installed, and you should be laughing.

Pre-requisites:
1. Windows 8/8.1 already installed, with the hard drive partitioned as you like (if you're on a blank hard drive, Windows will setup the EFI partition nicely).
2. You need to know which partitions point to where (e.g., my / pointed to /dev/sda5)
3. Magiea Install media and the LiveDVD (I used the KDE Live DVD)
4. The rEFInd RPM package (http://sourceforge.net/projects/refind/files/0.7.7/)
5. The rEFInd zip package (http://www.rodsbooks.com/refind/getting.html)
6. The efibootmgr RPM package (http://mirrors.kernel.org/mageia/distri ... x86_64.rpm)
7. Secure Boot needs to be disabled!


Steps:
1. I installed Mageia from the DVD ISO as per usual. (This left Mageia on the drive, but not accessible through the bootloader.)
2. I booted the system with the LiveDVD.
3. I had the RPM files on a SD card, which automatically mounted when inserted (so a USB stick would work, too...)
4. I manually mounted /, /boot, and /usr to point to the hard drive (i.e. "mount /dev/sda5 /" etc. This let me install the RPMs to the hard drive, instead of to RAM).
5. Installed the RPMs (efibootmgr then rEFInd)
6. Copied the driver file from the rEFInd zip package to the /boot/EFI/tools/drivers folder on the EFI partition (I was using ext4 partitions, so I used that driver)
7. Uncommented the "scan_driver_dirs" line in refind.conf (which I found in /boot/EFI/Microsoft/Boot)
8. I repaired /etc/fstab by reinstalling Mageia (/etc/fstab still had all the LiveDVD mount points in it...)
...and there was much rejoicing.

Disclaimers:
1. Could probably do this with only the Live DVD, but I wanted a fancier partition setup, so I used the regular DVD ISO for my installs.
2. Could probably download the RPMs while booted with the Live DVD, but I did it in a much more complicated way, so I'm probably the wrong person to ask.
3. May not need to mount /usr, but I had /usr on its own partition, and figured why not?
4. Reinstalling Mageia to fix /etc/fstab is probably overkill, but did the job.

Long story short, rEFInd is awesome, and I hope Mageia 4 has proper UEFI support out of the box.
Last edited by paultgg on Jan 11th, '15, 04:55, edited 7 times in total.
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UEFI Dual boot with Win8 and Mageia 3

Postby Lebarhon » Jan 8th, '14, 10:40

Hello,
At last a way I can understand, thanks paultgg.

This is worth to be copied in the wiki page https://wiki.mageia.org/en/UEFI_how-to
Long story short, rEFInd is awesome, and I hope Mageia 4 has proper UEFI support out of the box.

I fear not: https://wiki.mageia.org/en/Mageia_4_Err ... ler_Issues
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: [EXPLAINED] UEFI Dual boot with Win8 and Mageia 3

Postby paultgg » Jan 9th, '14, 07:11

FORGOT to add one thing... you also have to manually mount /boot to point to the EFI partition... I updated the above post.
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATED: UEFI Dual boot with Win8 and Mageia

Postby doktor5000 » Jan 9th, '14, 20:28

Thanks for sharing :D
I've moved this to Tips&Tricks subforum.

Maybe you want to add a pointer to this thread to the wiki pages aboutthis topic which are currently under construction:
https://wiki.mageia.org/en/UEFI_how-to
https://wiki.mageia.org/en/UEFI_booting
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [EXPLAINED] UPDATED: UEFI Dual boot with Win8 and Mageia

Postby martinw » Jan 10th, '14, 01:36

Here is a Mageia icon that can be used on the rEFInd boot screen:
mageia-icon.png
rEFInd Mageia boot screen icon
mageia-icon.png (4.55 KiB) Viewed 28790 times

It looks better with a Mageia background:
boot-screen.jpg
Boot screen screenshot
boot-screen.jpg (85.58 KiB) Viewed 28790 times
martinw
 
Posts: 608
Joined: May 14th, '11, 10:59

Re: [EXPLAINED] UPDATE 2: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 14th, '14, 21:40

paultgg wrote:1. I installed Mageia from the DVD ISO as per usual. (This left Mageia on the drive, but not accessible through the bootloader.)

Hello,
I tried to apply different ways to install Mageia 3 on dual boot wit win$ 8, on the new christmas PC of my son... New one, so Secureboot, UEFI, etc...
Your way looks good, but, I'm staying stuck in first step : the installation fails down at bootloader installation, and so I didn't reach to have a first installation as you suggest ("as per usual", what means?). There is a way to make installation without install bootloader?
I tried to install it on '/' partition, but it ask then to identify where is the main bootloader... and so fails down!
My goal is to install the bootloader directly in terminal, with target and all options.

Other question : when you write "4. I manually mounted /, /boot, and /usr to point to the hard drive" which one for /boot, and with wich options?
I tried mount -t vfat /dev/sda2 /boot/EFI (/dev/sda2 is the vfat @ 100Mo partition containing EFI directory, preinstalled on the computer).

Thanks,
Vincent.
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19

Re: [EXPLAINED] UPDATE 2: UEFI Dual boot with Win8 and Magei

Postby paultgg » Jan 15th, '14, 03:07

The bootloader part of the Magiea installation doesn't try to install the bootloader (Grub or Lilo) to a partition, it tries to install it to the MBR. I didn't specify any settings for the bootloader during the install - I just used the defaults.

Also, I used the same mount command you used - "mount -t vfat /dev/sda2 /boot" Are you getting some sort of error?
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATE 2: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 16th, '14, 22:11

Hello,

two kinds of errors, first, when the installation fails down (french message) :
"Le programme « draklive-install » a planté avec l'erreur suivante :

grub2-install failed: /usr/sbin/grub2-bios-setup : attention : cette étiquette de partition GPT ne contient pas de partition d'amorçage BIOS ; l'embarquage ne sera pas possible.
/usr/sbin/grub2-bios-setup : attention : L'embarquage est impossible. GRUB ne peut être installé sur cette configuration qu'en utilisant les listes de blocs. Cependant, les listes de blocs ne sont PAS fiables et leur utilisation est déconseillée..
/usr/sbin/grub2-bios-setup : erreur : refus de continuer avec les listes de blocs.
...propagated at /usr/lib/libDrakX/any.pm line 261.
Perl's trace:
standalone::bug_handler() called from /usr/lib/libDrakX/any.pm:261
any::installBootloader() called from /usr/lib/libDrakX/any.pm:233
any::setupBootloaderUntilInstalled() called from /usr/sbin/draklive-install:327
main::setup_bootloader() called from /usr/sbin/draklive-install:70
main::install_live() called from /usr/sbin/draklive-install:42"


And, last time, I considered Mageia installed, then I booted again on the USB Key and tried your method.
When I installed efibootmgr, no specific message, but when I installed rEFInd :
Installing rEFInd on Linux....
ESP was found at /boot using vfat

CAUTION: Your computer appears to support Secure Boot, but you haven't specified a valid shim.efi file source. If you've disabled Secure Boot and
intend to leave it disabled, this is fine; but if Secure Boot is active, the resulting installation won't boot. You can read more about this topic at
http://www.rodsbooks.com/refind/secureboot.html.

Do you want to proceed with installation (Y/N)? Y
OK; continuing with the installation...
Copied rEFInd binary files

Copying sample configuration file as refind.conf; edit this file to configure rEFInd.

Installing it!

ALERT: There were problems running the efibootmgr program! You may need to rename the refind_x64.efi binary to the default name (EFI/boot/bootx64.efi
on x86-64 systems or EFI/boot/bootia32.efi on x86 systems) to have it run!

Creating //boot/refind_linux.conf; edit it to adjust kernel options.
Setting default boot options based on //etc/default/grub

ALERT:
Installation has completed, but problems were detected. Review the output for error messages and take corrective measures as necessary. You may need to
re-run this script or install manually before rEFInd will work.


Any idea? I don't want to rename it without knowing why... Especially since efibootmgr didn't list any mageia entry and dmesg provided a lot of strange messages...
[ 4689.753735] sdd: detected capacity change from 2005925888 to 0
[ 5158.206398] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 5158.357716] Adding 4095996k swap on /dev/sda8. Priority:-1 extents:1 across:4095996k
[ 5160.868187] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
[ 5378.017933] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
[ 5378.028431] JFS: nTxBlock = 8192, nTxLock = 65536
[ 5378.049979] NTFS driver 2.1.30 [Flags: R/O MODULE].
[ 5378.064866] QNX4 filesystem 0.2.3 registered.
[ 5379.817548] EXT2-fs (sda3): error: can't find an ext2 filesystem on dev sda3.
[ 5379.818509] EXT4-fs (sda3): VFS: Can't find ext4 filesystem
[ 5379.819994] cramfs: wrong magic
[ 5379.821966] FAT-fs (sda3): bogus number of reserved sectors
[ 5379.821968] FAT-fs (sda3): Can't find a valid FAT filesystem
[ 5379.822873] SQUASHFS error: Can't find a SQUASHFS superblock on sda3
[ 5379.825505] EXT3-fs (sda3): error: can't find ext3 filesystem on dev sda3.
[ 5379.826552] REISERFS warning (device sda3): sh-2021 reiserfs_fill_super: can not find reiserfs on sda3
[ 5379.827860] XFS (sda3): bad magic number
[ 5379.827864] XFS (sda3): SB validate failed
[ 5379.861338] FAT-fs (sda3): bogus number of reserved sectors
[ 5379.861346] FAT-fs (sda3): Can't find a valid FAT filesystem
[ 5379.870128] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda3.
[ 5379.910547] hfs: unable to find HFS+ superblock
[ 5379.911673] qnx4: wrong fsid in superblock.
[ 5379.914484] You didn't specify the type of your ufs filesystem

mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[ 5379.914651] ufs_read_super: bad magic number
[ 5379.917641] hfs: can't find a HFS filesystem on dev sda3.
[ 5576.818257] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 5576.952974] Adding 4095996k swap on /dev/sda8. Priority:-1 extents:1 across:4095996k
[ 5579.471782] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
[ 7082.788669] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
[ 7111.769021] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 7111.895902] Adding 4095996k swap on /dev/sda8. Priority:-1 extents:1 across:4095996k
[ 7116.004619] EXT4-fs (sda9): mounted filesystem with ordered data mode. Opts: (null)
[ 7494.915111] EXT2-fs (sda3): error: can't find an ext2 filesystem on dev sda3.
[ 7494.916117] EXT4-fs (sda3): VFS: Can't find ext4 filesystem
[ 7494.917188] cramfs: wrong magic
[ 7494.919051] FAT-fs (sda3): bogus number of reserved sectors
[ 7494.919053] FAT-fs (sda3): Can't find a valid FAT filesystem
[ 7494.920013] SQUASHFS error: Can't find a SQUASHFS superblock on sda3
[ 7494.922884] EXT3-fs (sda3): error: can't find ext3 filesystem on dev sda3.
[ 7494.923893] REISERFS warning (device sda3): sh-2021 reiserfs_fill_super: can not find reiserfs on sda3
[ 7494.925076] XFS (sda3): bad magic number
[ 7494.925091] XFS (sda3): SB validate failed
[ 7494.928413] FAT-fs (sda3): bogus number of reserved sectors
[ 7494.928415] FAT-fs (sda3): Can't find a valid FAT filesystem
[ 7494.931017] VFS: Can't find a Minix filesystem V1 | V2 | V3 on device sda3.
[ 7494.932119] hfs: unable to find HFS+ superblock
[ 7494.933017] qnx4: wrong fsid in superblock.
[ 7494.933787] You didn't specify the type of your ufs filesystem

mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[ 7494.934045] ufs_read_super: bad magic number
[ 7494.935445] hfs: can't find a HFS filesystem on dev sda3.


I've to precise that the EFI partition seems to be sda2, sda3 corresponds to an unformatted partition, sda4 to a vfat one with 1Go and EFI binaries, sda5 to window$ one, sda7 to '/', sda8 to swap and last one sda9 to '/home'. sda1 is a ntfs small partition, and seems contain windows boot manager...?

Last point : the Mageaia 3 live contains /sys/firmware/efi/efivars... but 'modprobe efivars' answers unknown module.

Thanks for any ideas,
Vincent.
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19

Re: [EXPLAINED] UPDATE 2: UEFI Dual boot with Win8 and Magei

Postby paultgg » Jan 17th, '14, 03:26

I would make sure that Secure Boot is disabled in the BIOS (that would be my only guess for the problem with rEFInd). As for the installer, it looks like you may have been installing from the LiveDVD. Maybe try installing from the normal install ISO? Sorry I can't be of more help...
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 17th, '14, 21:37

Hi, unfortunately, I'm sure Secure Boot is disabled...
I will try to install again this time from normal ISO, but did you do an USB Key? With wich method, dd or contents of the ISO on a preformatted FAT32 USB Key?
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby paultgg » Jan 18th, '14, 02:21

Yes, I used a USB stick. I copied the ISO to USB using "dd". I didn't format the USB stick beforehand, but I believe it was FAT32.
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 18th, '14, 23:21

Ok, so, your initial installation is on Legacy boot?

I tried to solve using Boot-Disk-Repair, unfortunately, since I used a classical ISO on the CD, it booted on Legacy mode, and, may be it is the reason, it cannot solve it.
But, the Ubuntu.paste provide a good view of my configuration here : http://paste.ubuntu.com/6776343/

May be this link replace my previous sent results => I can reduce my previous posts?
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby paultgg » Jan 19th, '14, 08:29

Yes, my installation is with the legacy boot system, but my computer ignores the legacy boot when there is an EFI partition. From the pastebin info, it looks like you have two vfat partitions. Did they come with windows by default? You only need one, so if you have the option of wiping out the entire hard drive and starting over (which means, installing Win8, installing Linux, then fixing the bootloader), I'd definitely do that. For comparison, my drive is setup like this:

sda1=Windows Recovery Partition
sda2=EFI partition
sda3=??? Some sort of Windows thing
sda4=Windows 8 C:
sda5=/
sda6=swapor
sda7=/usr
sda8=/home
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 19th, '14, 19:46

I'm not fully sure the second partition relative to EFI was defined at beginning... I saw it after the Windows automatic recovery!
May be it is a kind of EFI Shell?

I prefer to do not format complete disc, since I'm not sure to be able to reinstall Win8 operating system... I did a recovery USB stick, but I don't have real habit to window$ systems, and I don't know where find the product key...

In fact, my system is a RAID one, with SSD used as cache memory : Boot Repair Disk seems to be confused about that since it find double partitions for each...
May be I have to desactive SSD cache first, possible in the Firmware, use Boot Repair Disk or rEFInd, and then reactivate SSD cache...what do you think about it?
An expert explained to me today that there was a limitation for usual Linux distribution : '/boot' partition have to be ext2 one defined in the first 30GB on the main disk.
But your system seems to do not have specific '/boot' partition? '/boot/EFI' in vfat? Or may be it is the mean of your sentence about the add of ext4 driver?

Thans for your patience,
Vincent.
P.S.: I tried today Boot Repair Disc of the Linux Secure 13.04 distribution, in UEFI mode, but there is no real difference => http://paste.ubuntu.com/6781109/
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby paultgg » Jan 20th, '14, 03:36

I'm not familiar with RAID setup, but if you have separate hard drives, you could try setting up Linux and the bootloader on the hard drive that does not have Windows on it. Then you'd be able to tell rEFInd where to look for the Windows installer using refind.conf. (I don't know how to do that, but I do know that it's possible.)

As for /boot partition needing to be ext2 (or similar), that's true to an extent, but /boot does not need to be on its own partition, and the EFI partition does not need to be permanently attached to /boot (only when you're installing rEFInd - then you can mount it temporarily with something like "mount -t vfat /dev/sdaX /boot"
paultgg
 
Posts: 45
Joined: Sep 1st, '11, 19:30

Re: [EXPLAINED] UPDATE 3: UEFI Dual boot with Win8 and Magei

Postby dubs120 » Jan 22nd, '14, 08:29

Hi paultgg,
I continue my problems discussion (worst now...) in a new topic since I think it's linked to Intel Rapid Storage Technology (SSD caching).
https://forums.mageia.org/en/viewtopic.php?f=7&t=6750

Thanks to visit it!
dubs120
 
Posts: 10
Joined: Jan 14th, '14, 21:19


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron