Re: [gentoo-user] Need help interpreting kernel panic

2017-02-11 Thread Johannes Rosenberger
On 11.02.2017 20:47, Rich Freeman wrote:
> On Sat, Feb 11, 2017 at 2:12 PM, Harry Putnam  wrote:
>> Again I get a kernel panic but this time its different.  It seems to
>> mount the disks ok but then fails to find a working `init' command.
>>
>> Checking that with sysrescueCD I see /sbin/init does exist on that new vm.
>> and is executable.
>>
>> The disk setup is sda1=/boot sda2=swap sda3=/home sda4=/
>>
> My guess is that it is mounting the wrong filesystem as root.  It
> might be detecting /dev/sdb as /dev/sda.  Also, the root device might
> be named /dev/xda4 depending on the kernel/etc.  Systemrescuecd isn't
> using the same kernel/etc so it might not see the disks the same way.
>
> An initramfs with root=UUID="505f850e-b26a-4d0f-a02f-6ba573a48ad8" (or
> a label) would be a more reliable way to handle this, or you can
> probably just fiddle with the device names until you stumble on the
> right one.
>
>
Well, if you look at the kernel messages you see that the init is found
but not executable (error -8). I don't know what the error number means, but
have you set CONFIG_BINFMT_ELF and CONFIG_BINFMT_SCRIPT in your .config?
Is /bin/sh executable?




Re: [gentoo-user] Need help interpreting kernel panic

2017-02-11 Thread Rich Freeman
On Sat, Feb 11, 2017 at 2:12 PM, Harry Putnam  wrote:
>
> Again I get a kernel panic but this time its different.  It seems to
> mount the disks ok but then fails to find a working `init' command.
>
> Checking that with sysrescueCD I see /sbin/init does exist on that new vm.
> and is executable.
>
> The disk setup is sda1=/boot sda2=swap sda3=/home sda4=/
>

My guess is that it is mounting the wrong filesystem as root.  It
might be detecting /dev/sdb as /dev/sda.  Also, the root device might
be named /dev/xda4 depending on the kernel/etc.  Systemrescuecd isn't
using the same kernel/etc so it might not see the disks the same way.

An initramfs with root=UUID="505f850e-b26a-4d0f-a02f-6ba573a48ad8" (or
a label) would be a more reliable way to handle this, or you can
probably just fiddle with the device names until you stumble on the
right one.


-- 
Rich



[gentoo-user] Need help interpreting kernel panic

2017-02-11 Thread Harry Putnam
I didn't want any typos in this kernel output so took a small screen
shot.

I'm working on a new vm (vbox) install of gentoo but having trouble
getting a kernel that boots.

Architecture=amd64 (not strict)

I started out by copying a .config from a running gentoo vm and using
it to do `make oldconfig' then fumbled my way thru the questions,
followed by a `make menuconfig' to look things over.

That kernel panicked and it seems to say it could not mount an ATA
disk.

Ok, went back to make oldconfig with that copied .config and and just
yessed my way thru the questions.  I mean accepting the default on
them all.

Again I get a kernel panic but this time its different.  It seems to
mount the disks ok but then fails to find a working `init' command.

Checking that with sysrescueCD I see /sbin/init does exist on that new vm.
and is executable.

The disk setup is sda1=/boot sda2=swap sda3=/home sda4=/

 root and kernel lines from grub.conf:
 
  root   (hd0,0)
  kernel /vmlinuz root=/dev/sda4 vga=0x31b video=vesfb:mtrr:3,ywrap

(see fstab below:)


/etc/fstab:

#   


# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
#   filesystems.  This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
#   more reliable to use filesystem labels or UUIDs. See your filesystem
#   documentation for details on setting a label. To obtain the UUID, use
#   the blkid(8) command.

## /dev/sda1/boot   ext2noauto,noatime  1   
2
UUID=1e323735-c111-48de-bd04-d255a07cc2b5   /boot   ext2noauto,noatime  
1   2
## /dev/sda2noneswapsw  0   0
UUID=5af8156e-3ea7-467e-9bbd-e015dfb25493   noneswapsw  0   0
## /dev/sda3/home   ext4noatime 0   1
UUID=e2a40d27-fdcf-4413-99d5-e01a73ea68f1   /home   ext4defaults
0   1
## /dev/sda4/   ext4noatime 0   1
UUID=505f850e-b26a-4d0f-a02f-6ba573a48ad8   /   ext4defaults
0   1

##

## From blkid:

## /dev/loop0: TYPE="squashfs"
## /dev/sda1: UUID="1e323735-c111-48de-bd04-d255a07cc2b5" TYPE="ext2" 
PARTUUID="29b3e776-01"
## /dev/sda2: UUID="5af8156e-3ea7-467e-9bbd-e015dfb25493" TYPE="swap" 
PARTUUID="29b3e776-02"
## /dev/sda3: UUID="e2a40d27-fdcf-4413-99d5-e01a73ea68f1" TYPE="ext4" 
PARTUUID="29b3e776-03"
## /dev/sda4: UUID="505f850e-b26a-4d0f-a02f-6ba573a48ad8" TYPE="ext4" 
PARTUUID="29b3e776-04"
## /dev/sdb1: UUID="87d69626-8798-4d1d-8ac9-64e6f8b47f42" TYPE="ext4" 
PARTUUID="ead06e45-01"
## /dev/sr0: UUID="2017-01-26-18-16-11-00" LABEL="sysrcd-4.9.2" TYPE="iso9660"