Ramdisk fdisk, bsdlabel, newfs, mount |
play10# mdconfig -a -t malloc -s20m -u1 play10# ls -l /dev/md1 crw-r----- 1 root operator 0, 129 Jul 3 17:25 /dev/md1
play10# fdisk /dev/md1 ******* Working on device /dev/md1 ******* parameters extracted from in-core disklabel are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found 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 63, size 32067 (15 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1/ head 254/ sector 63 The data for partition 2 is:The data for partition 3 is: The data for partition 4 is: play10# fdisk -u md1 ******* Working on device /dev/md1 ******* parameters extracted from in-core disklabel are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) Do you want to change our idea of what BIOS thinks ? [n] fdisk: invalid fdisk partition table found 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 63, size 32067 (15 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1/ head 254/ sector 63 Do you want to change it? [n] y Supply a decimal value for "sysid (165=FreeBSD)" [165] Supply a decimal value for "start" [63] Supply a decimal value for "size" [32067] 16000 fdisk: WARNING: partition does not end on a cylinder boundary fdisk: WARNING: this may confuse the BIOS or some operating systems Correct this automatically? [n] y fdisk: ERROR: could not adjust partition to start on a head boundary and end on a cylinder boundary. fdisk: ERROR: failed to adjust; setting sysid to 0 Explicitly specify beg/end address ? [n] sysid 0 (0000),(unused) start 63, size 16000 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 0/ head 254/ sector 61 Are we happy with this entry? [n] Supply a decimal value for "sysid (165=FreeBSD)" [0] 165 Supply a decimal value for "start" [63] Supply a decimal value for "size" [16000] fdisk: WARNING: partition does not end on a cylinder boundary fdisk: WARNING: this may confuse the BIOS or some operating systems Correct this automatically? [n] Explicitly specify beg/end address ? [n] sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 16000 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 0/ head 254/ sector 61 Are we happy with this entry? [n] y The data for partition 2 is: Do you want to change it? [n] y Supply a decimal value for "sysid (165=FreeBSD)" [0] 165 Supply a decimal value for "start" [0] 16064 Supply a decimal value for "size" [0] 16066 fdisk: WARNING: partition does not start on a head boundary fdisk: WARNING: this may confuse the BIOS or some operating systems Correct this automatically? [n] Explicitly specify beg/end address ? [n] sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 16064, size 16066 (7 Meg), flag 0 beg: cyl 0/ head 254/ sector 63; end: cyl 1/ head 254/ sector 63 Are we happy with this entry? [n] y The data for partition 3 is: Do you want to change it? [n] The data for partition 4 is: Do you want to change it? [n] Partition 1 is marked active Do you want to change the active partition? [n] We haven't changed the partition table yet. This is your last chance. parameters extracted from in-core disklabel are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 16000 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 0/ head 254/ sector 61 2: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 16064, size 16066 (7 Meg), flag 0 beg: cyl 0/ head 254/ sector 63; end: cyl 1/ head 254/ sector 63 3: 4: Should we write new partition table? [n] y fdisk: Geom not found
play10# fdisk md1 ******* Working on device /dev/md1 ******* parameters extracted from in-core disklabel are: cylinders=2 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=2 heads=255 sectors/track=63 (16065 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 63, size 16000 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 0/ head 254/ sector 61 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 16064, size 16066 (7 Meg), flag 0 beg: cyl 0/ head 254/ sector 63; end: cyl 1/ head 254/ sector 63 The data for partition 3 is:The data for partition 4 is:
play10# bsdlabel md1s1 bsdlabel: /dev/md1s1: no valid label found play10# ls -l /dev/md1* crw-r----- 1 root operator 0, 129 Jul 3 21:16 /dev/md1 crw-r----- 1 root operator 0, 132 Jul 3 17:25 /dev/md1s1 crw-r----- 1 root operator 0, 133 Jul 3 17:25 /dev/md1s2 play10# bsdlabel -w md1s1 play10# bsdlabel md1s1 # /dev/md1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 15984 16 unused 0 0 c: 16000 0 unused 0 0 # "raw" part, don't edit
play10# newfs /dev/md1s1a /dev/md1s1a: 7.8MB (15984 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 1.95MB, 125 blks, 256 inodes. super-block backups (for fsck -b #) at: 160, 4160, 8160, 12160
play10# mount /dev/md1s1a /mnt play10# df /mnt Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/md1s1a 7526 4 6920 0% /mnt play10# umount /mnt play10# bsdlabel -e md1s2
bsdlabel: /dev/md1s2: no valid label found play10# bsdlabel -w md1s2 play10# bsdlabel -e md1s2 # /dev/md1s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 8050 16 unused 0 0 c: 16066 0 unused 0 0 # "raw" part, don't edit d: 8000 8066 unused 0 0 ~ ~ ~ /tmp/EdDk.aqUf00xD29: 6 lines, 276 characters. play10# bsdlabel md1s2 # /dev/md1s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 8050 16 unused 0 0 c: 16066 0 unused 0 0 # "raw" part, don't edit d: 8000 8066 unused 0 0
play10# newfs md1s2a /dev/md1s2a: 3.9MB (8048 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 0.98MB, 63 blks, 128 inodes. super-block backups (for fsck -b #) at: 160, 2176, 4192, 6208 play10# newfs md1s2d /dev/md1s2d: 3.9MB (8000 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 0.98MB, 63 blks, 128 inodes. super-block backups (for fsck -b #) at: 160, 2176, 4192, 6208
play10# mount /dev/md1s2d /mnt play10# touch /mnt/newfile play10# ls -l /mnt total 2 drwxrwxr-x 2 root operator 512 Jul 3 21:21 .snap -rw-r--r-- 1 root wheel 0 Jul 3 21:22 newfile play10# umount /mnt