Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
installation on nvme
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
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Fri Dec 16, 2022 4:28 pm    Post subject: installation on nvme Reply with quote

Today I have received the new PC with nvme disk. and MB Z690-P D4. I have connected ssd SATA3 with working Gentoo.
But when started BIOS, I am not able to boot from SATA. The new PC was probably tested under Win11, because bios offers
Windows boot manager.
How could I boot Gentoo from SATA?
If I want make the new partitions on nvme disk can I use fdisk?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Fri Dec 16, 2022 5:06 pm    Post subject: Reply with quote

Hi
Code:

How could I boot Gentoo from SATA?


You need to chroot into your old Gentoo system then
1.Reinstall grub
2.Update initramfs.
3.Update grub.
Plz before that edit your fstab and /etc/default/grub and use UUID instead of plain partition naming.
Quote:

If I want make the new partitions on nvme disk can I use fdisk?


I prefer gdisk,as it is more suitable for gpt and uefi.
Basically you will need to create a partitioning scheme similar to your sata disk and use rsync to copy.
Again you will need to chroot into the new system and perform the above 3 steps.
_________________
:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Fri Dec 16, 2022 5:41 pm    Post subject: Reply with quote

apiaio,

Is secureboot off?
Windows will have been installed with it on and will not boot without it.
Your old Gentoo will want secure boot off.

Its possible to install Gentoo to use secure boot too, if you want a dual boot with windows system but you can't start for your old Gentoo that way.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Fri Dec 16, 2022 5:52 pm    Post subject: Reply with quote

Secure boot offers:
Secure Boot state ......................... User
OS Type .......................... Other OS
or .............................Window UEFI mode
Secure Boot mode ..................................Standart
or .................................Custom

Edit: any combination doesnt work
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Fri Dec 16, 2022 6:47 pm    Post subject: Reply with quote

My old Gentoo boots from bios. On the nvme disk is EFI Windows Boot Manager.
When I want to delete MBR I use
Code:
dd if=/dev/zero of=/dev/sdb bs=446 count=1

Is it possible erase efi partition? Or will I have to use efi in the future?
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1404
Location: Germany

PostPosted: Fri Dec 16, 2022 7:35 pm    Post subject: Reply with quote

do you want ot dualboot with windows?

If not, disable secure boot (it can be activated later but this is another story) and then you can format the whole nvme. The of n you dd command looks wrong. nvme drives do not start widh /sd
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Fri Dec 16, 2022 7:38 pm    Post subject: Reply with quote

apiaio,

If your BIOS has an EFI/BIOS option, choose BIOS. It may be called Legacy or Compatibility mode.
Windows won't boot like that but Gentoo might.

Here's the history.
When EFI was new, it was buggy and difficult to use, so everyone switched to BIOS mode.
Over the years EFI has got better - Windows demands it and the BIOS mode has become buggy and difficult to use. Its not well used any more.

If you boot your Gentoo in BIOS mode, you cannot complete an EFI mode install as its not possible to update the EFI vars unless you boot in EFI mode.

You should use EFI mode if you can as BIOS mode is a dead end.

Your example of BIOS mode may be too buggy to boot your Gentoo.

You can still read and chroot into your old Gentoo, regardless of how you boot.

Code:
dd if=/dev/zero of=/dev/sdb bs=446 count=1

erases the BIOS boot sector but leaves the MSDOS partition table intact.
There is no real equivalent in the EFI world as the EFI firmware reads the VFAT partition and loads an EFI compatible program from the filesystem.
I suppose the equivalent is to remove or rename all the files in the EFI directory on the VFAT partition that have names ending in .efi.
Don't do that until you have added another of your own or the EFI firmware will be very unhappy.

What do you want to do with the old Gentoo in the new system?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sat Dec 17, 2022 10:17 am    Post subject: Reply with quote

Finely I have successfully booted in EFI mode.
Quote:
What do you want to do with the old Gentoo in the new system?

