Browse Source

Plan 9 from Bell Labs 2011-04-21

David du Colombier 13 years ago
parent
commit
4721f412b6

+ 2 - 0
sys/man/3/fs

@@ -93,8 +93,10 @@ The length of the mirror device is the minimum of the lengths of the
 .IR files .
 .TP
 .BI part " new file offset length"
+.PD 0
 .TP
 .BI part " new offset end
+.PD
 In the first form,
 the device
 .I new

+ 42 - 16
sys/man/8/boot

@@ -34,12 +34,12 @@ into memory.
 Once loaded, the kernel initializes its data structures and devices.
 It sets the two environment variables
 .B /env/cputype
-and 
+and
 .B /env/terminal
 to describe the processor.
 It then binds a place-holder file server,
 .IR root (3),
-onto 
+onto
 .B /
 and crafts an initial process whose sole function is to
 .IR exec (2)
@@ -115,7 +115,7 @@ option,
 will prompt for one on the console:
 .IP
 .EX
-user: 
+user:
 .EE
 .PP
 The user will also be prompted for a password to
@@ -123,7 +123,7 @@ be used as an encryption key on each
 .IR attach (5):
 .IP
 .EX
-password: 
+password:
 .EE
 .PP
 With most
@@ -212,7 +212,7 @@ option is given or if no stored information is found
 will prompt for all three items and store them.
 .IP
 .EX
-password: 
+password:
 authid: bootes
 authdom: research.bell-labs.com
 .EE
@@ -238,7 +238,7 @@ The
 are passed to
 .IR ipconfig (8)
 when configuring the IP stack.
-The 
+The
 .IR plan9.ini (8)
 variables
 .B fs
@@ -253,13 +253,13 @@ connect to the local file system.
 The first argument is a disk holding a file system.
 .I Boot
 inspects the disk.
-If the disk is a 
+If the disk is a
 .IR fossil (4)
 file system, it invokes
 .B /boot/fossil
 to serve it.
 If the
-.B venti 
+.B venti
 environment variable (really,
 .IR plan9.ini (8)
 variable) is set,
@@ -274,7 +274,7 @@ The variable's value can take the following forms:
 .B /dev/sdC0/arenas
 the file should be a venti partition with a configuration
 stored on it using
-.I venti/conf 
+.I venti/conf
 (see
 .IR venti-fmt (8)).
 .I Boot
@@ -284,7 +284,7 @@ and start
 announcing on
 .B tcp!127.1!17034
 for venti service
-and 
+and
 .B tcp!127.1!8000
 for web service,
 using the configuration stored in that partition.
@@ -309,10 +309,35 @@ will configure the IP stack by passing
 if any, to
 .IR ipconfig (8).
 .RE
-.PP
+.IP
+.I Fossil
+is invoked as
+.RS
+.IP
+.EX
+/boot/fossil -f \fIpartition\fP -c 'srv -A fboot' -c 'srv -p fscons'
+.EE
+.RE
+.IP
+and
+.I boot
+then renames
+.L /srv/fboot
+to
+.LR /srv/boot ,
+so
+.B fossil.conf
+should not use the
+.B srv
+command to create
+.LR fboot ,
+.LR boot ,
+nor
+.LR fscons .
+.IP
 If the disk is not a
 .IR fossil (4)
-partition, 
+partition,
 .I boot
 invokes
 .BR /boot/kfs .
@@ -331,7 +356,7 @@ a
 disk.
 The args are passed to
 .IR kfs (4).
-.PP
+.IP
 For the
 .B tcp
 method,
@@ -342,12 +367,12 @@ system on the network using the BOOTP protocol and
 the Plan 9 vendor-specific fields.
 .SH EXAMPLES
 On PCs, the default arguments to boot are constructed using
-the 
+the
 .B bootargs
 variable in
 .IR plan9.ini (8).
 .PP
-Start 
+Start
 .IR kfs (4)
 with extra disk buffers:
 .IP
@@ -366,7 +391,7 @@ bootargs=tcp -g 192.168.0.1 ether /net/ether1 \e
     192.168.0.50 255.255.255.0
 .EE
 .LP
-(The 
+(The
 .B bootargs
 line is split only for presentation; it is one line in the file.)
 .SH FILES
@@ -377,6 +402,7 @@ line is split only for presentation; it is one line in the file.)
 .B /sys/src/9/boot
 .SH "SEE ALSO"
 .IR root (3),
+.IR factotum (4),
 .IR dhcpd (8),
 .IR init (8)
 .SH BUGS

+ 2 - 4
sys/man/8/prep

@@ -143,7 +143,7 @@ A
 file system.
 .TP
 .B fscfg
-A one-sector partition used to store an
+A few-sector partition used to store an
 .IR fs (3)
 configuration.
 .TP
@@ -713,9 +713,7 @@ Create a bootable USB disk or flash-memory device to be booted
 via the BIOS and containing only a FAT Plan 9 partition.
 .IP
 .EX
-mount /srv/usb /n/usb
-ls -d /n/usb/sdU*		# note the name, normally sdU0.0
-disk/partfs /n/usb/sdU0.0/data
+disk/partfs /dev/sdU0.0/data
 cd /dev/sdXX
 disk/mbr -m /386/mbr data
 disk/fdisk -baw data

+ 5 - 4
sys/src/9/boot/boot.h

@@ -12,15 +12,14 @@ enum
 	Nbarg=	16,
 };
 
-extern void	authentication(int);
-extern char*	bootdisk;
+extern char*	bootdisk;		/* defined in ../$arch/boot$CONF.c */
 extern char*	rootdir;
 extern int	(*cfs)(int);
 extern int	cpuflag;
 extern char	cputype[];
 extern int	fflag;
 extern int	kflag;
-extern Method	method[];
+extern Method	method[];		/* defined in ../$arch/boot$CONF.c */
 extern void	(*pword)(int, Method*);
 extern char	sys[];
 extern uchar	hostkey[];
@@ -28,19 +27,21 @@ extern uchar	statbuf[Statsz];
 extern int	bargc;
 extern char	*bargv[Nbarg];
 extern int	pcload;
-extern void	usbdiskinit(void);
 
 /* libc equivalent */
+extern void	authentication(int);
 extern int	cache(int);
 extern char*	checkkey(Method*, char*, char*);
 extern void	fatal(char*);
 extern void	getpasswd(char*, int);
 extern void	key(int, Method*);
+extern int	mountusbparts(void);
 extern int	outin(char*, char*, int);
 extern int	plumb(char*, char*, int*, char*);
 extern int	readfile(char*, char*, int);
 extern long	readn(int, void*, long);
 extern void	run(char *file, ...);
+extern void	runv(char **argv);
 extern int	sendmsg(int, char*);
 extern void	setenv(char*, char*);
 extern void	settime(int, int, char*);

+ 0 - 1
sys/src/9/boot/local.c

@@ -268,7 +268,6 @@ connectlocal(void)
 	bind("#k", "/dev", MAFTER);
 	bind("#u", "/dev", MAFTER);
 	bind("#æ", "/dev", MAFTER);
-	usbdiskinit();		/* make partfs partitions visible */
 
 	if((fd = connectlocalfossil()) < 0)
 	if((fd = connectlocalkfs()) < 0)

+ 1 - 0
sys/src/9/pc/pc

@@ -130,3 +130,4 @@ bootdir
 	/386/bin/ip/ipconfig
 	/386/bin/auth/factotum
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pcauth

@@ -80,3 +80,4 @@ bootdir
 	/386/bin/fossil/fossil
 	/386/bin/venti/venti
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pccpu

@@ -97,3 +97,4 @@ bootdir
 	/386/bin/ip/ipconfig ipconfig
 	/386/bin/auth/factotum
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pccpuf

@@ -130,3 +130,4 @@ bootdir
 	/386/bin/fossil/fossil
 	/386/bin/venti/venti
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pcdisk

@@ -132,3 +132,4 @@ bootdir
 	/386/bin/disk/kfs
 	/386/bin/cfs
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pcf

@@ -135,3 +135,4 @@ bootdir
 	/386/bin/fossil/fossil
 	/386/bin/venti/venti
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 0
sys/src/9/pc/pcfs

@@ -97,3 +97,4 @@ bootdir
 	/386/bin/srv
 	/386/bin/test
 	/386/bin/usb/usbd
+	/386/bin/disk/partfs

+ 1 - 1
sys/src/cmd/disk/prep/prep.c

@@ -70,7 +70,7 @@ Auto autox[] =
 {
 	{	"9fat",		10*MB,	100*MB,	10,	},
 	{	"nvram",	512,	512,	1,	},
-	{	"fscfg",	512,	512,	1,	},
+	{	"fscfg",	1024,	8192,	1,	},
 	{	"fs",		200*MB,	0,	10,	},
 	{	"fossil",	200*MB,	0,	4,	},
 	{	"arenas",	500*MB,	0,	20,	},