Re: ioctl DIOCSMBR: Inappropriate ioctl for device

2008-12-02 Thread Rajkumar S
On Tue, Nov 25, 2008 at 12:40 PM, Rajkumar S <[EMAIL PROTECTED]> wrote:
> boot0cfg: /dev/ad2: Class not found
> boot0cfg: /dev/ad2: ioctl DIOCSMBR: Inappropriate ioctl for device

I found the reason for this error: I need to set
kern.geom.debugflags=16 before executing this command.

raj
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


ioctl DIOCSMBR: Inappropriate ioctl for device

2008-11-24 Thread Rajkumar S
Hi,

I am working on a nanobsd derived system for updating an embedded
pfSense image. The disk is partitioned into 4 partitions with 2
similar "code" partitions. One of the two code partition is live at
any moment. To update the partition image is written to the other
partition and a command like boot0cfg -s 2 -v ad2 to boot to the new
partition.

Instead of using device names I am using bsdlabel and refer the disks
using the label in fdisk.

Current partitions are as follows:

nanoimg:~#  fdisk ad2
*** Working on device /dev/ad2 ***
parameters extracted from in-core disklabel are:
cylinders=1999 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=1999 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 32, size 239584 (116 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 467/ head 15/ sector 32
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 239648, size 239584 (116 Meg), flag 0
beg: cyl 468/ head 1/ sector 1;
end: cyl 935/ head 15/ sector 32
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 479232, size 2048 (1 Meg), flag 0
beg: cyl 936/ head 0/ sector 1;
end: cyl 939/ head 15/ sector 32
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 481280, size 20480 (10 Meg), flag 0
beg: cyl 940/ head 0/ sector 1;
end: cyl 979/ head 15/ sector 32

dmesg shows the following when booting:

ad2: 983MB  at ata1-master PIO4
GEOM: ad2: partition 4 does not start on a track boundary.
GEOM: ad2: partition 4 does not end on a track boundary.
GEOM: ad2: partition 3 does not start on a track boundary.
GEOM: ad2: partition 3 does not end on a track boundary.
GEOM: ad2: partition 2 does not start on a track boundary.
GEOM: ad2: partition 2 does not end on a track boundary.
GEOM: ad2: partition 1 does not start on a track boundary.
GEOM: ad2: partition 1 does not end on a track boundary.
GEOM_LABEL: Label for provider ad2s3 is ufs/cfg.
GEOM_LABEL: Label for provider ad2s4 is ufs/cf.
GEOM_LABEL: Label for provider ad2s1a is ufs/root0.
GEOM_LABEL: Label for provider ad2s2a is ufs/root1.
Trying to mount root from ufs:/dev/ufs/root0

Fstab is:

/dev/ufs/root0 / ufs ro 1 1
/dev/ufs/cfg /cfg ufs rw,noauto 2 2
/dev/ufs/cf /cf ufs ro 1 1

both ad2s1a and ad2s2a are active and they appear in boot screen as F1
and F2. I can manually press F1 and F2 and boot from either of them.
But when I give a command  boot0cfg -s 1 -v ad2 I get

boot0cfg: /dev/ad2: Class not found
boot0cfg: /dev/ad2: ioctl DIOCSMBR: Inappropriate ioctl for device

I have searched google and archives and could not find much about this
error. Any help to resolve this would be much appreciated.

with regards,

raj
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


make buildworld fails on a RELENG_7_0 machine

2008-06-26 Thread Rajkumar S
Hi,

I have a fresh freebsd 7.0 box, installed from CD. I have src cvsupd
with following supfile.

*default host=cvsup.de.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_7_0
*default delete use-rel-suffix
*default compress
src-all

after csup when I cd to /usr/src and issue a make buildworld It stops
with following error:

===> gnu/usr.bin/cvs/contrib (cleandir)
sed -e 's,@CSH@,/bin/csh,' -e 's,@PERL@,/usr/bin/perl,'
/usr/src/gnu/usr.bin/cvs/contrib/../../../../contrib/cvs/contrib/Makefile.in
> Makefile
"Makefile", line 15: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/src/gnu/usr.bin/cvs.
*** Error code 1

Stop in /usr/src/gnu/usr.bin.
*** Error code 1

Stop in /usr/src/gnu.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

The line in question ( /usr/src/contrib/cvs/contrib/Makefile.in:15
)has the following text.

@SET_MAKE@

If I do a csup after a comple just one file get's updated every time:

Parsing supfile "src-supfile"
Connecting to cvsup.de.FreeBSD.org
Connected to 212.19.57.134
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Updating collection src-all/cvs
 Checkout src/gnu/usr.bin/cvs/contrib/Makefile
Shutting down connection to server
Finished successfully

Any idea what could be wrong here?

raj
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"