I want use it like on the old PC. I am able now to boot it. Of course I have problems with
some drivers.Especially sound and ethernet
Code:
00:1f.3 Audio device: Intel Corporation Device 7ad0 (rev 11)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

Any help appreciated.
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1404
Location: Germany

PostPosted: Sat Dec 17, 2022 11:25 am    Post subject: Reply with quote

Quote:
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)

This should be Device drivers -> Network device support -> Ethernet driver support there look for Realtek devices. There should be an entry which has 8125 in it.
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3150

PostPosted: Sat Dec 17, 2022 11:57 am    Post subject: Reply with quote

Quote:
00:1f.3 Audio device: Intel Corporation Device 7ad0 (rev 11)
And this one might be colliding with HDMI.
Like in: not be a system default, so you're not using it even though it works.
You can check it with aplay -l. I'd expect it to be listed there with an index higher than 0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Dec 17, 2022 1:36 pm    Post subject: Reply with quote

apiaio,

You probably have several sound cards now.

Code:
00:1f.3 Audio device: Intel Corporation Device 7ad0 (rev 11)
looks like the one on the motherboard as it has subfunction=3
There is probably a HDA device on the video card too. It will use the same driver.

The default sound card is card 0.
That's the one with the lowest PCI ID, here the PCI ID is 00:1f.3

My system has
Code:
 $ lspci -nnk | grep -A2 -i audio
0c:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller [1002:ab28]
   Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller [1002:ab28]
   Kernel driver in use: snd_hda_intel
--
0e:00.4 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller [1022:1487]
   Subsystem: ASUSTeK Computer Inc. Device [1043:87c4]
   Kernel driver in use: snd_hda_intel

so the video card is the default sound card.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sat Dec 17, 2022 4:05 pm    Post subject: Reply with quote

Thanks to all of you,
everything works now. I have changed
Code:
VIDEO_CARDS="radeon radeonsi"
to
Code:
VIDEO_CARDS="intel"
, emerged world with --changed-use
enabled NVME in kernel. Haven't I forgotten something?

And one more question. I did not make the new Gentoo installation for a long time. I have
Code:
cat /etc/conf.d/net
config_enp5s0=("192.168.1.4 brd 192.168.1.255 netmask 255.255.255.0")
routes_enp5s0=( "default via 192.168.1.1")
But I do not have connection after reboot, I have to do
Code:
 ifconfig enp5s0 192.168.1.4 broadcast 192.168.1.255 netmask 255.255.255.0
 route add default gw 192.168.1.1
Why?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Dec 17, 2022 6:51 pm    Post subject: Reply with quote

apiaio,

Does your new install have the net.enp5s0 symlink in /etc/init.d/ ?
Is net.enp5s0 in the default runlevel ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sat Dec 17, 2022 8:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
apiaio,

Does your new install have the net.enp5s0 symlink in /etc/init.d/ ?
Is net.enp5s0 in the default runlevel ?

Yes, There was interface name of the old system.
Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Dec 17, 2022 9:26 pm    Post subject: Reply with quote

apiaio,

Has the interface name changed?
With udev 'persistent' names, its PCIe slot and function dependent. So it will change for motherboard to motherboard.

What does
Code:
ifconfig -a
show.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sat Dec 17, 2022 9:32 pm    Post subject: Reply with quote

