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 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Thu Oct 15, 2015 10:01 am    Post subject: GPT 2 drive set-up Gentoo/Windows[SOLVED;grub.cfg] Reply with quote

Hello,
I bought a new hdd (1 TB) for my Gentoo but I want to reinstall from scratch rather than cloning the old installation.
My Z97 chipset socket 1150 mainboard has UEFI BIOS.
Current situation: MBR partitioning, SATA1 hosts Gentoo OS while SATA2 has Windows 7 64bit Pro, booted by grub2; systemd on Gentoo.

In the near future I want to upgrade to Windows 10 and then clean-install Windows 10 changing partitiontable on the Windows SSD from MBR to GPT.

May be I should take the opportunity to move to EFI to take advantage of this modern BIOS but I am very uncertain
about how to do that.

My questions:
Is it recommendable to use EFI at all with Linux, with or without Windows?
Is it recommendable to partition the new drive for Gentoo GPT ?
Which guide for EFI with Gentoo is the best and ensures success?
Could I leave the Linux hdd on SATA1 or is it irrelevant on which physical SATA slot which hdd sits?
If both drives have a EFI partition, the Gentoo and the Windows drive, how does booting work?
Do I need grub2 and does it boot Windows like it does on the current MBR configuration?


I am grateful for any idea I might get here.

update Nov 28, 2015

I now have installed Windows 10 Pro 64bit on my second drive in EFI mode. Then I have plugged my new
Gentoo drive back in on sata1 with Windi 10 on sata2 and udated grub2:
both operating systems are being booted nicely again.

I am glad that I have started the EFI project with Gentoo. It was a walk in the park with Windows 10
after I have converted the Windows drive to gpt using diskpart. If I had begun with Windows I wouldn't have
understood anything about EFI.

This is the grub.cfg:
http://pastebin.com/TBiB16AGhttp

If during the following weeks I might become crazy enough I will consider signing the bootloader
so that I can reenable Secure Boot in the UEFI firmware. Sakaki's wiki is an excellent reference.

On a sidenote Gentoo might consider putting the following advice right into the handbook:
modprobe efivars before you chroot. :D
modprobe efivars even before those mount commands you issue before chroot so that the new
entoo system you're chrooting into has the variables ( -> mount sys ) or any attempt at getting a
working Gentoo efi system will fail and you loose a lot of time.


Last edited by transsib on Mon Nov 30, 2015 7:05 am; edited 4 times in total
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


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

PostPosted: Thu Oct 15, 2015 6:00 pm    Post subject: Reply with quote

Quote:
Is it recommendable to use EFI at all with Linux, with or without Windows?

You should use EFI both for Linux and Windows

Quote:
Is it recommendable to partition the new drive for Gentoo GPT ?

GPT for Linux and Windows

Quote:
Which guide for EFI with Gentoo is the best and ensures success?

-
Quote:
Could I leave the Linux hdd on SATA1 or is it irrelevant on which physical SATA slot which hdd sits?

Best idea is to install Windows on the first drive and then Linux on the second.

Quote:
If both drives have a EFI partition, the Gentoo and the Windows drive, how does booting work?

-

Quote:
Do I need grub2 and does it boot Windows like it does on the current MBR configuration?

You should use Grub2.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Thu Oct 15, 2015 6:17 pm    Post subject: Reply with quote

i installed windows 10 recently, than did a mistake and wasted the installation. Was just an installation to secure the free upgrade shitty license thing anyway.

summary of my wasted time

windows 10 only works with efi on uefi bios. so you need gpt.

asus g75vw bios get some magic boot entry to boot windows.

windows comes with its own partition layout.

i recommend to install windows first on a harddrive, and pull out the linux harddrive(i think you talked about two harddrives anyway). so windi 10 installer wont overwrit your linux box.

grub2 is a pain to work with with uefi on asus bios. it works but it is poorly documented. other bootloaders should work more painless waht i read here. grub2 is an option but definitely not the best to boot uefi thing.

---

gpt partiton layouts can be cloned but careful to not change source / target destination.

---

it does not matter where your linux hdd is connected. can be any supported controller which your mainboard and harddrive work with.

--

for booting i have no clue.
my asusg75vw bios has some bios option => exit tab => overwrite bios -> boot from cdrom -> maybe you get another entry when you install grub on the second linux harddrive only.
--

I am interested in how you solve the booting issue with windows 10.

--

You may try the following.

install linux on one harddrive with grub2. tell the bios to boot that grub2. and than make an entry with the chainload feature of grub2 to chainload windows10. that should work.

Please share your grub2 config file when you get it to work (because i want to reuse it for my case than)
the plan is to install windows 10 over xmas, to play around with windows again when i am bored.

--

You may phyiscally swap the harddrives or cables. so that the first harddrive is windows and the second will be linux. Although i think uefi bios should be able to boot from any hdd these days (looks fancy and able to do it...)

---

and go for the gpt partition layout, it has many benefit, and should have an old mbr table too, what i read recently.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Thu Oct 15, 2015 8:40 pm    Post subject: Re: GPT for two hdd set-up Gentoo/Windows Reply with quote

transsib wrote:
Do I need grub2 and does it boot Windows like it does on the current MBR configuration?
I'll only differ with what others have said here and say that it isn't necessary and may not even be desirable to do this. The BIOS will already have a bootloader available that you can manage through efibootmgr.

This has the advantage of not slowing the boot process and allowing you to select the non-default OS(s) at the touch of a button. Grub2 is swiftly becoming a complicated solution in search of a problem.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sun Oct 18, 2015 6:56 am    Post subject: Reply with quote

Quote:
The BIOS will already have a bootloader available that you can manage through efibootmgr.

Looks like I have to learn it the hard way.
Quote:
grub2 is a pain to work with with uefi on asus bios. [/quote]

I have ASUS Sabertooth Z97 but it doesn see the efi partition of my new Linux hdd.

Nevermind... I am running into many issues here. It started with the unability to do the Win 10 update at all
reason being that I had used Samsung Magician on the SSD for Windows that i used to clone the old Wind7 installation.
This little nice cloning tool shrinks the DATA partition to 100 MB -> Windows 10 won proceed. I tried to enlarge
teh partition but got a blue screen as reward which I deserved ==> reinstall of Window 7 - period

With Gentoo I used systemrescuecd usb stick to boot and followed the Gentoo handbook for partitioning:
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): 93348AF1-BE7B-4B62-966E-4C3B04975105
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 4029 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048           10239   4.0 MiB     EF02  grub
   2           10240        10239999   4.9 GiB     EF00  boot
   3        10240000        49151999   18.6 GiB    8300  swap
   4        49152000      1953523119   908.1 GiB   8300  rootfs


part 1 is grub_on but thereś no mount point for it and I believe I installed grub2 onto part2 boot
where the image sits which is why the BIOS cannot boot . I can boot the new system using
systemrescuecd though.

Other problems are that I set the profile for systemd but got the usual block with udev and
couldn solve that block; so I had to use openrc which I did not want. Also it has udev-216 without the
new network naming rule and thatś the second minor issue.

My square head has to go through a round hole. More to come when I know more.[/quote]
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sun Oct 18, 2015 7:10 am    Post subject: Reply with quote

Looks like The Doctor has a point but how I get there now is beyond me.

Yes may be I am just too dumb to get that working. I don´t seem to understand the principles here.

Following the handbook instructions I have a working/not working system.
I plugged the new drive off and the old drive on. I cannot boot the new drive
and I also don´t have net which means I cannot properly work on correcting mistakes.

If I understand properly this small /dev/sda1 grub_on not formatted partition should link to
/dev/sda2 vfat boot partition?

On grub2-install I might have made a mistake.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Sun Oct 18, 2015 11:21 am    Post subject: Reply with quote

hi

You may set up something like myself

Code:
sfdisk -l /dev/sda
Disk /dev/sda: 119,2 GiB, 128035676160 bytes, 250069680 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: REMOVED :)))

Device      Start       End   Sectors  Size Type
/dev/sda1    2048      6143      4096    2M BIOS boot
/dev/sda2    6144    268287    262144  128M EFI System
/dev/sda3  268288    530431    262144  128M Linux filesystem
/dev/sda4  530432 250067631 249537200  119G Linux filesystem


I moved my installation in early october 2015.
above is my disc layout for 128GB SSD, with uefi asusg75vw laptop.

sda1 ... needed for grub
sda2 ... could be bigger => vfat (is my boot, used with grub2, grub2 from portage)
sda3 ... it does not hurt to have a few "phyisical extents" / sectors / clusters, unused when you need those later (unused hdd)
sda4 ... (basically my root with luks / lvm / ext4)

Personally swap is overrated with 8GB ram (and i use tmpfs with 4gb to build software in a ramdisc))

---

I cannot boot the new drive
and I also don´t have net which means I cannot properly work on correcting mistake

You may start off with a genkernel generated kernel. and check with your sysrescue bootable medium:

lspci -kk
lsmod

and built those stuff in.

most likely the hardware controller is not recognized / file system support is missing / grub2 is not installed / uefi is not made aware to boot from that

i used arch linux / gentoo wiki / gentoo handbook to get it running

genkernel generated initramfs / kernel / grub.cfg is a basic start. Although it needs real_root parameter and the parameter to tell grub2 which filesystem root is. and oyu need to tell grub2 first where the bootable files are ... (without telling separately where boot partition was and where root partition with filesystem type it did not boot at all here)
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sun Oct 18, 2015 12:01 pm    Post subject: Reply with quote

@tw04l124 I´m sorry that I cannot deliver :(
There´re several things that bug me. At installing grub2 reported success, no errors.
Yet I still may have screwd up there because I had to search for the information at
several places.
The fact that I could not do a systemd installation made it worse. I would have to configure
a kernel with systemd but to do that I had to emerge sysvinit first and the profile with systemd
that I´ve set caused the block. All delivered files were completely outdated.

If I start over at all I will copy config files from my old harddrive over, especially those from /etc.
And I should clear the new harddrive to reflect the pitfalls found while trying to establish gpt on it.

But I cannot do that now: real work life collides; so time consuming.... :cry:

What bugs me is that my old Gentoo drive plus my old Win 7 drive work flawlessly with UEFI
activated in the BIOS of my motherboard - luckily. On my old drive systemd is working perfectly
and network naming is modern too - gonna stick with that for the time being.

Should I install a different distro on it?
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sun Oct 18, 2015 6:07 pm    Post subject: Reply with quote

I decided to give it another try. And do the partitioning that you suggested.
About swap... up to now I just knew you should have more swap than RAM. I have 16 GB RAM.

Trouble is I am so used to the mbr partitioning that it´s quite uncomfy to getting into efi.

Coming weekend let´s me have some time to try again.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Mon Oct 19, 2015 7:41 am    Post subject: Reply with quote

Ok... I searched a lot after this fail: installing uefi is much more complicated than I thought.

Quote:
You may set up something like myself

Code:
sfdisk -l /dev/sda
Disk /dev/sda: 119,2 GiB, 128035676160 bytes, 250069680 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: REMOVED :)))

Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 268287 262144 128M EFI System
/dev/sda3 268288 530431 262144 128M Linux filesystem
/dev/sda4 530432 250067631 249537200 119G Linux filesystem


I will partition the disk like you next time and forget about swap altogether. I know it´s a popular
discussion whether or not swap is needed on these fast newer systems with lots of ram.

But the main problem is not that and not the fact that Gentoo doesn´t let you install a systemd init variant
without major blocks ( although it p****s me off big time ). The main problem is uefi itself.

While efi is excellent for modern systems because it makes use of the speed of modern hardware
it´s also a nightmare : you cannot install with secure boot enabled, yet you cannot boot without the keys and dbs
in Bios.

Mainly it all hinges on Windows here: gotta install that first ( Windose in uefi ) and then clean-install Gentoo.
But in order to successfully install Gentoo on the drive Secure Boot has to be switched off and to do that you need
to save db and keys on a usb stick, delete them in the Bios and then Secure Boot is disabled.

What a nuisance all this is mainly. Next weekend, if nothing more important crops up, I try again.
Until then I hope my anger will have subsided by then.

Why does Gentoo not migrate to systemd btw? it´s faster and just as configurable if not more...
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 24, 2015 3:29 pm    Post subject: Reply with quote

Is it possible that I cannot install with Secure Boot enabled?
I tried again this weekend. I made sure to follow the wiki resources precisely.
My impression is that I cannot write. A simple example: hostname. I wrote the
conf file. When typing "hostname" on the console I got "sysrescecd".
Either that or chrooting failed for some reason.
Also I couldn´t make the kernel: no make rule, error 127... never had such a ridiculous error.

So... may be I have become too old and dumb to install Gentoo.
I am certain that my partition table and the GPT partitions are fine.
Just... installing Gentoo? Impossible

:roll:
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Sat Oct 24, 2015 3:33 pm    Post subject: Reply with quote

transsib wrote:
I decided to give it another try. And do the partitioning that you suggested.
About swap... up to now I just knew you should have more swap than RAM. I have 16 GB RAM.

Trouble is I am so used to the mbr partitioning that it´s quite uncomfy to getting into efi.

Coming weekend let´s me have some time to try again.


SErious SWap on 16GB of RAM?

i had 3-4gB boxes with old penryn cpus without swap for years.
googel chrome crashes but anything else no issue. chrome has a memory hole for years.

Now i have 16GB of RAM. I even build hole portage stuff in ram, no issues at all.

I do not know what you do with your box, but I highly doubt you serious need any swap as desctop user when you have 16GB of RAM.

Code:
none          /var/tmp/portage tmpfs   size=7G,noatime,nofail   0 0


I really consider even setting that to 9-10GB, because it seems it is only allocated when it is really needed.
When not many ebuilds are failing, means /var/tmp/portage gets full, libreoffice will not complain.
7gb is only needed for emerge libreoffice

--

Quote:
Is it possible that I cannot install with Secure Boot enabled?


I have an uefi box since a week or two. That secure boot stuff or what it is called is pure stupid settings. it will not allowed to boot anything else as Windi 10 operating system. or you generate any keys yourself. stupid feature, disable it.
careful, windi 10, sets regardless of the user, the uefi settings here on the uefi bios of ASUSg75VW.

