Re: livecd error

2006-12-03 Thread Andreas Bihlmaier
On Sun, Dec 03, 2006 at 03:31:41AM +0100, Tobias Weisserth wrote:
 Hi,
 
 I hope this is not considered thread-highjacking but it sort of fits into 
 this 
 thread, so here it goes:
 
 I'm trying to follow these instructions to build a live CD based on 4.0 
 stable:
 
 http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html

I start to dislike google (I know it is not googles fault),
above is WAY outdated! Here are the up-to-date instructions:
http://www.openbsd-wiki.org/index.php?title=LiveCD

snip

Regards,
ahb



Re: livecd error

2006-12-03 Thread Andreas Bihlmaier
On Sun, Dec 03, 2006 at 01:16:44PM +0100, Tobias Weisserth wrote:
 Hi,
 
 On Dec 3, 2006, at 11:48 AM, Andreas Bihlmaier wrote:
 
 On Sun, Dec 03, 2006 at 03:31:41AM +0100, Tobias Weisserth wrote:
 Hi,
 
 I hope this is not considered thread-highjacking but it sort of  
 fits into this
 thread, so here it goes:
 
 I'm trying to follow these instructions to build a live CD based  
 on 4.0
 stable:
 
 http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html
 
 I start to dislike google (I know it is not googles fault),
 above is WAY outdated! Here are the up-to-date instructions:
 http://www.openbsd-wiki.org/index.php?title=LiveCD
 
 Andreas, it's nice that you wrote that WIKI article and it's nice  
 that you already pointed out where to find it before in this thread,  
 but your blatant advertising of it when I explicitly asked how to fix  
come on you can't be serious-^
 an issue not related to it, isn't helpful at all.

Well, the issue is that the kernel grows because of new drivers, but
size of an emulated 2.88MB floppy doesn't grow.
You either have to rip stuff out of the kernel or use the new method.

 I'd like to  understand how the stuff in distrib works and playing
 with the  instructions of Kevin Lo seems a good idea to me.
Well I thought you just wanted to get it working ;)

 I'll gladly try your instructions when I'm done understanding the  
 stuff in distrib though, I noticed that you invested a lot of time in  
 it and seems to be very detailed.
 
 regards,
 Tobias

Regards,
ahb



Re: livecd error

2006-12-02 Thread Tobias Weisserth
Hi,

I hope this is not considered thread-highjacking but it sort of fits into this 
thread, so here it goes:

I'm trying to follow these instructions to build a live CD based on 4.0 
stable:

http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html

I'm in trouble when building the RAMDISK kernel with the modified 
Makefile.inc:

cd /usr/src/distrib/i386/ramdisk_cd  make

make stops with an error because it tries to copy too much into a mounted 
device with too little space:

###make output###
...
rm -f bsd
ld -Ttext 0xD0200120 -e start -N -S -x -o bsd ${SYSTEM_OBJ} vers.o
textdatabss dec hex
4730816 2163584 867984  7762384 7671d0
cp 
/usr/src/distrib/i386/ramdisk_cd/../../../sys/arch/i386/compile/RAMDISK_CD/bsd 
bsd
cc -DDEBUG -o 
rdsetroot /usr/src/distrib/i386/ramdisk_cd/../../common/elfrdsetroot.c
cp bsd bsd.rd
/usr/src/distrib/i386/ramdisk_cd/rdsetroot bsd.rd  mr.fs
segment 0 rd_root_size_off = 0x490740
rd_root_image_off = 0x490760
rd_root_size  val: 0x001DB000 (3800 blocks)
copying root image...
...copied 1945600 bytes
cp bsd.rd bsd.strip
strip -s -R .comment -K cngetc bsd.strip
gzip -c9 bsd.strip  bsd.gz
dd if=/dev/zero of=/var/tmp/image.27740 bs=10k count=288
288+0 records in
288+0 records out
2949120 bytes transferred in 0.271 secs (10881719 bytes/sec)
vnconfig -v -c svnd0 /var/tmp/image.27740
svnd0: 2949120 bytes on /var/tmp/image.27740
disklabel -w -r svnd0 floppy288
newfs -m 0 -o space -i 524288 -c 80 /dev/rsvnd0a
/dev/rsvnd0a:   5760 sectors in 80 cylinders of 2 tracks, 36 sectors
2.8MB in 1 cyl groups (80 c/g, 2.81MB/g, 32 i/g)
super-block backups (for fsck -b #) at:
 32,
mount /dev/svnd0a /mnt
cp /usr/mdec/boot /usr/src/distrib/i386/ramdisk_cd/boot
strip -s -R .comment -K cngetc /usr/src/distrib/i386/ramdisk_cd/boot
dd if=/usr/src/distrib/i386/ramdisk_cd/boot of=/mnt/boot bs=512
77+1 records in
77+1 records out
39572 bytes transferred in 0.016 secs (2371001 bytes/sec)
dd if=bsd.gz of=/mnt/bsd bs=512

/mnt: write failed, file system is full
dd: /mnt/bsd: No space left on device
5601+0 records in
5600+0 records out
2867200 bytes transferred in 1.233 secs (2324260 bytes/sec)
*** Error code 1

Stop in /usr/src/distrib/i386/ramdisk_cd (line 30 
of /usr/src/distrib/i386/ramdisk_cd/../common/Makefile.inc).

#

I haven't really understood what the 2.8MB device is for regarding the whole 
process. Can anybody explain and propose a solution? Can't I just copy the 
stuff to another device, that's bigger? If this is just for creating a floppy 
image that's bootable and is insignificant regarding my live CD, can I just 
delete these instructions from Makefile.inc?

The instructions by Kevin Lo say:
In the /usr/src/distrib/i386/ramdisk_cd directory, copy the two files bsd and 
cdrom36.fs to the /livecd directory.

The cdrom36.fs in my case would be cdrom40.fs and has a fliesize bigger than 
2.8MB anyway? I'm not able to spot any reference to any cdrom{version}.fs 
file being created in the Makefile.inc. What's my problem?

Since I haven't been able to apply the patch 
to /usr/src/distrib/i386/common/Makefile.inc with patch I deleted the lines 
with a - in front of it in the patch file and added the lines with the + 
at the appropriate lines. Just to avoid simple mistakes, I'll include the 
whole Makefile.inc here. Sorry, if this is not appropriate.

Makefile.inc##

#   $OpenBSD: Makefile.inc,v 1.15 2004/11/25 22:02:08 deraadt Exp $

TOP=${.CURDIR}/..

.include ${TOP}/Makefile.inc
IMAGE=  mr.fs
CBIN?=  instbin
CRUNCHCONF?=${CBIN}.conf
LISTS?= ${.CURDIR}/../common/list
UTILS?= ${.CURDIR}/../../miniroot

MOUNT_POINT=/mnt
MTREE=  ${UTILS}/mtree.conf

XNAME?= floppy
FS?=${XNAME}${REV}.fs
VND?=   svnd0
VND_DEV=/dev/${VND}a
VND_RDEV=   /dev/r${VND}a
VND_CRDEV=  /dev/r${VND}c
PID!=   echo 
REALIMAGE!= echo /var/tmp/image.${PID}
BOOT=   ${DESTDIR}/usr/mdec/boot
FLOPPYSIZE?=144
FLOPPYTYPE?=floppy3

all:${FS}

${FS}:  bsd.gz
dd if=/dev/zero of=${REALIMAGE} bs=10k count=${FLOPPYSIZE}
vnconfig -v -c ${VND} ${REALIMAGE}
disklabel -w -r ${VND} ${FLOPPYTYPE}
newfs -m 0 -o space -i 524288 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
cp ${BOOT} ${.OBJDIR}/boot
strip -s -R .comment -K cngetc ${.OBJDIR}/boot
dd if=${.OBJDIR}/boot of=${MOUNT_POINT}/boot bs=512
dd if=bsd.gz of=${MOUNT_POINT}/bsd bs=512
/usr/mdec/installboot -v ${MOUNT_POINT}/boot \
${DESTDIR}/usr/mdec/biosboot ${VND_CRDEV}
@echo 
@df -i ${MOUNT_POINT}
@echo 
umount ${MOUNT_POINT}
vnconfig -u ${VND}
cp ${REALIMAGE} ${FS}
rm ${REALIMAGE}

DISKTYPE?=   rdroot
NBLKS?=  3800
# minfree, opt, b/i  trks, sects, cpg
NEWFSARGS= -m 0 -o space -c 16 -i 4096

bsd.gz: bsd.rd
cp bsd.rd 

livecd error

2006-11-29 Thread Carlos A. Garcia G.

Hi, im trying to make a obsd livecd i use the instructions in
http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html
but in one step i get
/usr/bin/ld: cannot find -lstubs
collect2: ld returned 1 exit status
*** Error code 1

Stop in /usr/src/distrib/i386/ramdisk_cd (line 10 of instbin.mk).
*** Error code 1

Stop in /usr/src/distrib/i386/ramdisk_cd (line 109 of 
/usr/src/distrib/i386/ramdisk_cd/../common/Makefile.inc).


what can i do to solve the problem?



Re: livecd error

2006-11-29 Thread Andreas Bihlmaier
On Wed, Nov 29, 2006 at 09:05:35AM -0700, Carlos A. Garcia G. wrote:
 Hi, im trying to make a obsd livecd i use the instructions in
 http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html
 but in one step i get
 /usr/bin/ld: cannot find -lstubs
 collect2: ld returned 1 exit status
 *** Error code 1
 
 Stop in /usr/src/distrib/i386/ramdisk_cd (line 10 of instbin.mk).
 *** Error code 1
 
 Stop in /usr/src/distrib/i386/ramdisk_cd (line 109 of 
 /usr/src/distrib/i386/ramdisk_cd/../common/Makefile.inc).
 
 what can i do to solve the problem?

Use newer (better ;) instructions:
http://openbsd-wiki.org/index.php/LiveCD

Regards,
ahb



Re: livecd error

2006-11-29 Thread Bill Maas
From my notes (this is apparently the old way to do it,
but it might work for you as a quick fix):

Error: /usr/bin/ld: cannot find -lstubs

Problem: /usr/src/distrib/special/libstubs/libstubs.a does not exist

Fix:

cd /usr/src/distrib/special/libstubs
make


Bill

On Wed, 2006-11-29 at 09:05 -0700, Carlos A. Garcia G. wrote:
 Hi, im trying to make a obsd livecd i use the instructions in
 http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html
 but in one step i get
 /usr/bin/ld: cannot find -lstubs
 collect2: ld returned 1 exit status
 *** Error code 1
 
 Stop in /usr/src/distrib/i386/ramdisk_cd (line 10 of instbin.mk).
 *** Error code 1
 
 Stop in /usr/src/distrib/i386/ramdisk_cd (line 109 of 
 /usr/src/distrib/i386/ramdisk_cd/../common/Makefile.inc).
 
 what can i do to solve the problem?