Subject: Re: File system image
To: David Laight <email@example.com>
From: Brian Rose <firstname.lastname@example.org>
Date: 02/07/2003 14:17:29
Wojciech Puchar wrote:
>I tried using virtual devices, but you cannot disklabel a virtual
why? could you please say what was a problem?
David Laight wrote:
>>I tried using virtual devices, but you cannot disklabel a virtual
I was doing some googling on the subject, and I came across some
articles that mentioned that the virtual device driver does not have the
proper ioctl routines that disklabel uses. I don't know the details.
After I read several of these I decided to try to find a workaround. I
tried the following with no errors...
1) dd if=/dev/zero of=fs_16M.img bs=512 count=32768
2) vnconfig -c -v /dev/rvnd0 fs_16M.img
3) fdisk -i /dev/vnd0
4) disklabel -i -I /dev/vnd0
created the following disklabel...
label: default label
total sectors: 32768
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
# size offset fstype [fsize bsize cpg/sgs]
a: 32768 0 4.2BSD 0 0 0 # (Cyl. 0 - 15)
5) create the filesystem with 'newfs /dev/vnd0a'
6) mount the filesystem 'mount -t ffs /dev/vnd0a /mnt/floppy'
7) copy the filesystem (same as on the working image)
8) unmount the filesystem 'umount /mnt/floppy'
9) unconfigure the virtual device - 'vnconfig -u /dev/vnd0'
10) copy the filesystem image into the kernel 'mdsetimage
11) FTP the test image to my test machine, reboot and at the boot
prompt, select netbsd.test as the kernel to boot.
The bootloader seems to load the kernel (I see the numbers) and then