Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel Modules
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
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 16, 2015 5:00 pm    Post subject: Kernel Modules Reply with quote

Hi all

now I'm at "Kernel modules" part at the handbook

my kernel version:
Code:


livecd linux # uname -r
4.0.5-gentoo


so I execute that do see all the available kernels as the handbook but I can't find nothing:
Code:

find /lib/modules/4.0.5-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | less


by the way: there is no folder named "modules" under /lib

1. why I can't see nothing? [just an empty with ~ column beside]
2. how do I know which module I need?

thanks
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 16, 2015 5:36 pm    Post subject: Reply with quote

Are you going to build your own kernel or use genkernel? With genkernel you just build and install, there will be alot of modules built you do not need and some you do need.
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 16, 2015 5:52 pm    Post subject: Reply with quote

Buffoon wrote:
Are you going to build your own kernel or use genkernel? With genkernel you just build and install, there will be alot of modules built you do not need and some you do need.


I go over the "Manual configuration" which is the "default" in the handbook, but actually I didn't chose nothing, just ran command to view all the options and verifying that what they say is selected and then exit.

and I skipped the genkernel section there... so maybe I'll use it?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 16, 2015 5:57 pm    Post subject: Reply with quote

To roll your own kernel takes some effort, at least first time. You start with a good liveCD, run lspci -k to see what drivers are loaded, also have a look at lsusb output. Then you configure the kernel using this information. When I start from scratch I start with make allnoconfig and start adding functionality I need. This method ensures I end up with leanest kernel possible. This is not a ten minute job.
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 16, 2015 6:08 pm    Post subject: Reply with quote

Buffoon wrote:
To roll your own kernel takes some effort, at least first time. You start with a good liveCD, run lspci -k to see what drivers are loaded, also have a look at lsusb output. Then you configure the kernel using this information. When I start from scratch I start with make allnoconfig and start adding functionality I need. This method ensures I end up with leanest kernel possible. This is not a ten minute job.


yeah I'm also using livecd and I'm installing that Gentoo on laptop and now I'm connected to that laptop over ssh with putty.

that's the section as you can see
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel

I already execute make && make modules_install
and make install
[that Installation took me week with all the reading because everytime I'm shutting down the laptop I need to start from the beginning]
so what should I do now?
can I execute the following commands ?
Code:

emerge --ask sys-kernel/genkernel
nano -w /etc/fstab


by the way the fstab file of my system looks like that:
Code:


/dev/BOOT               /boot           ext2            noauto,noatime  1 2
/dev/ROOT               /               ext3            noatime         0 1
/dev/SWAP               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
/dev/fd0                /mnt/floppy     auto            noauto          0 0



and then
Code:

genkernel all


or I need to do some other action before that?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 16, 2015 7:01 pm    Post subject: Reply with quote

system-a,

Code:
livecd linux # uname -r
4.0.5-gentoo
tells the version of the kernel you are currently running.

Code:
emerge gentoo-sources
or whatever kernel you have selected only unstalls the sources into /usr/src
You still need to configure, build and install it.

Genkernel will build you a kernel that will boot your system provided you have a fairly standard setup.
That allows you to delay learning to configure your own kernel.
_________________
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
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 16, 2015 8:09 pm    Post subject: Reply with quote

You do not need to start from beginning every time you shut down your laptop. Do the chroot part and continue from where you left it. Your fstab is no good, you need to replace placeholders with real devices.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 16, 2015 8:28 pm    Post subject: Reply with quote

system-a,

You will get quite good at doing the chroot steps if your own kernel does not boot.
Your progress to date is always on your HDD.

Follow the handbook but ...
do not partition the drive
do not make any filesystems
do not fetch and install the stage3
do not fetch and install the portage snapshot.

Do mount your filesystems at /mnt/gentoo
Do mount dev, proc and sys
Do swapon, if you have swap
Do the chroot steps.
_________________
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
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 16, 2015 9:39 pm    Post subject: Reply with quote

Buffoon wrote:
You do not need to start from beginning every time you shut down your laptop. Do the chroot part and continue from where you left it. Your fstab is no good, you need to replace placeholders with real devices.


these are my real devices

thanks all, almost done 8)
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 16, 2015 9:56 pm    Post subject: Reply with quote

