Commit Graph

3401 Commits

Author SHA1 Message Date
jdolecek
2ced7f69cb fix DPADD 2003-10-11 09:51:49 +00:00
wiz
5ffe40db93 Sort sections; bump date to commit date; add NetBSD RCS Id; mention
when it appeared in NetBSD in HISTORY section; rename section
"GOTCHAS" to "CAVEATS" since that's our standard name.
2003-10-11 09:12:18 +00:00
lukem
7a699e2bed unconditionally #define DEFAULT_BOOTDIR. should fix non-x86 builds 2003-10-11 04:50:49 +00:00
matt
4669b2abcb Compensate for 64bit (use %p for pointers). 2003-10-10 21:59:09 +00:00
wiz
5a3b01bb60 All single letter options are usually combined; add -V to the others. 2003-10-10 09:03:23 +00:00
wiz
e5db3159a8 Sync look of -V description in usage with other option descriptions. 2003-10-10 09:00:24 +00:00
grog
5cfcdccff1 Hook Vinum into build. 2003-10-10 06:10:53 +00:00
grant
d2b25aff9c bump date for last 2003-10-10 04:14:00 +00:00
grog
c52d09a328 Decribe the V flag. 2003-10-10 03:27:10 +00:00
grog
51b6966ad7 Add -V flag for use with Vinum to indicate that the last character of
the device name should not be interpreted as a partition identifier.
2003-10-10 03:23:28 +00:00
grog
d5119a1e37 Initial import of Vinum userland.
Ported by:  Ramsubramanyam <Ramsubramanyam@infosys.com>,
	    Atul Kabra <Atul_Kabra@infosys.com>,
	    Maneesh Jhinger <maneesh_jhinger@infosys.com>

Reviewed by:  lukem
2003-10-10 03:13:12 +00:00
dbj
4d76d724b9 calculate "-s size" values after sectorsize has been fully determined
extend "-s size" argument to allow negative sizes to represent value to
subtract from diskalbel partition size
2003-10-09 16:23:29 +00:00
yamt
d59161d069 - don't try to write alt super blocks beyond the end of the partition.
- flush stdout when printing each super block addresses.
2003-10-09 14:28:34 +00:00
itojun
8612aa8b30 use asprintf David Hill 2003-10-08 20:39:07 +00:00
itojun
eb48d1d3cb plug memory leak. David Hill 2003-10-08 20:36:25 +00:00
lukem
1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
lukem
04a16dcc66 add some more detail to an error message 2003-10-08 03:56:21 +00:00
lukem
f41de51799 be consistent about "MS-DOS" 2003-10-06 12:02:52 +00:00
bouyer
85050e8b77 More licence fixes, pointed out by Thomas Klausner. 2003-10-05 20:54:45 +00:00
bouyer
7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
jdolecek
91b453f2db fix NULL pointer pointer dereference in fileerror() when ino is NULL
problem reported and fix provided in PR kern/23065 by Gary Duzan, only
slightly adjusted to only do the VTOI() when needed
2003-10-05 17:11:23 +00:00
dsl
920dff4b7c If /dev/constty exists, use it instead of /dev/console for single user shell.
I'm not 100% certain it should call login_tty() for anything else.
2003-10-03 13:31:32 +00:00
yamt
f271a34ced write out modified directory entries to the correct place. 2003-10-03 12:23:22 +00:00
yamt
6e547a61f9 make this work for big (ie. with indirect blocks) directories
without spurious 'EXTRA ..' errors.
2003-10-03 12:22:15 +00:00
wiz
b6c5244ce8 Bump date for previous. 2003-10-02 07:07:48 +00:00
itojun
2c96e1a283 use netmask of /32. as discusssed on tech-userlevel 2003-10-02 06:25:28 +00:00
itojun
d3e55680aa correct typo. PR misc/22944 2003-10-02 00:09:06 +00:00
itojun
83ddaf1cbf print prefixlen on -show 2003-10-01 06:24:19 +00:00
dsl
4cb1ff990c Forgot the date.... 2003-09-27 19:07:12 +00:00
dsl
0188e8d8ce Add kern.drivers and kern.root_partition to match recent kern_sysctl.c
Add kern.root_device which was absent.
2003-09-27 18:57:05 +00:00
cb
88823a8138 back out revision 1.3. this should not have been committed yet,
since it breaks backward compatibility.

noticed by recht@
2003-09-25 01:43:12 +00:00
wiz
72b77eb9e9 Add article. 2003-09-23 21:25:20 +00:00
cb
7543b55c56 add a new verification method that prompts for the pkcs#5 pbkdf2
passphrase again and checks the generated key against the original.
2003-09-23 17:24:45 +00:00
wiz
bc0e64144c Correct error in previous, noted by Nick Hudson. 2003-09-23 12:14:49 +00:00
wiz
0ba80f40e8 Combine multiple single-letter options. 2003-09-21 15:23:55 +00:00
grant
76036fea3c add -e flag to set the separator to '=' where the default is ' = '.
this allows sysctl output to fed back into itself. inspired by
FreeBSD's sysctl(8).

ok'd by atatat.
2003-09-20 17:02:17 +00:00
itojun
731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
itojun
6379e11194 realloc pedant 2003-09-19 08:29:58 +00:00
enami
69fc84d695 Need to write entire sector. 2003-09-17 21:09:18 +00:00
grant
9bf724618c put flags in a list with descriptions. add proper description of -w. 2003-09-17 18:24:47 +00:00
cube
5041ba1a4c Remove a comment that referred to a non-committed part of the patch I
submitted for bin/17613. Ok'd by mrg@.
2003-09-16 09:34:48 +00:00
simonb
bb850c0c5e Use HW_USERMEM64 to fetch the amount of memory available. 2003-09-13 10:59:50 +00:00
itojun
e1d953a832 support DUMP by sysctl 2003-09-12 07:45:21 +00:00
dsl
58915e2274 If /dev/MAKEDEV is a symlink then preserve the symlink in the mfs /dev.
If /dev/MAKEDEV doesn't exist then try to run /etc/MAKEDEV instead.
Use the (new) '-n inodes' option to mount_mfs and base the size on the number
of inodes and the size of the MAKEDEV script.
2003-09-11 12:51:51 +00:00
dsl
188e64350d Change date on man pages 2003-09-11 12:21:01 +00:00
dsl
a83765310a Make mkfs -N work again (was trying to read filesystem).
Correct calculation of number of inodes from density for small filesystems.
Add a '-n inodes' option so that the desired number of inodes can be
explicitly given - init needs this for mfs /dev, -i density is too crude.
2003-09-11 12:19:44 +00:00
dsl
82580bb3ec Try very hard to ensure that the correct superblock will be found by
invalidating a host of other possible superblocks.
2003-09-10 17:25:14 +00:00
itojun
0398a95f59 make it possible to use /kern/ipsec{sp,sa} for dumping policy/SA. it will
workaround the issue with socket buffer size in PF_KEY SADB_DUMP.
2003-09-08 12:34:29 +00:00
agc
76b6c930a4 Make this compile after the recent changes to the kernel. 2003-09-08 09:05:08 +00:00
wiz
0eba47bcd1 Sync usage with man page. 2003-09-08 07:21:59 +00:00
wiz
d234eaaab1 Sort options. 2003-09-08 07:21:51 +00:00
wiz
da332882ea Add file ... mode to usage. 2003-09-08 07:09:53 +00:00
wiz
c557470784 Punctuation nit; bump date for previous. 2003-09-08 07:09:13 +00:00
itojun
8ca90bd4e4 add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8).
it allows easier access to ipsecsa/sp.  it works around problem where
setkey -D does not work with large number of ipsec SAs due to socket buffer
size.
2003-09-08 06:51:53 +00:00
itojun
4380703631 make it possible to process files. 2003-09-08 06:18:49 +00:00
wiz
4ae63e1052 Bump date for previous. 2003-09-08 05:21:58 +00:00
itojun
9effb481fb "tagged" policy is not introduced to netbsd-current yet 2003-09-07 22:21:01 +00:00
itojun
967747c406 committed by mistake 2003-09-07 22:20:05 +00:00
itojun
643b0ddea3 warn that port-number does not work for gateway config. PR kern/22715
add reference.  bump date.
2003-09-07 22:18:58 +00:00
itojun
ce112dfc4f add -t option for gmt time offset (normally MS-DOS filesystem has timestamp
in localtime, not GMT).  PR kern/22717
2003-09-07 22:09:11 +00:00
wiz
47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
wiz
d0b01a96aa New sentence, new line; drop trailing whitespace. 2003-09-06 20:12:41 +00:00
wiz
51e1730356 Punctuation nits. 2003-09-06 20:11:18 +00:00
wiz
495a82c52c New sentence, new line; improve grammar. 2003-09-06 20:09:26 +00:00
jdolecek
06e5ddbb7e if neither -i nor -n option is specified, use the passed argument
as module ID if it's numeric, and as module name if it's not numeric

this saves some typing which bothered me for some years (one too many today)
2003-09-06 19:55:24 +00:00
martin
cf6d36c7b6 Make LCP keepalive behaviour configurable. 2003-09-06 19:35:34 +00:00
jdolecek
ade4df3adc implement support for forced LKM load, which makes the kernel skip
the version checks, using new -f flag and LMFORCE ioctl

Hopefully the description in the manpage is discouraging enough so that
nobody would dare even _think_ of using forced loads. A warning
message is written to stderr when this is used, just in case.
2003-09-06 19:23:20 +00:00
itojun
f189be338c unifdef HAVE_ARC4RANDOM 2003-09-06 12:56:43 +00:00
itojun
e2c411ce3c use arc4random 2003-09-06 12:42:00 +00:00
itojun
3f4f8a9b61 s/0x7fffffff/INT32_MAX/ 2003-09-04 15:31:58 +00:00
itojun
bb71295ab0 use arc4random(3). it is at least better than random(3)
XXX masked topmost bit so that values don't go negative, is it the right thing
to do?
2003-09-04 15:30:37 +00:00
dsl
426b102381 fsirand is no longer needed. 2003-09-03 19:38:04 +00:00
dsl
e6ca38e5ec Ensure the area between the end of the main superblock and the start of the
first alternate superblock is zerod.
Removes any possibility of any programs using a trully out of date
alternate superblock if a filesystem is remade with a larger block size.
2003-09-03 19:29:12 +00:00
dsl
36aa427d2c Randomise di_igen for the first 2 blocks of inodes for non-UFS2 filesystems.
Randomise di_igen for "/" (and lost+found) for UFS2 filesystems.
Ensure nothing from the lost+found inode leaks into the / inode.
2003-09-03 17:08:58 +00:00
wiz
feb417a0db Bump date for last. 2003-09-01 04:43:32 +00:00
mycroft
46743e2182 Add prevent/allow commands. 2003-09-01 04:34:16 +00:00
mycroft
4950c2c904 Add a flushcache command -- I need it for my DVD+RW. 2003-09-01 04:24:55 +00:00
dsl
1ce757782d Define and use PRIdaddr for printing disk block numbers.
Should fix bin/22638 for compilation on amd64.
2003-08-29 16:31:30 +00:00
dsl
0f7fa6b1be Update date for last. 2003-08-21 16:02:32 +00:00
dsl
66117d6353 Remove -c maxblkspercg (leaving -c xxx ignored).
-c used to specify the number of cylinders per group
- but newfs has ignored cylinders for a while.
Changing what -c meant is just asking for trouble!
I might add something to let MINCYL be changed.
2003-08-21 15:47:26 +00:00
dsl
870ae687ac Remove unimplemented -n rotational positions
Remove depracated -c cpg (had been fragments per group in newfs.c, but...)
I might add something to let MINCYL (= 4) be configurable.
2003-08-21 15:43:32 +00:00
dsl
cff5fdb06e Rework of code that sorts out number of cylinder groups and inodes:
- allows less than 'one fragment per inode' (useful for mfs /dev)
- limits number of inodes to 2^31 (they are stored in an int32_t)
- errors if the number of cylinder groups is such that the cylinder group
  summary won't fit in the first cylinder group.
- ensures that the last cylinder block contains a valid number of fragments
  and inodes, and is not larger than any earlier ones.
- cylinder groups are now created with almost the same size as each other.
Change posted to tech-kern, and no one objected.
2003-08-21 14:55:03 +00:00
dsl
beef08b576 Avoid allocating a data buffer the size of the cylinder group summary.
Write the summary every time it fills a fragment - except for the first
sector which is written last.
2003-08-15 15:24:21 +00:00
dsl
8f0618344d Fix layout of printout of alternate superblock list when > 2^32 sectors, use
80 columns (sysinst uses full width these days).
Use {;} instead of , in a couple of places.
Abort if user tries to make a UFS1 filesytem with > 2^31 fragments.
Abort if the cylinder group summary won't fit into the first cylinder group.
Use pread/pwrite and remove a few redundant casts.
2003-08-15 15:07:16 +00:00
itojun
d9be8318c9 avoid FD_SET overrun. from openbsd 2003-08-13 08:51:05 +00:00
wiz
c2e074ca4b Bump date for last. 2003-08-12 12:25:15 +00:00
dsl
04dec52c29 Mention and cross reference newfs_lfs and makefs. 2003-08-12 10:29:07 +00:00
dsl
b4c1c6117c Stop superblock being written to sector 0 for small filesystems.
Honour the '-s size' command option.
Allow an LFS filesystem to be created in a file.
2003-08-12 08:41:36 +00:00
dsl
26461e4412 Put cylinder number 1023 into the mbr for sectors beyond the CHS limit
(rather than encoding the highest CHS addressable sector).
2003-08-10 10:20:08 +00:00
wiz
bf2d0ca599 Mention /etc/sysctl.conf. Bump date. Closes PR 22213. 2003-08-07 10:11:02 +00:00
agc
276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
agc
bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
wiz
7539e84445 Bump date for flushall description. 2003-08-07 09:46:17 +00:00
dsl
9b8239809b Exit child process if we fail to 'cd /dev' or 'execl sh MAKEDEV'.
Don't really want two processes in the rest of init!
2003-08-05 09:31:48 +00:00
dsl
42c39f4f19 Make output fit into 80 columns when a partition doesn't end on a cylinder
boundary.
2003-08-04 17:14:50 +00:00
dsl
2ceab48459 Read correct sector when following extended partition chain.
Require extended partition chain to be through increasing sector numbers
in order to abort loops.
2003-08-04 16:51:56 +00:00
jdolecek
f462956915 bump date for last 2003-08-02 11:43:21 +00:00
jdolecek
28dd22899a actually enable MNT_GETARGS support 2003-08-02 11:42:20 +00:00
jdolecek
62e0ed44c8 Allow separate masks for files and directories. Useful e.g. to turn
the execute bit off for files, but keep search permission for directories.
Change contributed in PR kern/21538 by Pavel Arnost, based on some FreeBSD
patches.
Further manpage changes, and backward-compatibility adjustments done by me.

Also fixes PR kern/16778 by Johan Danielsson, and PR kern/3400 by Rick Byers
2003-08-02 11:41:19 +00:00
jdolecek
913ed381f5 g/c all traces of FreeBSD-specific code - it only obfuscated the code without
any real benefit
2003-08-02 10:11:47 +00:00