* milo extension request
@ 1998-06-09 16:42 Greg Lindahl
1998-06-09 8:44 ` Jay.Estabrook
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Greg Lindahl @ 1998-06-09 16:42 UTC (permalink / raw)
To: axp-list
I have a ton of Alphas. If I want to upgrade a ton of x86 boxes,
here's how I do it:
disable swap and reboot
dd an upgraded system partition into the swap partition
reconfigure lilo to boot off this new partition
reboot
dd the final upgraded system onto the old system partition
reconfigure lilo back to original system partition
reboot
All of this can be done with scripts.
On an Alpha, the problem is that the boot info is in the PROM, which I
can only change by typing on the keyboard. Is there any way to:
1) have Milo read the initial args out of a file and set the prom args
to be something like "=FILENAME", or
2) poke the initial args into the Milo executable
If you don't see why I don't just type the boot args into each
machine, consider N = 64. Or N = 128.
-- g
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: milo extension request 1998-06-09 16:42 milo extension request Greg Lindahl @ 1998-06-09 8:44 ` Jay.Estabrook 1998-06-09 18:43 ` Andreas Haumer ` (2 more replies) 1998-06-09 21:28 ` milo extension request Michael Alan Dorman 1998-07-19 1:18 ` Michael Alan Dorman 2 siblings, 3 replies; 7+ messages in thread From: Jay.Estabrook @ 1998-06-09 8:44 UTC (permalink / raw) To: axp-list >>> Greg Lindahl said: > I have a ton of Alphas. If I want to upgrade a ton of x86 boxes, > here's how I do it: > > disable swap and reboot > dd an upgraded system partition into the swap partition > reconfigure lilo to boot off this new partition > reboot > dd the final upgraded system onto the old system partition > reconfigure lilo back to original system partition > reboot > > All of this can be done with scripts. > > On an Alpha, the problem is that the boot info is in the PROM, which I > can only change by typing on the keyboard. Is there any way to: > > 1) have Milo read the initial args out of a file and set the prom args > to be something like "=FILENAME", or > > 2) poke the initial args into the Milo executable > > If you don't see why I don't just type the boot args into each > machine, consider N = 64. Or N = 128. Take a look at the following setup for AlphaBIOS/MILO operation I got from Bruce Allen <ballen@dirac.phys.uwm.edu>: > It worked! We now have an automatic cloning procedure that can be > done entirely on the net. No keyboards, monitors, soft-reset pushes, > etc are needed. > > A detailed description of this (with credit to you!) showing how to > modify the code etc, is at: > > http://www.lsc-group.phys.uwm.edu/~www/docs/beowulf/Slave/auto-clone.html > > You might enjoy glancing at our main beowulf pages: > > http://www.lsc-group.phys.uwm.edu/~www/docs/beowulf --Jay++ ------------------------------------------------------------------------------- American Non Sequitur Society: we don't make sense, but we do like pizza... Jay A Estabrook Alpha Motherboards - LINUX Project Digital Equipment Corp. (508) 841-3241 or (DTN) 237-3241 334 South Street, Shrewsbury, MA 01545 Jay.Estabrook@digital.com ------------------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: milo extension request 1998-06-09 8:44 ` Jay.Estabrook @ 1998-06-09 18:43 ` Andreas Haumer 1998-06-09 18:57 ` Xserver & long*/int* alignment probs Uncle George 1998-09-02 15:00 ` Another method for changing Milo's reboot arguments from a running AXP system Christian Worley 2 siblings, 0 replies; 7+ messages in thread From: Andreas Haumer @ 1998-06-09 18:43 UTC (permalink / raw) To: axp-list Hi! Jay.Estabrook@digital.com wrote: > [...] > Take a look at the following setup for AlphaBIOS/MILO operation I got from > Bruce Allen <ballen@dirac.phys.uwm.edu>: > > > It worked! We now have an automatic cloning procedure that can be > > done entirely on the net. No keyboards, monitors, soft-reset pushes, > > etc are needed. > > I'm wondering how you could manage to boot a AlphaBIOS based system _without_ keyboard attached?? On my system (PC164LX board), AlphaBIOS refuses to auto-boot, when there's no keyboard attached to it. I even issued a official service request to Digital Semiconductor and got the answer that "at this time that feature is not supported" This is a serious problem for me and still unresolved for 6 months (and, no, attaching some "keyboard simulator" is not an option, my customers would just laugh at me when I tried to install a Linux Alpha server machine with such a device attached, just to satisfy the BIOS...) Well, I guess there's no real "Windows NT Server" with serial console support, so it shows you where the wind blows from... :-( - andreas -- Andreas Haumer | email: andreas@xss.co.at | PGP key available *x Software + Systeme | phone: +43.1.6001508 | on request. Buchengasse 67/8 | +43.664.3004449 | A-1100 Vienna, Austria | fax: +43.1.6001507 | ^ permalink raw reply [flat|nested] 7+ messages in thread
* Xserver & long*/int* alignment probs 1998-06-09 8:44 ` Jay.Estabrook 1998-06-09 18:43 ` Andreas Haumer @ 1998-06-09 18:57 ` Uncle George 1998-09-02 15:00 ` Another method for changing Milo's reboot arguments from a running AXP system Christian Worley 2 siblings, 0 replies; 7+ messages in thread From: Uncle George @ 1998-06-09 18:57 UTC (permalink / raw) To: axp-list, Jay.Estabrook I believe it was u who wanted my changes for the alignment probs in cfb32 in cfb8line.c all the RROP_SOLID_MASK((unsigned long*) ...->RROP_SOLID_MASK((unsigned int *) in cfbrrop.h RROP_UNROLL_CASE( @310 RROP_UNROLL_LOOP( @314 RROP_SOLID( @320 RROP_SOLID_lu( @325 thay all have (unsigned long *), which should be (unsigned int *) hope this helps in the X alignment probs. gat ^ permalink raw reply [flat|nested] 7+ messages in thread
* Another method for changing Milo's reboot arguments from a running AXP system. 1998-06-09 8:44 ` Jay.Estabrook 1998-06-09 18:43 ` Andreas Haumer 1998-06-09 18:57 ` Xserver & long*/int* alignment probs Uncle George @ 1998-09-02 15:00 ` Christian Worley 2 siblings, 0 replies; 7+ messages in thread From: Christian Worley @ 1998-09-02 15:00 UTC (permalink / raw) To: axp-list, ballen, Andreas Haumer, Greg Lindahl, extreme-linux, beowulf [-- Attachment #1: Type: text/plain, Size: 4596 bytes --] I have a new method for changing Milo's boot parameters from a running system. It's a simple program, that needs to be run by root. It's attached. It modifies the "milo reboot block", by searching for it's magic number "MIDOODIM", then modifying the boot parameters. It takes three or four arguments: the boot device by number, the boot file by name, the boot string, and, optionally, if the change is to be permanent in NVRAM. The last argument only works for systems that boot from milo in NVRAM, which we use, since milo doesn't require a keyboard (and AlphaBios and ARC do, at least, you have to acknowledge from the serial port that you know there's no keyboard before these will boot). Other than that, the code should work for all milo's, no matter how they're started, for a one-shot reboot. This is useful for cloning. For example, if you run: ./chgroot 0x200 /vmalta.gz "root=/dev/nfsroot init=/tftpboot/scripts/clonerc " Then reboot, the next invocation of the system will use the "vmalta.gz" kernel off the floppy, use an NFS mounted root file system, and run the "clonerc" script (for re-writting the main disk). If the system is power-cycled before rebooting, then all bets are off! To make the new boot permanent, any additional argument will do (I usually just add "yes" to the end of the command line). I.e., if I want to start booting from the hard disk (which I do at the end of running the "clonerc" script), I run: ./chgroot 0x301 /vmalta.gz root=/dev/hda1 yes Or, to permanently run in bootp/NFS root diskless mode, I run: ./chgroot 0x200 /vmalta.gz "root=/dev/nfsroot init=/tftpboot/scripts/disklessrc" yes Then, reboot the system. This permanent change requires milo to run from NVRAM. Which, if you search the AXP list, Jim and Jay will give you many reasons why you should never do this. Foremost, it won't emulate a scsi bios (so, no scsi devices/controllers allowed). Also, if you're compiling from a glibc, the DEC proprietary VGA bios emulation won't work (RH4.2 systems work OK). But, these are headless and keyboardless nodes, with no scsi devices. ARC and AlphaBios won't autoboot without a keyboard, and SRM has a per-node fee. So, Milo wins. I did have to make some changes to the milo code to get the NVRAM boot arguments code working. Make sure to use the "-DMINI_NVRAM" flag when compiling milo. When you "make milo.rom", you have to add the key "MILO Environment" at the beginning of a 65K block of the rom image. Right after "makerom" in the makefile, I add the line: (dd if=./milo.rom bs=65536 conv=sync;echo "MILO Environment" ) >lx164nt.rom To make sure that worked, I follow that with the line: od -taxL lx164nt.rom | tail I place the "lx164rom.nt" on a floppy (that's the only name AlphaBios will accept), and burn the new image into NVRAM from the AlphaBios option. If I'm already running milo, then I jumper the motherboard to run the failsafe booter, stick in the AlphaBios floppy, then burn in the new Milo. I did have to make a source change to milo to get this working. If I modify the 65K block where "Milo Environment" is placed, then the serial ROM, while check-summing the NVRAM, notices the change and goes straight to the failsafe booter, So, I modify "nvram.c", in the "find_nvram" routine to return the next block number. Instead of: if (strncmp(buffer, id, strlen(id)) == 0) return block; It now returns the next block number: if (strncmp(buffer, id, strlen(id)) == 0) return block + 1; So, two NVRAM blocks are wasted for the environment. The other change to the source is in "milo.c". In the "reboot" routine, Milo needs to look for the flag that the "chgboot" application (source attached) set if the changes are to be permanent. Right after the line that reads (in the "reboot" routine): device_number_to_name(milo_reboot_block->boot_device, bootdev); I add: if (milo_reboot_block->spare2 == 1) { setenv("BOOT_DEV", bootdev); setenv("BOOT_FILE", milo_reboot_block->boot_filename); setenv("BOOT_STRING", milo_reboot_block->boot_string); } This will write the new reboot arguments into NVRAM. Disclaimer: I nor Alta Technology guarantee this to work (except to our customers). If it breaks, keep both pieces. Specifically, the source included modifies kernel memory from a user task; that can be dangerous. Furthermore, re-writing NVRAM can permanently disable your system. Otherwise, enjoy! Chris --- When I die, please cast my ashes upon Bill Gates --for once, let him clean up after me! [-- Attachment #2: chgboot.c --] [-- Type: text/plain, Size: 1180 bytes --] #include <stdio.h> #include <string.h> typedef struct { unsigned long signature1; unsigned long flags; unsigned short boot_device; short boot_filesystem; unsigned short memory_size; unsigned short spare2; unsigned char boot_filename[32]; unsigned char boot_string[64]; unsigned long signature2; } Milo_reboot_t; char *midoodim = "MIDOODIM"; main(int argc, char **argv) { Milo_reboot_t rb; long int *rebootblockp = (long int *)midoodim; long int rebootblock = *rebootblockp; long int data; int i; FILE *fd = fopen("/dev/kmem","w+"); fpos_t pos ; for (i=0; fread(&data,8,1,fd) == 1L; i++) { if (data == rebootblock) { pos = i*8; fsetpos(fd,&pos); fread(&rb, sizeof(Milo_reboot_t), 1, fd); rb.boot_device = strtoul(argv[1],NULL,0); strcpy(rb.boot_filename,argv[2]); strcpy(rb.boot_string,argv[3]); if (argc > 4) rb.spare2 = 1; fsetpos(fd,&pos); fwrite(&rb, sizeof(Milo_reboot_t), 1, fd); printf("New device: %x New kernel: %s New Args: %s\n",rb.boot_device,rb.boot_filename,rb.boot_string); return; } } fprintf(stderr,"Boot block not found after %d bytes\n",i); } ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: milo extension request 1998-06-09 16:42 milo extension request Greg Lindahl 1998-06-09 8:44 ` Jay.Estabrook @ 1998-06-09 21:28 ` Michael Alan Dorman 1998-07-19 1:18 ` Michael Alan Dorman 2 siblings, 0 replies; 7+ messages in thread From: Michael Alan Dorman @ 1998-06-09 21:28 UTC (permalink / raw) To: axp-list On Tue, Jun 09, 1998 at 12:42:54PM -0400, Greg Lindahl wrote: > On an Alpha, the problem is that the boot info is in the PROM, which I > can only change by typing on the keyboard. Is there any way to: > > 1) have Milo read the initial args out of a file and set the prom args > to be something like "=FILENAME", or > > 2) poke the initial args into the Milo executable > > If you don't see why I don't just type the boot args into each > machine, consider N = 64. Or N = 128. The Debian/Alpha team has, literally *today*, decided to look into extending MILO with this sort of functionality. On Debian/i386, you can compile a custom kernel and have it installed as a .deb package, and even have some basic management of your boot menu done. This can't be done (at least, the last bit) on the Alpha because of the way MILO gets its arguments and the basic impedence mismatch between keeping the kernel version as part of the filename, etc. We've decided to try and get to the point where you can have a single boot entry in your ARC console or whatnot, and have MILO present you with a menu or a prompt like LILO or *something*, based on the contents of a file in one of the filesystems---we are planning to allow you to compile in a filename, or specify it from ARC, etc. So we're working on this. We'll keep people assessed. We'll make our mods available. Mike. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: milo extension request 1998-06-09 16:42 milo extension request Greg Lindahl 1998-06-09 8:44 ` Jay.Estabrook 1998-06-09 21:28 ` milo extension request Michael Alan Dorman @ 1998-07-19 1:18 ` Michael Alan Dorman 2 siblings, 0 replies; 7+ messages in thread From: Michael Alan Dorman @ 1998-07-19 1:18 UTC (permalink / raw) To: axp-list On Tue, Jun 09, 1998 at 12:42:54PM -0400, Greg Lindahl wrote: > On an Alpha, the problem is that the boot info is in the PROM, which I > can only change by typing on the keyboard. Is there any way to: > > 1) have Milo read the initial args out of a file and set the prom args > to be something like "=FILENAME", or > > 2) poke the initial args into the Milo executable > > If you don't see why I don't just type the boot args into each > machine, consider N = 64. Or N = 128. Greg, Although there are still some issues to be worked out (Jay Estabrook has emailed Nikita about updating the DEC BIOS emulation code, but hasn't heard back from him yet---I may see if Nikita would like me to coordinate that for him) I thought you might be interested in this announcement from the Debian developer who's been working on MILO lately: Date: Sat, 11 Jul 1998 22:41:08 +0100 From: Nikita Schmidt <cetus@snowball.ucd.ie> To: debian-alpha@lists.debian.org Subject: MILO status Hi, I just finished what I wanted to do with MILO. The major improvements are: - symlinks on EXT2 FS; - memory size detection when booted from SRM; - parameters block that specifies a command line for autoboot (useful when neither ARC nor NVRAM is available); - a separate tool to view and set the parameters block; - lots of bugfixes. The introduction of this "parameters block" means that it is now possible to pre-program MILO (via its binary image) to execute a command on startup. If MILO is booted from ARC or AlphaBIOS and is given non-empty OSLOADOPTIONS, they take precedence. Otherwise the hardwired command is executed. For example, on an installation disk it may be useful to set this command to something like `boot -t msdos fd0:vmlinux.gz'. Several bugs have been fixed in the part that reads /etc/milo.conf and presents a choice of bootable images a la LILO. It's still far from perfect, but now hopefully it is at least useable. The command to boot via /etc/milo.conf is `boot dev:' (without file name). However, I haven't managed to make the Digital's BIOS emulation library work. I wonder how those binaries from gatekeeper are built... Well, the free x86emu code works fine for me with my S3, so I'm not concerned too much. For those who are interested, this stuff is now available under ftp://genie.ucd.ie/pub/alpha/milo. There is a big patch for MILO, a small patch for the kernel (on top of alpha-patches), a tool to play with the parameters block and a binary MILO image for Avanti. Cheers Nikita Date: Sun, 12 Jul 1998 01:42:33 +0100 From: Nikita Schmidt <cetus@snowball.ucd.ie> To: debian-alpha@lists.debian.org Subject: More on MILO Further to my announcement, I have built some more MILOs for different platforms with both Digital's and free x86 emulation libraries. If anybody wants to try them out, they are in the standard place, ftp://genie.ucd.ie/pub/alpha/milo. Your feedback is very welcome! The images are named <platform>.free and <platform>.dec, depending on the emulation package used. I doubt those *.dec will work, but who knows. The following system types are supported at the moment: Alcor Avanti Miata Noname PC164LX XL XLT Note that the file names are all lowercase. Thanks Nikita ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~1998-09-02 15:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1998-06-09 16:42 milo extension request Greg Lindahl 1998-06-09 8:44 ` Jay.Estabrook 1998-06-09 18:43 ` Andreas Haumer 1998-06-09 18:57 ` Xserver & long*/int* alignment probs Uncle George 1998-09-02 15:00 ` Another method for changing Milo's reboot arguments from a running AXP system Christian Worley 1998-06-09 21:28 ` milo extension request Michael Alan Dorman 1998-07-19 1:18 ` Michael Alan Dorman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox