Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unmasking ~amd64 for mkinitrd?
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
Dr Croubie
Apprentice
Apprentice


Joined: 21 Nov 2006
Posts: 159

PostPosted: Mon Jan 15, 2007 1:53 am    Post subject: unmasking ~amd64 for mkinitrd? Reply with quote

Hey guys,
i've finally got my gentoo system working(ish). I was having problems with one of those VFS kernel Panics (i'd post a link to the thread, but i'm on w3m right now).
Anyway, i've got it to booting and working (using it now, whilst emerging X) by using genkernel. So i've decided that the reason my custom-kernel doesn't work is because it doesn't have an initrd.
Except that when i 'emerge mkinitrd', i get an '~amd64 is masked' error. (and i do have USE="multilib" too)

So is there an easy way to unmask it just for mkinitrd (and OpenOffice too, btw).
which setting out of CFLAGS and CHOST do i have to change, can i change it in the command line like a temporary USE, and most importantly, will my system break if i do?
cheers
doc C
Back to top
View user's profile Send private message
Jarhead
Guru
Guru


Joined: 26 Mar 2004
Posts: 474

PostPosted: Mon Jan 15, 2007 2:06 am    Post subject: Reply with quote

add
Code:

sys-apps/mkinitrd ~amd64


to /etc/portage/package.keywords.
_________________
Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Mon Jan 15, 2007 2:22 am    Post subject: Reply with quote

Custom kernel does not need initrd. Why should it?
Back to top
View user's profile Send private message
Dr Croubie
Apprentice
Apprentice


Joined: 21 Nov 2006
Posts: 159

PostPosted: Mon Jan 15, 2007 2:23 am    Post subject: Reply with quote

that worked, thanks for the quick response
(at least, emerging worked, can't reboot and test until firefox is finished emerging)
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Jan 15, 2007 2:36 am    Post subject: Reply with quote

mkinitrd is a tool that is used to make an init ram disk image. If you are not going to make one, by just emerging mkinitrd you will change nothing. When do you need an initrd image? There are many cases, but mainly when you are doing some black magic at startup. For example, when you need a driver that cannot be compiled into the kernel because of some reason, and the hardware that that kernel provides needs to be up at boot time. You case seems not to be this at all, so adding an initrd image would just make things more complex, without a real need for it. And of course, as I said, just emerging it will fix nothing.

Custom kernels usually do not boot because you are missing some critical stuff, for example: you IDE controler driver, the driver for the filesystems that you need at boot time, scsi drivers or sata ones if you are booting into a sata drive... and so on. Those must be compiled into the kernel, marked as '*' in menuconfig, and not as modules.

As said, an initrd is not usually needed. Just make sure that all the critical stuff that you need at boot time is compiled right into the kernel, and not as modules.
Back to top
View user's profile Send private message
Dr Croubie
Apprentice
Apprentice


Joined: 21 Nov 2006
Posts: 159

PostPosted: Mon Jan 15, 2007 2:57 am    Post subject: Reply with quote

6thpink wrote:
mkinitrd is a tool that is used to make an init ram disk image. If you are not going to make one, by just emerging mkinitrd you will change nothing. When do you need an initrd image? There are many cases, but mainly when you are doing some black magic at startup. For example, when you need a driver that cannot be compiled into the kernel because of some reason, and the hardware that that kernel provides needs to be up at boot time. You case seems not to be this at all, so adding an initrd image would just make things more complex, without a real need for it. And of course, as I said, just emerging it will fix nothing.

Custom kernels usually do not boot because you are missing some critical stuff, for example: you IDE controler driver, the driver for the filesystems that you need at boot time, scsi drivers or sata ones if you are booting into a sata drive... and so on. Those must be compiled into the kernel, marked as '*' in menuconfig, and not as modules.

As said, an initrd is not usually needed. Just make sure that all the critical stuff that you need at boot time is compiled right into the kernel, and not as modules.


yeah, i've tried every option i can think of as to why i can't boot, all SATA / nvidia / reiserfs / whatever are built into the kernel, not modules. For full details of my make.conf see the thread called something like 'how to fix VFS' in >Tips&Tricks.
but put simply, genkernel works, custom kernel doesn't. the last option is that the kernel doesn't like my SATA controller (nForce 570SLI) or something else, so i'm just trying an initrd to see if that fixes the problem.

and there's nothing that bad with using an initrd if it is unnecessary, is there?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Mon Jan 15, 2007 3:02 am    Post subject: Reply with quote

Nothing bad, it just adds another layer of complexity to the thing.

Regardless of the way, the important thing is to get it working. ;)
Back to top
View user's profile Send private message
Dr Croubie
Apprentice
Apprentice


Joined: 21 Nov 2006
Posts: 159

PostPosted: Wed Jan 17, 2007 1:45 am    Post subject: Reply with quote

well, i finally got around to testing the new kernel with initrd, no
good. got a kernel panic, different to last time, can't remember what
the details were (i'll try write them down next time)
so i'm still using genkernel, at least it works (although for some
reason resolv.conf removes my 'nameserver' each time i boot)

i've never done an initrd before, hope i did it properly, all i did was
'mkinitrd' and copy the .img file to /boot. also, in my grub.conf, i
just copied over the options from the genkernel (straight from the
install handbook) and changed only the kernel/initrd locations (i can
post grub.conf if anyone thinks it will help)

my last option is that i have indeed cut (or modulised) something in the
kernel i do need but aren't aware of. when i do a 'genkernel menuconfig
all', where does the .config file from that go? (i was just thinking i
could copy it to my custom kernel location, build a kernel exactly like
genkernel without the initrd and try that)

cheers
Doc C
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Jan 17, 2007 2:32 am    Post subject: Reply with quote

Dr Croubie wrote:

(i can post grub.conf if anyone thinks it will help)


Unless you are setting an incorrect path for the kernel or for the root partition, it is not a grub.conf thing. One kernel boots, and another does not, to me it is clear that it is something in your hand made kernel that has been left behind.

Quote:

my last option is that i have indeed cut (or modulised) something in the
kernel i do need but aren't aware of. when i do a 'genkernel menuconfig
all', where does the .config file from that go? (i was just thinking i
could copy it to my custom kernel location, build a kernel exactly like
genkernel without the initrd and try that)


Boot from the genkernel kernel. The config for the running kernel is into /proc/config.gz. That is, if you activated that option in the kernel. But since genkernel builds almost every single option, I assume that it has that activated as well. You can then uncompress that file, copy it to your kernel dir as ".config" and then run "make oldconfig && make menuconfig". The config will be cleaned against your kernel in case that the genkernel kernel's version is different (if not you dont need the olconfig step, but it will not harm anyway) and start menuconfig with the options that genkernel uses.

To test you can compile it with "make && make install modules_install". Before the install step make sure that /boot is mounted, otherwise your kernel will end up in the wrong place and you will continue using the previous (not bootable) kernel. When you are sure that you can compile and install that by hand, it is time to start messing around into menuconfig and change whatever you want.
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