Click to See Complete Forum and Search --> : sparc/linux installation


midworks
05-20-2003, 02:25 PM
i'm trying to install debian linux 3.0 on a sparc 5 machine with 2 disk drives (i.e., /dev/sda, /dev/sdb). i'm using an external cdrom for installation. all seems to go well until time comes to reboot the machine at which time reboot attempt fails due to failure to locate the /etc/silo.conf file. there are also warnings re: SILO buggy old PROMs don't allow reading past 1GB from start of disk; send complaint to SMCC. :(

i'm wondering whether this has something to do with the PROM code or i'm doing something wrong during installation. in specific, i'm unsure whether i'm partitioning my disks properly. :confused:

i have a total of 2733 cylinders on each disk and i create three partitions on the first disk as follows: sda1 (1000 cylinders, type linux native), sda2 (1000 cylinders, type linux native, 733 cylinders, type linux swap). on second disk i create same number of partitions all being of type linux native however. i intend to use sda1 for /root, sda2 for /usr, sdb1 for /var, sdb2 for /home, and sdb3 for other. my first question is should i create a separate partition for /boot? and if so, where should it be located and what should be its type?

after going thru all installation steps, i execute 'make system bootable' option and this seems to work properly as well. i then proceed to reboot the system and in preparation for that, i remove the installation disk from the cdrom. once i attempt to reboot, i fail to do so.

can anyone help me understand the root cause of this problem? could it be related to incorrect partitioning of my disks? or could it be caused by my disk sizes? obsolete PROM code on my machine?

midworks
05-20-2003, 05:17 PM
i found out a little more info in the past few hours but my problem remains unresolved...

first, some version-2 PROMs require file systems to be accessed by SILO to be located within the first 1GB of the disk; therefore, it's recommended that the root filesystem resides within the first 1GB of the disk -- i just did this and SILO warning described in my original e-mail disappeared, which is good.

but system still complains about missing /etc/silo.conf file when i attempt to reboot the machine after installation.

so what i did was to switch to shell command level right before reboot operation and check on things. i see that an /etc/silo.conf file exists under /dev/sda1 directory that is mounted on /target directory. i'd have expected contents of this directory to remain the same following the reboot operation. apparently, it's not.

i also see /dev/ram0 to be mounted on / directory and its type is ext2. i don't understand why this entry exists and how it relates to the /dev/sda1. perhaps, i don't understand how ext2 comes into play and whether it should point to the root directory or some other directory.

this is how far i got after additional digging. any comments will be appreciated.

RWiggum
05-20-2003, 06:07 PM
On my Ultra 5 I replaced the stock 8GB hard drive with a 20GB drive out of a PC. Sun has their own partitioning scheme known as a "Sun disk label". The phrase "disk label" didn't make a lot of sense to me; it's actually a required partioning scheme - "label" makes it sound like you have to "name" the drive in a particular way. It's used to keep the Sun hardware "oriented" when it's accessing your drive.

But I digress. Using fdisk, you use the "s" option to apply a Sun disk label. This option will delete your current partitioning scheme and set it up the way Sun requires. Unlike a PC, you don't have all the primary/extended/logical garbage. You can have up to 8 partitions, and they are all "primary". The third partition is just a "place holder" partition that "contains" the entire drive. It didn't make a whole lot of sense to me until I used the "s" option and looked at the defaults. It looks something like:

Partition 1: 95% of drive, starts at cylinder 0, ends at cyl X, type Linux native
Partition 2: 5% of drive, starts at cylinder X, ends at last cylinder, type Linux swap
Partition 3: 100% of drive, starts at cyl 0, ends at last, type "whole disk"

Don't worry, partition 3 isn't really visible inside Linux and doesn't interfere with the file system in any way. It sounds like your PROM may be having trouble finding it's way around your disks because they don't have Sun disk labels. Try a reinstallation and use fdisk to repartition, using the "s" option on both disks. Lay out the partitions as you like (for /home, /usr, /var, etc.), just work around your "whole disk" partitions on sda3 and sdb3. IIRC, a /boot partition is not really necessary on a Sun.

Regarding /dev/ram0 and /target, that's the installation system running. /dev/ram0 is a ramdisk that's used to run a small Linux system so that the install software can operate. I don't believe it will be present after a hard drive boot of the full system. Your /dev/sda1 is mounted to /target so the installation system can write to it during installation.

If you are comfortable flashing your PROM, it might not hurt to get the latest available for the SS5 from sun.com. Keep in mind that they haven't supported the SS5 for many years, and you might already have the last PROM available.

If you have any more difficulties, let me or Alex Cavnar know. He has a Sparcstation 5, and will know more of the details of that machine. As far as I know there aren't too many Debian/Sparc users on JLC, but I'd be happy to help if I can.

midworks
05-21-2003, 10:03 AM
RWiggum, thanks for your explanations -- they helped me put things into a better perspective but my problem continues...

when i use the s option from fdisk menu, i get prompted with the drive type. i select 'auto configure' which comes up with SUN2.1G which makes sense. subsequent p option will show the following 3 partitions:

/dev/sda1 linux native (start=0, end=2666)
/dev/sda2 linux swap (start=2666,end=2733)
/dev/sda3 whole disk (start=0,end=2733)

only other noteworthy thing is that a 'u' flag is displayed next to /dev/sda2 entry. i can toggle this on/off using the a option.

i intend to use /dev/sda1 for root; however, since default size of /dev/sda1 is above 1024, i then delete first 2 partitions and create new ones as follows:

/dev/sda1 linux native (start=0,end=1024)
/dev/sda2 linux native (start=1024,end=2666)
/dev/sda3 whole disk (start=0,end=2733)
/dev/sda4 linux swap (start=2666,end=2733)

