Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Sep 2004 00:39:30 +0200
From:      Paolo Pisati <p.pisati@oltrelinux.com>
To:        FreeBSD_Hackers <freebsd-hackers@freebsd.org>
Cc:        mk@neon1.net
Subject:   Installing minibsd inside vmware virtual disk
Message-ID:  <20040914223930.GA1945@tin.it>

next in thread | raw e-mail | index | archive | help
Hi guys,

[the long story]
i've a problem while i try to install minibsd inside
a virtual disk of vmware3 running on top of FreeBSD.

I obtained minibsd scripts form the freesbie cvs, 
unpacked in a dir on my disk, executed all the scripts and 
generated a iso containing a complete minibsd system.

/*
 * personal note: minibsd is SO sweetttt!!!!
 * ONLY 15mbs for a working system!!! =)
 */

Booted vmware with freesbie, mouned the minibsd iso
and a 32mb virtual disk previously prepared(see below
for some more info), copied all the stuff from the minibsd iso 
and updated /etc/fstab.
Installed the boot code and halted the system.
Unmounted all the iso (freesbie & minibsd iso),
and booted vmware with only virtual disk.
It started correctly, executed the boot code, loaded
the kernel, decompressed it but
when it came to mount / (the previously created fs)
it paniced:

panic: going nowhere without my init
(detaild screenshot here: http://www.gufi.org/~flag/vmware-minibsd-init-signal6.gif)

Now, i know i'm missing something very stupid, but i don't know what...

 /* WARNING: brain fart starts here */

The panic msg seems to be clear: the kernel can't find the init 
executable so it panics, but:

1) the fs seemed to be ok cause it was mounted with no prob
(if it couldn't find the fs i expected a panic during the 
 mount phase "Mounting root from ufs:..."

2) the init file is present in the created fs
(/sbin/init)

So here comes the question:
why the hell (if the fs is good and it was mounted correctly)
the kernel cannot find it?

/* End of brain fart */

Uhmmm... probably i should read again the boot section
in the handbook or think a bit more but i'm sure
there's something REALLY stupid i'm missing...
Or maybe is just minibsd that doesn't use init
but a custom program and i botched it...
But if you have any ideas or suggestions i would be
REALLY pleased to here it from you... =)

Thanks.

structure of the created fs:

root@FreeSBIE:~# fdisk /dev/ad0
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=65 heads=16 sectors/track=63 (1008 blks/cyl)

parameters to be used for BIOS calculations are:
cylinders=65 heads=16 sectors/track=63 (1008 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 64449 (31 Meg), flag 80 (active)
            beg: cyl 0/ head 1/ sector 1;
                    end: cyl 63/ 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@FreeSBIE:~#))))))

bsdlabel ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:    64433       16    4.2BSD     2048 16384  4032 
  c:    64449        0    unused        0     0         # "raw" part, don't edit
root@FreeSBIE:~# mkdir /tmp/minibsd
root@FreeSBIE:~# mount /dev/ad0s1a /tmp/minibsd
root@FreeSBIE:~# ls -la /tmp/minibsd/sbin/init
-r-x------  1 root  wheel  18272 Sep 14 13:07 /tmp/minibsd/sbin/init
root@FreeSBIE:~# /tmp/minibsd/sbin/init
init: already running
root@FreeSBIE:~#
root@FreeSBIE:~# ls -la /tmp/minibsd/
total 34
drwxr-xr-x  17 root  wheel      512 Sep 14 13:07 .
drwxrwxrwx   5 root  wheel      512 Sep 14 14:04 ..
drwxrwxr-x   2 root  operator   512 Sep 14 13:06 .snap
drwxr-xr-x   2 root  wheel      512 Sep 14 13:07 bin
drwxr-xr-x   5 root  wheel      512 Sep 14 13:06 boot
dr-xr-xr-x   2 root  wheel      512 Sep 14 13:06 dev
drwxr-xr-x  18 root  wheel     1536 Sep 14 13:07 etc
drwxr-xr-x   3 root  wheel      512 Sep 14 13:06 lib
drwxr-xr-x   2 root  wheel      512 Sep 14 13:06 libexec
drwxr-xr-x   2 root  wheel      512 Sep 14 13:06 mnt
dr-xr-xr-x   2 root  wheel      512 Sep 14 13:07 proc
drwxr-xr-x   2 root  wheel      512 Sep 14 13:07 rescue
drwxr-xr-x   2 root  wheel      512 Sep 14 13:07 root
drwxr-xr-x   2 root  wheel     1024 Sep 14 13:07 sbin
lrwxr-xr-x   1 root  wheel       11 Sep 14 13:07 sys -> usr/src/sys
drwxr-xr-t   2 root  wheel      512 Sep 14 13:07 tmp
drwxr-xr-x  13 root  wheel      512 Sep 14 13:07 usr
drwxr-xr-x  20 root  wheel      512 Sep 14 13:07 var
root@FreeSBIE:~# cat /tmp/minibsd/etc/fstab
# See the fstab(5) manual page for important information on automatic mounts
# of network filesystems before modifying this file.
#
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1a             /               ufs     rw,noatime      1       1
root@FreeSBIE:~#

kernel config file:

machine         i386
cpu                 I486_CPU
cpu                 I586_CPU
cpu                 I686_CPU
ident           MINIBSD
maxusers        0

options     SCHED_4BSD
options         INET                    #InterNETworking
options         FFS                     #Berkeley Fast Filesystem
options         SOFTUPDATES             #Enable FFS soft updates support
options         UFS_DIRHASH             #Improve performance on big directories
options         NFSCLIENT               #Network Filesystem Client
options         PROCFS                  #Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                #Pseudo-filesystem framework
options         SCSI_DELAY=5000         #Delay (in ms) before probing SCSI
options         KTRACE                  #ktrace(1) support
options   ROOTDEVNAME=\"ufs:ad0s1\"

device          isa
device          pci

# ATA and ATAPI devices
device          ata
device          atadisk                 # ATA disk drives
options         ATA_STATIC_ID           #Static device numbering

# syscons is the default console driver, resembling an SCO console
device atkbdc
device atkbd
device vga
device          sc
options   SC_NO_SYSMOUSE

# Floating point support - do not disable.
device          npx

device          pmtimer

# Serial (COM) ports
device          sio             # 8250, 16[45]50 based serial ports

device          miibus          # MII bus support
device          lnc             # NIC emulated in vmware

# Pseudo devices - the number indicates how many units to allocate.
device          random          # Entropy device
device          loop            # Network loopback
device          ether           # Ethernet support
device          tun             # Packet tunnel.
device          pty             # Pseudo-ttys (telnet etc)
device          md              # Memory "disks"

options     NETGRAPH
-- 
Paolo

Italian FreeBSD User Group: http://www.gufi.org




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