when i wanted to boot sysrescue-cd, big text wall, unsecure bla bla,.... stupid secure boot, no feature at all.


microsoft just has everywhere its fingers and it is their approach to solve those boot virus stuff (lol lol) after 20-30 years with that isse un those windi 95 upwards operating systems.

you may also check google for wmi. => Windows Management Instrumentation ... (basically some add ons for bios, so mirnocrap can get the license keys out of the bios, and some other written data from the manufacturer, like mac-address, serial number and so on) so they can clearly say if their windi 10 license is stolen or not. thats the background, to raise profit, and to get rid of those evil pirate copies ...
some bios even install junkware from the bios, even when you do clean install ... (lenovo / samsung ... (and others which are not known yet)



Just sharing a bit too much my opinion, what i had to read about that stuff, ... I am well aware of that, ty

---

Disable secure boot

boot up sysrescue-cd

do a clean install,

use gpt partition table, as uefi needs it.

you may use something else as grub2 with gpt, as the documentation was a month ago, as i did my installtion, very very poor. there are other bootloaders, way to boot gentoo on uefi which should work more easy according to others here.

gentoo handbook + arch linux wiki + gentoo wiki are the basic needed sources

---

there are 100 pages of systemd pro and cons, and a lot of accusing, blaming, offensive words.

i see it as your opinion that systemd is faster or whatever...

you have the choice here.

basic way was in the past, you install basic box with openrc and switch over.

you may do a chainloading of wini 10 operating system (but i do not use windi 10 yet)

next xmas i will try a new approach in installing windi 10. So i can argue with those fanboys on how awesome / not awesome it is, twinker.

you know a bit more about htose windi 10, saving and rstoringing those uefi keys which it seems to need ... (i will try that around xmas, when it is cold and i am very bored)


Last edited by Roman_Gruber on Sat Oct 24, 2015 3:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 24, 2015 3:44 pm    Post subject: Reply with quote

Disabling Secure Boot of an Asus UEFI BIOS is not that easy.
It is always enabled. If you wanna disable it you gotta jump through a few loops, like,
securing all Secure Boot keys and db etc onto a usb stick and then delete one value
and one value only ( gotta look up which ).
But noone can tell me what´ll happen then.

I have repartitioned the drive after my last attempt. I still have swap, but that´s
not the problem. Also if I see that the system never uses swap I can always get rid of it
and resize rootfs partition.

How did you get efi install Gentoo done!?

:cry:

Ahh... and to continue my rant.... I don´t like Sysrescue, it uses zsh and I don´t trust it;
it writes stuff I don´t wnat: into package.mask, package.use and the make.conf it delivers
is an abomination....

I am so sad and sorry... there´re no words for it. My last Gentoo fresh install is 6 years ago. So either
I have become too inflexible to successfully do it or ... whatever....
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Sat Oct 24, 2015 4:01 pm    Post subject: Reply with quote

Quote:
How did you get efi install Gentoo done!?


Short story, sorry but I want to tell the full story.

i bought an used asus g75vw laptop with windi 10.

installed windi 10 with the microsoft isos, used it for a few days becuase i was curious and i wanted to see how the hardware was running. also to read out hardware specs, if it is okay and such (hardly any decent hardware readout tools for linux)

i made a mistake, because it seems i was tired and flushed the gpt partition table, so windi 10 was gone (yes i admit it, mistake by the user)

I took the gentoo handbook, arch wiki and gentoo wiki as reference.

i created the partition tables from the handbook + an empty partitoin, ~128MB, for future use.

MY basic installation medium was from portage, the sysrescue cd.

Created the lvm containers, created the luks containers inside, and made the root fs as ext4.
Than i cloned my exisinting gentoo installation from my asusg70sg notebo0k, penryn cpu, old mbir.
basically cp -axr old harddisc new harddisc
installed grub2 from gentoo.
took me over a week to get that grub2 working with lvm / luks / gentoo becuase of no documentation

*) disable secure boot
*) define first where your boot is and than your boot files (stuipd grub2 and uefi needs that now)
*) define rootfilesystem, root volume, kernel file where it is, initramfs where it is, tell the knerel all the parameters and built everything in teh kernel, including hardware controlers, file system support, encryption, lvm
*) play one hole week around with the grub.cfg and read wiki wiki wiki, topics without an answer and so on, until it works.
*) I got my box working because I "disassembled" genkernel initramfs and because I knew how the boot process works. With the knowledge on the lvm / luks commands I was able to clearly understand how the mess of that initramfs works and than in a very short time period, less than an hour my box booted. What i learnt form that is, that when next time my box will not boot, i will instantly start "reading" genkernel initramfs.

