Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Search for Installation Guide
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
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3282

PostPosted: Thu Nov 28, 2019 6:35 am    Post subject: Reply with quote

Even more confusing for me. Are you really adding Dropbox to the list of your requirements? Or are you just confusing Dropbox with VirtualBox?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3691
Location: Illinois, USA

PostPosted: Thu Nov 28, 2019 4:42 pm    Post subject: Reply with quote

sumati wrote:
Another stupid question: How can copy the kernel and initramfs from that minimal iso to my new installed system, since I cannot open the iso with a filemanager?

Not stupid at all! I went through loading sysrescuecd into RAM and found there is no /boot !
However, I could run "zcat /proc/config.gz" and retrieve the config. re-direct that to a file, i.e.
Code:
zcat /proc/config.gz >/mnt/gentoo/usr/src/lmiinimal. config

Run "uname -a" to get the kernel version.
Then chroot into your install, per the manual.
Now, two ways to go:

#1 (safest)
emerge the same version of gentoo-sources as found on the minimal iso.
Run eselect kernel to be sure the symlink is set.
"cp /usr/src/minimal.config /usr/src/linix/.config"
" cd /usr/src/linux" and run make. make modules, etc.

Alternatively, run "genkernel --menuconfig=/usr/src/minimal.config

#2
emerge the latest gentoo-sources, then do the same as #1 but run "make oldconfig" first.

#2
emerge the lasted version of gentoo-sources.
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 630

PostPosted: Sat Nov 30, 2019 6:28 pm    Post subject: Reply with quote

Tony0945 wrote:
Just so that you can store kernels on FAT32 instead of ext4 or btrfs? WHY?

Because it just works and when properly configured, a modern UEFI system can boot your Gentoo install without the help of any additional bootloaders. I store all of my kernels (working and testing) on the (ESP)FAT32 and use the hardware's bootloader to select which kernel to boot. When a kernel build goes wrong, I reboot to my working kernel, fix the problem and move on. This method is about as simple as it can get on a modern system.

The only time this wouldn't be the case is when a more complex and advanced install is needed, or on older hardware that won't support UEFI booting.

Tony0945 wrote:
On the second install I had to go into the BIOS and select refind from the list of boot targets. MSI B350 Tomahawk Arctic. I did not have to do that with my Gigabyte install.

I use MSI Boards almost exclusively and only go into the UEFI system when I wish to boot something other then what I have set as the DEFAULT. If you have multiple boot targets (KERNELS) or OS's it is important to set your desired DEFAULTS This is where the use of efibootmgr is very helpful. It allows you to set the DEFAULT target, boot priority and time out options. Every time you add something new to the ESP the firmware will get updated and it is important to verify the settings with efibootmgr because the updated ESP could have changed your DEFAULTS.

Best Tango
Back to top
View user's profile Send private message
sumati
n00b
n00b


Joined: 10 Nov 2019
Posts: 46

PostPosted: Sun Dec 01, 2019 9:17 am    Post subject: Reply with quote

charles17 wrote:
Even more confusing for me. Are you really adding Dropbox to the list of your requirements? Or are you just confusing Dropbox with VirtualBox?

sorry, it should be VirtualBox
Back to top
View user's profile Send private message
sumati
n00b
n00b


Joined: 10 Nov 2019
Posts: 46

PostPosted: Sun Dec 01, 2019 9:26 am    Post subject: Reply with quote

Tony0945 wrote:
sumati wrote:
Another stupid question: How can copy the kernel and initramfs from that minimal iso to my new installed system, since I cannot open the iso with a filemanager?

Not stupid at all! I went through loading sysrescuecd into RAM and found there is no /boot !
However, I could run "zcat /proc/config.gz" and retrieve the config. re-direct that to a file, i.e.
Code:
zcat /proc/config.gz >/mnt/gentoo/usr/src/lmiinimal. config

Run "uname -a" to get the kernel version.
Then chroot into your install, per the manual.
Now, two ways to go:

#1 (safest)
emerge the same version of gentoo-sources as found on the minimal iso.
Run eselect kernel to be sure the symlink is set.
"cp /usr/src/minimal.config /usr/src/linix/.config"
" cd /usr/src/linux" and run make. make modules, etc.

Alternatively, run "genkernel --menuconfig=/usr/src/minimal.config

#2
emerge the latest gentoo-sources, then do the same as #1 but run "make oldconfig" first.

#2
emerge the lasted version of gentoo-sources.


many thanks! I will try your suggestion. Another question: What is the best configuration that makes a quick installation of the kernel? Yesterday I tried again the installation of Gentoo on another old laptop of mine, the step of running "genkernel all" takes many hours, sometimes it also hangs with a compiling, so that I had to force it to stop it by press ^C and run the command again; it was still not finished before I interrupted it in the midnight. Can I deactivate some unnecessary options, for example, in /etc/genkernel.cont, which can make a quick installation? Sorry for my ignorant question, I want to learn Gentoo from all of you.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3691
Location: Illinois, USA

PostPosted: Sun Dec 01, 2019 2:18 pm    Post subject: Reply with quote

Re genkernel, I can't help as I haven't run genkernel for many years. All my configurations are simple so I don't need an initramfs. I use this simple script to build.
Code:
#!/bin/bash

#test if running on a bare VT
if [ "$TERM" = linux ]; then
    TERM=xterm     #so make munuconfig will display correctly
fi

NPROC=$( nproc ) # run nproc to get the number of cores

cd /usr/src/linux || { echo "Did you forget 'eselect kernel set' ?" >&2 && exit 255 ; }
if [ "$1" != "" ]; then
    ( cp "$1" .config && echo "Config is $1") || exit 255;
else
    echo "Using present kernels built-in config"
    zcat /proc/config.gz >.config