system-a wrote:
Buffoon wrote:
You do not need to start from beginning every time you shut down your laptop. Do the chroot part and continue from where you left it. Your fstab is no good, you need to replace placeholders with real devices.


these are my real devices

thanks all, almost done 8)


ahh the system doesn't comes up did you meant to ROOT and SWAP to sda1...sda2?

and I need to mount all the devices and all

Code:

livecd ~ # chroot /mnt/gentoo /bin/bash
chroot: failed to run command '/bin/bash': No such file or directory


I think I'll start from the beginning again so I don't miss or forget anything because now I don't know from where to start
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 16, 2015 10:25 pm    Post subject: Reply with quote

system-a

mount /dev/... /mnt/gentoo
mount /dev/... /mnt/gentoo/boot
swapon /dev/...
mount proc
mount dev
mount sys
chroot

You can fix your fstab without most of that.
mount /dev/... /mnt/gentoo
nano -w /mnt/gentoo/etc/fstab
_________________
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
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Tue Nov 17, 2015 10:02 am    Post subject: Reply with quote

NeddySeagoon wrote:
system-a

mount /dev/... /mnt/gentoo
mount /dev/... /mnt/gentoo/boot
swapon /dev/...
mount proc
mount dev
mount sys
chroot

You can fix your fstab without most of that.
mount /dev/... /mnt/gentoo
nano -w /mnt/gentoo/etc/fstab


Hi

thanks very much I'm trying very hard here because I'm new with Gentoo, hope I'll have system up and running soon

I'll try and let you know the results :D
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Wed Nov 18, 2015 6:59 pm    Post subject: Reply with quote

Code:

/dev/sda2               /boot           ext2            noauto,noatime  1 2
/dev/sda4               /               ext3            noatime         0 1
/dev/sda3               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
/dev/fd0                /mnt/floppy     auto            noauto          0 0


I did exactly the partitions in the handbook
1. I mounted all the thigs you said
2. chroot
Code:

root #chroot /mnt/gentoo /bin/bash
root #source /etc/profile
root #export PS1="(chroot) $PS1"

as the handbook
3. edit fstab placeholders as the table above
4. reboot
5.removed the CD
6. still "Reboot and select proper boot device or insert boot media in selected boot device and press a key" do you have an idea what I did wrong?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Wed Nov 18, 2015 8:13 pm    Post subject: Reply with quote

Did you install a boot loader? OTOH, your BIOS may require bootable bit set on sda2.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Nov 18, 2015 8:29 pm    Post subject: Reply with quote

system-a,

Code:
Reboot and select proper boot device or insert boot media in selected boot device and press a key.

Is an error from your BIOS before it even loads your boot loader.

As Buffoon says, you need to set the bootable flag on /dev/sda2.

BIOSes come in three sorts. Those that don't check the bootable flag at all.
Those that check that the bootable flag is set on one or more partitions
Those that check its set on exactly one partition.

Boot your install media. Don't mount anything.
Run
Code:
fdisk /dev/sda

fix your bootable flag(s), save changes and reboot.

Its covered in the Gentoo Handbook under Creating the boot partition
Do not create/delete any partitions. Just do the single line relating to "toggle the bootable flag on a partition"
_________________
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
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Sun Nov 22, 2015 10:01 am    Post subject: Reply with quote

NeddySeagoon wrote:
system-a,

Code:
Reboot and select proper boot device or insert boot media in selected boot device and press a key.

Is an error from your BIOS before it even loads your boot loader.

As Buffoon says, you need to set the bootable flag on /dev/sda2.

BIOSes come in three sorts. Those that don't check the bootable flag at all.
Those that check that the bootable flag is set on one or more partitions
Those that check its set on exactly one partition.

Boot your install media. Don't mount anything.
Run
Code:
fdisk /dev/sda

fix your bootable flag(s), save changes and reboot.

Its covered in the Gentoo Handbook under Creating the boot partition
Do not create/delete any partitions. Just do the single line relating to "toggle the bootable flag on a partition"