Code:
ifconfig -a
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.4  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::a236:bcff:fe22:fb18  prefixlen 64  scopeid 0x20<link>
        ether a0:36:bc:22:fb:18  txqueuelen 1000  (Ethernet)
        RX packets 989  bytes 561852 (548.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1021  bytes 246695 (240.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4  bytes 240 (240.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 240 (240.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1000  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Dec 17, 2022 9:40 pm    Post subject: Reply with quote

apiaio,

That's all in order.

Code:
config_enp5s0=("192.168.1.4 brd 192.168.1.255 netmask 255.255.255.0")
routes_enp5s0=( "default via 192.168.1.1")

The parenthesises' the "()" tave not ben required for a long time but I doubt that its that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sun Dec 18, 2022 3:02 pm    Post subject: Reply with quote

Hallo again
.
Does exist any tutorial "How to EFI dualboot with Windows "? Gentoo is installed.
Up to now I have been using BIOS only.
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1404
Location: Germany

PostPosted: Sun Dec 18, 2022 6:48 pm    Post subject: Reply with quote

apiaio wrote:
Hallo again
.
Does exist any tutorial "How to EFI dualboot with Windows "? Gentoo is installed.
Up to now I have been using BIOS only.

Well, it depends. With Windows 11 and the required secureboot enabled, yes but kind of painfull. If you do not neet windows, don't use secureboot.

There are wiki entries about this topic: https://wiki.gentoo.org/wiki/EFI_stub#Optional:_Secure_boot
And: https://wiki.gentoo.org/wiki/User:Sakaki/Sakaki%27s_EFI_Install_Guide/Configuring_Secure_Boot
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Sun Dec 18, 2022 8:32 pm    Post subject: Reply with quote

Unfortunately my BIOS doesn't offer possibility to disable secureboot. See above.
Is possible to overwrite Windows EFI partition using GRUB?
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1404
Location: Germany

PostPosted: Mon Dec 19, 2022 7:28 am    Post subject: Reply with quote

I'm pretty sure this will destroy booting windows..

Why don't you start here There are wiki entries about this topic: https://wiki.gentoo.org/wiki/EFI_stub#Optional:_Secure_boot and reading those two links mention in the secure boot section.
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Mon Dec 19, 2022 10:54 am    Post subject: Reply with quote

apiaio,

That will destroy Windows.

To dual boot with WIndows, your Gentoo needs to play by its rules.
Gentoo must use EFI.

If you really can't disable secure boot. Rare unless you have an arm system, Gentoo needs to use secure boot too.
Don't even think about removing the existing secure boot keys.
Unless you can turn off secure boot, your motherboard will be 'bricked'.

The bad news is that unless your Gentoo is installed using a GPT partition table now, moving to GPT (secure boot or not) is tricky, without destroying the Gentoo install.
There are two problems. The start of the userspace on the install and making space for the backup GPT at the end of the volume.

What exact motherboard do you have - we need to read the manual?
Which version of Windows do you want to dual boot with?
Do you have a TPM module?
If so, is it used and what version?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
apiaio
Guru
Guru


Joined: 04 Dec 2008
Posts: 417

PostPosted: Mon Dec 19, 2022 11:58 am    Post subject: Reply with quote

NeddySeagoon wrote:
apiaio,
What exact motherboard do you have - we need to read the manual?
Which version of Windows do you want to dual boot with?
Do you have a TPM module?
If so, is it used and what version?

- MB Asus Prime Z690-P D4
- Win10 Pro
- I dont think that I have TMP. AFAIK only Win11 need TMP.

Methods described in above mentioned wiki pages seems to be too complicated and dangerous.
I read, than UBUNTU and Mint can boot in secure mode. So I installed Mint and now I am booting with Mint.
NVMe disk partitions:
Code:
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: CT500P5PSSD8                           
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: C08DD226-88B6-CB41-AED7-B51B6BC1BADA

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    526335    524288   256M EFI System
/dev/nvme0n1p2    526336 315099135 314572800   150G Microsoft reserved
/dev/nvme0n1p3 315099136 524814335 209715200   100G Linux filesystem - Gentoo
/dev/nvme0n1p4 524814336 734529535 209715200   100G Linux filesystem - Mint
/dev/nvme0n1p5 734529536 976773134 242243599 115.5G Linux filesystem

I thing that I am ready to install Windows. After that I will recovery (update) Mint's GRUB.
For safety's sake I have made backup of Gentoo on another volume.
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