fi

# At this point we should compare kernel versions and make oldconfig if the base version has updated
make oldconfig
make menuconfig
make -j"${NPROC}" || {  echo "make -j${NPROC} failed"; exit 1; }
make -j"${NPROC}" || {  echo "make -j${NPROC} failed"; exit 1; }
make -j"${NPROC}"  modules_install || { echo "make modules_install failed";  exit 2; }
make -j"${NPROC}" install && echo "Don't forget to update boot loader menu"

#virtualbox modules
echo "Building Virtualbox modules"
emerge @module-rebuild
echo "Done"


I have it as /usr/local/sbin/buildmykernel. If you don't give it a parameter, it uses the current kernel's built in config.
In this case just pass the name of the config extracted from the minimal iso.

The last clause will handle out of kernel drivers like nvidia as well as virtualbox.

I'm a novice shell coder. I'm sure experts here can improve on it.

If you need an initramfs, you will need to run dracut and I have no idea how to do that.
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 630

PostPosted: Sun Dec 01, 2019 9:36 pm    Post subject: Reply with quote

The best kernel configuration is one that boots and provides all the necessary support you require. How long it takes the kernel to build is dependent on how big it is and the hardware you compile it on.

The best option for those new to Gentoo is to emerge a stable sys-kernel/gentoo-sources kernel. Run
Code:
make menuconfig
Don't make any changes to the default settings except those that are required for your specific hardware and file system support. Use the Handbook and Wiki to help you get through this step. Once you are done exit and save the changes then build and install the kernel. The Upside is it will most likely boot. The Downside is it will take some time to compile.

However and this is important, you want to run Gentoo as a quest in Virtualbox. Virtualbox uses emulated hardware not your specific hardware. You need to make sure the kernel has the support necessary to run in Virtualbox. Check the Gentoo Wiki to ensure you have the correct Virtualbox hardware support built in. There is a decent Blog Post by Karim Elatov on this process. It's an older post and geared more for advanced users so use it as a guide only.

Compiling a kenerl in Virtualbox could take awhile depending on how you set up the VM. If you don't need a "initramfs" and many users don't it will go a little quicker.

The other option is to take Tony0945's advise with some modifications:

#1 (safest)
emerge the latest stable gentoo-sources kernel
Run eselect kernel to be sure the symlink is set.
"cp /usr/src/minimal.config /usr/src/linix/.config"
"cd /usr/src/linux" and run "make oldconfig" first. When that's complete.
Run "make menuconfig" Verify using the Wiki that the necessary settings for Virtualbox are selected.
If no changes were necessary just exit, otherwise exit and save the config.
Run "make -j?" The ? represents the number of cores you assigned to the VM

If any drivers were selected as modules, they must be installed.
To do this run "make modules_install"

Best Tango
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Dec 01, 2019 9:54 pm    Post subject: Reply with quote

sumati,

Some years ago I wrote NeddySeagoons' Rough Guide to DIY Kernels
Later pappy_mcfae wrote a whole website on the topic.

Both methods are still valid. Its been a while since pappy_mcfae posted new material to kernel-seeds but the method is sound.

New seeds appear in Pappy's preconfigs! from time to time.

A seed is a lean mean kernel starting point to which you add your hardware support.
_________________
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
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 630

PostPosted: Sun Dec 01, 2019 10:36 pm    Post subject: Reply with quote

NeddySeagoon wrote:
sumati,

Some years ago I wrote NeddySeagoons' Rough Guide to DIY Kernels
Later pappy_mcfae wrote a whole website on the topic.

Both methods are still valid. Its been a while since pappy_mcfae posted new material to kernel-seeds but the method is sound.

New seeds appear in Pappy's preconfigs! from time to time.

A seed is a lean mean kernel starting point to which you add your hardware support.
Neddy, I haven't seen your guide before. I wonder how I missed it in all my years of searching the forums. Have you ever considered updating it?

I have used Pappy's seeds in the past and they have been a great help in assisting me with making my own lean kernel configs.

Thanks for all your input. I don't think a days goes by that I don't learn something new from you.

WARNING: Never drink beer when configuring a kernel!
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3691
Location: Illinois, USA

PostPosted: Sun Dec 01, 2019 11:18 pm    Post subject: Reply with quote

Ooops, I see a superflous line in my script"
Code:
make -j"${NPROC}" || {  echo "make -j${NPROC} failed"; exit 1; }
make -j"${NPROC}" || {  echo "make -j${NPROC} failed"; exit 1; }
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Dec 01, 2019 11:41 pm    Post subject: Reply with quote

OldTango,

I did consider updating that guide or even moving it to the Wiki but pappy did such a good job on kernel-seeds that other than a top level overview its redundant.
Kernel seeds is still relevant too.

I would extend your
OldTango wrote:
WARNING: Never drink beer when configuring a kernel!

to Never drink and be root.

-- edit --

I just realised that the earlier post of mime that I linked is almost 15 years old.
_________________
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
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 630

PostPosted: Tue Dec 03, 2019 2:12 am    Post subject: Reply with quote

sumati,

After combing through the Handbook in the very first section I found the subsection Installation options for Gentoo with a link pointing to the Gentoo Wiki that should solve most of your concerns. It allows you to copy everything necessary to your working environment from the live CD, skipping a manual kernel build completely.

Best Tango
Back to top
View user's profile Send private message
sumati
n00b
n00b


Joined: 10 Nov 2019
Posts: 46

PostPosted: Tue Dec 03, 2019 5:33 pm    Post subject: Reply with quote

I have successfully installed Gentoo. Thanks to all for your kind helps and suggestions! I have learned a lot from the handbook, various wiki articles and also from your discussions in this forum.
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