Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub-install fail
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
rollexus
n00b
n00b


Joined: 20 Aug 2011
Posts: 34

PostPosted: Tue Aug 22, 2017 9:35 pm    Post subject: grub-install fail Reply with quote

Hello Everyone,

New installation on an older x346 system that has a HW raid serveraid7k. I have the appropriate kernel driver compiled `aic79xx`.

lscpi:

Code:
00:00.0 Host bridge: Intel Corporation E7520 Memory Controller Hub (rev 0c)
00:00.1 Unassigned class [ff00]: Intel Corporation E7525/E7520 Error Reporting Registers (rev 0c)
00:02.0 PCI bridge: Intel Corporation E7525/E7520/E7320 PCI Express Port A (rev 0c)
00:04.0 PCI bridge: Intel Corporation E7525/E7520 PCI Express Port B (rev 0c)
00:05.0 PCI bridge: Intel Corporation E7520 PCI Express Port B1 (rev 0c)
00:06.0 PCI bridge: Intel Corporation E7520 PCI Express Port C (rev 0c)
00:08.0 System peripheral: Intel Corporation E7525/E7520/E7320 Extended Configuration Registers (rev 0c)
00:1d.0 USB controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.7 USB controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
01:06.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV100 [Radeon 7000 / Radeon VE]
02:00.0 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge A (rev 09)
02:00.2 PCI bridge: Intel Corporation 6700PXH PCI Express-to-PCI Bridge B (rev 09)
03:03.0 Network controller: MYRICOM Inc. Myrinet 2000 Scalable Cluster Interconnect (rev 06)
05:00.0 Ethernet controller: Broadcom Limited NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 11)
06:00.0 Ethernet controller: Broadcom Limited NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 11)
07:00.0 PCI bridge: Intel Corporation 80332 [Dobson] I/O processor (A-Segment Bridge) (rev 07)
07:00.2 PCI bridge: Intel Corporation 80332 [Dobson] I/O processor (B-Segment Bridge) (rev 07)
08:0e.0 RAID bus controller: Adaptec ServeRAID Controller (rev 07)



emerge --info


Code:
Portage 2.3.6 (python 3.4.5-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r4, 4.8.17-hardened-r2 x86_64)
=================================================================
System uname: Linux-4.8.17-hardened-r2-x86_64-Intel-R-_Xeon-TM-_CPU_3.60GHz-with-gentoo-2.3
KiB Mem:     8061620 total,   6539044 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 07 Aug 2017 15:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28 p1.2) 2.28
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:




When I try to mount the partitions outside of chroot everything mounts fine. Within chroot, I get a "permission denied" when trying to mount.
My bigger problem is that when trying to install grub, I am getting:

Code:
grub-install /dev/sda
Installing for i386-pc platform.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda4.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda4.
grub-install: warning: disk does not exist, so falling back to partition device /dev/sda4.
grub-install: error: disk `hostdisk//dev/sda4' not found.

drwxr-xr-x  3 root root    1024 Aug 22 20:52 .
drwxr-xr-x 21 root root    4096 Aug 22 20:45 ..
-rw-r--r--  1 root root  106617 Aug 22 20:51 config-4.9.34-gentoo
drwxr-xr-x  6 root root    1024 Aug 22 20:52 grub
-rw-r--r--  1 root root 3609869 Aug 22 20:51 System.map-4.9.34-gentoo
-rw-r--r--  1 root root 6852592 Aug 22 20:51 vmlinuz-4.9.34-gentoo

Thanks in advance

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14276

PostPosted: Wed Aug 23, 2017 1:31 am    Post subject: Reply with quote

Hardened kernels disallow some operations inside a chroot, even when run by root. Run the operations from outside the chroot (if possible), disable the chroot security restrictions, or switch to a non-hardened kernel for those steps.

For your grub install, what does ls -l /dev/sda* show after grub fails?
Back to top
View user's profile Send private message
rollexus
n00b
n00b


Joined: 20 Aug 2011
Posts: 34

PostPosted: Wed Aug 23, 2017 3:46 pm    Post subject: Reply with quote

Hu wrote:
Hardened kernels disallow some operations inside a chroot, even when run by root. Run the operations from outside the chroot (if possible), disable the chroot security restrictions, or switch to a non-hardened kernel for those steps.

For your grub install, what does ls -l /dev/sda* show after grub fails?


Hello Hu,

Thank you for your response. What I think happened is that when I partitioned the drive I was using GPT (default) this is an older machine and I does not support EFI.
By any means, I made sure the boot partition is of type linux filesystem:

Code:
/dev/sda1      2048    477183    475136  232M Linux filesystem
/dev/sda3    477184   8865791   8388608    4G Linux filesystem
/dev/sda4   8867840  71782399  62914560   30G Linux filesystem
/dev/sda5  71782400 213280767 141498368 67.5G Linux filesystem

brw-rw---- 1 root disk 8, 0 Aug 23 15:37 /dev/sda
brw-rw---- 1 root disk 8, 1 Aug 23 15:37 /dev/sda1
brw-rw---- 1 root disk 8, 3 Aug 23 15:37 /dev/sda3
brw-rw---- 1 root disk 8, 4 Aug 23 15:37 /dev/sda4
brw-rw---- 1 root disk 8, 5 Aug 23 15:37 /dev/sda5

Using GPT in fdisk there is no longer a option to toggle the boot flag. How do I do this?

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7320
Location: Saint Amant, Acadiana

PostPosted: Wed Aug 23, 2017 5:18 pm    Post subject: Reply with quote

You can use fdisk and create protective MBR on your GPT drive. Then you can set the boot flag in case your BIOS requires it.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
rollexus
n00b
n00b


Joined: 20 Aug 2011
Posts: 34

PostPosted: Wed Aug 23, 2017 5:52 pm    Post subject: Reply with quote

Jaglover wrote:
You can use fdisk and create protective MBR on your GPT drive. Then you can set the boot flag in case your BIOS requires it.


Hello Jag,

Thank you for your response. I am kind of a noob to this. How do I create a protective MBR on the GPT? I think the bios does require it because I am getting cursor on boot...
I just wanted to mention that this machine will *never* have dual boot
Code:

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: 213282816 sectors, 101.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8D47D867-637F-40BD-8729-7E80013A2D83
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 213282782
Partitions will be aligned on 2048-sector boundaries
Total free space is 8125 sectors (4.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  grub
   2            6144          475135   229.0 MiB   8300  boot
   3          477184         8865791   4.0 GiB     8300  swap
   4         8867840        71782399   30.0 GiB    8300  rootfs
   5        71782400       213280767   67.5 GiB    8300  primary

I really don't want to start the installation from the beginning using the correct (dos) partition table...

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
rollexus
n00b
n00b


Joined: 20 Aug 2011
Posts: 34

PostPosted: Wed Aug 23, 2017 6:03 pm    Post subject: Reply with quote

Also, how to set the boot flag on GPT in fdisk? The a command is no longer valid
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