this time, a 'u' flag is displayed next to sda2 and sda4 entries. should i manipulate this flag for any of the entries? i tried doing this but it doesn't seem to make any difference.

my intentions are to use sda1 for root, sda2 for usr. on second disk, i follow similar steps but i create 3 linux native partitions only w/o a swap partition. i plan to use them for var and home. since 2nd disk seems to be irrelevant to what i'm trying to do, i'll skip details about it.

i save all partitioning info w/o any complaints and continue. later during installation, i get prompted about which partition do i wanna use for ext2. i choose sda1 -- is that ok? i then get prompted about root file system is about to be mounted on sda1 and whether this is ok or not. i say ok. installation proceeds and finishes w/o any complaints.

at the very end, i get prompted about making the system rebootable -- which i believe copies SILO on the disk. final step is to reboot the machine. at that time, i remove the cd from cdrom drive and reboot the machine.

SILO starts fine but then complains about not being able to find /etc/silo.conf file. why?

now if i boot from cdrom and switch to command-line to mount the /dev/sda1 manually, i can see that /etc/silo.conf file is actually on the disk. what may possibly prevent SILO to mount /dev/sda1 and find this file?

as you can see, my ultimate goal is to make linux bootable from hard disk as i intend to use this machine solely for linux work. my installation seems to work fine but i fail to boot linux from hard disk afterwards. perhaps, i can use a boot floppy or cd to start up linux and then continue but if possible i'd like to avoid this mess.

any additional thougths? thanks...

midworks
05-21-2003, 11:58 AM
error message printed after SILO starts is as follows:

Cannot find /etc/silo.conf (Unknown ext2 error)

If I boot from cdrom and manually mount /dev/sda1 on to /mnt and look under /mnt/etc, i see that silo.conf file is there and its contents look reasonable as follows:

partition=1
root=/dev/sda1
timeout=100
image=1/vmlinuz
label=linux
read-only

why can't SILO mount /dev/sda1 as root and locate /etc/silo.conf remains as a mystery.

i'd have thought when i execute 'make system rebootable' option in the installation menu, it'd make arrangements for the linux os to boot from my hard disk. does anyone know what command line utility this menu option may be invoking?

i'm also wondering what the unknown ext2 error may be referring to. am i doing the right thing by designating /dev/sda1 partition for ext2 use?

RWiggum
05-21-2003, 01:44 PM
Hmmm. I was betting that the Sun disk label would solve the problem. Have you tried just typing "root=/dev/sda1" at the SILO boot: prompt?

Apparently the mobo is finding the hard drive if it mentions SILO at all, so it's not a PROM problem. Try looking into the rdev command (man pages if you've got another box working or google). It sets the root device stored in the kernel image. That may not be the problem though. If the boot loader can't find the root device, it's not going to be looking in the /vmlinux file anyway.

Other than that, I'm pretty stumped. You might try tldp.org and get the "From Power up to Bash prompt" and BootPrompt HOWTOs for more help. If you can't find it in there, you could check the debian-sparc mailing list (debian-sparc@lists.debian.org). Be sure you search the archives at debian.org before posting.

The "u" flag is the read-only flag. I don't know why it's set as default, but you should clear it before leaving fdisk.

Alex Cavnar, aka alc6379
05-21-2003, 04:33 PM
When you boot, do you actually get to the point to where silo gives you a boot: prompt?

I think I had this problem before. My memory's fuzzy, but here are two suggestions:

When it boots, hit <Stop>-A. When it says "ok", try typing boot 1/vmlinux

If you do get to the boot: prompt as mentioned before, simply type 1/vmlinux at that prompt.

Either way, if one of these options gets you to boot, simply type the silo command as root to have the bootsectpr reinstalled. I may be able to come up with something better later, but right now my memory's really fuzzy on it...

midworks
05-22-2003, 02:51 PM
finally, i was able to get my sparc 5 machines up and running under debian linux 3.0. both of them now boot linux from the 2nd hard disk automatically. if i were to configure them to boot linux from the 1st hard disk, they would fail for the reason specified earlier. i doubt the problem can be reproduced in single hard disk configurations -- this is just a guess!

in my current config, 1st hard disk (i.e., /dev/sda) contains var, home, and swap dirs and 2nd hard disk (i.e., /dev/sdb) contains root and usr dirs.

i suspect the root cause of the problem is as follows:

when i select the 'make system rebootable' option from debian installation menu, it copies the boot sector at the beginning of the 2nd hard disk regardless of where the root is located at (i.e., although root is located at /dev/sda1, boot sector gets copied under /dev/sdb1). note that /etc/silo.conf file contents are filled correctly (i.e., root points to the correct partition).

once i reproduce the problem, i can boot from the CR-ROM and manually install root and modify /etc/silo.conf such that root points to the partition on the 2nd disk. subsequently, if i were to reboot the machine, it'd be able to locate the boot sector and automatically boot from the hard disk. but then my file systems would all be messed up. but this proves a boot sector got created however got put under the 2nd disk not the 1st one.

what i don't know is whether this is a problem caused by a glitch in the debian installation menu or a problem related to multi-disk sparc configurations in general. only if i were to know what shell command(s) are executed to 'make a system rebootable,' i could manually invoke them and try to sort things out.

i lost a few days but i'm happy with my current workaround since it doesn't seem to have any disadvantages.

RWiggum, Alex, thanks for all the pointers you've supplied.

Alex Cavnar, aka alc6379
05-27-2003, 05:47 AM
Could it be that your SCSI IDs in the sparc machine are out of whack? I've never had this problem, but I'd crack the case and check to see if the hard drives are actually plugged in where they're supposed to be. Maybe you or the installer has the device IDs mixed up...