Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual booting with Windows 8.1 on Toshiba Satellite
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tux's lil' helper
Tux's lil' helper

Joined: 09 Jul 2012
Posts: 109

PostPosted: Fri Jun 24, 2016 10:57 pm    Post subject: Dual booting with Windows 8.1 on Toshiba Satellite Reply with quote

Third time's the charm, as they say. First time I tried this a few years ago, I managed to completely erase Windows (which, awful though Windows may be, is actually not my primary objective this time around because I need it for certain software that won't run in Wine), the second time I couldn't get the LiveCD to boot, and now here we are.

Because I don't have the money for another computer, or the option of not having one for an extended period of time as happened after my first attempt, I'd just like to post my game plan here before I go through and do anything drastic, irreversible, and/or with the potential to nuke my entire machine. If there's anything that will definitely do the last one, or even if it just has a significant chance of doing so if done wrong, please let me know!

  • Step 0: Back up.
  • Step 1: Disable Secure Boot as per this link.
  • Step 2: Shrink Windows partition as per these instructions.
  • Step 3: Create partitions using gparted, leaving Windows alone, as per this and this.
  • Step 4: Follow Gentoo Handbook, steps 1-8.
  • Step 5: Follow Gentoo Handbook steps 13-22.
  • Step 6: Configure kernel manually as per this.
  • Step 7: Follow Gentoo Handbook steps 25-35 and 39, installing grub to /boot and NOT the MBR.
  • Step 8: Boot back into Windows, install EasyBCD, add grub, reboot.
  • Step 9: Follow Gentoo Handbook steps 40-42.
  • Step 10: Boot into Gentoo, install all the things, celebrate!

    I've done everything through step 3 so far. My partitions are as follows, at least judging from what I wrote down when I made them 6 months ago during my second attempt at dual booting and what Windows's disk management utility is telling me is there:
    /dev/sda1: Recovery (1GB)
    /dev/sda2: EFI (100MB)
    /dev/sda3: Windows (292.97GB)
    /dev/sda4: /boot
    /dev/sda5: swap (5.59GB)
    /dev/sda6: /root (93.13GB)
    /dev/sda7: /home (296.15GB)
    /dev/sda8: Recovery again? (9.48GB) (I'm actually not sure how this partition got here, I don't remember making it...?)

    So, that's what I've got so far. I will note that I wrote out this list 6 months ago for my second attempt, which never got off the ground because my LiveCD failed to boot. Now I'm using a (theoretically) bootable USB drive instead, so is there anything I should know about the difference in boot media? Or is there anything that could be done in a simpler, more idiot-proof fashion with a lower risk of breaking everything? (I haven't had the opportunity to do anything with Linux for about 2 years now, so I don't know how much of my old Gentoo intuition has been lost in that time.) Any and all constructive comments on this methodology are welcome!
Back to top
View user's profile Send private message

Joined: 09 Dec 2006
Posts: 7605
Location: Goose Creek SC

PostPosted: Sat Jun 25, 2016 12:28 am    Post subject: Reply with quote

sysresccd or sysreccd on usb is best live media for this, remember that the live media must be booted in efi mode
recommend leaving grub out.
rEFInd is better
Defund the FCC.
Back to top
View user's profile Send private message

Joined: 13 Dec 2011
Posts: 309

PostPosted: Sat Jun 25, 2016 2:12 pm    Post subject: Mount efivarfs read only - only mount read/write to update ! Reply with quote

My top tip is to mount efivarfs read only unless you actually need to change things for example efi keys and efiboot information.
grep efi /etc/fstab
# efivarfs mount ro
efivarfs        /sys/firmware/efi/efivars       efivarfs        remount-ro,nosuid,nodev,noexec  0       0

I have installed Gentoo on 2 Toshiba Satellite laptops.
The C55D-A-12N I booted from the systemrescuecd and performed the install without problems. This machine is a triple boot with Gentoo, Linux Mint and Windows 8. This is my laptop so it gets booted into Gentoo or Mint, both are on luks encrypted partitions.
The C70D-B-10U would not boot from the systemrescuecd but did boot from the latest Gentoo live DVD. That machine is also a triple boot of Gentoo, Linux Mint and Windows 8.1. I set this up for my dad and he boots into Linux Mint.

I recommend using the systemrescuecd if the machine will boot from it, if it will not then give the Gentoo live DVD a try.

I am posting this from the C55D-A-12N laptop which I installed grub on but created a direct boot using efibootmgr
cat /proc/cmdline
root=PARTUUID=ec0bd5af-a424-4ecb-bdf7-13018b525327 crypt_root=/dev/sda6 ro root=/dev/mapper/root rootfstype=ext4 cryptodevice=/dev/sda6:Gentoo_luks iommu=soft

