View previous topic :: View next topic |
Author |
Message |
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Sun May 15, 2005 6:46 pm Post subject: booting an "upgraded" kernel (or not, in this case |
|
|
A recently installed system, problems getting updates, that I managed to sort here at the GDF's (different forum though).
One of the updates was kernel version 2.6.11-gentoo-r8. Previously, I've just followed the instruction in the kernel upgrade guide.
This time, I've followed the instructions, but when I try to boot the kernel I just get this
Quote: |
>>Block device /dev/hda3 is not a valid root device...
>>The root block device is unspecified or not detected.
Please specify a device to boot, or "Shell" for a shell..
boot () ::
|
As a last ditch effort, just in case it was a grub issue, I've unmerged grub and emerged lilo and get the same result.
Could someone advise me on how I correct this please?
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54642 Location: 56N 3W
|
Posted: Sun May 15, 2005 7:29 pm Post subject: |
|
|
bigjohn,
It looks like you have left either the chipset driver or filesystem driver out of the kernel. However, you mentioned updates, have you upgraded from devfs to udev but missed coldplug and hotplug and removing devfs along the way (or some combination) ?
I could read into your error that /dev/hda3 doesn't exist.
Tell us more about the nature of the updates. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun May 15, 2005 7:30 pm Post subject: |
|
|
If your harddisk is a SATA one, your root will be /dev/sda3, instead of /dev/hda3. _________________ Cómo usar Portage correctamente |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Mon May 16, 2005 7:56 pm Post subject: |
|
|
NeddySeagoon wrote: | bigjohn,
It looks like you have left either the chipset driver or filesystem driver out of the kernel. However, you mentioned updates, have you upgraded from devfs to udev but missed coldplug and hotplug and removing devfs along the way (or some combination) ?
I could read into your error that /dev/hda3 doesn't exist.
Tell us more about the nature of the updates. |
The updates where just what "arrived" once I'd finished installing from the disc(s) (stage 3 + GRP to get the system up and running quickly). I did the usual and apart from the fact that there was a mountain of updates, one of them happened to be 2.6.11-gentoo-r8, so I just did as I've done previously and compiled it using genkernel as it says in the kernel upgrade guide. I'm stuck with that, because I haven't managed to learn enough about what I'd need to "have" if I tried to compile it manually (i.e. I don't know which to select from the absolute plethora of choices - sure, some I can guess, like I know that my network card is one with a national semiconductors chipset, and I've found the module selection for that, but most of it is an absolute mystery).
As for hot and cold plug, no they were emerged during the initial install, and the system has used udev from install (not that I know the difference between udev and devfs, other than devfs is deprecated).
The bootloader (initally grub, but now lilo) has both versions listed, with identical entries, apart from the kernel and initrd names. The -r3 will boot, the -r8 won't
Quote: |
boot=/dev/hda
prompt
timeout=50
default=2.6.11-r3
image=/boot/kernel-2.6.11-gentoo-r3
label=2.6.11-r3
read-only
root=/dev/ram0
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
initrd=/boot/initrd-2.6.11-gentoo-r3
image=/boot/kernel-2.6.11-gentoo-r8
label=2.6.11-r8
read-only
root=/dev/ram0
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
initrd=/boot/initrd-2.6.11-gentoo-r8
|
Oh and no it's just and normal non-SATA hard disc.
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54642 Location: 56N 3W
|
Posted: Mon May 16, 2005 8:18 pm Post subject: |
|
|
bigjohn,
Since you have one kernel that works and one that doesn't its an ideal time to learn to 'roll your own', if you want to invest an hour or two. After 2 or 3 goes, it will only be 10 minutes.
If you have X on that box its even easier.
cd /usr/src/linux (make sure thats your -r8 kernel)
make xconfig (a nice gui kernel config tool)
Look but don't change anything. You will be starting from the mess that genkernel leaves if you do.
You don't want to do that.
Post back if you want to go down this route. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Tue May 17, 2005 8:11 pm Post subject: |
|
|
NeddySeagoon wrote: | bigjohn,
Since you have one kernel that works and one that doesn't its an ideal time to learn to 'roll your own', if you want to invest an hour or two. After 2 or 3 goes, it will only be 10 minutes.
If you have X on that box its even easier.
cd /usr/src/linux (make sure thats your -r8 kernel)
make xconfig (a nice gui kernel config tool)
Look but don't change anything. You will be starting from the mess that genkernel leaves if you do.
You don't want to do that.
Post back if you want to go down this route. |
Well, apart from the fact that I'm working for the next 3 days, and I'm not sure how to tell whether I'm in the -r8 kernel or not (I presume that I can always just remake the symlink as I would have done for a normal kernel upgrade??? That might do the job??) so times tight, and any replys to posts would be erratic.
But having just had a look at the xconfig, now that looks rather interesting.
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
bav n00b
Joined: 21 Aug 2003 Posts: 5
|
Posted: Wed May 18, 2005 6:52 am Post subject: |
|
|
Before you try that, you might like to try adding --udev to your genkernel line. I experienced the same problem as you -
Code: | Block device /dev/hda6 is not a valid root device... |
Turns out I was using my old method of invoking genkernel:
Code: | genkernel --menuconfig --bootloader=grub all |
I used this instead:
Code: | genkernel --udev --menuconfig --bootloader=grub --clean --install all |
And normal service has resumed.... |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Wed May 18, 2005 8:04 am Post subject: |
|
|
that's exactly what I did bav.
did you suss out the new way of doing that, or do you have a link to some new instructions for getting genkernel to "get it right"?
Because I've obviously got something wrong here, and for the life of me, can't work out why, though as both bootloaders are having the same problem it's got to be a problem with either genkernel or the kernel itself (as all indications show that it's not a hardware problem).
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Wed May 18, 2005 9:19 am Post subject: Solved - In part. |
|
|
Well, by using the suggestion, I've invoked genkernel as per what bav said (the sym link for /usr/src/linux was already pointing at the 2.6.8-gentoo-r8 so I didn't need to change that), and then I've unmerged lilo and emerged grub and the nvidia driver and it's now booting into the 2.6.8-gentoo-r8
excellent.
the only odd thing, is that grub is still not very nice too look at, i.e. the grub login screen is virtually unreadable, so I'll have to check to see whats going on there i.e. how to "pass it a correct video mode".
but I'm a lot happier now than I have been for a week or so
Plus, I'd still like to understand about what NeddySeagoon said about compiling my own kernel - thats something that I SHOULD learn about for future reference.
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54642 Location: 56N 3W
|
Posted: Wed May 18, 2005 8:23 pm Post subject: |
|
|
bigjohn,
When you have X running, you can use one of the GUI tools to configure a kernel. For now, just look.
Open a xterm, cd /usr/src/linux then run ome of, make xconfig or make gconfig. Which one will (or maybe both) work for you depends on the widget sets you have installed.
Have a look at what genkernel has done for you. The advantage of the GUI is the you have the menu, the options and the help on screen at the same time.
When you want to have a go for real, get a fresh kernel tree, totally unmolested by genkernel and a large (very large) pot of coffee.
Work your way through all the options one at a time, reading the help as you go. It will take an hour or to the first time, even then it won't boot, about 30 min, the second time, because you build on what you already have, then about 10 min.
The manual config, and build is faster than letting genkerenl build everything known to Linus. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Fri May 20, 2005 7:59 am Post subject: |
|
|
Oh, Ok Neddy, a quick question though, I found some stuff about xconfig and the images didn't look anything like the ones I managed to get on screen.
So, how would I identify that I had the correct kernel version to "make"?
Also, if I'm just working my way through the kernel upgrade guide, obviously I'd be using the "manual compilation" section, so does the "make xconfig" just replace one of the parts of the instructions?
Quote: |
Code Listing 5.3: Invoking menuconfig
# cd /usr/src/linux
# make menuconfig
Select the options required for your hardware and operating environment. Refer to the Gentoo Handbook for additional guidance on this.
Next, compile your kernel and copy it over to your boot partition. Again, follow the handbook instructions here, but don't forget to mount your /boot partition first! In the initial installation, you would have already mounted this at a much earlier stage.
Code Listing 5.4: Compiling and installing the new kernel
# make && make modules_install
# mount /boot
# cp arch/i386/boot/bzImage /boot/bzImage-2.6.9-gentoo-r2
# cp System.map /boot/System.map-2.6.9-gentoo-r2
|
Because I'm presuming that "make xconfig" replaces the "make menuconfig" in section 5.3 and then I just carry on and "do" the bits in section 5.4
Which, if thats the case then I'm ready to have a go, as soon as "they" release the next version (or maybe I should emerge the dev-sources ???).
The only thing that's confusing me a little, is that in the example, they are saying use arch/i386/............. now I recently had a bit of a problem with portage, it was something to do with having completed the aforementioned upgrades/updates and if I've got a handle on it, my system is now using the i686 (pentium 4) architecture. So would I have to change the command to reflect that (I'd have already choosen pentium 4 support, instead of generic x86 when doing the "make xconfig" thing???
regards
John.
p.s. Oh and when I do this, is it better to just select options for what I'm doing with the system (and currect hardware) now? Or also select support options for what I might want to have a try at later (and possible new/different hardware)??? _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Fri May 20, 2005 7:48 pm Post subject: |
|
|
Ha Ha! I've just done my daily emerge -uD world, and what have I found, a nice shiney new kernel version (2.6.11-gentoo-r9).
Which obviously, I've emerged, so at the moment, it's just sitting there and nothing else.
Something to "get my teeth" into?
Further to the question(s) above, is it also a case, that if the option/selection in make xconfig are ones that I've never heard of, that I'm unlikely to need them ??
i.e. I suppose that I'm asking, is there anything that might be "hidden technology" that's likely to trip me up? because while I don't know a huge amount of the technicalities of the hard ware, I know roughly what it is and if it's anything particular (like my network card, which has a national semiconductor chipset and uses the 821*** support - which I happen to have already spotted when I looked at the xconfig gui the other day)???
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
bigjohn Guru
Joined: 30 Nov 2003 Posts: 317 Location: 5100N, 0019W
|
Posted: Sun May 22, 2005 4:15 pm Post subject: |
|
|
The previous post has been overtaken by events i.e. I did have a go at xconfig but the bugger wouldn't boot. I'm sure I included everything that I needed to. I also paid special attention to bootloader entries so that it should have looked at the correct kernel image/version, but I obviously screwed up somewhere as it just gave me a black screen that said that it thought it should be looking for an ext2 formatted partition, but only saw an ext3 formatted one.
So I said bollocks to it and used genkernel and did Code: | genkernel --udev --menuconfig --bootloader=grub --clean --install all | but I made sure that the stuff I'll need e.g. lp and paraport support where included so that I'll be able to get my printers going.
And yes, I'm happy to admit to cowardice! kernel compilation is, as far as I'm concerned, "white mans magic".
Even xconfig came up with a few questions that I didn't know what to do with! Oh well, never mind, I'll just have to look into this again, when the next kernel version is released!
regards
John _________________ How to read manpages
rute users handbook
Take care with "emerge -U" |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54642 Location: 56N 3W
|
Posted: Sun May 22, 2005 5:07 pm Post subject: |
|
|
bigjohn,
NeddySeagoons' Rough Guide to DIY Kernels
Have to hand (or accessable) the following :-
lspci output
lsmod output
large pot of strong coffee
clean unconfigured kernel tree
cd to the tree, and run one of the configuration tools, in decreasing order of preference
make xconfig
make gconfig
make menuconfig
make config
Work you way through the list of options, reading the help and drinking the coffee, applying the following rules of thumb:-
1. If you need an option to boot, build it into the kernel. Thats (Y) (*) or a tick depending on your make tool.
2. If you need an option after booting, make it a module. Thes (M) (M) or a dot depending on your make tool.
3. If you don't need an option, don't make it at all. Thats (N) ( ) or a blank box depending on your make tool.
4. If you don't understand the help, leave the default alone
We are building a kernel that will not need an initrd file so some examples in ach category are
1. Your root filesystem driver. If root (/) is on an ext3 fs then the kernel needs to be able to read ext3 to load any modules. Your SATA / SCSI or IDE chipset driver for the chipset controlling the drive where the root filesystem lives.
2. Things like sound, networking, usb and filesystem types you don't use often
3. ISA bus (if you don't have ISA) The old IDE disk driver, Non IDE CD-ROMS attached to sound cards etc Good use of the 'No' option can save you a lot of reading, because some Y/N dont actually do anything except show/hide other options. You can save and come back to it where you left off. there is no need to do it in one sitting.
Save your configuration, then build and install the kernel with the following seperate commands
make
make modules_install
mount /boot (only if you have a seperate /boot partition)
cp arch/i386/boot/bzImage /boot/<nice_meaningful_kernel_name>
Do not use bzImage for <nice_meaningful_kernel_name>, you will really wish you hadn't overwritten your old kernel one day. The arch/i386 is right for all 32 bit Intel compatible chips. I don't know id AMD_64 is any different.
Now fix grub.conf, so we can choose which kernel to boot, after all, there may be a configuration error in the new one. Open /boot/grub/grub.conf in the editor of your choice. Copy the block of lines for your most recent kernel (like this) to the end of the file. This example is one of mine
title=Kernel 2.6.11-gentoo-r4
root (hd0,0)
kernel (hd0,0)/2.6.11-gentoo-r4 root=/dev/md1 hdc=ide-scsi hdd=ide-scsi
Edit the bits in bold in the copy as follows:-
The title= is used in grubs menu and is for you - put anything you like here
The 2.6.11-gentoo-r4 is the name of the kernel file <nice_meaningful_kernel_name>above. Grub will give Error 15 if this is wrong.
If you have some initrd junk, its no longer needed and should be removed.
Now its time to reboot and choose your new entry in grubs menu .... _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Jan 16, 2006 8:49 pm Post subject: |
|
|
I personally always use
to install the kernel.
It copies the kernel image, the config, and your system.map to your /boot dir, all with unique names, and updates or creates symlinks to vmlinuz, System.map and config, as well as .old versions of all these, which get linked to the previous versions that were there.
If you set up your boot loader to always allow you to boot from both vmlinuz and vmlinuz.old, you never have to change your bootloader config
Yes, it does both GRUB and LILO. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
jonnevers Veteran
Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Thu May 18, 2006 2:52 pm Post subject: |
|
|
NeddySeagoon wrote: | bigjohn,
Do not use bzImage for <nice_meaningful_kernel_name>, you will really wish you hadn't overwritten your old kernel one day. The arch/i386 is right for all 32 bit Intel compatible chips. I don't know id AMD_64 is any different.
|
just adding an edit:
AMD64 64bit (and I'm sure intel's x86_64) kernels get compiled into arch/x86_64 |
|
Back to top |
|
|
herkusPT n00b
Joined: 15 Feb 2008 Posts: 26
|
Posted: Wed Dec 26, 2018 2:00 pm Post subject: |
|
|
Thanks so much for your help _________________ HerkusPT |
|
Back to top |
|
|
|
|
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
|
|