Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
missing boot after new kernel
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 1:43 pm    Post subject: missing boot after new kernel Reply with quote

I believe my mistake was to compile a kernel as root, I have since read the guide in faq and know to compile the kernel as user....now. :oops:

What I really needed was info on what to do, after a world gives you a new kernel. Seems their would be a few simple commands to configure it, add it to grub and boot it. my google-fu failed, so I compiled a new one. If anyone could share a link, would be appreciated.

# df -H /boot
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 52G 5.9G 44G 13% /

# fdisk -l

Disk /dev/sda: 119.7 GB, 119775648256 bytes
255 heads, 63 sectors/track, 14561 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0b0b0b0b

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6387 51199155 83 Linux
/dev/sda3 6388 6642 2048287+ 82 Linux swap / Solaris
/dev/sda4 6643 14561 63609367+ 83 Linux

In " / " I have the boot dir but it is empty, also,surprising enough still boots fine in original kernel with no errors.

I am not sure of the correct way to fix this, was thinking of a chroot and using fdisk to redo the boot partition, re-install grub etc...
Anyone got a better idea?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Oct 25, 2009 1:49 pm    Post subject: Reply with quote

Quote:
Anyone got a better idea?

Yes, look at your fstab and see if your /boot gets mounted automatically or you have to mount it by hand. Hint: Is your /boot really 52 GB? :P
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 2:01 pm    Post subject: Reply with quote

sda2 is / I have looked at boot several times and all was fine, lost and found kernel images grub
never went mia untill after the update or I compiled the new kernel, I assume it was me.





<fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda2 / 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

https://forums.gentoo.org/viewtopic-t-539024.html

from this link in faq


Important Warning: The kernel developers advise against uncompressing the kernel source code, configuring or building the kernel as root. It should be done as an ordinary user. Only the one or two commands needed to install the kernel and the modules should be run as root. There have been bugs in the build process in the past which have caused files in /dev to be deleted when run as root and uncompressing the kernel archive as root can lead to some files getting the wrong permissions. gkh-lkn: "None of the primary kernel developers build kernels as root"
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 2:12 pm    Post subject: Reply with quote

what does "mount" return
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 2:23 pm    Post subject: Reply with quote

frgginmiricale genfool # mount
/dev/sda2 on / type ext3 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
frgginmiricale genfool #
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 2:26 pm    Post subject: Reply with quote

/boot is not mounted


Edit to add:
what does
Code:
mount /boot
do


and from the opening post
Quote:
I believe my mistake was to compile a kernel as root,

you have to compile the kernel as root
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 2:34 pm    Post subject: Reply with quote

frgginmiricale genfool # mount /boot
mount: unknown filesystem type 'ext2'

tried the mount command again and is the same.

Quote:

Important Warning: The kernel developers advise against uncompressing the kernel source code, configuring or building the kernel as root. It should be done as an ordinary user. Only the one or two commands needed to install the kernel and the modules should be run as root. There have been bugs in the build process in the past which have caused files in /dev to be deleted when run as root and uncompressing the kernel archive as root can lead to some files getting the wrong permissions. gkh-lkn: "None of the primary kernel developers build kernels as root"


Just going by this, I thought it odd as when installing the system, everything is done in a chroot.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 2:39 pm    Post subject: Reply with quote

what does this return
Code:
grep EXT2 /usr/src/linux/.config

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 2:41 pm    Post subject: Reply with quote

frgginmiricale genfool # grep EXT2 /usr/src/linux/.config
# CONFIG_EXT2_FS is not set


hmmm, did I forget something?
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Sun Oct 25, 2009 2:43 pm    Post subject: Reply with quote

You're either going to have to boot an older kernel, or chroot in. From there, just add the ext2 option to the kernel and rebuild. From that system, you should have access to the /boot partition to move things around.

It probably makes sense to build the kernel with the right option in your normal system, and just copy it over from a livecd.
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Oct 25, 2009 2:49 pm    Post subject: Reply with quote

carpenterguy wrote:
frgginmiricale genfool # mount /boot
mount: unknown filesystem type 'ext2'

No need for full rebuild, enable EXT2 as module, make modules, make modules_install. You even do not need to reboot.
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 3:09 pm    Post subject: Reply with quote

certainly something is wrong here, I used the live dvd to install, like cruising in a Cadilac, very nice.

I used the cp arch/i386/boot/bzimage /boot/kernel-2.xxx command with no errors emerged grub wrote my grub.conf file

this is all gone missing from /boot I thought I read that ext2 and ext3 is already compiled into the kernel, so I did not change anything in that option

frgginmiricale genfool # uname -a
Linux frgginmiricale 2.6.30-gentoo-r7 #1 SMP Mon Oct 19 22:07:49 GMT 2009 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux

Available kernel symlink targets:
[1] linux-2.6.30-gentoo-r7
[2] linux-2.6.30-gentoo-r8 *

I really would like to boot the new kernel from update and found missing grub empty boot.

I will make ext2 as a module and try that

CG, shakes head and wonders if he imagined editing grub.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Oct 25, 2009 3:25 pm    Post subject: Reply with quote

Quote:
I will make ext2 as a module and try that


You need to use sources for your running kernel indeed, uname -r.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 3:26 pm    Post subject: Reply with quote

You might very well have modified the /boot/grub/grub.conf file,
but you did it on the /boot partition.

If you can't mount that partition, then you can't access it.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21619

PostPosted: Sun Oct 25, 2009 3:53 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Quote:
I believe my mistake was to compile a kernel as root,

you have to compile the kernel as root

No. You need root access to install the kernel, but you can, and should, build it as non-root, as the quote from GregKH mentions above.
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 4:07 pm    Post subject: Reply with quote

# uname -r
2.6.30-gentoo-r7

one more twist to the tale, after the update, --depclean wanted to remove 1 package gentoo-sources for r7
since r8 was pulled in, I let it my bad. I do not have those sources
and have issues with booting the r8 kernel because of ext2 issues

cool thing with linux, if you do not get it right the first time....you will get to do it again :)

my first thought is to chroot in and add the ext2 module to r8 would that work?
my second thought is to compile a new kernel

since this is a new install and have learned much from it, sure I could do better next time
3rd option is to reinstall I hate to be a quitter though, a fresh clean install does not take that long

obvious I am a noob, but am trying to think of the best way to deal with this, I do not have sources for running kernel, have sources for a kernel I cant boot, is a fresh install with nothing but some time on it and has taught me a bunch.
seems I dug a deep hole.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Oct 25, 2009 4:12 pm    Post subject: Reply with quote

You can emerge those sources back if you want to.

emerge -av =gentoo-sources-2.6.30-r7

Quote:
cool thing with linux, if you do not get it right the first time....you can fix it :!:


You .config file for this version is probably still there.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 4:23 pm    Post subject: Reply with quote

Hu wrote:
Anon-E-moose wrote:
Quote:
I believe my mistake was to compile a kernel as root,

you have to compile the kernel as root

No. You need root access to install the kernel, but you can, and should, build it as non-root, as the quote from GregKH mentions above.


then you need to make sure that the permissions on all files, and the kernel directory structure is set up for normal users.

On my system, it was setup as root from the very beginning and root does all the emerging of packages, and creating of directories,
with root style permissions. I've been compiling linux kernels since the 0.* days as root and have never had any problems with
permissions or build bugs or files being deleted from /dev.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 4:41 pm    Post subject: Reply with quote

thanks jaglover
sure would be nice to mark this as solved
I set the kernel to r7, rebooted, and am running r7. emerged the sources, and am now in menuconfig

File systems --->
< > Second extended fs support │ │
│ │ <*> Ext3 journalling file system support │ │
│ │ [ ] Default to 'data=ordered' in ext3 (legacy option) │ │
│ │ [*] Ext3 extended attributes │ │
│ │ [*] Ext3 POSIX Access Control Lists │ │
│ │ [*] Ext3 Security Labels │ │
│ │ < > The Extended 4 (ext4) filesystem │ │
│ │ [ ] JBD (ext3) debugging support │ │
│ │ < > Reiserfs support │ │
│ │ < > JFS filesystem support │ │
│ │ < > XFS filesystem support │ │
│ │ < > OCFS2 file system support │ │
│ │ < > Btrfs filesystem (EXPERIMENTAL) Unstable disk format │ │
│ │ [*] Dnotify support │ │
│ │ [*] Inotify file change notification support │ │
│ │ [*] Inotify support for userspace │ │
│ │ [*] Quota support │ │
│ │ [*] Report quota messages through netlink interface │ │
│ │ [ ] Print quota warnings to console (OBSOLETE) │ │
│ │ < > Old quota format support │ │
│ │ <*> Quota format v2 support │ │
│ │ < > Kernel automounter support │ │
│ │ <*> Kernel automounter version 4 support (also supports v3) │ │
│ │ < > FUSE (Filesystem in Userspace) support │ │
│ │ Caches ---> │ │
│ │ CD-ROM/DVD Filesystems ---> │ │
│ │ DOS/FAT/NT Filesystems ---> │ │
│ │ Pseudo filesystems ---> │ │
│ │ [*] Miscellaneous filesystems ---> │ │
│ │ [*] Network File Systems ---> │ │
│ │ Partition Types ---> │ │
│ │ -*- Native language support ---> │ │
│ │ < > Distributed Lock Manager (DLM) ---> │ │
│ │ │ │
│ │
everything for ext3 is checked and see nothing for ext2, am I missing something?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


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

PostPosted: Sun Oct 25, 2009 4:45 pm    Post subject: Reply with quote

< > Second extended fs support

This is the EXT2 :)
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 4:46 pm    Post subject: Reply with quote

Code:
File systems --->
< > Second extended fs support │ │



Edit to add: :lol:
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 5:12 pm    Post subject: Reply with quote

ahh, so it is. I have checked it as a module
so with all this great help everyone has offered, I want to get it right.....feeling the pressure :)

save the config and run make modules, make modules_install ?
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 5:14 pm    Post subject: Reply with quote

carpenterguy wrote:
ahh, so it is. I have checked it as a module
so with all this great help everyone has offered, I want to get it right.....feeling the pressure :)

save the config and run make modules, make modules_install ?


yep
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
carpenterguy
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2009
Posts: 132

PostPosted: Sun Oct 25, 2009 5:33 pm    Post subject: Reply with quote

hmm, I missed something. I did eselect correct kernel, rebooted and uname confirms correct kernel.
The error I receive is,
frgginmiricale linux # make modules, make modules_install
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
make: *** No rule to make target `modules,'. Stop.
frgginmiricale linux #

Since I have both r7 and r8 sources, how can I control which sources are being used when starting menuconfig?
Or is that not the problem.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Sun Oct 25, 2009 5:44 pm    Post subject: Reply with quote

when you do "eselect kernel show"

That is the currently selected kernel sources
when you "cd /usr/src/linux"
you will be in that currently selected kernel.

When you run make, make modules or make modules_install
it will be doing things with those kernel sources

---
Code:
[1] linux-2.6.30-gentoo-r7
[2] linux-2.6.30-gentoo-r8 *


these are your kernel sources, /usr/src/linux from the above points to /usr/src/linux-2.6.30-gentoo-r8
when you cd to /usr/src/linux then you are working on kernel 2.6.30-gentoo-r8
and uname -a should reflect that with 2.6.30-gentoo-r8
that makes it all consistent.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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