View previous topic :: View next topic |
Author |
Message |
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Tue Feb 13, 2018 6:42 pm Post subject: |
|
|
what worries me is he is talking about legacy boot settings...
its not actually definitely stated *IF* his BIOS is EFI enabled, likewise whether grub was setup as such. EQUALLY whether void was setup for EFI or not... _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Feb 13, 2018 6:50 pm Post subject: |
|
|
If you don't use PXE boot, try disabling it in BIOS. i.e. don't put it in the chain.
That may not work. The mobo I referred to early had it disabled but it always tried anyway. But it only takes less than a minute to try.
The BIOS on my new MSI mobo will only try the first choice. If it fails, the BIOS reboots in an infinite loop instead of trying the second choice.
It's also supposed to support DDR-4 3200 memory. i have 2666 memory but it sees it only as 2400. I have to use the overclocking menu to select 2400 (the highest choice) or it will default to 2166. off topic, but illustrates that BIOS' have a lot of bugs. |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Tue Feb 13, 2018 7:15 pm Post subject: |
|
|
Naib wrote: | what worries me is he is talking about legacy boot settings...
its not actually definitely stated *IF* his BIOS is EFI enabled, likewise whether grub was setup as such. EQUALLY whether void was setup for EFI or not... |
Agreed. My scenario was IF UEFI was enabled, and I don't see conclusive evidence anywhere in the thread. I may have missed something. I'm not a UEFI genius, I've installed it on exactly one Gentoo box.
The thing is, PXE is very definitely not controlled by grub. It's controlled by the BIOS. The only thing that fits the description of the OP's problem is if void was higher up the boot order than PXE, or if PXE was disabled before but isn't now.
I can only see this problem as being related to BIOS and boot loader settings.
As far as I understand it, boot requirements are:
UEFI:
- GPT partition table on the boot media
- Exactly one partition of type EF00
- The EF00 partition is formatted fat32
- The EF00 partition contains the kernel/boot loader and all the associated files
- The BIOS knows where to find the kernel/boot loader.
Old-school:
- One partition marked bootable
- Boot loader in one of two predetermined places
- Possible wiring or BIOS configuration to determine disk boot order.
The reason I brought up UEFI is because I don't really see a way for this situation to happen with an old-school boot. That said I suppose I can understand a BIOS which wants to be picky about which disks can be booted. Mine is. I just never saw that sort of thing until UEFI came around. |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Tue Feb 13, 2018 7:36 pm Post subject: |
|
|
I always had legacy boot enabled because Void wouldn't install in EFI mode, don't ask me why. I could enable UEFI, but I seem to be too narrow-minded to understand how to use it correctly.
There is no obvious way to remove PXE from the boot order completely - I could only move it up or down? _________________ I already use the new Genthree. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Tue Feb 13, 2018 7:39 pm Post subject: |
|
|
What is needed is a definitive statement on
1) BIOS configured as EFI or legacy
2) VOID configured for EFI or legacy
3) Is VOID still bootable?
3) Gentoo configuration steps followed (EFI or legacy).
Everything is pointing to aspects of the HDD are not "waking up" so BIOS moves on to the next boot device & hence an attempted PXE... one way would be to disable that, the correct way is to sort out the boot partitions...
if EFI is used are both VOID & Gentoo efi files present in /boot/EFI ...
We really need to know the HDD layout, bios config, bootloader config (VOID and Gentoo). Which distro do you want to manage grub... Grub can boot a tonne of kernels (windows, iso, different distro's)
Quote: | lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
└─sda1 8:1 0 238.5G 0 part /var/tmp
nvme0n1 259:0 0 931.5G 0 disk
├─nvme0n1p1 259:1 0 130M 0 part /boot
└─nvme0n1p2 259:2 0 931.4G 0 part /
|
_________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Tue Feb 13, 2018 7:53 pm Post subject: |
|
|
OK that's valuable info.
FWIW it seems that in order to install a UEFI boot system you need to be booted from an UEFI boot disk.
I would check the condition of your chosen boot disk to make sure that the correct partition is marked as bootable, and that the BIOS is in place and correct, and check your BIOS for boot order settings. |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Wed Feb 14, 2018 7:24 pm Post subject: |
|
|
Sooo...
Code: | EFI variables are not supported on this system. |
I think it's safe to assume that this is as legacy as it can get?
lsblk output:
Code: | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238,5G 0 disk
├─sda1 8:1 0 2M 0 part
├─sda2 8:2 0 497M 0 part
├─sda3 8:3 0 500M 0 part [SWAP]
└─sda4 8:4 0 237,5G 0 part /
sr0 11:0 1 1024M 0 rom |
I had removed Void before installing Gentoo because I did (edited: typo) not want to have any interferences. _________________ I already use the new Genthree.
Last edited by pun_guin on Wed Feb 14, 2018 8:58 pm; edited 1 time in total |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 14, 2018 8:44 pm Post subject: |
|
|
right. what does fdisk show, primarily looking for the partition that is marked for boot
NOTE: this is efi so there is no boot flag
Code: | fdisk -l
Disk /dev/nvme0n1: 931.5 GiB, 1000204886016 bytes, 1953525168 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: 173E81AB-ED99-4127-A026-DE6CA8736408
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 268287 266240 130M EFI System
/dev/nvme0n1p2 268288 1953523119 1953254832 931.4G Linux filesystem
Disk /dev/sda: 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: dos
Disk identifier: 0x000effdf
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 500117503 500115456 238.5G 83 Linux |
_________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Wed Feb 14, 2018 9:08 pm Post subject: |
|
|
From fdisk -l /dev/sda (I only have one SSD):
Code: | Festplatte /dev/sda: 238,5 GiB, 256060514304 Bytes, 500118192 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: DB852F98-B31C-4CBF-B8ED-8B0B7D4BF301
Gerät Anfang Ende Sektoren Größe Typ
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 1023999 1017856 497M Linux-Dateisystem
/dev/sda3 1024000 2047999 1024000 500M Linux-Dateisystem
/dev/sda4 2048000 500116143 498068144 237,5G Linux-Dateisystem |
I set /dev/sda1 as the boot partition and this seems to have worked. /boot is mounted and it contains my current kernel. _________________ I already use the new Genthree. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54097 Location: 56N 3W
|
Posted: Wed Feb 14, 2018 9:26 pm Post subject: |
|
|
pun_guin,
BIOSes are somewhat simplistic. At one time they were 64kB max. A single segment
They read the partition table, check for a bootable flag then boot from the drive, or not.
Checking varies. Some don't check at all.
Others don't mind how many partition have the bootable flag set.
Yet others insist that its only set on exactly one partition.
The bootable flag says noting about the partition its attached to. Your sda1 is the BIOS_Boot partition, which grub uses raw.
It does not hold your kernel.
I suspect what you have is (a novel to me case), where if the bootable flag is not set, that boot option is skipped and the drive is pushed to the bottom of the list, after all else has failed.
The bootable flag is just for the BIOS. Nothing else cares.
Well, Windows does sometimes. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Wed Feb 14, 2018 9:33 pm Post subject: |
|
|
NeddySeagoon,
NeddySeagoon wrote: | I suspect what you have is (a novel to me case), where if the bootable flag is not set, that boot option is skipped and the drive is pushed to the bottom of the list, after all else has failed. |
I just tried to set the bootable flag via fdisk, but a reboot showed no improvement. _________________ I already use the new Genthree. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 14, 2018 9:49 pm Post subject: |
|
|
Any reason you chose to have GPT partitioning while using LEGACY BIOS? Annoying combination. Microsoft does not support legacy BIOS and GPT partitioning due to the complexity
Sda1 must be grub2 boot partition (to deal with gpt partitioning)
Is sda2 your /boot with your kernel?
Sda3 swap
Sda4 is /<root> _________________
Quote: | Removed by Chiitoo |
Last edited by Naib on Wed Feb 14, 2018 9:55 pm; edited 1 time in total |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Wed Feb 14, 2018 9:54 pm Post subject: |
|
|
No special reason - the Handbook suggests (unless I plan to dual-boot with Windows) that I should either use UEFI or BIOS+GPT, so I thought I might want to do exactly that. _________________ I already use the new Genthree. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 14, 2018 9:59 pm Post subject: |
|
|
There still seems to be missing information to help you through this... Partitions for one, how grub was setup...
Could you read through this as see if it aligns with what you did
https://wiki.gentoo.org/wiki/GRUB2#BIOS_with_GPT _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Wed Feb 14, 2018 10:12 pm Post subject: |
|
|
+1 on nothing valuable in your sector 1. It's 2M, nothing would fit IMO. My /boot contains 51M with 3 kernels, grub and a bootx64.efi. 2M is not big enough to hold a kernel on a typical system.
The handbook's recommendation of a 2M ef00 partition is, IMO, very misleading and I struggled with it years ago. If it's still there I think it should be changed to something realistic.
I used GPT long before I used UEFI boot. That said I haven't installed Windows on bare metal in more than 20 years, and then not for me.
I would recommend doing this as root:
Code: |
mount /boot
cp -rax /boot /boot2
|
Then boot into system rescue cd (or other alternate Linux media) and open 'gdisk /dev/sda'
- delete sda1
- delete sda2
- Create sda1 as taking all the space from 2048 to 1023999 (the space previously occupied by sda1 and sda2)
- Make it Linux filesystem.
- Save and quit.
- mkfs.ext3 /dev/sda1
- mount /dev/sda4 /mnt/gentoo
- mount /dev/sda1 /mnt/gentoo/boot
- cp -rax /mnt/gentoo/boot2 /mnt/gentoo/boot
- reboot and remove external boot media
Edit: You may have to tweak /mnt/gentoo/etc/fstab such that the /boot partition is /dev/sda1. But that could actually happen after the reboot when you're in your normal system again I think.
Or maybe you'd have to chroot and redo grub? Not sure. I came into grub way later than most, having been stuck on lilo for decades |
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Wed Feb 14, 2018 10:19 pm Post subject: |
|
|
I used parted and I (think I) did all of this as it was mostly a part of the installation recommendations anyway:
Code: | mount /boot
grub-install /dev/sda
set 1 bios_grub on |
I just checked parted again and there was no boot flag, only boot_grub ... after changing that, all flags seem to be where they belong (other than I don't really know what an esp is):
Code: | Modell: ATA KINGSTON RBUSC18 (scsi)
Festplatte /dev/sda: 256GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: gpt
Disk-Flags:
Nummer Anfang Ende Größe Dateisystem Name Flags
1 1049kB 3146kB 2097kB grub bios_grub
2 3146kB 524MB 521MB ext4 boot boot, esp
3 524MB 1049MB 524MB linux-swap(v1) swap
4 1049MB 256GB 255GB xfs rootfs |
Still, no improvement.
I probably made a whole mistake quite early in my installation procedure. _________________ I already use the new Genthree. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Feb 14, 2018 11:04 pm Post subject: |
|
|
1clue wrote: | +1 on nothing valuable in your sector 1. It's 2M, nothing would fit IMO. My /boot contains 51M with 3 kernels, grub and a bootx64.efi. 2M is not big enough to hold a kernel on a typical system.
The handbook's recommendation of a 2M ef00 partition is, IMO, very misleading and I struggled with it years ago. If it's still there I think it should be changed to something realistic.
|
The 2M partition is grub's way of dealing with a GPT partition table WITH a legacy BIOS. it needs somewhere to write its stage2 data.
This needs to be of type ef01 otherwise it won't work completely - it appears to be set that was as fdisk is reporting it is a grub drive
pun_guin wrote: |
Still, no improvement.
I probably made a whole mistake quite early in my installation procedure. |
Maybe... but it should be recoverable... there are very VERY few circumstances that need a start from scratch with Gentoo
My 1st gentoo install was over a weekend and I have to chroot back in a couple of times and essentially rewind some steps
My 2nd gentoo install (due to changing to 64bit) actually resulted in a corrupted disk (Uber convinced me to try openRC as it just appeared in teh tree BUT a needed dependency wasn't pushed to the tree and it resulted in a nasty spinlock and corrupted root.)
Right now the gentoo install is valid, it is part of the configuration that may (or may not) be responsible for what you are experiencing _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Thu Feb 15, 2018 12:04 am Post subject: |
|
|
Naib wrote: | Maybe... but it should be recoverable... |
That's what I was promised here.
Seriously though, I probably could just start from scratch (that would only make me lose time, I did not start anything productive on this machine yet other than trying to set up my environments). However, chances are that this would not necessarily fix my grub issue and I am genuinely curious now... _________________ I already use the new Genthree. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Feb 15, 2018 12:16 am Post subject: |
|
|
Two layouts:
First, EFI boot, monolithic filesystem (no separate /boot , swap on a swapfile SSD
Code: | gentoo ~ # fdisk -l /dev/sda
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B71B8547-F661-4A0E-A610-5FE0BDF75913
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G EFI System
/dev/sda2 2099200 488392703 486293504 231.9G Linux filesystem
gentoo ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 228G 59G 158G 27% /
devtmpfs 10M 0 10M 0% /dev
tmpfs 698M 1.3M 697M 1% /run
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
shm 3.5G 0 3.5G 0% /dev/shm
/dev/sda1 1022M 2.3M 1020M 1% /boot/efi
/dev/sdc2 4.6T 1.6T 2.8T 37% /video
tmpfs 18G 0 18G 0% /var/tmp/portage
|
Second. legacy boot with grub-legacy 10,000 RPM hard disk
Code: | MSI ~ # fdisk -l /dev/sda
Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000d25aa
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 2097151 2095104 1023M 83 Linux
/dev/sda2 2097152 4194303 2097152 1G 82 Linux swap / Solaris
/dev/sda3 4194304 488396799 484202496 230.9G 83 Linux
MSI ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 228G 90G 127G 42% /
devtmpfs 10M 0 10M 0% /dev
tmpfs 799M 1.2M 798M 1% /run
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
shm 4.0G 0 4.0G 0% /dev/shm
/dev/sda1 1007M 155M 802M 17% /boot
/dev/sr0 482M 482M 0 100% /mnt/cdrom
tmpfs 12G 0 12G 0% /var/tmp/portage
/dev/sdb1 1.9T 857G 1006G 47% /video |
Notice the asterix indicating boot partition. Gparted can set this for you and I'm pretty sure that it's on sysrescuecd.
If it's a fat32 partition you will need fat32 filesystem BUILT_IN the kernel NOT as module.
Note to Self: You forgot to mount the swap partition, dummy. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Thu Feb 15, 2018 12:17 am Post subject: |
|
|
could you provide the output of:
the bios_grub flag is set, but is the partition type correct. _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
pun_guin Apprentice
Joined: 06 Feb 2018 Posts: 204
|
Posted: Thu Feb 15, 2018 12:29 am Post subject: |
|
|
Sure:
Code: | GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 500118192 sectors, 238.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DB852F98-B31C-4CBF-B8ED-8B0B7D4BF301
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 6143 2.0 MiB EF02 grub
2 6144 1023999 497.0 MiB EF00 boot
3 1024000 2047999 500.0 MiB 8300 swap
4 2048000 500116143 237.5 GiB 8300 rootfs |
EF00 is what it should be, right? _________________ I already use the new Genthree. |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Thu Feb 15, 2018 2:59 am Post subject: |
|
|
Partition 1 should be EF01 according to Naib. I haven't verified that.
If what he's saying is correct then don't do my partition mangling from my prior post. |
|
Back to top |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Thu Feb 15, 2018 3:13 am Post subject: |
|
|
Tony0945 wrote: | Note to Self: You forgot to mount the swap partition, dummy. |
Swap won't show up in any of the charts you posted. Use |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Feb 15, 2018 3:34 am Post subject: |
|
|
1clue wrote: | Tony0945 wrote: | Note to Self: You forgot to mount the swap partition, dummy. |
Swap won't show up in any of the charts you posted. Use |
I am a double dummy! Mea culpa. |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Thu Feb 15, 2018 3:44 am Post subject: |
|
|
1clue wrote: | Partition 1 should be EF01 according to Naib. I haven't verified that.
If what he's saying is correct then don't do my partition mangling from my prior post. |
On a working EFI boot system: Code: | gentoo ~ # gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B71B8547-F661-4A0E-A610-5FE0BDF75913
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 2048-sector boundaries
Total free space is 6445 sectors (3.1 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB EF00
2 2099200 488392703 231.9 GiB 8300
|
EF00, it's mounted as /boot/efi. Root and /boot are on the second partition.
bootx64.efi is under /boot/efi/EFI/BOOT. It's booting refind not grub. That may make a difference between EF00,EF01,EF02 ?
EDIT: Yes, see this link https://stackoverflow.com/questions/32931124/boot-partition-type-to-use-for-gpt-partition-table |
|
Back to top |
|
|
|