Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2006 09:48:09 +0300
From:      Nikolay Pavlov <quetzal@zone3000.net>
To:        freebsd-stable@freebsd.org
Subject:   loader can't load kernel on FreeBSD 6.1-p6.
Message-ID:  <20060916064809.GA59517@zone3000.net>

next in thread | raw e-mail | index | archive | help
Hi, folks.
While booting 6.1-RELEASE-p6 i have this error on /boot/loader stage:

can't load kernel

ls shows nothing...

lsdev shows me:
disk devices:
	disk0: BIOS drive C:
	   disk0s1: FFS bad disklabel


But when i am booting from LiveCD i see all my labels, i can mount them,
i can produce read/write operations.
Other thing that confused me is that when i am using second stage  
bootstrap file i see my root partition:

FreeBSD/i386 BOOT
Default: 0:ad(0,a)/boot/loader
boot: ?. .. .snap bin boot dev etc lib libexec mnt proc and so on...

But when i am trying to boot kernel (GENERIC) directly from bootstrap 
i have "BTX halted" error, don't know if this actually supported.
World was builded on other box and installed to this drive
using tar.

Here is additional information that i can get from LiveCD:

root@ccv:~# fdisk /dev/ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=19679 heads=16 sectors/track=255 (4080 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=19679 heads=16 sectors/track=255 (4080 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 80293185 (39205 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 807/ head 15/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

root@ccv:~# disklabel /dev/ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   524288        0    4.2BSD     2048 16384 32776
  b:  4161280   524288      swap
  c: 80293185        0    unused        0     0         # "raw" part,
don't edit
  d:  2097152  4685568    4.2BSD     2048 16384 28552
  e: 20971520  6782720    4.2BSD     2048 16384 28552
  f: 10485760 27754240    4.2BSD     2048 16384 28552
  g: 42053185 38240000    4.2BSD     2048 16384 28552


root@ccv:~# atacontrol list
ATA channel 0:
    Master:  ad0 <Maxtor 6E040L0/NAR61590> ATA/ATAPI revision 7
    Slave:       no device present
ATA channel 1:
    Master:      no device present
    Slave:       no device present

root@ccv:~# mount
/dev/iso9660/FreeSBIE on / (cd9660, local, read-only)
devfs on /dev (devfs, local)
/dev/md0.uzip on /usr (ufs, local, read-only)
/dev/md1 on /etc (ufs, local)
/dev/md2 on /usr/local/etc (ufs, local)
/dev/md3 on /root (ufs, local)
/dev/md4 on /var (ufs, local)
/dev/md5 on /tmp (ufs, local)
/dev/ad0s1a on /mnt/ufs.1 (ufs, local, read-only)
/dev/ad0s1d on /mnt/ufs.2 (ufs, local, read-only)
/dev/ad0s1e on /mnt/ufs.3 (ufs, local, read-only)
/dev/ad0s1f on /mnt/ufs.4 (ufs, local, read-only)
/dev/ad0s1g on /mnt/ufs.5 (ufs, local, read-only)

root@ccv:~# ls -al /mnt/ufs.1/boot/
total 588
drwxr-xr-x   5 root  wheel     512 Sep 16 00:52 .
drwxr-xr-x  20 root  wheel     512 Sep 15 10:05 ..
-r--r--r--   1 root  wheel    7638 Sep  6 18:43 beastie.4th
-r--r--r--   1 root  wheel    8192 Sep  6 18:43 boot
-r--r--r--   1 root  wheel     512 Sep  6 18:43 boot0
-r--r--r--   1 root  wheel     512 Sep  6 18:43 boot0sio
-r--r--r--   1 root  wheel     512 Sep  6 18:43 boot1
-r--r--r--   1 root  wheel    7680 Sep  6 18:43 boot2
-r--r--r--   1 root  wheel    1200 Sep  6 18:43 cdboot
drwxr-xr-x   2 root  wheel     512 Sep  6 18:43 defaults
-r--r--r--   1 root  wheel    1741 Sep  6 18:43 device.hints
-r--r--r--   1 root  wheel    2249 Sep  6 18:43 frames.4th
drwxr-xr-x   2 root  wheel    9216 Sep  6 18:44 kernel
-r-xr-xr-x   1 root  wheel  212992 Sep  6 18:43 loader
-r--r--r--   1 root  wheel    7772 Sep  6 18:43 loader.4th
-rw-r--r--   1 root  wheel     463 Sep  6 18:44 loader.conf
-r--r--r--   1 root  wheel   15058 Sep  6 18:43 loader.help
-r--r--r--   1 root  wheel     389 Sep  6 18:43 loader.rc
-r--r--r--   1 root  wheel     512 Sep  6 18:43 mbr
drwxr-xr-x   2 root  wheel     512 Sep  6 18:41 modules
-r--r--r--   1 root  wheel  215040 Sep  6 18:43 pxeboot
-r--r--r--   1 root  wheel     692 Sep  6 18:43 screen.4th
-r--r--r--   1 root  wheel   36440 Sep  6 18:43 support.4th

root@ccv:~# ls -al /mnt/ufs.1/boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  6640118 Sep  6 18:21 /mnt/ufs.1/boot/kernel/kernel

root@ccv:~# file /mnt/ufs.1/boot/kernel/kernel
/mnt/ufs.1/boot/kernel/kernel: ELF 32-bit LSB executable, Intel 80386,
version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped





-- 
========================================================================= 
= Best regards, Nikolay Pavlov. <<<------------------------------------ = 
========================================================================= 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060916064809.GA59517>