Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bios uefi windows10 + Gentoo
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
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Oct 21, 2018 5:18 pm    Post subject: bios uefi windows10 + Gentoo Reply with quote

Hello.
Please tell me how best to implement two systems on one ssd / nvme drive?
Windows 10 installed, when installing Windows, it created a partition under its bootloader for uefi (about 100 meters), allocate space for the system to the floor of the ssd disk, I will select the rest under gentoo.
But the question arose how best to make the systems boot, I did not come across ufi.
on the old system, hornbeam, bios ufi is used.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Mon Oct 22, 2018 5:59 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8 also works with win 10
_________________
Defund the FCC.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Tue Oct 23, 2018 6:00 am    Post subject: Reply with quote

1. Partition Drive
2. Install Windows first
3. Install Gentoo: I highly recommend using rEFInd instead of grub. Just compile efistub kernels and place them in your ESP.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sat Nov 10, 2018 4:49 pm    Post subject: Reply with quote

bammbamm808 wrote:
1. Partition Drive
2. Install Windows first
3. Install Gentoo: I highly recommend using rEFInd instead of grub. Just compile efistub kernels and place them in your ESP.

Confused, please correct.
I install the system, the disk structure is as follows.
Code:
# fdisk -lu /dev/nvme0n1
Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2F80834C-E223-4F30-B507-B1AEEC184FD5

Device             Start       End   Sectors  Size Type
/dev/nvme0n1p1      2048   1023999   1021952  499M Windows recovery environment
/dev/nvme0n1p2   1024000   1228799    204800  100M EFI System
/dev/nvme0n1p3   1228800   1261567     32768   16M Microsoft reserved
/dev/nvme0n1p4   1261568 185346047 184084480 87.8G Microsoft basic data
/dev/nvme0n1p5 185346048 351234047 165888000 79.1G Linux filesystem

In the process of installing Gentoo, do I need to use the EFI (boot) partition (/dev/nvme0n1p2) created by Windows?
After downloading stage 3 and unpacking it (tar xpvf stage3-*.tar.bz2 --xattrs-include='*.*' --numeric-owner).
After
Code:
root #mount --types proc /proc /mnt/gentoo/proc
root #mount --rbind /sys /mnt/gentoo/sys
root #mount --make-rslave /mnt/gentoo/sys
root #mount --rbind /dev /mnt/gentoo/dev
root #mount --make-rslave /mnt/gentoo/dev

root #chroot /mnt/gentoo /bin/bash
root #source /etc/profile
root #export PS1="(chroot) ${PS1}"

After I need to mount the efi section in:
root #mount /dev/nvme0n1p2 /boot
Correctly?
I'm confused, it used to be easier, the boot section was on the same partition as the root /
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Sat Nov 10, 2018 7:31 pm    Post subject: Reply with quote

bagas wrote:
After I need to mount the efi section in:
root #mount /dev/nvme0n1p2 /boot
Correctly?
I'm confused, it used to be easier, the boot section was on the same partition as the root /


Before chroot, your ESP should be mounted as /mnt/gentoo/boot. In chroot or once booting new system, it would be /boot.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sun Nov 11, 2018 2:11 am    Post subject: Reply with quote

Just my opinions: It is best to have only one ESP (EFI Systems Partition) lest confusion result.
There is no longer a good reason to have a separate boot partition.
The handbook recommendation of double tasking a separate, FAT32 formatted partition, with the boot directory and the EFI directory may add a low level of risk: more frequent mounting and writing to the ESP to support kernel and grub updates. An ESP may easily be mounted and written to only once in the life of a system if it only contains the EFI directory.
The ESP may be mounted to any convenient point in the file system when you need to mount it.
If installing grub or another boot loader/boot manager such as EFI stub kernel/rEFInd you will need to mount the ESP and specify its location if it is not the default location assumed by the install program. Best to specify even if ...
_________________
Defund the FCC.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2617

PostPosted: Sun Nov 11, 2018 8:10 am    Post subject: Reply with quote

bammbamm808 wrote:
1. Partition Drive
2. Install Windows first
3. Install Gentoo: I highly recommend using rEFInd instead of grub. Just compile efistub kernels and place them in your ESP.

Why not install Gentoo on a properly formatted ESP first and install Windows 10 later? Just leave enough unformatted unpartitioned space for Windows 10.
REFInd iis optional, not necessary.
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Nov 11, 2018 12:22 pm    Post subject: Reply with quote

charles17 wrote:
bammbamm808 wrote:
1. Partition Drive
2. Install Windows first
3. Install Gentoo: I highly recommend using rEFInd instead of grub. Just compile efistub kernels and place them in your ESP.

Why not install Gentoo on a properly formatted ESP first and install Windows 10 later? Just leave enough unformatted unpartitioned space for Windows 10.
REFInd iis optional, not necessary.

Did so.
Code:
# mount | grep boot
/dev/nvme0n1p2 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

Code:
# refind-install
ShimSource is none
Installing rEFInd on Linux....
ESP was found at /boot using vfat
Running in BIOS mode with a suspected Windows installation; moving boot loader
files so as to install to /boot/EFI/Microsoft/Boot.
Copied rEFInd binary files

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


Installation has completed successfully.

(chroot) livecd / #

Code:
ls -al /boot/EFI/
���������� 5
drwxr-xr-x 5 root root 1024 ������ 11 15:04 .
drwxr-xr-x 3 root root 1024 ������  1  1970 ..
drwxr-xr-x 2 root root 1024 ������ 18 11:44 Boot
drwxr-xr-x 4 root root 1024 ������ 11 15:04 Microsoft
drwxr-xr-x 2 root root 1024 ������ 11 15:04 tools
(chroot) livecd / # ls -al /boot/EFI/tools/

Code:
# cat /boot/EFI/Microsoft/Boot/refind.conf
timeout 3
resolution 1440 900

showtools shell,memtest,gdisk,windows_recovery,about,reboot,shutdown,firmware
scanfor manual

default_selection "Gentoo Linux"

menuentry "Gentoo Linux" {
        icon /EFI/refind/icons/os_gentoo.png
        ostype Linux
        volume boot
        loader /vmlinuz-4.14.78-gentoo
        options "root=/dev/nvme0n1p5 ro"
}
menuentry "Windows 10 Pro" {
        loader \EFI\Microsoft\Boot\bootmgfw.efi
}

My /
/dev/nvme0n1p5
The loader is not loaded.
In BIOS I tried to choose refind, it does not work.
copy
cp -r /usr/share/refind-0.10.4/refind /boot/EFI/
In Windows 10
Code:
bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi
bcdedit /set {bootmgr} description "rEFInd boot manager"

The loader is not loaded.
What am I doing wrong?
Code:
[ebuild   R    ] sys-boot/refind-0.10.4-r2::gentoo  USE="ext2 ext4 (gnuefi) iso9660 -btrfs (-custom-cflags) -doc -hfs -ntfs -reiserfs" 0 KiB

Code:
# ls -al /boot/
���������� 11874
drwxr-xr-x  3 root root    1024 ������  1  1970 .
drwxr-xr-x 21 root root    4096 ������  9 00:19 ..
-rwxr-xr-x  1 root root  113614 ������ 11 11:49 config-4.14.78-gentoo
drwxr-xr-x  6 root root    1024 ������ 11 15:16 EFI
-rwxr-xr-x  1 root root 3911382 ������ 11 11:49 System.map-4.14.78-gentoo
-rwxr-xr-x  1 root root 8126736 ������ 11 11:49 vmlinuz-4.14.78-gentoo
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Nov 11, 2018 1:07 pm    Post subject: Reply with quote

After these steps, refind-install, booted.
You can go to Ghent, but now the win-win record is corrupted, I can't go to windows.
Code:
# cat /mnt/vfat/EFI/Microsoft/Boot/refind.conf
timeout 3
resolution 1920 1080

showtools shell,memtest,gdisk,windows_recovery,about,reboot,shutdown,firmware
scanfor manual

default_selection "Gentoo Linux"

menuentry "Gentoo Linux" {
        icon /EFI/refind/icons/os_gentoo.png
        ostype Linux
        volume boot
        loader /vmlinuz-4.14.78-gentoo
        options "root=/dev/nvme0n1p5 ro"
}
menuentry "Windows 10 Pro" {
        loader \EFI\Microsoft\Boot\bootmgfw.efi
}
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Nov 11, 2018 3:23 pm    Post subject: Reply with quote

With this configuration,
windows works.
Linux hangs on kernel boot.
Code:
cat /boot/EFI/Microsoft/Boot/refind.conf                                                                                               

timeout 3
resolution 1920 1080
Plymouth
use_graphics_for linux
scanfor internal,external,optical
default_selection "Gentoo Linux"
menuentry "Gentoo Linux" {
        icon /EFI/refind/icons/os_gentoo.png
        ostype Linux
        volume boot
        loader /vmlinuz-4.14.78-gentoo
        options "root=/dev/nvme0n1p5 ro"
}
menuentry "Windows 10" {
loader \EFI\Microsoft\Boot\bootmgr.efi
icon /EFI/refind/icons/os_win.png
}
menuentry "Windows 10" {
        loader \EFI\Microsoft\Boot\bootmgfw.efi
}
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2288
Location: near Augsburg, Germany

PostPosted: Sun Nov 11, 2018 3:53 pm    Post subject: Reply with quote

Can you show where and how the kernel hangs on booting ?
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Nov 11, 2018 4:15 pm    Post subject: Reply with quote

Keruskerfuerst wrote:
Can you show where and how the kernel hangs on booting ?

I can not show.
Gentoo falls into a panic when loading the kernel, openrs does not have time to boot.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sun Nov 11, 2018 4:26 pm    Post subject: Reply with quote

take a picture of panic screen with phone or camera, paste on free photo site, post url here
_________________
Defund the FCC.
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Sun Nov 11, 2018 5:24 pm    Post subject: Reply with quote

I have two linux entries appear in refind.
One working Linux record, and the other not.

Foto error.
https://b.radikal.ru/b22/1811/d7/b93f8fe65d69t.jpg
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 487
Location: Hawaii

PostPosted: Sun Nov 11, 2018 7:35 pm    Post subject: Reply with quote

charles17 wrote:
bammbamm808 wrote:
1. Partition Drive
2. Install Windows first
3. Install Gentoo: I highly recommend using rEFInd instead of grub. Just compile efistub kernels and place them in your ESP.

Why not install Gentoo on a properly formatted ESP first and install Windows 10 later? Just leave enough unformatted unpartitioned space for Windows 10.
REFInd iis optional, not necessary.


Where did I say rEFInd was required? Show me.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sun Nov 11, 2018 7:41 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Knowledge_Base:Unable_to_mount_root_fs covers the problem
Suggest booting the install media, mounting the gentoo partition, running
Code:
wgetpaste -t /mnt/gentoo/usr/src/linux/.config
posting the url returned so the kernel configuration can be examined by the peanut gallery.
If the root partition is formatted ext4 the kernel boot options may need to be edited to include rootfs=ext4.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Tue Nov 13, 2018 7:09 am    Post subject: Reply with quote

I solved the problem, later I will lay out the config as I did.
Back to top
View user's profile Send private message
bagas
n00b
n00b


Joined: 29 Jun 2018
Posts: 56

PostPosted: Tue Nov 13, 2018 11:34 am    Post subject: Reply with quote

My config ( Gentoo+Windows10).
Code:
# cat /boot/EFI/Microsoft/Boot/refind.conf
timeout 3
resolution 1920 1080
Plymouth
use_graphics_for linux
scanfor manual,internal
showtools windows_recovery, about, reboot, shutdown, exit
scan_all_linux_kernels false
fold_linux_kernels false
default_selection "Gentoo Linux"
menuentry "Gentoo Linux" {
        icon /EFI/refind/icons/os_gentoo.png
        ostype Linux
        volume "EFI system partition"
        loader /vmlinuz-4.14.78-gentoo
        options "root=/dev/nvme0n1p5 ro"
}
#menuentry "Windows 10" {
#loader \EFI\Microsoft\Boot\bootmgr.efi
#icon /EFI/refind/icons/os_win.png
#}
#menuentry "Windows 10 PROF" {
#        loader \EFI\Microsoft\Boot\bootmgfw.efi
#}
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