Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GPT 2 drive set-up Gentoo/Windows[SOLVED;grub.cfg]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Oct 31, 2015 3:43 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks

Quote:

Default partitioning scheme

/dev/sda1 (bootloader) 2M BIOS boot partition
/dev/sda2 ext2 (or vfat) 128M Boot partition
/dev/sda3 (swap) 512M or higher Swap partition
/dev/sda4 ext4 Rest of the disk Root partition


swap is nonsesne for RAM equal or bigger 3GB in my expierence. talking about T4400 cpu or up (that is antqiue hardware)

Up to you. Summary. Grub2 / uefi needs that 2MB, sda1 partition...

importance of informations, how I order the informations told

old user >> gentoo handbook >> documentation provided by the guy who wrote the source code >> gentoo wiki >> arch linux wiki >> ordinary user, who hardly / sometimes posts >> ubuntu wiki >> anything else ...

left side is the most hightest information priority...

Sadly the gentoo wiki gets only updated when someone realizes it is outdated ... many sections are just outdated, are not valid ... no surprise that you tahn tell me grub2 mention something else ... I do not even looked at that. Those gentoo wiki pages i reviewed in past half year, the mayority needed some fine tuning / update to current state.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 31, 2015 3:48 pm    Post subject: Reply with quote

Grub2 has its partition /dev/sda1 bios_grub non formatted, no mount point
Then there is /dev/sda2 vfat mounted on /boot/efi
No swap ( seems fine gcc compiles really fast )
/dev/sda3 is rootfs mounted on / where everything else sits

mounting /dev/sda2 /boot
In /boot/efi/EFI/gentoo/ all I have is names grubx64.efi
in there is config-4.0.9-gentoo directory efi directory grub System.map-4.0.9-gentoo vmlinuz-4.0.9-gentoo
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 31, 2015 6:08 pm    Post subject: Reply with quote

Now it boots :P

but has a kernel panic: Unabl to mount root fs on unknown-block(0,0)

:(

Plus I did not have a grub splash.
May be I have made a mistake by copying the kernel to /boot/efi/EFI/gentoo/ bootx64.efi
while there already was a grubx64.efi

I don quite know what I am doing here yet.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 31, 2015 7:02 pm    Post subject: Reply with quote

Is grub2-mkconfig -o /boot/grub/grub.cfg still at use if you have /boot/efi ?
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sun Nov 01, 2015 9:19 am    Post subject: Reply with quote

Booting is completely f****d up. I can get grub loading but it loads to the grub shell.
When trying to load kernel grub doens find it.

Here`s gdisk output:
Code:
root@sysresccd /root % gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.0

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: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C6EE6EEA-1EEA-428F-957E-14558C7269CB
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3437 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  grub
   2            6144          255999   122.0 MiB   EF00  boot
   3          256000      1953523711   931.4 GiB   8300  rootfs


On the grub shell I can find partitions and disks, I can even look into specific files.
But I cannot load the kernel.

How can I wipe the chaos that's on /dev/sda2 ?

Code:
(chroot) sysresccd boot # ls -al
total 9490
drwxr-xr-x  4 root root     512 Jan  1  1970 .
drwxr-xr-x 21 root root    4096 Oct 31 15:24 ..
-rwxr-xr-x  1 root root   96529 Oct 29 17:06 config-4.0.9-gentoo
drwxr-xr-x  5 root root     512 Oct 31 21:11 efi
drwxr-xr-x  6 root root     512 Oct 29 17:36 grub
-rwxr-xr-x  1 root root       0 Oct 29 17:42 .keep
-rwxr-xr-x  1 root root 3310053 Oct 29 17:06 System.map-4.0.9-gentoo
-rwxr-xr-x  1 root root 6304304 Oct 29 17:06 vmlinuz-4.0.9-gentoo


Code:
(chroot) sysresccd boot # cd efi/EFI/
(chroot) sysresccd EFI # ls
gentoo
(chroot) sysresccd EFI # ls -al
total 2
drwxr-xr-x 3 root root 512 Oct 29 17:34 .
drwxr-xr-x 5 root root 512 Oct 31 21:11 ..
drwxr-xr-x 2 root root 512 Oct 31 20:01 gentoo

Code:
(chroot) sysresccd EFI # cd gentoo/
(chroot) sysresccd gentoo # ls -al
total 6267
drwxr-xr-x 2 root root     512 Oct 31 20:01 .
drwxr-xr-x 3 root root     512 Oct 29 17:34 ..
-rwxr-xr-x 1 root root 6300336 Oct 31 20:01 bootx64.efi
-rwxr-xr-x 1 root root  115712 Oct 29 17:34 grubx64.efi


[code(chroot) sysresccd gentoo # cd /boot/efi/
(chroot) sysresccd efi # ls
boot bootx64.efi EFI gentoo
(chroot) sysresccd efi # cd boot
(chroot) sysresccd boot # ls
bootx64.efi
[/code]
Code:
(chroot) sysresccd boot # cd grub/
(chroot) sysresccd grub # ls -al
total 29
drwxr-xr-x 6 root root   512 Oct 29 17:36 .
drwxr-xr-x 4 root root   512 Jan  1  1970 ..
drwxr-xr-x 2 root root   512 Oct 29 17:34 fonts
-rwxr-xr-x 1 root root  4784 Oct 29 20:14 grub.cfg
-rwxr-xr-x 1 root root  1024 Oct 29 17:34 grubenv
drwxr-xr-x 2 root root  2560 Oct 29 17:34 locale
drwxr-xr-x 3 root root   512 Oct 29 17:34 themes
drwxr-xr-x 2 root root 18432 Oct 29 17:34 x86_64-efi

Code:
(chroot) sysresccd / # lsblk -f
NAME   FSTYPE LABEL UUID MOUNTPOINT
sda                     
├─sda1                   
├─sda2                   /boot/efi
└─sda3                   /
sdb                     
└─sdb1                   
sr0                     
loop0                   


This cannot work - don say it... I deserve it...
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Mon Nov 02, 2015 7:50 am    Post subject: Reply with quote

LOL, that´s slowly becoming a monologue here...

I´ve gone back to Legacy BIOS and plugged the drives like they were to get
some real work and some gaming done.
I´ve put the new drive on sata 3 so that I could copy important config files
onto the new system; btw it works nicely: booted it once with sysrescue; needs
some finetuning and adjusting but works like a charm.

Back to the subject: I performed grub2-mkconfig -o /boot/grub/grub.cfg
to make sure that the new/old order is reflected in grub and got this:
Code:
grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Thema gefunden: /boot/grub/themes/starfield/theme.txt
Linux-Abbild gefunden: /boot/kernel-4.1.8-gentoo
Linux-Abbild gefunden: /boot/kernel-4.1.4-gentoo
  /run/lvm/lvmetad.socket: connect failed: Datei oder Verzeichnis nicht gefunden
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
Windows Vista (loader) auf /dev/sdb1 gefunden
Gentoo Base System release 2.2 auf /dev/sdc3 gefunden
erledigt


Please read the last message done by grub2 :lol:
Cannot boot it of course.

So I should let go and decide to do it with Windi first and put Gentoo
in a VB container (?).
I need to fix that lvm warning too because I don´t use lvm.

I certainly won´t upgrade to Windi 10 because many people would like
to downgrade already after upgrading. IF I go to Windi 10 I will buy a system-builder
and use both Windows versions.

Either grub2 isn´t yet completely ready to do efi yet or I am.

Thank you for trying to help.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Nov 02, 2015 5:47 pm    Post subject: Reply with quote

transsib wrote:
LOL, that´s slowly becoming a monologue here...

Only because you seem to be floundering, not because I know anything about EFI ;) this blog post might shed light/link to further info.

IME you want to get khayyam's help with EFI, from what I've seen in other threads about it. He has a way of getting right to the point you're stuck on.

You could also ask the author of the blog post above, directly. (I'm sure a bump to 10 based on questions would be a positive step.)
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Mon Nov 02, 2015 7:31 pm    Post subject: Reply with quote

Quote:
Only because you seem to be floundering


:lol:

You´d do that too if you´ d waisted three weekends on a experiment that´s likely to fail
yet seems so attractive that you cannot let go of.

Thanks for the links. I knew Sakaki but he does it with initramfs which complicates stuff for me
because I´ve never used any initramfs at all yet.

I found another idea: if you create a fat32 formatted usb stick on which you´d install grub2
and copy a sysrescuecd image onto it and add a grub.cfg that loads that iso you might be able to get the efivars loaded if you´d boot the ready to use
kernel built with EFIVARS = workaround the chicken/egg problem.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Nov 03, 2015 10:50 am    Post subject: Reply with quote

Oh, I know I'd flounder.. ;-)

Have you tried IRC? #gentoo on chat.freenode.net or: .org
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Tue Nov 03, 2015 1:10 pm    Post subject: Reply with quote

steveL wrote:
Quote:
Oh, I know I'd flounder.. ;-)

Have you tried IRC? #gentoo on chat.freenode.net or: .org


Not yet. When I actually know what I´m talking about I might.
Although I´ve already provided hard facts here I have just collected snippets of code
I´ve squeezed out of my new system I don´t have a full picture yet.
I plan on writing some sort of roadmap for myself before I start again.
I have found this:
https://blog.flameeyes.eu/2012/11/uefi-booting#gsc.tab=0
and this:
http://feitel.indeedgeek.de/2012/10/mbr_vs_efi/ with the idea of a grub2 usb stick
holding sysrescuecd.
Both ideas will find a way into my roadmap.
Then we have the troubleshooting wiki https://wiki.gentoo.org/wiki/GRUB2/Troubleshooting.
Makes me wonder why we should have EFIVARS as module in the kernel instead of firmly set in the kernel.

May be my mistake is simple, like not naming the kernel .efi but only vmlinuz-4.0.9-gentoo; this won´t boot of course.

As you can see I need to know what I´m talking about before I start chatting on it.

On a paranoid sidenote: isn´t it dangerous to go EFI? Who guarantees that nobody inserts an official rootkit into a
motherboards efi firmware?

Nevermind.... going nuts
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Fri Nov 13, 2015 4:31 pm    Post subject: Reply with quote

Ok... all the floundering is over. I tried again after a forced break > real life.
Freshly hatched Gentoo now boots in EFI mode just fine.

I read some more about EFI and found that I did not quite understand what EFI is,
that it is not a BIOS and that CSM is an optional extension that modern UEFI firmwares
are being shipped with. Native mode is EFI. Also I searched at other places, like the ASUS
ROG forum. They mostly install Windows and also have difficulty installing in EFI.
I learned a lot by just watching others.

In UEFI firmware I entirely disabled CSM (compatibility mode) and in Secure Boot which is
still disbled I pick "Other OS" over "Windows UEFI only".

Plus I had to copy vmlinuz-4.2.5-gentoo to /boot/efi/EFI/boot/bootx64.efi to tell grub
where to find root which was missing as I had a kernel panic telling me no root found.

I am such a dumb but happy pig now :D

My next step is Windows> this drive is still mbr so that I will have to reenable CSM
to boot my Windows 7 drive, upgrade to Windi 10 and then trying to fresh-install
on a GPT partition table on that drive.
I am certain I will get both OS to boot again when everything is done.
According to subject this is not over yet but the most difficult first step's been done; so
I mark thread as "Solved".
I would like to say that boot time is rather super-fast now - never seen it boot that fast.

And I would also like to thank you all for your patience, guys :) :)
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
Goto page Previous  1, 2
Page 2 of 2

 
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