From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 14 22:29:20 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4692716A4CE for ; Tue, 14 Sep 2004 22:29:20 +0000 (GMT) Received: from vsmtp14.tin.it (vsmtp14.tin.it [212.216.176.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id C027243D48 for ; Tue, 14 Sep 2004 22:29:19 +0000 (GMT) (envelope-from flag@tin.it) Received: from southcross.homeunix.org (82.49.164.44) by vsmtp14.tin.it (7.0.027) id 411B8D0E004CE1E4; Wed, 15 Sep 2004 00:29:19 +0200 Received: by southcross.homeunix.org (Postfix, from userid 1001) id 2E35D20CD; Wed, 15 Sep 2004 00:39:31 +0200 (CEST) Date: Wed, 15 Sep 2004 00:39:30 +0200 From: Paolo Pisati To: FreeBSD_Hackers Message-ID: <20040914223930.GA1945@tin.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: mk@neon1.net Subject: Installing minibsd inside vmware virtual disk X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 22:29:20 -0000 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: The data for partition 3 is: The data for partition 4 is: 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