|Shane Adams||Jul 24, 2006 6:51 pm|
|Eric Anderson||Jul 24, 2006 7:06 pm|
|Shane Adams||Jul 24, 2006 7:11 pm|
|Shane Adams||Jul 24, 2006 7:41 pm|
|Eric Anderson||Jul 24, 2006 7:50 pm|
|Dag-Erling Smørgrav||Jul 25, 2006 3:12 pm|
|Eric Anderson||Jul 25, 2006 4:12 pm|
|Shane Adams||Jul 25, 2006 5:54 pm|
|Rick C. Petty||Jul 25, 2006 6:33 pm|
|Eric Anderson||Jul 25, 2006 6:39 pm|
|Dag-Erling Smørgrav||Jul 25, 2006 6:49 pm|
|Dag-Erling Smørgrav||Jul 27, 2006 7:14 am|
|Rick C. Petty||Jul 27, 2006 5:54 pm|
|Oliver Fromme||Jul 28, 2006 9:27 am|
|Rick C. Petty||Jul 28, 2006 3:10 pm|
|Shane Adams||Aug 1, 2006 8:54 pm|
|Eric Anderson||Aug 2, 2006 3:44 am|
|Subject:||Advice for hacking on ufs/ffs|
|From:||Rick C. Petty (rick...@kiwi-computer.com)|
|Date:||Jul 25, 2006 6:33:53 pm|
On Tue, Jul 25, 2006 at 10:53:31AM -0700, Shane Adams wrote:
I used dd to create 1G file.
A faster way is: touch filename truncate -s 1g filename
You also may wish to look at qemu-img, which is installed with qemu.
I did mdconfig -a -t vnode -f /bigdrive/bsdfilesystem -u 0
I'm pretty sure "-t vnode" is implied by "-f".
I downloaded the 20M boot only ISO.
I ran qemu specifying -cdrom as the 20M iso, and -hda to
Qemu started fine, and I proceeded to go through the basic install process, at
that point it asked me to toss in the correct CD with the packages to complete
the installation (Which I didnt' have the CD handy and it was late so I will try
You didn't use the network install, especially if you only had the boot-only CD? If your media type was set to network, it should have attempted to grab the packages from there. Not that you need any packages installed to play with UFS.
Anyway - you said you do a make DESTDIR to your mdconfig'd file. Did you mount
the file you mdconfiged?
You have to mount it because DESTDIR points to a directory, not a device or image. I'd suggest:
mount /dev/md0s1a /mnt [mount your other filesystems, if applicable, under /mnt/] cd /usr/src; make DESTDIR=/mnt installworld installkernel cd /usr/src/etc; make DESTDIR=/mnt distribution
If so, does a make installworld install a boot loader as well?
I'm not clear on how you used qemu to boot agains that device. Perhaps you did
a normal BSD install on it then later mounted it to get your stuff on there?
That would be easier, but you might wish to put an MBR and a label on your image:
fdisk -BI /dev/md0 bsdlabel -Bw /dev/md0
You may wish to partition the label for separate file systems, although that's not necessary. Don't forget to newfs each of your filesystems, e.g.
Using this method won't require you to run the installer inside qemu.
The nice thing about using qemu to test your hacking is that you can use the -snapshot mode to preserve the disk image(s), that way if the qemu "box" panics, you don't need to fsck or any of that.
-- Rick C. Petty