Basically it is the same as when you mount your root, the initramfs does the same. Just very complicatd set up, and I had to look up all the parameters of those commands of the initramfs. Reading a lot of man-pages regarding htis.

Encryption has the advantage, when the harddrive dies, no one may access the data. when only the electronics are dead, someone could swap the pcb and read out all data. lack of privacy. the only concern here, and the main motivation to run luks. you can dump the drive instantly, no shredding of the drive.

I am sorry if these informations are just a time waste for you, that was my porting of my gentoo installation. this installation is now 7 years old, just switched hardware.

And i am not that happy or convinced about ASUS uefi bios of ASUSg75vw

Suggestions:

I think refind bootloader may be the better approach. honestly i did not used it because I am sturdy and I try as long and keep going until it works. I have a lot of patience. I think maybe too much like a robot. Too logical. I think maybe refind is a faster approach, or htose other uefi bootloader options.

http://www.rodsbooks.com/refind/linux.html
https://wiki.gentoo.org/wiki/UEFI_Dual_boot_with_Windows_7/8
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Sat Oct 24, 2015 4:10 pm    Post subject: Reply with quote

You may read the other post also as i was editing it before.

when you have an exisiting installation, you should transplant it, like i did.

requirements:

The old box and the new box should have the same type of cpu.

old box: intel penryn
new box: intel ivybridge

intel cpus are down compatible, so the gnetoo installation of penryn works on ivybridge too.

and i am using on both only nvidia gpus.

no idea when you upgrade to a newer amd cpu for example ...

maybe i am already also an nvidia and intel fanboy, lol

--

generate drive structures (boot will be made later with the bootable sysrescuecd)

Please read manpage of cp
cp -axr oldhdd newdd
is all the trick.

chroot and you are done

configure grub with the transplanted gentoo

--

you may change the shell to bash with typing bash in the sysrescue cd zsh.

for the bootable medium you can use anyhting which, has teh required commands and if it is the same flavour of linux. 64bit => 64bit; 32bit => 32bit.

I hardly used windows at home. I can only tell you how you may get your gentoo running and configured. but for the windi 10 stuff, i lack the knowledge yet.

I believe, grub => chainloading windi 10 should be still somehow possible

---

configureable tasks when you transplant your gentoo

configuring boot (you need to do that anyway, with a fresh intall also)
configuring kernel (may be faster to use a genkernel and adapt the config later, my way)

I think stage 3 vs transplanting is basically nearly the same. as I later rebuild the hole world set with march-native and very safe cflags / ldflags.

Advantage: Your hole user data / config files are transplanted. No time waste on /etc /x-server /home directory ... and so on.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Sat Oct 24, 2015 4:51 pm    Post subject: Reply with quote

My story is easy: I built the new box last year same month and migrated my old drives.
For Gentoo all I had to do was configure a new kernel to adapt to the new hardware.

This month I bought a new drive because I am running out of free space on my old drive.
My idiocy was that I considered using the new UEFI BIOS that my mobo sports.
Before I started the fresh install from scratch I tried to simply clone the old drive onto
the new drive using mbr partition table which failed.

Next step is to save Secure Boot values on a usb stick and sleep on it.

About Win 10... I don´t have it yet and I am not even certain whether I can actually agree
to that EULA at all. I couldn´t upgrade because my DATA partition was too small. Had to perform a fresh install
of Win 7, mbr partition table.

Nevermind... gotta disable Secure Boot first.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Mon Oct 26, 2015 7:36 am    Post subject: Reply with quote

It seems I still do not understand in-depth EFI and EFI booting or GPT.

Gentoo Handbook recommends partitioning like I tried:
Code:
 1       1.00MiB    3.00MiB  2.00MiB               grub   bios_grub



It should remain unformatted, yet it still got formatted fat16 without my doing.

What´s that needed for?
I installed Ubuntu on the disk because I needed to know that it´s working.
I am not satisfied as it uses nouveau driver on my 960 GTX resulting in a
abysmal unchangable resolution but installing linux on GPT partitioned disk with
UEFI Other OS in BIOS works. Btw Ubuntu complained about Secure Boot
being disabled.
But for Gentoo Secure Boot obviously is poison.

Back to my question:
why can´t I just do it like so:

/dev/sda1 fat32 boot,esp
/dev/sda2 ext 2 oder ext 3 boot
/dev/sda3 ext 4 rootfs
No swap this time.

Short comment on the patience/stamina thingy: My time´s limited as I´ve got a
very time-consuming job plus a household/family which results in limitations.
But I try hard; I´ve already waisted two nights on this :)
Like I said... may be I am just too dumb.

So... Ubuntu partitioned like so:
Code:
parted /dev/sdc
GNU Parted 3.2
/dev/sdc wird verwendet
Willkommen zu GNU Parted! Rufen Sie »help« auf, um eine Liste der verfügbaren Befehle zu erhalten.
(parted) p                                                               
Modell: ATA ST1000DM003-1ER1 (scsi)
Festplatte  /dev/sdc:  1000GB
Sektorgröße (logisch/physisch): 512B/4096B
Partitionstabelle: gpt
Disk-Flags:

Nummer  Anfang  Ende    Größe  Dateisystem  Name                  Flags
 1      1049kB  538MB   537MB  fat32        EFI System Partition  boot, esp
 2      538MB   794MB   256MB  ext2
 3      794MB   1000GB  999GB


where 3 is crypt-luks which I will ditch again. But that´s beside the point.

Having witnessed a Linux system being installed on that disk using GPT and EFI I will remove that installation again
and give Gentoo another try with Secure Boot disabled.

Why that part 1 unformatted boot_grub on when other distros don´t create it?
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Thu Oct 29, 2015 6:41 pm    Post subject: Reply with quote

I now have an entry in the boot menu in bios:
gentoo (P1:ST1000DM003-1ER162)
No efi
No boot :evil:
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Thu Oct 29, 2015 8:03 pm    Post subject: Reply with quote

Ohne diese zwei Partitionen wirds nicht gehen

/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 268287 262144 128M EFI System

Ich denke dir fehlt diese 2Megabyte partition, die braucht einfach grub2 ...
Das layout habe ich vom gentoo handbuch uebernommen.

uefi ja:
secureboot ausschalten im bios (oder wie es halt dein bios halt benennt).

es ist schon mal positiv das dueinen eintrag mit deiner festplatte siehst !

wahrscheinlcih darfst du das ganze grub2 nochmal machen, weil dir diese 2mb parittion gefehlt hat., beides ist von noeten fuers booten!.

--

short summary: I think you miss that 2 mb partition.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Thu Oct 29, 2015 8:25 pm    Post subject: Reply with quote

Ja hast du recht< ich habe folgendes>
Code:
efibootmgr --create --disk /dev/sda --part 2 --label "Gentoo" --loader "\efi\boot\bootx64.efi"
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0003,0000,0001,0002
Boot0000* gentoo
Boot0001* UEFI: (FAT) TSSTcorp CDDVDW SH-224FB
Boot0002* UEFI: TSSTcorp CDDVDW SH-224FB
Boot0003* Gentoo



Code:
fdisk /dev/sda

Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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: C6EE6EEA-1EEA-428F-957E-14558C7269CB

Device      Start        End    Sectors   Size Type
/dev/sda1    2048       6143       4096     2M BIOS boot
/dev/sda2    6144     255999     249856   122M EFI System
/dev/sda3  256000 1953523711 1953267712 931.4G Linux filesystem


Deutsch in englischem fred? :lol:

no boot :cry:

CONFIG_EFIVAR_FS as module in kernel_
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Fri Oct 30, 2015 12:46 pm    Post subject: Reply with quote

I know... I am a nuisance. Everyone else here has gotten that working already...

Secure Boot is disabled, or I wouldn=t have been able to install Gentoo.
Like I posted above... I do have entries for Gentoo and I can choose it from F8 Boot.
But instead of loading it throws me right back onto the UEFI BIOS screen.

I chrooted back onto my freshly hatched Gentoo but this time I did this before entering chroot>
Code:
sudo modprobe efivarfs
sudo mount -t efivarfs efivarfs /sys/firmware/efi/efivars

