@@ -17,34 +17,36 @@ - - Disk partitioning/booting + + Getting along with other operating systems Accessing Microsoft partitions NetBSD supports a number of different filesystems (for a complete list see - &man.fstab.5; including FAT, FAT32, NTFS4 and NTFS5 from Microsoft. + &man.fstab.5;) including FAT, FAT32, NTFS4 and NTFS5 from Microsoft. Currently only read support works reliably for NTFS filesystems. Long filenames are supported on both FAT and NTFS. - To access another filesystem you have to set up a correct "disklabel" - which tells the system where to find the data on the disk. With a correct - "disklabel" you are able to "mount" it for use with NetBSD. + To access another filesystem you have to set up a + disklabel, which tells the system where to find the + data on the disk. With a correct disklabel you are + able to mount it for use with NetBSD. Setting up the disklabel Determine the disk containing the filesystem - If you only have a single IDE/ST506 or SCSI disk it will be wd0 or - sd0, if you have multiple disks you should check the output from - "dmesg | more" to determine the correct disk's - name. + If you only have a single disk it will be wd0 + or sd0, depending on whether you have IDE + or SCSI. If you have multiple disks you should check the output + of dmesg | more to determine the name of the desired + disk. Determine the size and offset of the partition. - Type "fdisk" and you will see the size and offset of the partitions - which could be something like: + Type fdisk and you will see the size and offset of + the partitions which could be something like: NetBSD disklabel disk geometry: cylinders: 16938 heads: 15 sectors/track: 63 (945 sectors/cylinder) @@ -78,9 +80,10 @@ 3. Windows 2000 NTFS5 inside an "extended" partition - Type "disklabel <DISKNAME>" - If the disk contains only MS-DOS partitions NetBSD will automatically generate - a 'fake' disklabel containing an entry for the first MS-DOS partition. + Type disklabel <DISKNAME> + If the disk contains only MS-DOS partitions NetBSD will + automatically generate a 'fake' disklabel containing an entry + for the first MS-DOS partition. The output could look something like this: # disklabel wd0 @@ -111,19 +114,19 @@ Prepare to edit the disklabel - If you prefer to use an editor other than vi type - "setenv EDITOR <YOUR_EDITOR>", e.g., "setenv EDITOR - pico". + If you prefer to use an editor other than vi, + type setenv EDITOR <YOUR_EDITOR>, e.g., + setenv EDITOR pico. - Edit the disklabel with "disklabel -e <DISKNAME>" + Edit the disklabel with disklabel -e <DISKNAME> Go down to the bottom of the disklabel and you are ready to edit your labels. You need two things: - The next unused partition letter (eg: 'f'). - The 'start/size' value from fdisk (eg: '63'). + The next unused partition letter (e.g., 'f'). + The 'start/size' value from fdisk (e.g., '63'). Add a new line at the bottom that for NTFS reads: @@ -151,50 +154,54 @@ g: 4596480 7302960 MSDOS - Notes on partitions: NetBSD/i386 currently only supports eight partitions per - disk ('a' - 'h'), also the 'number of partitions' line directly above the - partition table should be greater or equal to the number of partitions defined. + Note on partitions: NetBSD/i386 currently only supports eight + partitions per disk ('a' - 'h') and the 'number of partitions' + line directly above the partition table should be greater or + equal to the number of partitions defined. Save and check the disklabel - Exit the editor, type "disklabel <DISKNAME>", and confirm your - new partition is visible. + Exit the editor, type disklabel <DISKNAME>, + and confirm your new partition is visible. Mounting the filesystem - Every disk partition has a device entry in '/dev', the form of such an - entry is '/dev/' followed by the diskname, followed by the partition letter. - In the above example the device entry for the NTFS and MS-DOS partitions would - be '/dev/wd0f' and '/dev/wd0g' respectively. + Every disk partition has a device entry in /dev. + The form of such an entry is /dev/ followed by + the disk name, followed by the partition letter. In the above + example, the device entry for the NTFS and MS-DOS partitions would + be /dev/wd0f and /dev/wd0g + respectively. Create a mountpoint for each partition - "mkdir <MOUNTPOINT>", eg: "mkdir /msdos" and - "mkdir /nt4". + mkdir <MOUNTPOINT>, e.g., mkdir /msdos and + mkdir /nt4 Mount the filesystems - "mount -t <TYPE> <DEVICE> <MOUNTPOINT>", - eg: "mount -t msdos /dev/wd0g /msdos" and "mount -t ntfs - /dev/wd0f /nt4". - Check all is ok - "ls <MOUNTPOINT>", eg: "ls /msdos" and "ls - /nt4". - Set filesystems to be automatically mounted on boot - If you want NetBSD to automatically mount the filesystems every time it - boots you should edit /etc/fstab and add lines of the form: + mount -t <TYPE> <DEVICE> <MOUNTPOINT>, + e.g., mount -t msdos /dev/wd0g /msdos and + mount -t ntfs /dev/wd0f /nt4 + Check all is OK + ls <MOUNTPOINT>, e.g., ls /msdos and + ls /nt4 + Set filesystems to be automatically mounted at boot + If you want NetBSD to automatically mount the filesystems every + time it boots, you should edit /etc/fstab and + add lines of the form: <DEVICE> <MOUNTPOINT> msdos rw - <DEVICE> <MOUNTPOINT> ntfs rw + <DEVICE> <MOUNTPOINT> ntfs ro Again, in the above example this would be: /dev/wd0g /msdos msdos rw - /dev/wd0f /nt4 ntfs rw + /dev/wd0f /nt4 ntfs ro @@ -222,10 +229,10 @@ Method 1) Use the NetBSD mbr code - Use the NetBSD mbr code which allows you to override options at boot time if - required. This requires a working, bootable NetBSD installation. - The NetBSD mbr code is installed in an empty file using the fdisk - command in NetBSD + Use the NetBSD mbr code which allows you to override options at + boot time if required. This requires a working, bootable NetBSD + installation. The NetBSD mbr code is installed in an empty file + using the fdisk command in NetBSD. In this example, Windows Server 2003 is on disk 0 and a NetBSD 4.0 @@ -328,7 +335,7 @@ The advantages of this method are that you have the wider array of grub options open to you, plus the kernel can be loaded from NTFS - (if that is appropriate to your needs, usually you'd just load it + (if that is appropriate to your needs; usually you'd just load it from the root of your NetBSD installation). For instance, you might like to have a NetBSD recovery or installation kernel handy for troubleshooting even on a machine without a full NetBSD @@ -365,25 +372,27 @@ - Installing NetBSD on a disk which currently is entirely used by Dos/Windows + Installing NetBSD on a disk which currently is entirely used by DOS/Windows + Note: this only applies to FAT filesystems. If you have an installation where DOS/Windows currently occupies the - whole disk, you can if there is space left on the drive, make the - DOS/Windows partition smaller and then build a second partition to use + whole disk, if there is space left on the drive you can make the + DOS/Windows partition smaller and then create a second partition to use with NetBSD. The steps involved in this are - Moving all data of the DOS partition to the start of that + Move all data of the DOS partition to the start of that partition using the tool defrag - Resizing the DOS partition using a tool called FIPS. - Fips can be obtained from the FIPS WWW Site. + Resize the DOS partition using a tool called FIPS. + FIPS can be obtained from the FIPS + web site. Be sure to read all the documentation! - Installing a bootloader as described above - Installing NetBSD + Install a bootloader as described above + Install NetBSD @@ -402,7 +411,7 @@ The Windows 98 CD is a fine way to get a (real!) MS-DOS prompt if your machine has Windows Millennium Edition (Windows ME) installed, and if booting from - floppy is not an option, as it's often the case with modern + floppy is not an option, as is often the case with modern laptops. You can press shift+F5 to not load any drivers like "highmem.sys" (see above) @@ -448,12 +457,12 @@ Compile a new kernel to match the card settings. Buy a different card - in modern PCI PCs an ISA network card can seriously impact the performance of other devices - - a PCI card such as an &man.fxp.4; (Intel etherexpress-pro), + - a PCI card such as an &man.fxp.4; (Intel EtherExpress Pro), or &man.tlp.4; (Tulip or clone) is recommended. Manually change the kernel settings with &man.ddb.4;. Boot the kernel with '-d' (Hit the space - bar, before boot countdown reaches 0), then type 'boot + bar before boot countdown reaches 0), then type 'boot netbsd -d'. Enter x/xla loc,100. Record the offsets of fields with 0x280 in them. @@ -571,10 +580,13 @@ + + Disk issues with old machines + Using large drives on machines with a 540MB BIOS limit - Enter a geometry of 1024/16/63 in the BIOS, and be sure to have + Enter a geometry of 1024/16/63 in the BIOS and be sure to have your boot partition within the first 540M (so that the kernel can be loaded by BIOS routines). NetBSD will then be able to use the whole disk. @@ -583,35 +595,30 @@ How to determine a "correct" disk geometry - - NetBSD uses the PC BIOS to load the boot program. In order for this to work - both NetBSD and the BIOS must agree on the disk geometry (at least the part - containing the boot partition). + NetBSD uses the PC BIOS to load the boot program. In order for + this to work, both NetBSD and the BIOS must agree on the disk geometry + (at least the part containing the boot partition). - - The BIOS in PCs can only cope with a certain number of cylinders, heads, and - sectors per disk (see table). (This includes - BIOSes on SCSI cards). + The BIOS in PCs can only cope with a certain number of cylinders, + heads, and sectors per disk (see + table). (This includes BIOSes on SCSI cards). - - Since many drives' real geometry cannot fit within these limitations a modern - BIOS will 'translate' the geometry by picking fictitious values that multiply - out to the same total size (or slightly less). + Since modern drives' real geometry cannot fit within these + limitations, a modern BIOS will 'translate' the geometry by picking + fictitious values that multiply out to the same total size (or slightly + less). - - If a disk has a valid DOS MBR partition, (created by DOS, Windows, pfdisk, - or similar) it will contain the "correct" BIOS geometry. - NetBSD will use this as the BIOS geometry during sysinst. - Unfortunately on an empty disk, or one without the MBR set up properly, - NetBSD will get the BIOS geometry wrong. - Ideally this information should be passed in from the boot program, but - there is no certain method of determining the mapping of bios disk to - netbsd disk, though it should be possible to improve on the current 0% - hitrate. + If a disk has a valid DOS MBR partition, (created by DOS, + Windows, pfdisk, or similar) it will contain the "correct" BIOS + geometry. NetBSD will use this as the BIOS geometry during sysinst. + Unfortunately, on an empty disk, or one without the MBR set up + properly, NetBSD will get the BIOS geometry wrong. Ideally, this + information should be passed in from the boot program, but there is + no certain method of determining the mapping of BIOS disk to NetBSD + disk. - - One method of determining the "correct" translated geometry is to use - 'pfdisk': + One method of determining the "correct" translated geometry is + to use 'pfdisk': @@ -649,28 +656,17 @@ Other sources of information - XFree86 Documentation - - for problems with installing or configuring X. - - NetBSD 5.0 install notes - supported hardware and how to install. -The NetBSD ELF FAQ. As - of NetBSD 1.5, the i386 port uses ELF instead of a.out. -The wscons - documentation. NetBSD's platform-independent workstation console -driver. -port-i386 mail list - - if you have any additional questions please subscribe. + + The wscons documentation. NetBSD's platform-independent + workstation console driver. +port-i386 mailing + list Netbooting - NetBSD/i386 - booting from floppies or dos partitions. + NetBSD/i386 - booting from floppies or DOS partitions. Power Management for Laptops General NetBSD Documentation - for questions not specific to NetBSD/i386. -Luke Mewburn's - - guide on choosing i386 hardware for *BSD -Toshiba's machine/OS - compatibility database, including NetBSD Reed Media's Laptops and NetBSD list