I'm copying this to -hackers as well.

I tried setting the MD_NSECT to 307200 to accomodate my RAM disk, but
according to md(4):

     At boot time the md driver will search for pre-loaded modules of type
     `md_image' and instantiate a md device for each of these modules.  The
     type `mfs_root' is also allowed for backward compatibility.  These
     devices are backed by the RAM reserved by the loader(8), and as such not
     limited by the malloc(9) size constraints.

I am preloading the images using the md_image variable in loader.conf, so
this documentation thinks I *should* be fine.

The kernel with MD_NSECT set to 307200 still failed to boot with my 128MB
md_image.

I'm attaching my kernel config.

-nick

On Mon, Sep 23, 2002 at 02:08:11PM -0400, Lowell Gilbert wrote:
> Nicholas Esborn <[EMAIL PROTECTED]> writes:
> 
> > I've tried this on two machines:
> > 
> >  1 4.7-RC w/ 512 MB of RAM
> >  2 5.0-CURRENT w/ 256 MB of RAM
> > 
> > Both behave the same way with a ~128MB md_image.
> 
> Did you check the manual?  It says: "The default maximum size of a md
> disk backed by malloc(9) is 20,000 sectors of 512 bytes each.  This
> can be changed with the kernel option MD_NSECT." 
> 
> > -nick
> > 
> > On Sun, Sep 22, 2002 at 11:19:18AM -0700, Kris Kennaway wrote:
> > > On Sun, Sep 22, 2002 at 01:11:20AM -0700, Nicholas Esborn wrote:
> > > > Hello,
> > > > 
> > > > I've been trying to boot a kernel and a preloaded md_image of about 128MB.
> > > > 
> > > > The kernel and image load, and then about a quarter of a second after the
> > > > kernel executes, before any text even prints, the machine reboots.
> > > > 
> > > > Has anyone had better luck with large md_image root filesystems?
> > > 
> > > You forgot to mention how much RAM you have, and what FreeBSD version.

-- 
Nicholas Esborn
Unix Systems Administrator
Berkeley, California
#
# COPPER
# Tue Apr 23 05:41:01 GMT 2002
# nick
#
# Based on $FreeBSD: src/sys/i386/conf/GENERIC,v 1.246.2.40 2002/03/27 02:16:26 dd Exp 
$

machine         i386
cpu             I686_CPU
ident           COPPERX
maxusers        0

options         HZ=1000                 #increase clock resolution for polling
options         INET                    #InterNETworking
options         INET6                   #IPv6 communications protocols
options         FFS                     #Berkeley Fast Filesystem
options         FFS_ROOT                #FFS usable as root device [keep this!]
options         SOFTUPDATES             #Enable FFS soft updates support
options         UFS_DIRHASH             #Improve performance on big directories
options         MFS                     #Memory Filesystem
options         MD_ROOT                 #MD is a potential root device
options         MD_NSECT=307200         #Maxium MD size
options         NFS                     #Network Filesystem
options         NFS_ROOT                #NFS usable as root device, NFS required
options         MSDOSFS                 #MSDOS Filesystem
options         CD9660                  #ISO 9660 Filesystem
options         CD9660_ROOT             #CD-ROM usable as root, CD9660 required
options         PROCFS                  #Process filesystem
options         COMPAT_43               #Compatible with BSD 4.3 [KEEP THIS!]
options         SCSI_DELAY=15000        #Delay (in ms) before probing SCSI
options         UCONSOLE                #Allow users to grab the console
options         USERCONFIG              #boot -c editor
options         VISUAL_USERCONFIG       #visual boot -c editor
options         KTRACE                  #ktrace(1) support
options         SYSVSHM                 #SYSV-style shared memory
options         SYSVMSG                 #SYSV-style message queues
options         SYSVSEM                 #SYSV-style semaphores
options         P1003_1B                #Posix P1003_1B real-time extensions
options         _KPOSIX_PRIORITY_SCHEDULING
options         ICMP_BANDLIM            #Rate limit bad replies
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         CPU_ENABLE_SSE
options         CPU_ATHLON_SSE_HACK
#options                BOOTP
#options                BOOTP_NFSROOT
#options                BOOTP_NFSV3
#options                BOOTP_COMPAT
options         IPSEC
options         IPSEC_ESP
options         IPSEC_DEBUG
options         IPFILTER
options         IPFILTER_LOG

options         DEVICE_POLLING

device          isa
device          pci

# Floppy drives
device          fdc0    at isa? port IO_FD1 irq 6 drq 2
device          fd0     at fdc0 drive 0

# ATA and ATAPI devices
device          ata
device          atadisk                 # ATA disk drives
device          atapicd                 # ATAPI CDROM drives
device          atapifd                 # ATAPI floppy drives
device          atapist                 # ATAPI tape drives
options         ATA_STATIC_ID           #Static device numbering

# SCSI Controllers
device          ahc             # AHA2940 and onboard AIC7xxx devices

# SCSI peripherals
device          scbus           # SCSI bus (required)
device          da              # Direct Access (disks)
device          sa              # Sequential Access (tape etc)
device          cd              # CD
device          pass            # Passthrough device (direct SCSI access)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device          atkbdc0 at isa? port IO_KBD
device          atkbd0  at atkbdc? irq 1 flags 0x1
device          psm0    at atkbdc? irq 12

device          vga0    at isa?

# splash screen/screen saver
pseudo-device   splash

# syscons is the default console driver, resembling an SCO console
device          sc0     at isa? flags 0x100

# Floating point support - do not disable.
device          npx0    at nexus? port IO_NPX irq 13

# Serial (COM) ports
device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
device          sio1    at isa? port IO_COM2 irq 3

# Parallel port
device          ppc0    at isa? irq 7
device          ppbus           # Parallel port bus (required)
device          lpt             # Printer
#device         plip            # TCP/IP over parallel
device          ppi             # Parallel port interface device
#device         vpo             # Requires scbus and da


# PCI Ethernet NICs.
device          de              # DEC/Intel DC21x4x (``Tulip'')

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device          miibus          # MII bus support
device          dc              # DEC/Intel 21143 and various workalikes
device          fxp             # Intel EtherExpress PRO/100B (82557, 82558)
device          vr              # VIA Rhine, Rhine II
device          xl              # 3Com 3c90x (``Boomerang'', ``Cyclone'')

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device   loop            # Network loopback
pseudo-device   ether           # Ethernet support
pseudo-device   pty             # Pseudo-ttys (telnet etc)
pseudo-device   md              # Memory "disks"

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device   bpf             #Berkeley packet filter

# USB support
device          uhci            # UHCI PCI->USB interface
device          ohci            # OHCI PCI->USB interface
device          usb             # USB Bus (required)
device          ugen            # Generic
device          uhid            # "Human Interface Devices"
device          ukbd            # Keyboard
device          ulpt            # Printer
device          umass           # Disks/Mass storage - Requires scbus and da
device          ums             # Mouse
# USB Ethernet, requires mii
device          aue             # ADMtek USB ethernet
device          cue             # CATC USB ethernet
device          kue             # Kawasaki LSI USB ethernet

device          smbus
device          iicbus
device          iicbb
device          ic
device          iic
device          iicsmb
device          smb

device          viapm

#device         pcm

device          bktr

Reply via email to