From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,7d6deeeb70e74062 X-Google-Attributes: gid111c93,public From: Subject: Re: Boot Redhat 6.0 from hard drive on AlphaStation 600 Date: 1999/11/07 Message-ID: <802l8a$bc2$1@hyperion.triode.net.au> X-Deja-AN: 545386366 References: <8022oi$ulk$1@nnrp1.deja.com> Organization: Triode Internet User-Agent: tin/pre-1.4-19990216 ("Styrofoam") (UNIX) (Linux/2.2.13 (i686)) Newsgroups: comp.os.linux.alpha > To boot from the hard disk directly, we wish to use aboot, as the > AlphaStation 600 does not have Flash, and milo will thus not work. If you have ARC firmware you can boot MILO using linload.exe and booting the same way that NT does, you don't need to put MILO in flash, just put it into the MSDOS partition where ARC can find it. This is a roundabout way to boot but it works and is easy to do because ARC is a simple but functional piece of code and not much can go wrong. If you have only SRM and no ARC then forget about what I just said. SPECIAL NOTE: If you want ARC to work, you must use MSDOS style partition table (i.e. using the standard fdisk in the default manner). > aboot-0.5 is dated 1995, and will not compile. > gcc -I/home/andyr/aboot-0.5/include -I/usr/src/linux/include > -D__KERNEL__ -O2 -Wall -mno-fp-regs -c -o aboot.o aboot.c > In file included from /usr/src/linux/include/asm/semaphore.h:11, > from /usr/src/linux/include/linux/fs.h:164, > from /usr/src/linux/include/linux/capability.h:13, > from /usr/src/linux/include/linux/binfmts.h:5, > from /usr/src/linux/include/linux/sched.h:8, > from /usr/src/linux/include/linux/mm.h:4, > from aboot.c:24: > /usr/src/linux/include/asm/current.h:4: global register variable follows > a function definition > /usr/src/linux/include/asm/current.h:4: warning: call-clobbered register > used for global register variable > make: *** [aboot.o] Error 1 Yeah, I remember this, aboot depends on some kernel headers which have obviously changed. From memory changing the order of the includes fixed it or possibly even removing an include somewhere. Email me if you want a copy of the aboot tree of my machine, I've forgotten exactly what I changed. > We used bootlx from /usr/src/linux/arch/alpha/boot/tools - > after make'ing bootimage. > From this directory, we did :- > % swriteboot -f1 -f3 /dev/sdc bootlx > Why does it need this ? f1 and f3 seem to be a throwback to the > DEC UNIX disklabel, which we thought was history now. Ummm, yes it is related to disklabels, nope they haven't died. In fact, if you want to use swriteboot and/or aboot then you MUST NOT use the MSDOS-style partition tables, instead you must use disklabels. They are called BSD style these days, and you get them by wiping out the first few blocks on your hard drive, then use the linux fdisk and select the `b' command to switch into BSD mode. This is actually documented somewhere but it had me guessing for a few hours. swriteboot also comes with some disklabel creation software -- don't use it, fdisk is much better. When you do make the partitions, leave some free space at the start of the disc for the boot stuff. You don't have to allocate it a partition because you don't put a filesystem onto it but you do have to ensure that none of the partitions that WILL get a filesystem are overlapping. Tradition suggests skipping the first cylinder and leaving all that to the disklabel and bootstrap code and starting on cylinder 2. Tradition also gives the third partition (called `c' in the BSD style) the whole disc as some sort of dummy partition. Who knows what purpose it once had, probably it was good for discs that didn't report their size correctly, I doubt it has any purpose in the modern world but fdisk puts it in anyhow. > After this, fdisk could no longer find any partition info. That is because you are using an MSDOS style partition table and swriteboot expects BSD style disklabel -- same purpose, different format. > We think therefore that swriteboot trashes the partition info. It trashes MSDOS partition info yup caught me too. > If we repartition the disk as above, all is well again, including > all our installed linux software. Yes, if you are careful to get the cylinder offsets and such correct, you can switch from MSDOS style partition table to BSD style disklabel without losing your filesystems. Beware though that some SCSI discs get translated to DOS-friendly clyinder/head/sector values when using the MSDOS partition table but they DON'T get the same translations when using the BSD disklabel -- this can be totally confusing but still it is possible to get it to work. > We can boot to Linux using '-flags "root=/dev/sdc3"' at the SRM > prompt with a kernel (as above) from the CD. A new kernel is 1.6M > with as little as possible compiled in, so we are unable to boot > from floppy - a (poor) second choice. Once you get swriteboot working, you can throw either bootlx or MILO directly onto the first cylinder and take your pick which one you think works best (or choose the one that works at all). With bootlx you can also follow it with a kernel image (this stuff is documented) but you may need 2 or 3 cylinders spare at the front of the disc to have space for the kernel. There are limitations in bootlx with respect to the way it reads ext2 filesystems. I'm not sure that I completely tracked it down but I noticed that it grabs inode indexes from directly after the superblock which only works when the ext2 filesystem is formatted with 1024 byte blocks (or possibly 2048 but definitely not 4096). Somehow, the Debian mke2fs seems to give me 4096 byte blocks by default. With 4096 byte blocks, the inode stuff moves along to a block boundary and aboot ends up trying to read sectors with impossible offsets then fails to find any files. The solution is to ensure that the partition where you store your kernels and aboot.conf is using a filesystem with 1024 byte blocks (probably your /) (actually you can hack aboot to change the offset when looking for inode tables which is what I did rather than wipe everything -- then it ONLY works for 4096 byte blocks. In an ideal world aboot would figure out the block boundary for itself and get it working in all cases, I haven't figured out how to do this, it is probably easy). > Has anyone been successful on this hardware ? I'm basing this off my experience with the Multia but since I hit the same things you did, I'm guessing the same fixes will work. - Tel