Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "Xenophon Fenderson, the Carbon(d)ated" <econommx@rose-hulman.edu>
Subject: minihowto: Linux and BSD on the Alpha [long]
Date: 1997/08/25	[thread overview]
Message-ID: <w4ovi0u40l9.fsf@deneb.cs.rose-hulman.edu> (raw)


I thought I'd share.  YMMV, though questions and comments are welcome.

I just installed OpenBSD and Linux on my AlphaStation this weekend.
If you want to do the same, you will find the Linux-SRM FAQ
(http://www.azstarnet.com/~axplinux/SRM.html) to be enlightening.  If
you want NT on the same machine as BSD, it MUST be on a disk separate
from BSD, because the two operating systems use incompatible
partitioning schemes.  Linux understands both BSD disklabels and (of
course) fdisk, so it can go on either.  Note that installing and
booting Linux on a fdisked drive via ARC/MILO is relatively
straightforward.  Installing and booting Linux on a disklabeled drive
is a pain.

0. You must have the SRM console installed on your Alpha to boot
   OpenBSD.  I acquired a copy of the Alpha Firmware Update CD and
   used that to install SRM (my machine came with ARC; I run NT on the
   first internal disk).

1. I grabbed the OpenBSD boot image from
   ftp.openbsd.org:/pub/OpenBSD/2.1/alpha/floppy.fs and wrote it to a
   floppy with rawrite.

2. I decided to boot the RHS install from SRM (like BSD), so I used
   ftp.redhat.com:/pub/redhat/redhat-4.2/alpha/images/avanti-s.img
   You can use MILO and the regular kernel, but I have to jump several
   hoops to run ARC while I have SRM going...it seems that only one of
   the two consoles will fit in flash at any one time.  I got used to
   my old Multia, which had room enough in flash for both ARC and SRM.

3. Booted the OpenBSD installation:
	>>> boot dva0 -file bsd -flags -s

4. The OpenBSD installation script will start up 'ed' to edit the
   target disk's disklabel (no, you cannot use fdisk or minlabel to
   accomplish the same; they don't work with BSD).  'ed' is fun:
	w - write file
	q - exit 'ed'
	i - insert text (before the current line, I think; use '.' on
	    a line by itself to terminate)
	a - append text (after the current line; use '.' ...)
	l - display the current line
	<number> - goto that line number
	<enter> - goto the next line number and display
	s/old/new/ - replace occurences of 'old' with 'new'

   I created the following disklabel:

># /dev/rsd1c:
>type: SCSI
>disk: ST15150N
>label: BSD
>flags:
>bytes/sector: 512
>sectors/track: 107
>tracks/cylinder: 21
>sectors/cylinder: 2247
>cylinders: 3712
>total sectors: 8388315
>rpm: 7200
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0		# milliseconds
>track-to-track seek: 0	# milliseconds
>drivedata: 0 
>
>4 partitions:
>#        size   offset    fstype   [fsize bsize   cpg]
>  a:  3670016        0    4.2BSD     1024  8192    16 	# (Cyl.    0 - 1633*)
>  b:   524288  3670016      swap                    	# (Cyl. 1633*- 1866*)
>  c:  8388315        0    unused        0     0       	# (Cyl.    0 - 3733*)
>  d:  4194011  4194304     MSDOS                    	# (Cyl. 1866*- 3733*)

   I think partition 'a' must be BSD's root file system, otherwise it
   won't be able to boot (from SRM, see the FAQ for more details).
   'b' is traditionally swap.  'c' must be the size of the entire
   drive (note 'size' field and 'total sectors' field).  'd' here is
   my Linux root filesystem.  A fstype of 'MSDOS' corresponds to
   'reservd8' under Digital UNIX and 'ext2' under Linux.

5. Continue with the BSD install.  It's fairly straight-forward.  Note
   that de0 starts out unconfigured (I thought that just because it
   was listed means it was ready to go...it's not, it must have the
   little "[X]" next to it).  I also had to use IP addresses because
   it wasn't connecting to the nameserver.

   Something else that was strange was setting the correct port on my
   Ethernet adapter.  I ended up setting the port to "Twisted-Pair" in
   SRM and giving NO additional flags to BSD to get it to work.

6. When the install finishes, type 'halt' at the prompt.  This will
   return you to SRM.  To boot BSD, I type:
	>>> boot dka1 -file bsd -flags -a
   You can set the boot* variables to set up for auto-boot.  That's
   covered (pretty much) in the INSTALL.alpha file for BSD.

7. Put the Linux/SRM boot disk in the drive and type:
	>>> boot dva0 -file vmlinux.gz -flags "root=/dev/fd0 load_ramdisk=1"

8. About here is where I screwed stuff up.  I had marked partition 'd'
   as 'unused' (type 10), because when I did the BSD install the first
   time, disklabel wouldn't recognize the fstype 'reservd8'.  I didn't
   realize that under OpenBSD, I had to use MSDOS ('reservd8' is a
   Digital UNIX-ism).  So I ran fdisk on the drive (from the RHS
   install, now), switched to the command prompt window, and fired up
   minlabel:
	$ minlabel /tmp/sdb

   I proceeded to change the partition type of 'd' to 'ext2'
   (aka. type 8).  Save/exit.  Reboot.  Restart install.  Linux
   detected partitions 1-4, RHS install sets up swap on partition 2
   (yay!), formats partition 4 as ext2fs, do install, done.

   Reboot again!  This time, to boot Linux, I used:
	>>> boot dva0 -file vmlinux.gz -flags "root=/dev/sdb4"
   (still booting from floppy)

9. Added 'mkswap /dev/sdb2' to rc.sysinit to force Linux to reformat
   the swap partition, because I'm sharing swap partitions with BSD.

10. BSD will no longer boot.  It seems that BSD disklabel and Linux
    minlabel are incompatible, and SRM only groks BSD disklabels.  I
    could no longer boot BSD, and when I fired up the BSD install
    (from floppy), disklabel reported the label on the disk was
    corrupted.

    I rewrote the label and set partition 'd' back to 'unused'.  I
    figured the Linux kernel wouldn't really care what the partition
    type was set to, as long as it detected an ext2 filesystem there.

    Rebooted.  I was able to boot BSD off the hard disk again.  Yay.

11. Rebooted into Linux, same as above (w/ root=/dev/sdb4).  This
    time, the kernel only detected three partitions (1-3), then panics
    because it can't mount the root filesystem on partition 4 (as I
    told it).

    I played around with it for about 2 hours.  I figured out (after
    reading the disklabel(5) manual page) that type 'MSDOS'
    corresponds to the magical partition type '8'.  Ran minlabel; it
    reads 4 partitions on the disk.  The RHS install still thinks
    there's an ext2 file system on /dev/sdb4, but when it tries to
    format it, gets 'no such device' (or somesuch error).

    Eventually, I tried booting with "root=/dev/sdb3".

    Linux boots just fine (after I fiddle with /etc/fstab).

So I have some questions for the Linux devel people.  Why is it that
minlabel isn't compatible with disklabel?  Why do both the RHS
installation program and the Alpha/Linux Miniloader (MILO) detect a
/dev/sdb4, but the Linux kernel (both the MILO one and the SRM on)
only detects 3 partitions, unless the disk was minlabel-ed?  These
appear to be problems with minlabel and the kernel, respectively.

Some speculation: I think that if I can figure out how to mount a
4.2BSD file system under Linux, I can copy a Linux kernel image to
partition 'a' and boot it with OpenBSD's boot loader.  I may have to
compile the kernel in ECOFF format, though, to get this to work.

Anyway, I am now running Windows NT, OpenBSD, and Linux on my
AlphaStation.  Don't try this at home, kids.  :)

-- 
Xenophon Fenderson, the Carbon(d)ated, Discordian Episkopos of Ambidextrous
Thinking, SubGenius-Wannabe, Patron Saint of All Things Plastic fnord, Member
of the Cuddle Cabal (There Is No Cabal(tm)), and MAJOR CRACK SMOKER,...  erm, I
mean, "CS Major"...yeah...that's it...no smoking crack for me!! *plonk*



                 reply	other threads:[~1997-08-25  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox