Re: install questions
> - I have to install without the benefit of a monitor or keyboard, how do I = > get > the resce flopppy to eject so I can insert the root disk? A very vague reply: I think you can exit to the PROM and tell the PROM "eject-floppy" and then "continue". I forget the exact commands. Try "help". As for exiting to the PROM, a file tells me: #The equivalent of L1-A (halt machine, drop to ROM monitor) from a # terminal console is BREAK. I can't remember how I sent a BREAK using minicom (or whatever I was using), but I do remember that this did work for me ...
Re: SLILO
> I 've installed a debian potato on sparc 1 without problem (exept mysql ;) > but now o a sparc station LX (sun4m) slilo don't run , in fact the install > is ok but when slilo run, after reboot, the system tell me : wrong label (You mean SILO?) Earlier I suggested that something like the following be added to the installation manual. I think something similar but more concise was in fact added. Note that fdisk has a hidden command "s" meaning "create a new empty Sun disklabel". (How hard would it be to make the installation program check the type of partition table and warn the user?) Partitioning a disc The installation system gives you the option of partitioning a disc. If you select this option, it runs the command fdisk for you. The fdisk program can understand several different kinds of partition table. (The kernel can understand even more kinds; see linux/drivers/block/genhd.c.) The Sun's PROM, however, only understands Sun partition tables, so, if you want to be able to boot off your disc, make sure that fdisk mentions "Sun disk label" when you print the partition table using the command "p". If you start with a blank disc, fdisk will create a Sun partition table by default. However, if your disc was previously partitioned by a different system you will have to be careful at this point, or you will end up with an unbootable disc. In addition to having a Sun partition table, to be able to boot from the disc, the first partition, /dev/sdX1, must start at cylinder 0. This means that /dev/sdX1 contains the partition table and the boot block, as these are the first two sectors of the disc. Therefore you must be careful what you use /dev/sdX1 for. In particular, you must not use a partition starting at cylinder 0 for Linux swap, as that would overwrite the partition table and the boot block. You may, however, use such a partition for a UFS or EXT2 file system, as these file systems leave the first 1024 bytes undisturbed. It is also advised that the third partition, /dev/sdX3, should be of type "Whole disk" (5), though this may not be an absolute requirement for booting.
SPARC kernel questions
A couple of questions appeared in my mind while upgrading to 2.2.10: (1) This business of having to install /etc/init.d/devpts.sh from potato's libc6 to make a recent 2.2.x kernel work if CONFIG_UNIX98_PTYS is selected. It's not too hard to do by hand, but it doesn't seem right that people should have to do that sort of thing merely in order to use a more up-to-date kernel. You can't tell people to update their libc6 to unstable just in order to use a newer kernel; we've already seen how an unstable libc6 can make a system unusable in some unfortunate cases. So is there another solution, other than telling people how to extract and install /etc/init.d/devpts.sh by hand? (2) I built a kernel with CONFIG_SMP, which is the default, and was welcomed by this message (coming from linux/arch/sparc/mm/nosun4c.c): SILO boot: Uncompressing image... 32bit SMP kernel only supports sun4m and sun4d Program terminated Is there no way, at present, of building a kernel which does SMP on some suns but works on all suns? Edmund
Re: Compiling the kernel
> I've experience on compiling the Linux kernel for i386 systems but not for > SPARC. I want to compile a kernel myself for my SPARC, but have no idea on > how to do it. Is there any information somewhere about it? It's the same as on Intel, really, except that the kernel image produced is /usr/src/linux/vmlinux instead of /usr/src/linux/arch/i386/boot/bzImage or whatever. You can then compress vmlinux yourself, if you want. Don't forget to include an appropriate frame buffer if you want the console to work. Use egcs, not gcc-2.7.2.3. (Hey, gcc-2.95 is due in about a week anyway ...) Edmund
Re: Setting the clock
> Sorry if this thread's getting a little long, but for the price of the > chip and ease of fitting I wouldn't suggest it's worth the effort. > > Then again, if you're the sort of person who's trying to set up Linux on > a Sparc... If your machine is on a network, consider using xntp3 to keep its time set correctly. (My SPARCstation 2 uses NTP to set its time from another Debian machine. On that machine I had to edit /etc/init.d/hwclock.sh to stop it from running hwclock --systohc at shutdown. I don't think the default should be to run hwclock --systohc except where the system clock is known to be set accurately ... (By the way, If anyone knows how to get xntpd to use a non-priviledged port for its queries, please tell me. I would like to be able to query through a firewall ... (But this is off-topic here ...)))
"esp0: disconnect, resetting bus" -> max_scsi_luns=1
> I have an IPX that I have tried to install Sparc Debian on but > afterthe > boot tries to detect the devices it detects the cd rom drivs a Sony CDU-8012 > it > starts resetting the bus this drive works fine with solaris and is listed as > SUN Cd drive that was OEMed for Sun by Sony. I have boot prom 2.9 and have > tried to boot from the cdrom and have created the resc, root , drv and base > disks and install the rest from the cdrom and neither works. I kow this drive > is old and slow but I would still think it should work. Any help with this > would be appreciated Try typing "linux max_scsi_luns=1" at SILO's "boot:" prompt. Or try a kernel >=2.2.4. Edmund
cross-compiling the kernel
I'm sending these notes to the list because some people might be interested, and some people might have advice for me about how I could have done it better. Building a SPARC kernel on an Intel machine --- I did this partly because my Intel machine (233 BogoMIPS CyrixInstead, 64 MB) can compile the kernel about ten times faster than my SPARCstation 2 (40 BogoMIPS, 32 MB), and partly because I wanted to see if I could get a cross-compiler to work. I used egcs-1.1.2 and binutils-2.9.1.0.19a on an i686 running Debian GNU/Linux 2.1, but with kernel 2.2.7. I took the header files from the SPARC version of Debian 2.1. First make a directory, henceforth referred to as $b, in a file system with plenty of space for building a cross-compiler (about 150 MB): $ b=/tmp/ccc ; mkdir -p $b ; cd $b Unpack the source packages: $ tar xzf binutils_2.9.1.0.19a.orig.tar.gz $ bzcat egcs-1.1.2.tar.bz2 Rather than download egcs-1.1.2, what I actually did was apply the patch from soon-to-be-renamed-Cygnus's FTP site to Debian's source package: $ tar xzf egcs_1.1.1.orig.tar.gz $ mkdir xx ; cd xx ; ../egcs-1.1.1.orig/configure ; cd .. $ mv -i egcs-1.1.1.orig egcs-1.1.2 $ cd egcs-1.1.2 ; bzcat egcs-1.1.1-1.1.2.diff.bz2 | patch -p1 -s $ cd .. ; rm -rf xx (Why did I configure egcs-1.1.1 before applying the patch? Because it seems to be necessary. I haven't investigated why.) Make a link to binutils from the egcs directory: $ cd egcs-1.1.2 ; ln -s ../binutils-2.9.1.0.19a binutils ; cd .. Get a local copy of the target machine's header files. I don't know which ones you really need, so I just take the whole damn lot. If you have NFS-mounted the SPARC's root directory at $SUNROOT: $ mkdir headers ; cd headers $ ( cd $SUNROOT/usr/include ; tar cf - * ) | tar xf - $ cd .. For general-purpose cross-compilation you might also want to get a local copy of the target machine's standard libraries, but you don't need them just for building the kernel. Unless you change the default (using --prefix=/whatever with configure) the build process will try to make some directories under /usr/local/sun4-linux, so make this directory, and make it writable. As root: # mkdir /usr/local/sun4-linux ; chmod a+rwxt /usr/local/sun4-linux Make an object directory, cd to it, configure and build: $ mkdir objdir ; cd objdir $ ../egcs-1.1.2/configure --target=sun4-linux --with-headers=$b/headers $ make cross (If things go horribly wrong and you want to make a fresh start, make sure you clean out both objdir and /usr/local/sun4-linux.) This first attempt to build chugs along happily for a long time, but then grinds to a halt at this point: _muldi3 as: option `-s' is ambiguous This is because $b/objdir/gcc/xgcc is invoking the wrong "as". Enquire where it's looking with: $ $b/objdir/gcc/xgcc --print-search-dirs | grep ^prog We can fix this problem by installing "as" by hand: $ mkdir /usr/local/sun4-linux/bin $ ln $b/objdir/binutils/gas/as-new /usr/local/sun4-linux/bin/as $ make cross But it gets no further: /bin/sh: sun4-linux-ar: command not found ... I fixed this by putting the new "ar" on the path thus: $ PATH=$b/p:$PATH $ mkdir ../p $ ln -s ../objdir/binutils/binutils/ar ../p/sun4-linux-ar $ make cross This time it gets a bit further: Configuring in sun4-linux/libio ... checking whether the C compiler (... ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. Judging by the "FIXME" in egcs-1.1.2/libiberty/configure, this is not a new problem. I don't know the solution, but I note that the build process failed while trying to build the runtime libraries; the cross-compiler has already been built. I couldn't get "make install" or "make install-cross" to work, but I could install some of the bits by hand ("as" has already been installed): $ ln binutils/binutils/ar /usr/local/sun4-linux/bin/ar $ ln gcc/cc1 /usr/local/sun4-linux/bin/cc1 $ ln gcc/gcc-cross /usr/local/sun4-linux/bin/gcc $ ln binutils/ld/ld-new /usr/local/sun4-linux/bin/ld $ ln binutils/binutils/nm-new /usr/local/sun4-linux/bin/nm $ ln binutils/binutils/objdump /usr/local/sun4-linux/bin/objdump $ ln binutils/binutils/strip-new /usr/local/sun4-linux/bin/strip (You have to install the programs where you said you were going to because some of the executables run the others using file paths that were compiled into them. I think this is a damn nuisance. In an alternative universe, would it better if there were a mechanism by which executables could locate files relative to themselves? That might be good for configuration files too ...) (I did try hacking egcs-1.1.2/libiberty/configure to get past the configure error, but I then got conflicting types for sys_errlist in libiberty/strerror.c:461, and more errors when I fixed that ...) You might want to change the owner back to root, by the way: # chown -R root:root /usr/local/sun4-linux # chmod a=rX,u+w /usr/local/sun4-linux Now I can
Sun prices
Sorry to be slightly off-topic, but does anyone have any recent experience of how much second-hand Sun computers are worth? If so I'd be grateful for any data points (model and price) as there's a whole lot coming up for auction here soon and I might try to get one. The machines to be sold include: SS LX, SS 4, SS 5, SS 20, Ultra Enterprise, Ultra Creator, Ultra 6262, Ultra 10 (according to the catalogue which does not seem to have been compiled very carefully). (It's the remains of Ionica being sold off, by the way.) Edmund
installing without floppy, CD or network
Several people have asked about this recently, or had problems with all the methods described in the installation manual. There does seem to be another way, which might be worth mentioning in the installation manual, where you copy the rescue and root floppy images onto a spare partition, then boot from that partition, so you can install without having a floppy drive, a CD drive or a tftp server. Mark Eichin gave most of the information when he described how to boot from a zip drive, but here's a description of what I just did. First I boot my existing operating system, which happens to be Debian GNU/Linux in this case, but it could be another Linux, SunOS or Solaris, I expect. I su to root. I'm going to use my swap partition for this experiment, so first I stop using it as swap: # swapoff /dev/sda4 Next I mount the file system where the floppy images are (the Debian CD mounted over NFS in this case) and cd to the appropriate directory: # mount -o intr rano:/cdrom /cdrom # cd /cdrom/dists/slink/main/disks-sparc/2.1.8.1-1999-03-01/ Now I copy the images onto the unused partition and shut down: # dd if=resc1440.bin of=/dev/sda4 # dd if=root.bin of=/dev/sda4 seek=3000 # shutdown -h now When it's finished I type Stop-A then "n" to get the PROM's "ok" prompt. And I tell it to boot from /dev/sda4: ok boot /sbus/esp/[EMAIL PROTECTED],0:e (If I were using /dev/sdb3, it would have been [EMAIL PROTECTED],0:d, I think.) SILO starts up and gives me the "boot:" prompt. I type: boot: linux initrd=/sbus/esp/[EMAIL PROTECTED],0;4[3000-6000] root=/dev/ram (It I were using /dev/sdb3, it would have been [EMAIL PROTECTED],0;3..., I think. Very confusing how many ways there are of referring to partitions ...) And the installation system boots itself. Unfortunately, different people have different PROMs, so these instructions might now work for everyone. I did this with a SPARCstation 2. Does anyone who feels confident about dd-ing onto partitions (very dangerous if you mistype the command or get confused) want to try this installation method? Please tell me how you got on, if you do, but don't blame me if you trash your existing system! Edmund
Re: Linux kernel for Sparc
> Is the Linux kernel source for Sparc the same as the i386 one? > If not, where should I get the Sparc one from? I built kernels for Sparc and x86 using the same source, version 2.2.5. It may be that patches are required for some features which I don't use, though. Edmund
Re: booting at last!
> Funny, you say above that it's ok to put a file system partition on > cylinder zero (and the silo documentation agrees). But here you say > you had to put a non-partition to keep that cylinder blank. It's a real partition, just unused, namely: Device FlagStart End Blocks Id System /dev/sda1 01 510 83 Linux native It occurred to me later that there may be a SILO or boot-floppies bug here worth correcting at some point ... One explanation for my experience might be that either SILO installs itself, by default, into sector 2 of the disc, while the PROM, by default, boots from sector 2 of the first partition ... or the other way round. Hence it only worked for me when I made partition 1 start on cylinder 0. Of course, there are other possible explanations. The SILO documentation makes some vague allusions to partition 1 starting on cylinder 0, but it's not at all clear why. For example: # silo -? SILO 0.8.5 Sparc Improved boot LOader Usage: /sbin/silo [options] Options: ... -o backup save your old bootblock from 1st partition if sdX1 doesn't start on cylinder 0 and backup doesn't exist yet ... -t store bootblock on the same partition as second stage loader (default is into the bootblock of the whole disk) ... # zmore /usr/doc/silo/README.gz ... /sbin/silo will warn you if there are any problems, but you should ensure that: you need to start either first, or third (usually whole disk), or any other partition on cylinder 0 in your partition table. ... My partition 3 did start on cylinder 0, and it was of type "Whole disk". It didn't work until I also made partition 1 start on cylinder 0. SILO did not warn me about any problems; it simply didn't work when I rebooted. Maybe different PROMs follow different rules and that's the reason for the reigning confusion. Edmund
Re: Pb with Linux et Sparc 2 when booting
> > I want to install Suse Linux 5.2 on a Sun Sparc2 without CD-ROM drive . > > So I put the SCSI hard drive on a PC, installed linux and reboot . Lilo > > & Linux start . OK, so I put the HD on the Sparc. > > When boot I have the following message : > > > > Boot device: /sbus/[EMAIL PROTECTED],80/[EMAIL PROTECTED],0 Files and > > args : > > Bad magic number in disk label > > Cant't open Sun disk label package > > Can't open boot device > > > > Please, can you help me ? That error message is what you get if a disc has the wrong sort of partition table. The same problem plagued me for ages. If you partition a disc on a PC, you probably put an MSDOS partition table on it. But Sun's PROM only understands Sun partition tables. However, I think it's unlikely that you will succeed in producing a Sun bootable disc using an x86 machine, if that's what you're trying to do, unless SuSE specifically recommends that approach. If you have no network connection and no CD drive, moving a hard drive across is a reasonable way of getting all the data from one machine to the other, but you will almost certainly need a floppy drive to boot Linux the first time, unless you're going to do something very clever. I recently succeeded in installing Debian GNU/Linux on a SPARCstation 2 using floppies. If you need help with that method, ask me or debian-sparc@lists.debian.org ... Edmund
booting at last!
I solved it! It boots! And I think the solution should go into the installation notes somewhere. Please consider adding something like this. (The crucial and new bit is the start of paragraph 2.) === The installation system gives you the option of partitioning a disc. If you select this option, it runs the command fdisk for you. The fdisk program can understand several different kinds of partition table. (The kernel can understand even more kinds; see linux/drivers/block/genhd.c.) The Sun's PROM, however, only understands Sun partition tables, so, if you want to be able to boot off your disc, make sure that fdisk mentions "Sun disk label" when you print the partition table using the command "p". If you start with a blank disc, fdisk will create a Sun partition table by default. However, if your disc was previously partitioned by a different system you will have to be careful at this point, or you will end up with an unbootable disc. In addition to having a Sun partition table, to be able to boot from the disc, the first partition, /dev/sdX1, must start at cylinder 0. This means that /dev/sdX1 contains the partition table and the boot block, as these are the first two sectors of the disc. Therefore you must be careful what you use /dev/sdX1 for. In particular, you must not use a partition starting at cylinder 0 for Linux swap, as that would overwrite the partition table and the boot block. You may, however, use such a partition for a UFS or EXT2 file system, as these file systems leave the first 1024 bytes undisturbed. It is also advised that the third partition, /dev/sdX3, should be of type "Whole disk" (5), though this may not be an absolute requirement for booting. === Since I don't yet have a network connection, nor enough space on the other disc for putting a tar file of my complete system, I ended up using a rather strange partition table, with a one-cylinder unused partition covering cylinder 0, just to keep the stupid PROM happy: Disk /dev/sda (Sun disk label): 17 heads, 60 sectors, 5400 rpm 1018 cylinders, 2 alternate cylinders, 1020 physical cylinders 0 extra sects/cyl, interleave 1:1 Linux custom cyl 1018 alt 2 hd 17 sec 60 Units = cylinders of 1020 * 512 bytes Device FlagStart End Blocks Id System /dev/sda1 01 510 83 Linux native /dev/sda2 129 1018 453390 83 Linux native /dev/sda3 0 1018 5191805 Whole disk /dev/sda4 1 12965280 82 Linux swap
Re: still not booting
> You can't have swap as the first partition on the disk. The boot > loader and the swap overwrite each other. My first partition starts at 1, rather than 0, because fdisk warned me about that problem. But I can't boot even if I run swapoff before running silo before shutdown -h and attempted reboot ... Edmund (But I don't understand how the first partition being ext2fs would be any better. Does an ext2 file system not use the first sectors? When I ran mkfs.ext2 on a file it zeroed the first few sectors ...)
another floppy install report
I downloaded Eric's latest floppy images (2.1.8) today and reinstalled using them. They worked with no problems this time: dbootstrap didn't die once! Unfortunately, I still can't boot from [EMAIL PROTECTED],0. Here's what I get on the screen, in case it helps: Rebooting with command: disk3 Boot device: /sbus/[EMAIL PROTECTED],80/[EMAIL PROTECTED],0 File and args: Bad magic number in disk label Can't open disk label package Can't open boot device Type help for more information ok Some other points: Since gpm had the perfectly appropriate default "-t sun", should its default values also include "-m /dev/sunmouse" instead of "-m /dev/mouse"? I also found the responsiveness rather feeble: "-r 50" works better for me. I found that xserver-xsun worked, but only if I ran "startx" as root. I fixed that by changing the permissions of /dev/fb[0-7] from 622 to 666. This might be another bug in makedev which Eric has to compensate for when building boot-floppies ... xserver-xsun24 worked too, but xserver-xsun-mono didn't work on my hardware ... I had to run mkfontdir by hand. I'm not sure if the package installation scripts are supposed to take care of this. There are some annoying and, I think, incorrect dependencies on xbase, but I seem to recall that this is a known bug. Delete key doesn't work in an Xterm. I found that if I switched from VC 7 running X to VC 1 with Ctrl-Alt-1, then back again with Alt-7, the X server believed the Ctrl key still to be depressed. Most of the time, anyway. Not exactly a major bug, but my XFCom_SiS running on i386 doesn't get confused in this way. Another very minor one: The question "Do you want to make the ... X server the default? (y/n)", asked when you install an X server, is a bit messed up on the screen; there's a newline missing in /var/lib/dpkg/info/xserver-xsun*.postinst. It's probably a problem with my display, but I find the virtual consoles almost unreadable until I do echo -e '\033[1m'. Xterms are all right. All in all, I found this distribution to be a lot more mature than Debian's web pages suggest. Debian 2.1, running on four different architectures, is going to be a excellent system ... Edmund
Re: sunmouse, eject-floppy, booting
> Get the ``eject'' package and type ``eject floppy''. Thanks! > > (3) I'm still looking for a way of booting Linux from a hard drive ... > > Go into the PROM monitor, get into ``new command mode'' and type ``boot > disk''. > You will need SILO to be set up properly, of course. I have Linux on the disc with ID 0. If I type "boot /sbus/esp/[EMAIL PROTECTED],0" (or various equivalents) I get "Bad magic number in disk label". Is SILO not capable of installing whatever magic the PROM demands? Is it possible to tell the PROM not to be so fussy? Edmund PS. Any clues about how to get X to work? Can anyone e-mail me an example XF86Config or tell me how to find out what video card I have? It's a SPARCstation 2. There's another one with a different video card that I could swap, if necessary ...
sunmouse, eject-floppy, booting
(1) /dev/MAKEDEV gives /dev/sunmouse the wrong major device number: it should be 10, not 11. Grep /dev/MAKEDEV for "sunmouse"; it's in there twice. (2) Can someone please tell me how to eject a floppy without using the PROM? (3) I'm still looking for a way of booting Linux from a hard drive ... Edmund
Re: dbootstrap segfaults on "Configure the Base System"
Shurik: > I've made some additional testing and found out that dbootstrap just segfaults > while trying to "Configure the Base System". First of all, its PID changes > when it goes to the initial message. That meens, I guess, it was restarted > (the same behaviour if I kill it by hands). So I've try to execute it from VT2 > and got that "segmentation fault" message I was expecting. VT2 became unusable > afterwards, so I had to boot from floppy again. > > Could it be something wrong with my hardware configuration? I'm installing > Linux on sda4. sda1 is Solaris and sda2 is swap. Are there some limitations > on that? I've had exactly the same experience: configure_base() seems to cause the process to die, and it doesn't get as far as writing /target/etc/fstab, though the file was created, it seems. Could it be that is_nfs_partition() does it? It uses code in libfdisk/ which is reasonably complex and might contain an undetected architecture-dependent bug. I'm just guessing wildly. My work-around was to go to VT2, write /target/etc/fstab manually, then remove /target/sbin/unconfigured,sh, so that dbootstrap thinks that the base system has been configued. (It hasn't really; there are several other things that dbootstrap would have done.) # cat > /target/etc/fstab # /etc/fstab: static file system information. # # /dev/sda2 / ext2 defaults,errors=remount-ro 0 1 /dev/sda1 none swap sw 0 0 proc/proc proc defaults 0 0 # mv /target/sbin/unconfigured.sh /target/sbin/unconfigured.sh.hide # I now have a working system that boots off the boot floppy. (Just as well I didn't miss out that step!) Can anyone tell me how to boot without using a floppy, if that's possible? Or is at least possible to read the kernel off the hard drive, even if SILO has to come off a floppy? I put Debian GNU/Linux on a nice new Fujitsu drive with SCSI ID 0. Most of my attempts to boot using it, either from the PROM or the SILO prompt, result in a "Bad magic number in disk label". Edmund