Mailing List Archive

early boot failure, not sure how to diagnose
I got new hardware for a home desktop a few days ago.
Downloaded install-amd64-minimal-20130801.iso and am still booting
from that cd as hard drive boot fails.

I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
The disks are mounted but readonly. I guess from this the problem is
occurring before the root partition is mounted.

I only have 4 partitions: boot, swap, root, and home. Since everything
important is on the root partition, I'm not using an initramfs.

I have many times tried to catch the error by watching the screen, but it
scrolls past way to fast.

The last part of the boot messages before things go crazy is
"Switching to clocksource TSC".

I've been reading up on grub, but don't see anyway to get more info on what
is going wrong.

If I boot from the cd and chroot to the disk, everything seems to work
fine. /boot is ext2 fs and this is my grug.conf:
default 0
timeout 20
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.8.13
root (hd0,0)
kernel /boot/3.8/13-0/bzImage root=/dev/sda3
Re: early boot failure, not sure how to diagnose [ In reply to ]
Daiajo Tibdixious posted on Thu, 08 Aug 2013 18:43:24 +1000 as excerpted:

> I got new hardware for a home desktop a few days ago.
> Downloaded install-amd64-minimal-20130801.iso and am still booting from
> that cd as hard drive boot fails.
>
> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
> The disks are mounted but readonly. I guess from this the problem is
> occurring before the root partition is mounted.

[Please turn off the HTML.]

If it's mounting the partitions, it can't be before root is mounted. I
assume you meant before root is /remounted/ using the options set in
fstab...

> I only have 4 partitions: boot, swap, root, and home. Since everything
> important is on the root partition, I'm not using an initramfs.

> I have many times tried to catch the error by watching the screen, but
> it scrolls past way to fast.
> The last part of the boot messages before things go crazy is "Switching
> to clocksource TSC".
>
> I've been reading up on grub, but don't see anyway to get more info on
> what is going wrong.

If the kernel is loading, grub's activating it just fine, so the
problem's elsewhere. Further, if root is getting mounted and the display
is working, that means you have at least the drivers necessary to read
the disk and the filesystem drivers, plus those for the display,
configured correctly in your kernel.

> If I boot from the cd and chroot to the disk, everything seems to work
> fine. /boot is ext2 fs and this is my grug.conf:

> default 0
> timeout 20
> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>
> title Gentoo Linux 3.8.13
> root (hd0,0)
> kernel /boot/3.8/13-0/bzImage root=/dev/sda3

Do you get a shell prompt at all, or does it quite before that? If you
get a shell prompt, does it react to key presses or is the keyboard
unresponsive?

What happens if you add init=/bin/bash ? Does /that/ get you a shell
prompt? (That should boot directly to bash instead of to init/openrc, so
it's a good way to correct problems with them if you can get to it. Of
course you'll have to do whatever init you need manually, from there.
No /proc/ mounted for you or anything, at that stage.)

Do you get any hint that it can load userspace at all? If the
init=/bin/bash trick doesn't work, perhaps glibc is messed up, as that'd
screw both bash and the normal init. It could also be that it's mounting
the wrong partition -- if it mounted /home as /, for instance, it
obviously wouldn't be able to find bash or init to start, let alone the
libraries they load.

If you have a cellphone or can otherwise take a picture, you could upload
that to a pastebin site or something and post a link to that (or simply
attach the image if this list doesn't filter them, I'm honestly not
sure...), thus avoiding the pain of trying to manually write down the
kernel panic or whatever. That could be helpful.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
Re: Re: early boot failure, not sure how to diagnose [ In reply to ]
Sorry about the HTML, didn't realise.

If I press enter, I get a login prompt, and can login as root.
Thats how I know the partitions are mounted but are readonly.
I can't do shutdown or reboot nor write to any disk.

I originally was getting a kernel panic with the boot partition as ext4.
I reformated to ext2, reinstalled grub and recopied the kernel.
There is no panic that I can see now.

On my old system I needed an initramfs & the first few attempts left
me in a similar state: partitions mounted, but all readonly. Fixed
that by letting genkernel generate the initrd.

As far as I can tell all the right stuff is in the right place, I'll
reboot again and check that. I'm also not sure if home is mounted

On Thu, Aug 8, 2013 at 7:40 PM, Duncan <1i5t5.duncan@cox.net> wrote:
> Daiajo Tibdixious posted on Thu, 08 Aug 2013 18:43:24 +1000 as excerpted:
>
>> I got new hardware for a home desktop a few days ago.
>> Downloaded install-amd64-minimal-20130801.iso and am still booting from
>> that cd as hard drive boot fails.
>>
>> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
>> The disks are mounted but readonly. I guess from this the problem is
>> occurring before the root partition is mounted.
>
> [Please turn off the HTML.]
>
> If it's mounting the partitions, it can't be before root is mounted. I
> assume you meant before root is /remounted/ using the options set in
> fstab...
>
>> I only have 4 partitions: boot, swap, root, and home. Since everything
>> important is on the root partition, I'm not using an initramfs.
>
>> I have many times tried to catch the error by watching the screen, but
>> it scrolls past way to fast.
>> The last part of the boot messages before things go crazy is "Switching
>> to clocksource TSC".
>>
>> I've been reading up on grub, but don't see anyway to get more info on
>> what is going wrong.
>
> If the kernel is loading, grub's activating it just fine, so the
> problem's elsewhere. Further, if root is getting mounted and the display
> is working, that means you have at least the drivers necessary to read
> the disk and the filesystem drivers, plus those for the display,
> configured correctly in your kernel.
>
>> If I boot from the cd and chroot to the disk, everything seems to work
>> fine. /boot is ext2 fs and this is my grug.conf:
>
>> default 0
>> timeout 20
>> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>>
>> title Gentoo Linux 3.8.13
>> root (hd0,0)
>> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
>
> Do you get a shell prompt at all, or does it quite before that? If you
> get a shell prompt, does it react to key presses or is the keyboard
> unresponsive?
>
> What happens if you add init=/bin/bash ? Does /that/ get you a shell
> prompt? (That should boot directly to bash instead of to init/openrc, so
> it's a good way to correct problems with them if you can get to it. Of
> course you'll have to do whatever init you need manually, from there.
> No /proc/ mounted for you or anything, at that stage.)
>
> Do you get any hint that it can load userspace at all? If the
> init=/bin/bash trick doesn't work, perhaps glibc is messed up, as that'd
> screw both bash and the normal init. It could also be that it's mounting
> the wrong partition -- if it mounted /home as /, for instance, it
> obviously wouldn't be able to find bash or init to start, let alone the
> libraries they load.
>
> If you have a cellphone or can otherwise take a picture, you could upload
> that to a pastebin site or something and post a link to that (or simply
> attach the image if this list doesn't filter them, I'm honestly not
> sure...), thus avoiding the pain of trying to manually write down the
> kernel panic or whatever. That could be helpful.
>
> --
> Duncan - List replies preferred. No HTML msgs.
> "Every nonfree program has a lord, a master --
> and if you use the program, he is your master." Richard Stallman
>
>
Re: early boot failure, not sure how to diagnose [ In reply to ]
Am 08.08.2013 10:43, schrieb Daiajo Tibdixious:
> I got new hardware for a home desktop a few days ago.
> Downloaded install-amd64-minimal-20130801.iso and am still booting
> from that cd as hard drive boot fails.
>
> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
> The disks are mounted but readonly. I guess from this the problem is
> occurring before the root partition is mounted.
>
> I only have 4 partitions: boot, swap, root, and home. Since everything
> important is on the root partition, I'm not using an initramfs.
>
> I have many times tried to catch the error by watching the screen, but
> it scrolls past way to fast.
>
> The last part of the boot messages before things go crazy is
> "Switching to clocksource TSC".
>
> I've been reading up on grub, but don't see anyway to get more info on
> what is going wrong.
>
> If I boot from the cd and chroot to the disk, everything seems to work
> fine. /boot is ext2 fs and this is my grug.conf:
> default 0
> timeout 20
> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>
> title Gentoo Linux 3.8.13
> root (hd0,0)
> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
>


and what is happening?
Re: early boot failure, not sure how to diagnose [ In reply to ]
Logged in after failed boot.
/home & /boot are mounted, but nothing in them when I ls.
ls of / shows all the normal things there.

While logged in, I'm still getting boot messages, where USB devices,
eg the mouse, disconnect and reconnect.

There are a ridiculous number of sd devices in /dev. sda, sdb, sdc,
sdd all go to 15. sda is the hard drive, sdb/sdc for USB devices.
Never had sdd.

Did see some errors, notably "cannot mount /run" bad superblock or
something like that. Its hard to scroll back with USB messages
constantly appearing, half a screenful each time.

On Fri, Aug 9, 2013 at 6:40 AM, Volker Armin Hemmann
<volkerarmin@googlemail.com> wrote:
> Am 08.08.2013 10:43, schrieb Daiajo Tibdixious:
>> I got new hardware for a home desktop a few days ago.
>> Downloaded install-amd64-minimal-20130801.iso and am still booting
>> from that cd as hard drive boot fails.
>>
>> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
>> The disks are mounted but readonly. I guess from this the problem is
>> occurring before the root partition is mounted.
>>
>> I only have 4 partitions: boot, swap, root, and home. Since everything
>> important is on the root partition, I'm not using an initramfs.
>>
>> I have many times tried to catch the error by watching the screen, but
>> it scrolls past way to fast.
>>
>> The last part of the boot messages before things go crazy is
>> "Switching to clocksource TSC".
>>
>> I've been reading up on grub, but don't see anyway to get more info on
>> what is going wrong.
>>
>> If I boot from the cd and chroot to the disk, everything seems to work
>> fine. /boot is ext2 fs and this is my grug.conf:
>> default 0
>> timeout 20
>> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>>
>> title Gentoo Linux 3.8.13
>> root (hd0,0)
>> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
>>
>
>
> and what is happening?
>
Re: early boot failure, not sure how to diagnose [ In reply to ]
On Fri, 2013-08-09 at 09:07 +1000, Daiajo Tibdixious wrote:
> Logged in after failed boot.
> /home & /boot are mounted, but nothing in them when I ls.
> ls of / shows all the normal things there.
>
> While logged in, I'm still getting boot messages, where USB devices,
> eg the mouse, disconnect and reconnect.
>
> There are a ridiculous number of sd devices in /dev. sda, sdb, sdc,
> sdd all go to 15. sda is the hard drive, sdb/sdc for USB devices.
> Never had sdd.
>
> Did see some errors, notably "cannot mount /run" bad superblock or
> something like that. Its hard to scroll back with USB messages
> constantly appearing, half a screenful each time.
>
> On Fri, Aug 9, 2013 at 6:40 AM, Volker Armin Hemmann
> <volkerarmin@googlemail.com> wrote:
> > Am 08.08.2013 10:43, schrieb Daiajo Tibdixious:
> >> I got new hardware for a home desktop a few days ago.
> >> Downloaded install-amd64-minimal-20130801.iso and am still booting
> >> from that cd as hard drive boot fails.
> >>
> >> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
> >> The disks are mounted but readonly. I guess from this the problem is
> >> occurring before the root partition is mounted.
> >>
> >> I only have 4 partitions: boot, swap, root, and home. Since everything
> >> important is on the root partition, I'm not using an initramfs.
> >>
> >> I have many times tried to catch the error by watching the screen, but
> >> it scrolls past way to fast.
> >>
> >> The last part of the boot messages before things go crazy is
> >> "Switching to clocksource TSC".
> >>
> >> I've been reading up on grub, but don't see anyway to get more info on
> >> what is going wrong.
> >>
> >> If I boot from the cd and chroot to the disk, everything seems to work
> >> fine. /boot is ext2 fs and this is my grug.conf:
> >> default 0
> >> timeout 20
> >> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
> >>
> >> title Gentoo Linux 3.8.13
> >> root (hd0,0)
> >> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
> >>
> >
> >
> > and what is happening?
> >
>
does your kernel config have:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_HOTPLUG=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_NET=y
CONFIG_PROC_FS=y
CONFIG_SIGNALFD=y
CONFIG_SYSFS=y
CONFIG_SYSFS_DEPRECATED is not set
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_BLK_DEV_BSG=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
Re: early boot failure, not sure how to diagnose [ In reply to ]
On Fri, 2013-08-09 at 09:07 +1000, Daiajo Tibdixious wrote:
> Logged in after failed boot.
> /home & /boot are mounted, but nothing in them when I ls.
> ls of / shows all the normal things there.
>
> While logged in, I'm still getting boot messages, where USB devices,
> eg the mouse, disconnect and reconnect.
>
> There are a ridiculous number of sd devices in /dev. sda, sdb, sdc,
> sdd all go to 15. sda is the hard drive, sdb/sdc for USB devices.
> Never had sdd.
>
> Did see some errors, notably "cannot mount /run" bad superblock or
> something like that. Its hard to scroll back with USB messages
> constantly appearing, half a screenful each time.
>
> On Fri, Aug 9, 2013 at 6:40 AM, Volker Armin Hemmann
> <volkerarmin@googlemail.com> wrote:
> > Am 08.08.2013 10:43, schrieb Daiajo Tibdixious:
> >> I got new hardware for a home desktop a few days ago.
> >> Downloaded install-amd64-minimal-20130801.iso and am still booting
> >> from that cd as hard drive boot fails.
> >>
> >> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
> >> The disks are mounted but readonly. I guess from this the problem is
> >> occurring before the root partition is mounted.
> >>
> >> I only have 4 partitions: boot, swap, root, and home. Since everything
> >> important is on the root partition, I'm not using an initramfs.
> >>
> >> I have many times tried to catch the error by watching the screen, but
> >> it scrolls past way to fast.
> >>
> >> The last part of the boot messages before things go crazy is
> >> "Switching to clocksource TSC".
> >>
> >> I've been reading up on grub, but don't see anyway to get more info on
> >> what is going wrong.
> >>
> >> If I boot from the cd and chroot to the disk, everything seems to work
> >> fine. /boot is ext2 fs and this is my grug.conf:
> >> default 0
> >> timeout 20
> >> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
> >>
> >> title Gentoo Linux 3.8.13
> >> root (hd0,0)
> >> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
> >>
> >
> >
> > and what is happening?
> >
>
Does kernel config have:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_HOTPLUG=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_NET=y
CONFIG_PROC_FS=y
CONFIG_SIGNALFD=y
CONFIG_SYSFS=y
CONFIG_SYSFS_DEPRECATED is not set
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_BLK_DEV_BSG=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y

also this problem frequently results from graphics support attempting to
invoke kms support with:
modules instead of builtins
with frame buffers enabled
with the radeon driver enabled without building in appropriate
firmware
Re: early boot failure, not sure how to diagnose [ In reply to ]
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
Had DEVTMPFS not the TMPFS ones.
All others match.
I don't think I've ever been into "Pseudo filesystems" before.

Well much better after adding TMPFS. /home was not mounted,
otherwise looks fine.

I've had this problem before, but never with the USB message
confusion. I believe that is because this system has USB keyboard &
mouse, while my last one had normal ones. In retrospect I should have
eliminated all of the USB confusion by using the other keyboard &
mouse.

I think I can fix the remaining problems, thanks for your help.

On Fri, Aug 9, 2013 at 10:32 AM, Drake Donahue <donahue95@comcast.net> wrote:
> On Fri, 2013-08-09 at 09:07 +1000, Daiajo Tibdixious wrote:
>> Logged in after failed boot.
>> /home & /boot are mounted, but nothing in them when I ls.
>> ls of / shows all the normal things there.
>>
>> While logged in, I'm still getting boot messages, where USB devices,
>> eg the mouse, disconnect and reconnect.
>>
>> There are a ridiculous number of sd devices in /dev. sda, sdb, sdc,
>> sdd all go to 15. sda is the hard drive, sdb/sdc for USB devices.
>> Never had sdd.
>>
>> Did see some errors, notably "cannot mount /run" bad superblock or
>> something like that. Its hard to scroll back with USB messages
>> constantly appearing, half a screenful each time.
>>
>> On Fri, Aug 9, 2013 at 6:40 AM, Volker Armin Hemmann
>> <volkerarmin@googlemail.com> wrote:
>> > Am 08.08.2013 10:43, schrieb Daiajo Tibdixious:
>> >> I got new hardware for a home desktop a few days ago.
>> >> Downloaded install-amd64-minimal-20130801.iso and am still booting
>> >> from that cd as hard drive boot fails.
>> >>
>> >> I turned on logging in /etc/rc.conf, but no /var/log/rc.log is produced.
>> >> The disks are mounted but readonly. I guess from this the problem is
>> >> occurring before the root partition is mounted.
>> >>
>> >> I only have 4 partitions: boot, swap, root, and home. Since everything
>> >> important is on the root partition, I'm not using an initramfs.
>> >>
>> >> I have many times tried to catch the error by watching the screen, but
>> >> it scrolls past way to fast.
>> >>
>> >> The last part of the boot messages before things go crazy is
>> >> "Switching to clocksource TSC".
>> >>
>> >> I've been reading up on grub, but don't see anyway to get more info on
>> >> what is going wrong.
>> >>
>> >> If I boot from the cd and chroot to the disk, everything seems to work
>> >> fine. /boot is ext2 fs and this is my grug.conf:
>> >> default 0
>> >> timeout 20
>> >> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>> >>
>> >> title Gentoo Linux 3.8.13
>> >> root (hd0,0)
>> >> kernel /boot/3.8/13-0/bzImage root=/dev/sda3
>> >>
>> >
>> >
>> > and what is happening?
>> >
>>
> Does kernel config have:
> CONFIG_DEVTMPFS=y
> CONFIG_DEVTMPFS_MOUNT=y
> CONFIG_HOTPLUG=y
> CONFIG_FSNOTIFY=y
> CONFIG_DNOTIFY=y
> CONFIG_INOTIFY_USER=y
> CONFIG_NET=y
> CONFIG_PROC_FS=y
> CONFIG_SIGNALFD=y
> CONFIG_SYSFS=y
> CONFIG_SYSFS_DEPRECATED is not set
> CONFIG_UEVENT_HELPER_PATH=""
> CONFIG_BLK_DEV_BSG=y
> CONFIG_TMPFS=y
> CONFIG_TMPFS_POSIX_ACL=y
> CONFIG_TMPFS_XATTR=y
>
> also this problem frequently results from graphics support attempting to
> invoke kms support with:
> modules instead of builtins
> with frame buffers enabled
> with the radeon driver enabled without building in appropriate
> firmware
>
>
Re: Re: early boot failure, not sure how to diagnose [ In reply to ]
On Thu, 8 Aug 2013 22:08:50 +1000
Daiajo Tibdixious <daiajo@gmail.com> wrote:

> > What happens if you add init=/bin/bash ? Does /that/ get you a

It is also easy to build a q&d initrd with nothing more than
busybox and something like:

#!/bin/busybox sh

/bin/busybox --install -s;

mkdir /proc;
mkdir /sys;

mount /proc;
mount /sys;

lvm vgscan -v;
lvm vgchange -v -a y;

exec /bin/busybox 'sh';

At that point you can poke around with the busybox util's and
see what is going on. If you use RAID then make a static copy
of mdadm; ditto "lvm" if you use that. Go through the steps you
expect to work by hand and see what happens. At that point you
can get more specific error messages without having them all
stream by on the screeen.

You can build the initrd from a single directory with nothing
more than an /etc/fstab, busybox, mdadm, lvm in the bin dir,
and /dev populated with null, zero, console, tty, and the
sd* devices you really have on the device. Cpio+gzip it into
something like /boot/rescue.cpio.gz and use it with initrd.

--
Steven Lembark 3646 Flora Pl
Workhorse Computing St Louis, MO 63110
lembark@wrkhors.com +1 888 359 3508