I should used fdisk instead of parted

I'll check that, thanks :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Nov 22, 2015 11:26 am    Post subject: Reply with quote

system-a,

You can use any partition tool.

I prefer fdisk because I know how to force it to operate on the protective MSDOS partition table.
That's needed when you have a GPT partition table on a legacy BIOS based system.
_________________
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
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Sun Nov 22, 2015 11:30 pm    Post subject: Reply with quote

NeddySeagoon wrote:
system-a,

You can use any partition tool.

I prefer fdisk because I know how to force it to operate on the protective MSDOS partition table.
That's needed when you have a GPT partition table on a legacy BIOS based system.


first of all, my fdisk doesn't look the same as the handbook:
I don't know why, I don't have the 'a' option and I can't see where is the boot flag
I looks like that:
Code:


Welcome to fdisk (util-linux 2.25.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: 698.7 GiB, 750156374016 bytes, 1465149168 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: D814E081-4BA9-49E3-90C0-4BEE05BD6CF4

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    1316863    1048576  512M Linux filesystem
/dev/sda4  1316864 1465147119 1463830256  698G Linux filesystem



and these are my only options:
Code:

Command (m for help): m

Help:

  Generic
   d   delete a partition
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table

  Misc
   m   print this menu
   x   extra functionality (experts only)

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table




second thing, in parted I can see who hold the boot flag:


Code:

livecd ~ # parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA HGST HTS721075A9 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  3146kB  2097kB                  grub    bios_grub
 2      3146kB  137MB   134MB   ext2            boot    boot, esp
 3      137MB   674MB   537MB   linux-swap(v1)  swap
 4      674MB   750GB   749GB   ext4            rootfs



but even that boot flag set on 2 which is the boot partition, I still get that error message without the livecd
Code:

Reboot and select proper boot device or insert boot media in selected boot device and press a key.


I don't know what to do and how to continue [/code]
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 23, 2015 12:32 am    Post subject: Reply with quote

Did you get any errors when you installed the bootloader?
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 23, 2015 8:25 am    Post subject: Reply with quote

Buffoon wrote:
Did you get any errors when you installed the bootloader?


nothing or I missed that.. I don't know 8O

maybe I should start all over again ?

by the way, about the packages there was an option to choose Desktop or Desktop/gnome or Desktop/KDE
but the handbook example choose only desktop what does it mean ? and why not to choose gnome if I'm going to install it?


thanks
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 23, 2015 12:07 pm    Post subject: Reply with quote

Try installing bootloader again, you do not have more than one hard drive, do you?

KDE and other profiles are presets for your convenience, you can use plain profile and still install anything you like.

It is OK to install the base system using the plain [1] profile, once the base is working you can change the profile to something else.
Back to top
View user's profile Send private message
system-a
n00b
n00b


Joined: 16 Nov 2015
Posts: 19

PostPosted: Mon Nov 23, 2015 2:25 pm    Post subject: Reply with quote

Buffoon wrote:
Try installing bootloader again, you do not have more than one hard drive, do you?

KDE and other profiles are presets for your convenience, you can use plain profile and still install anything you like.

It is OK to install the base system using the plain [1] profile, once the base is working you can change the profile to something else.


only one :) sorry for the long post, I never installed Gentoo or something like Gentoo

OK I'll try this:

Code:

chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) $PS1"
emerge --ask sys-boot/grub
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg
reboot


do I missed something?
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Mon Nov 23, 2015 2:28 pm    Post subject: Reply with quote

You need to mount at least /dev and probably /proc and /sys before you chroot. You do not need to emerge grub again if you already emerged it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Nov 23, 2015 5:30 pm    Post subject: Reply with quote

system-a,

Code:
Command (m for help): p
Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 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


You have a gpt disk label. You can set the bootable flag here if you want but it won't help.
You also have a fake MSDOS disk label. This is the only disk label your BIOS can see.
It consists of a single partition and is only used as a warning to non gpt aware partition tools that gpt is in use.

Code:
fdisk -t dos /dev/sda
is the command you need to get at the MSDOS partition table.

A few brain dead systems won't like the partition type ee but that's a story for another post.
_________________
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
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