In chroot I see I have efivars
Code:
efivar -l
605dab50-e046-4300-abb6-3dd810dd8b23-MokListRT
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-MeEndOfPostFlag
7b77fb8b-1e0d-4d7e-953f-3980a261e077-AfterReadyToBoot
1b838190-4625-4ead-abc9-cd5e6af18fe0-HiiDB
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootCurrent
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-InBiosSetupFlag
8be4df61-93ca-11d2-aa0d-00e098032b8c-LangCodes
8be4df61-93ca-11d2-aa0d-00e098032b8c-PlatformLangCodes
8be4df61-93ca-11d2-aa0d-00e098032b8c-ErrOutDev
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOptionSupport
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConInDev
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0510_0_VV
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0501_0_VV
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0400_0_VV
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOutDev
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupACPIRAM
c811fa38-42c8-4579-a9bb-60e94eddfb34-USB_POINT
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-UsbMassDevValid
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-UsbMassDevNum
8be4df61-93ca-11d2-aa0d-00e098032b8c-PKDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c-KEKDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c-dbDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c-dbxDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndicationsSupported
4bafc2b4-02dc-4104-b236-d6f1b98d9e84-S3SS
8be4df61-93ca-11d2-aa0d-00e098032b8c-SetupMode
8be4df61-93ca-11d2-aa0d-00e098032b8c-SecureBoot
8be4df61-93ca-11d2-aa0d-00e098032b8c-SignatureSupport
01368881-c4ad-4b1d-b631-d57a8ec8db6b-RSCInfoAddresss
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-BootFromUSB
3c4ead08-45ae-4315-8d15-a60eaa8caf69-DefaultLegacyDevOrder
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0005
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0004
a56074db-65fe-45f7-bd21-2d2bdd8e9652-OldLegacyDevOrder
a56074db-65fe-45f7-bd21-2d2bdd8e9652-LegacyDevOrder
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0003
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0002
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0001
8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0000
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-Setup
69a20012-b167-4e35-a999-98ee0835f02e-IsctData
8be4df61-93ca-11d2-aa0d-00e098032b8c-BiosEventLog
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
9d0da369-540b-46f8-85a0-2b5f2c301e15-EfiTime
4c19049f-4137-4dd3-9c10-8b97a83ffdfa-MemoryTypeInformation
4c19049f-4137-4dd3-9c10-8b97a83ffdfa-PreviousMemoryTypeInformation
af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e-AcpiGlobalVariable
5d6b998a-e304-4088-9087-130c917fb1ae-HiiDataSize
b540a530-6978-4da7-91cb-7207d764d262-FastBootOption
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-FirstBootFlag
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupHWMOneof
d1405d16-7afc-4695-bb12-41459d3695a2-NetworkStackVar
7b77fb8b-1e0d-4d7e-953f-3980a261e077-IccAdvancedSetupDataVar
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0501_1_NV
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-UsbSupport
93c483a1-d3fa-4e92-b437-733b2a346e23-VARSTORE_OCMR_TIMING_SETTINGS_NAME
c811fa38-42c8-4579-a9bb-60e94eddfb34-AMITSESetup
8be4df61-93ca-11d2-aa0d-00e098032b8c-Timeout
8be4df61-93ca-11d2-aa0d-00e098032b8c-PlatformLang
f8dbe9b1-e2ee-42d6-820f-a54b06ebf9d1-IccRollingFlag
2485da8e-ded2-42cb-acb0-3ce666c55f0c-SetupEntry
15a9dd61-e4f8-4a99-80db-353b13d76490-NVRAM_Verify
45cf35f6-0d6e-4d04-856a-0370a5b16f53-DefaultBootOrder
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-IccLockDefault
8be4df61-93ca-11d2-aa0d-00e098032b8c-Lang
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupHWMCPUFanLowerLimit
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupHWMFeatures
8be4df61-93ca-11d2-aa0d-00e098032b8c-ErrOut
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConIn
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0510_0_NV
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0501_0_NV
560bf58a-1e0d-4d7e-953f-2980a261e031-PNP0400_0_NV
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-PreVgaInfo
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupAPMFeatures
58cd8089-e2d9-4b84-88b8-3da497dba390-MemoryFreq
4b3082a3-80c6-4d7e-9cd0-583917265df1-WriteOnceStatus
8be4df61-93ca-11d2-aa0d-00e098032b8c-KEK
d719b2cb-3d3a-4596-a3bc-dad00e67656f-db
d719b2cb-3d3a-4596-a3bc-dad00e67656f-dbx
8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications
c05fba7d-7a92-49e0-bcee-233b14dca803-VARSTORE_OCMR_SETTINGS_NAME
4d9dd1b4-8829-4338-b4c2-432ad21ea731-DIMMChecksum
1456cc6e-22ac-5289-33ba-2e13bbdabaee-CPUS3APICID
f61b2305-aac3-4c9d-8f25-3a4313f9cc0e-EPUflag
f3ed95df-828e-41c7-bca0-16c41965a634-TcgInternalSyncFlag
8be4df61-93ca-11d2-aa0d-00e098032b8c-CurVID.
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupDetectMode
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-FanCalibrateFlag
01368881-c4ad-4b1d-b631-d57a8ec8db6b-FPDT_Variable
ec87d643-eba4-4bb5-a1e5-3f3e36b20da9-SetupHWMCPUFanFullSpeed
c89dc9c7-5105-472c-a743-b1621e142b41-CMOSfailflag
380d7a5e-1bca-11e1-a110-e8598732f156-TbtHRStatusVar
dde1bc72-d45e-4209-ab85-14462d2f5074-HobRomImage
01368881-c4ad-4b1d-b631-d57a8ec8db6b-MonotonicCounter
8be4df61-93ca-11d2-aa0d-00e098032b8c-FTMActiveFlag
4599d26f-1a11-49b8-b91f-858745cff824-StdDefaults



And checking whether I have efi I get this
Code:
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
UEFI
[/code]
Code:
dmesg | grep "EFI v"
[    0.000000] efi: EFI v2.31 by American Megatrends


/dev/sda2 is mounted and shows
Code:
cd /boot/efi/
(chroot) kubuntu-2 efi # ls
boot  bootx64.efi  EFI


But where is my kernel? It is in /boot.
Code:
boot # ls
config-4.0.9-gentoo  efi  grub  System.map-4.0.9-gentoo  vmlinuz-4.0.9-gentoo


What makes that kernel boot at all?

I am close. I am so close but right now I need your help please.
My hubby keeps telling me that I will never get it to work. Please help me prove him wrong.
Back to top
View user's profile Send private message
transsib
l33t
l33t


Joined: 26 Jul 2003
Posts: 860

PostPosted: Fri Oct 30, 2015 5:04 pm    Post subject: Reply with quote

:cry:
ok
giving up
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


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

PostPosted: Fri Oct 30, 2015 9:41 pm    Post subject: Reply with quote

please share sgdisk output. fdisk is not the right choice for uefi

Quote:
But where is my kernel? It is in /boot.
Code:
boot # ls
config-4.0.9-gentoo efi grub System.map-4.0.9-gentoo vmlinuz-4.0.9-gentoo


when you want to see directories and more details you better use

ls -al /boot

or

ls --full-time /boot

Anyway.

I assume vmlinuz-4.0.9-gentoo is your kernel-image.
I assume config-4.0.9-gentoo is your kernel.config, a text file with the options which were used to build your kernel.

When you use grub2. your configuration is in /boot/grub/grub.cfg

--

https://wiki.gentoo.org/wiki/Efibootmgr

Quote:
The sys-boot/efibootmgr application is not a boot loader. It is a tool that interacts with the EFI firmware of the system, which itself is acting as a boot loader. With the efibootmgr application, boot entries can be created, reshuffled and updated.


It seems you started to use this "pseudo" bootmanger thingy.

The only advise is, to play around until it works and to read documentations. Arch linux / gentoo wiki is always a good starting point. Stay away from ubuntu based sites, as they are always not worth the time in my expierence.

--

my thoughts.

when you ahve cloned my setup, or have a similar setup, including that small 2mb parittion which you seem not have had before.
you have to do all steps again. install grub / install the bootloader again. as you changed a bit of your partition layout.

The tricky part is ahead, as you need to undesrtand the partition naming, grub2 and such so you can start than adapting grub2 / kernel / initramfs so the box boots. That has taken most of my time usually when i set up gentoo, reading different sources on the web and than just try and error.

I personally stick to grub2. others claims that some other bootlaoders are more easy to use. Spending 2 weeks average on a new box is nothing uncommon for myself. Changed hardware / kernel settings / bootloader ... Uefi just complicates things ...

When you changed your partition layout, you need to redo "any" bootloader setup, for any bootloader, because you changed the disc. Hidden flaw ...
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:38 am    Post subject: Reply with quote

I had part 1 before I tried to boot the system for the first time. All it found was
the name of the OS to boot from but nothing else.

I partitioned with parted and the system itself is nice.
But there´s no way to boot it with EFI BIOS enabled.

How´s that supposed to work anyway? There´s this ominous part 1 for example.
What´s it´s function? Is it some sort of container for the BIOS to enumerate disks to boot from?
But how does it find the kernel then? It looks for something on part 2.
But if it throws you right back to the BIOS it obviously doesn´t find anything.
Looks like I do have a kernel and a grub.cfg. Obviously the system doesn´t
know where to find what it needs to boot the system or cannot access the partition where
the kernel is and all the rest (/dev/sda2)

I might have made a mistake mounting part 2 by omitting the command -t vfat while
mounting it. Could that be the problem? Could that have corruptd the fs on it plus the data it holdsso that the kernel cannot be found or the BIOS cannot access part 2 anymore?

Could I reformat /dev/sda2 and start over with bootloader install? Do I need to delete entries that are already there before that?
Can I do that without destroying all the work I´ve put into it?

How do I get EFI pure installation media. May be that was the reason, may be if the install media isn´t EFI
then the system doesn´t install in EFI. You cannot do an EFI pure installation media on a legacy bios system.

For the time being I´ve unplugged the new drive, gone back to legacy BIOS and plug in my old drives
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:09 pm    Post subject: Reply with quote

Sysrescucd cannot boot up my new Gentoo. Boot stalls at Loading Kernel modules (?)

ls -al /boot gives two directories, efi and grub

In this Gentoo Grub2 Wiki https://wiki.gentoo.org/wiki/GRUB2
the small non-formatted partition that we both have does is not mentioned.

sgdisk not known
parted says
1 1049kB 3146kB grub bios_grub
2 3146kB 131MB fat32 boot boot,esp
3 131MB 1000GB ext4 rootfs

paritiion 1 is EF02
partition 2 has EF00

In /boot/efi/EFI/gentoo/ all I have is names grubx64.efi


Last edited by transsib on Sat Oct 31, 2015 4:05 pm; edited 1 time in total
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 1, 2  Next
Page 1 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