Date: Fri, 18 Aug 2000 18:46:10 +0200 (SAST) From: Johan Kruger <jkruger@oskar.dev.nanoteq.co.za> To: Patrick Bihan-Faou <patrick@mindstep.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Bootable CD... Message-ID: <XFMail.000818184610.jkruger@oskar.dev.nanoteq.co.za> In-Reply-To: <03b801c0092b$bc8db0a0$040aa8c0@local.mindstep.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok, here's what i did ( busy building a custom CD installation ) After the 'make release' , i took the boot.flp image 2.88 Meg and mounted it. I deleted everything except for /boot/boot0-2 an the bootforth loader. Then i made my own kernel allowing a MFS of 2048 x 512 blocks, giving me 1.44 Meg in the filesystem. In this i crunched 72 Megs of binary's , one of them 'chroot' I compiled init as not to look for 'rc' ( check the Makefile, define part that's specifically for a release ) After this i use the write_mfs_in_kernel script and umount it ( remember to compress the kernel after the mfs write sh -e doFS.sh -s mfsroot ./ /mnt 2880 johan's_mfsfd_root_dir/ 8000 minimum2 ./write_mfs_in_kernel kernel mfsroot gzip -9vc kernel > kernel.gz vnconfig /dev/vn0 boot.flp mount /dev/vn0 /mnt rm /mnt/kernel.gz cp kernel.gz /mnt/kernel.gz umount /mnt vnconfig -u /dev/vn0 Now your boot.flp is ready for mkisofs Basically what happens now , i copy my complete live filesystem with installed apps to the CD's root dir, and when i do mkisofs, i use my new bootimage. After boot , since it can not find rc, it executes .profile in the MFS filesystem in the kernel- BUT ONLY if you compiled init for the crunch with in /usr/src/sbin/init/Makefile #CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT CFLAGS+=-DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT In .profile i put 'mount_cd9660 /dev/acd0a /cdrom' ( /cdrom an extra dir i put in my filesystem ) and 'chroot /cdrom /setup' , where setup is my prog, and this works perfectly , i even load my own modules before the chroot and so on. The release i built is 5.0-CURRRENT , and if you want the boot.flp i can attach it for you. Just mail me. Right now i'm going home - it's Friday - at last GOOD LUCK *;-) On 18-Aug-00 Patrick Bihan-Faou wrote: > Hi, > > > Actually I am using the doFS.sh script from /usr/src/release. The disklabel > is done (without the -b and -s options though) by that script. Also I used > to be able to build bootable CDs from the same procedure a few weeks ago > (before the code in /usr/src/sys/boot was updated). > > The CD is recognized as bootable and starts to boot. I can stop the boot at > the first "spinning bar" (I think that's boot0 or boot1) before the control > is passed to "loader". > >>From there I am sort of stuck: the only thing I can boot is loader which in > turn crashes immediately. I tried to load "kernel.gz" but its format is not > recognized at this stage of the boot (probably because it is compressed). > > > > BTW I tried you procedure above, and I get: > > su-2.03# vnconfig /dev/vn0 boot.cdrom.img > su-2.03# mount /dev/vn0 /mnt > su-2.03# disklabel -B -b /mnt/boot/boot1 -s /mnt/boot/boot2 /dev/vn0 > disklabel: /dev/vn0: Device busy > su-2.03# disklabel -B -b /mnt/boot/boot1 -s /mnt/boot/boot2 /mnt > > Patrick. > > ---------------------------------- Unix Software Developer/Engineer E-Mail: Johan Kruger <jkruger@oskar.dev.nanoteq.co.za> Date: 18-Aug-00 Time: 18:28:20 All good things come to those who ... runs FreeBSD ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000818184610.jkruger>