The iommu=soft I need for a desktop pc and is probably not required for the Toshiba.

Partitions I have are
sda        8:0    0 931.5G  0 disk 
|-sda1     8:1    0     1G  0 part 
|-sda2     8:2    0   260M  0 part 
|-sda3     8:3    0   128M  0 part 
|-sda4     8:4    0    80G  0 part 
|-sda5     8:5    0  10.7G  0 part 
|-sda6     8:6    0   300G  0 part 
| `-root 254:0    0   300G  0 crypt /
|-sda7     8:7    0   100G  0 part 
|-sda8     8:8    0 319.5G  0 part 
`-sda9     8:9    0   120G  0 part 
sr0       11:0    1  1024M  0 rom   

sda1,3,4,5 are Windows related (sda5 is the Windows recovery partition - made by Windows). sda6 is my Gentoo luks encrypted partition, sda7 is my Mint luks encrypted partition and sda8 and 9 are my date luks encrypted partitions. sda2 is the EFI System Partition (ESP) for Gentoo, Mint and Windows.

sda6 and sda7 are password protected luks partitions, the data partitions I mount using a gpg encrypted key stored on a pen drive.

Both laptops have secure boot enabled which I used an updated version of efitools from sakaki-tools overlay.

I create a Custom_boot folder and keep the signed kernel and grub images in to allow secure boot
ls /boot/efi/EFI/Custom_boot   
grubx64.efi_Mint_sda7.signed  grubx64.efi_gentoo_sda6.signed  grubx64.efi_sda6  grubx64.efi_sda7  kernel-current.signed
which don't get over-written if grub needs to be re-installed etc.

Windows 8 has an annoying habit of trying to dominate the machine boot process, and occationally I find that I have to boot from the systemrescuecd, chroot into Gentoo or Mint and use efibootmgr to update information. This behaviour can be stopped by either renaming the Microsoft folder on the esp or only loading your own keys for secureboot (both approaches work - I have tried them).

Ed: I think when you run grub-install it will setup grub as the default. I use a script to recreate entries in the order I want and set default using

echo This script $0 erases existing efibootmgr entries and recreates those required to boot OS on this hard drive
echo Script must run as root - Press enter to continue or Ctrl-c to abort

# mount efivarfs read/write and /dev/sda2
mount /dev/sda2 /boot/efi 1> /dev/null 2> /dev/null
mount efivarfs /sys/firmware/efi/efivars -o remount,rw,nosuid,nodev,noexec,relatime 1> /dev/null 2> /dev/null

# delete existing entries
for x in {0..10} ; do efibootmgr -B -b $x 1> /dev/null 2> /dev/null ; done
for x in {A..H} ; do efibootmgr -B -b $x 1> /dev/null 2> /dev/null ; done

# create new entries
efibootmgr -c -L "Gentoo kernel-current direct boot" -p 2 -d /dev/sda -l "\\EFI\\Custom_boot\\kernel-current.signed" -u "crypt_root=/dev/sda6 ro root=/dev/mapper/root rootfstype=ext4 cryptodevice=/dev/sda6:Gentoo_luks iommu=soft"
efibootmgr -c -L "Gentoo Grub (/dev/sda6)" -p 2 -d /dev/sda -l \\EFI\\Custom_boot\\grubx64.efi_gentoo_sda6.signed 1> /dev/null 2> /dev/null
efibootmgr -c -L "Mint Grub (/dev/sda7)" -p 2 -d /dev/sda -l \\EFI\\Custom_boot\\grubx64.efi_Mint_sda7.signed 1> /dev/null 2> /dev/null
efibootmgr -c -L "Windows Boot Manager" -p 2 -d /dev/sda -l \\EFI\\Microsoft\\Boot\\bootmgfw.efi 1> /dev/null 2> /dev/null

# set order of boot
efibootmgr -o 0,1,2,3 1> /dev/null 2> /dev/null

# show results of update
echo "The contents of the efi Custom boot folder are shown below - check the dates for the .signed files are as expected: "
ls /boot/efi/EFI/Custom_boot -l
echo "The efibootmgr output is shown below - check the .signed files are listed above, in case of problems do not reboot ! :"
efibootmgr -v

# umount /dev/sda2 and efivarfs read only
umount /dev/sda2 1> /dev/null 2> /dev/null
mount efivarfs /sys/firmware/efi/efivars -o remount,rw,nosuid,nodev,noexec,relatime 1> /dev/null 2> /dev/null
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum