Showing posts with label openbsd. Show all posts
Showing posts with label openbsd. Show all posts

Wednesday, November 25, 2009

Writing and Verifying a Floppy Image

First format a floppy with the following command:



fdformat /dev/fd0 (in Linux)
fdformat /dev/rfd0c (in OpenBSD)
format A: (in DOS)


Linux and OpenBSD


Insert a floppy and use the dd command to write an floppy image to the floppy diskette.



dd if=floppy46.fs of=/dev/fd0 bs=32k (in Linux)
dd if=floppy46.fs of=/dev/rfd0c bs=32k (in OpenBSD)


Use the following command to make sure that the image is written correctly to
the floppy.



cmp /dev/fd0 floppy46.fs (in Linux)
cmp /dev/rfd0c floppy46.fs (in OpenBSD)


Windows and DOS


If you use Windows XP, Vista or Windows 7, use fdimage or ntrw to write the boot floppy. Make sure the floppy has been formatted first.



C:\> ntrw floppy46.fs a:
3.5", 1.44MB, 512 bytes/sector
bufsize is 9216
1474560 bytes written


Or,



C:\> fdimage -q floppy46.fs a:


In Windows 9x/ME or DOS, you can use rawrite to write your boot floppy.



C:\> rawrite
RaWrite 1.2 - Write disk file to raw floppy diskette

Enter source file name: floppy46.fs
Enter destination drive: a
Please insert a formatted diskette into drive A: and press -ENTER- :

Compiling an OpenBSD kernel

Configuring Kernel


Download srcsys.tar.gz from ftp://ftp.openbsd.org/pub/OpenBSD/2.8
and unpack it into the /usr/src/ directory.



cd /usr/src
gzip -dc srcsys.tar.gz | tar xvf -


To update the kernel source tree to the latest version using CVS,
perform the following steps:



export CVS_RSH="/usr/bin/ssh"
export CVSROOT="anoncvs@anoncvs1.usa.openbsd.org:/cvs"
cd /usr/src/sys
cvs update -d


Read the options(4) man page which has a complete list of options.
You can also check /usr/src/sys/conf/GENERIC
and /usr/src/sys/arch/i386/conf/GENERIC files.



All the options should be placed in your kernel configuration file
in the form of:



option OPTION


When there is unreconized isapnp devices, you should add their name
to /sys/dev/isa/pnpdevs and /sys/dev/isa/pnpdevs.h files and
recompile your kernel to have them detected.



Building your own kernel


To build a new kernel, do like this:



cd /tmp/kernel
config -s /usr/src/sys -b /tmp/kernel kernel.config
make clean
make depend
make


Once a new kernel is compiled, move it to /bsd.



mv /bsd /bsd.old
mv /usr/local/tmp/bsd /bsd

Tuesday, November 24, 2009

Installing OpenBSD 5.1

Downloading OpenBSD Installation Packages


You can download installation files of OpenBSD 5.1 from ftp://ftp.openbsd.org/pub/OpenBSD/5.1/i386/ or an OpenBSD mirror
to install OpenBSD. The following files are recommended for download.



INSTALL.i386
INSTALL.linux
SHA256
base51.tgz
bsd
bsd.mp
bsd.rd
comp51.tgz
etc51.tgz
floppy51.fs
game51.tgz
man51.tgz
xbase51.tgz
xetc51.tgz
xfont51.tgz
xserv51.tgz
xshare51.tgz


Save these files on a FAT partition. Later, the OpenBSD installer will mount the FAT partition and extract the downloaded files.



Starting the OpenBSD Installer


At the SYSLINUX prompt, type the following command:


memdisk initrd=floppy51.fs

Alternatively, GRUB can be used to start the OpenBSD installer:


kernel (hd0,3)/syslinux/memdisk raw
initrd (hd0,3)/OpenBSD/5.1/i386/floppy51.fs
boot

The kernel and all the programs
OpenBSD uses to install itself will be loaded into memory.



Welcome to the OpenBSD/i386 5.1 installation program.
(I)nstall, (U)pgrade or (S)hell? I

Choose your keyboard layout ('?' or 'L' for list) [default] us


During installation, you can run a shell command at any prompt via '!foo'
or escape to a shell by simply typing '!'. In the shell, you can restart
the installation by typing install.



OpenBSD installer asks for some network settings.


System hostname? (short form, e.g. 'foo') lenovo-s12

DNS domain name? (e.g. 'bar.com') [my.domain] openbsd.org

DNS nameservers? (IP address list or 'none') [none] 72.235.80.12 72.235.80.4

Do you want to do any manual network configuration? [no]

Password for root account? (will not echo)

Start sshd(8) by default? [yes]


Answer No to the ntpd question if your computer is not always online or has Windows installed.


Start ntpd(8) by default? [no] Enter


It is recommended for desktop users to have xdm start X Windows at boot time.


Do you expect to run the X Window System? [yes] Enter
Do you want the X Window System to be started by xdm(1)? [no] yes


Create additional users other than root:


Setup a user? (enter a lower-case loginname, or 'no') [no] jocelyn


Partitioning for OpenBSD


In OpenBSD, we use fdisk(8) and disklabel(8) for partitioning hard drives and USB drives. When you are shown the partition table and given the following question, DON'T answer whole! Instead, type O or E to edit the partition table so you can keep any existing OS and data.



Available disks are: wd0.
Which one is the root disk? (or 'done') [wd0] Enter

Use (W)hole disk, use the (O)penBSD area, or (E)dit the MBR? [whole] E


wd0 points to an IDE disk. If your disks are SCSI, you will use sd0 instead.
If you choose not to use the whole disk for OpenBSD, you will need to use
fdisk(8) to create an OpenBSD entry (A6) in BIOS partition table.



Then, use disklabel to split the OpenBSD partition into several pieces.
If you are not sure how to split it, at least create / (at least 80MB or 5%)
and swap partition (256 to 512MB). Optionally, you may create /var (at least
240MB or 10%), /usr (at least 1600MB or 75%), /home (at least 250MB or 10%),
/tmp and /usr/local partitions.



You can type ? at the prompt to get help. Useful commands are:



p [unit]  - print label.
a [part] - add new partition.
d [part] - delete partition.
w - write label to disk.
q - quit and save changes.
x - exit without saving changes.


You can use the m suffix to denote megabytes and g for gigabytes.
Without suffix, the number will indicate sectors.



Choosing Installation Media


If you have saved installation packages to DOS, Linux or OpenBSD partitions
on local disk, answer d to the following question.



Location of sets? (cd disk ftp http or 'done') [ftp] disk


Choosing installation packages and finishing the install


You will be given a list of packages to install. You should at least install
base46, etc46, man46 and bsd to have a working system.



By this moment, installation is all done. Just type 'reboot' at the shell.



Booting OpenBSD for the first time


I installed OpenBSD on the first primary partition. Since I already had Windows installed on the hard drive, I had to run Acronis Disk Director to resize and move Windows partition to the right. After installing OpenBSD, I used the following GRUB commands to boot into OpenBSD.


root (hd0,0)
chainloader +1
boot

One of the first things to read after installing OpenBSD is afterboot(8).



Using Rescue Shell


If there's a problem with your OpenBSD system, you can boot the rescue kernel by typing bsd.rd at the OpenBSD boot prompt.


boot> bsd.rd

At the following prompt, type s to start the shell.



erase ^?, werase ^W, kill ^U, intr ^C
(I)nstall, (U)pgrade or (S)hell? s


Useful Links


Sunday, October 19, 2008

Microsoft Weakening? Upcoming OS Battle

Now that Bill Gates has shifted his endeavors from monopolist Microsoft to his philanthropic foundation, once invincible Microsoft is now constantly threatened by the rise of Apple and Google. With its charismatic leader gone, Microsoft is no longer a leader in technological innovation and trends. Indeed, the Zeitgeist of technology is being dominated by Google and Apple. Microsoft is facing increasing challenges in multiple fronts, one of which is the Internet.


The Internet has become an integral part of modern computing. The Internet has a potential to become a new platform from which applications are delivered on demand. Google is dominating the Internet industry based on its lead in the search market, and expanding to other markets such as cell phone industry. So fascinated with Google, people are willing to follow the trends set by Google, buy the products from Google, and becoming bored with Microsoft. Facing the threat of Google, Microsoft is desperate to take over the Internet for which it has unsuccessfully spent billions of dollars and a decade.


Apple has also stole public spotlight from Microsoft. With the help of public craze over iPods and iPhones, Apple has set out a massive marketing campaign against Microsoft Windows operating system. Thus far, Apple is gaining in sales of Macs and MacBooks.


Microsoft is also facing oppositions from the open-source world. The open source trend has released a multitude of free software whose quality rivals most products from Microsoft. Among the numerous open-source software, we can find many fine software that can be used in place of Microsoft Windows. The main contenders for the operating system market are as follows:




  • Microsoft Windows

    Microsoft Windows come bundled with most new personal computers. Still, many people in business stick with Windows XP, reluctant to switch to Windows Vista because of many problems posed by Vista.


  • Linux

    Linux is gaining popularity especially in the network sector. Linux is also seeing increase in its user base who's trying to find alternatives to Microsoft Windows.


  • OpenBSD

    Another group of contenders for OS market comes from the BSD camp. Besides the popular FreeBSD, I am fond of OpenBSD.


  • OpenSolaris

    Sun Microsystems was once a dominant player in the network server market. However, after its market share dwindling, Sun decided to release its Solaris operating system free to the open-source community. Now people can experience the stability and solid performance of OpenSolaris. It will be interesting to see if OpenSolaris can become a formidable force in the OS market.

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger