===== aboot =====
aboot is the Linux boot loader for Alpha systems with the [[software:firmware:srm|SRM console]]. It loads a Linux kernel, optionally with an initial ramdisk, from an ext2, ext3, ext4, XFS, ISO 9660, or UFS file system or from raw disk blocks, and supports a configuration file, ''/etc/aboot.conf''. [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)] Systems with the [[software:firmware:arc|ARC or AlphaBIOS]] firmware use [[software:boot_loaders:milo|MILO]] instead. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/aboot.sgml|aboot(8)]], aboot 2.0)]
aboot is free software under the GNU GPL. [(>[[https://github.com/alphalinux/aboot/blob/master/COPYING|COPYING]], aboot 2.0)] The current source repository is [[https://github.com/alphalinux/aboot]].
==== Installing ====
=== Packages ===
Debian packages aboot as ''aboot'', which holds the tools such as ''swriteboot'', and ''aboot-base'', which installs the boot loader itself as ''/boot/bootlx''; the version in unstable is 1.0~pre20200212. [(>[[https://tracker.debian.org/pkg/aboot|aboot]], tracker.debian.org)] [(>[[https://packages.debian.org/sid/all/aboot-base/filelist|aboot-base file list]], packages.debian.org)] Gentoo packages aboot 2.0 as ''sys-boot/aboot'', which also installs ''/boot/bootlx''. [(>[[https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-boot/aboot/aboot-2.0.ebuild|sys-boot/aboot/aboot-2.0.ebuild]], gentoo.git)]
=== Building ===
''make'' builds ''bootlx'' and the tools, and ''make install'' copies ''bootlx'' to ''/boot'' and ''swriteboot'', ''abootconf'', ''e2writeboot'', and ''isomarkboot'' to ''/sbin''; the ''root'' make variable sets a different prefix. [(>[[https://github.com/alphalinux/aboot/blob/master/Makefile|Makefile]], aboot 2.0)] ''make netabootwrap'' builds ''netabootwrap'', which is not part of the default target. [(>[[https://github.com/alphalinux/aboot/blob/master/Makefile|Makefile]], aboot 2.0)]
The Makefile cross-compiles by default: ''bootlx'' is built with the compiler named by ''CROSS_COMPILE'', by default ''alpha-unknown-linux-gnu-'', while the tools are built with ''HOSTCC'' for the machine doing the build. [(>[[https://github.com/alphalinux/aboot/commit/1932dc6|"build: support cross-compilation via CROSS_COMPILE"]], alphalinux/aboot)] [(>[[https://github.com/alphalinux/aboot/blob/master/Makefile|Makefile]], aboot 2.0)] On an Alpha, ''CROSS_COMPILE'' is set to nothing; elsewhere it names the installed cross compiler (see [[documentation:toolchains#cross_compilers|Toolchains: Cross compilers]]):
git clone https://github.com/alphalinux/aboot.git
cd aboot
make CROSS_COMPILE= # native build on an Alpha
make CROSS_COMPILE=alpha-linux-gnu- # cross build with Debian's cross compiler
''include/config.h'' sets the default partition for ''/etc/aboot.conf'', which can also be changed later with ''abootconf''. [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)]
=== Disklabels ===
A disk booted from SRM must use a BSD disklabel, not an MBR or GPT partition table, because a PC partition table occupies the same place in the first sector as the SRM boot block. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2000-April.mbox#L4626|"Re: Newbie question about booting."]], Larry Sendlosky, axp-list, 5 Apr 2000)] Other disks in the system can use any partition table. A BSD disklabel stores each partition's offset and size as a 32-bit count of sectors, so with 512-byte sectors it cannot describe more than 2 TiB of a disk. [(>[[https://github.com/alphalinux/aboot/blob/master/include/disklabel.h|include/disklabel.h]], aboot 2.0)]
Current ''fdisk'' from util-linux cannot create BSD disklabels; ''parted'' creates one with ''mktable bsd'' (see [[documentation:installation#partitioning|Installation: Partitioning]]). [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/gentoo-alpha-mbox/2024-April.mbox#L85|"Re: [gentoo-alpha] fdisk on mini-installer iso"]], Matt Turner, gentoo-alpha, 8 Apr 2024)] ARC and AlphaBIOS cannot read BSD disklabels, so a disk cannot be booted from both SRM and AlphaBIOS. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2000-February.mbox#L38849|"RE: srm / ide"]], Larry Sendlosky, axp-list, 29 Feb 2000)]
aboot only tries the file system drivers that match the partition type in the disklabel. ext2, ext3, ext4, and XFS use type 8, and UFS type 7. ISO 9660 is only found on devices without a disklabel, such as CDs. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] Recycled disks with an old PC partition table can confuse installers; erasing the old signatures first, with ''wipefs -a'', avoids this. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2003-January.mbox#L11200|"Re: swriteboot ?"]], Michal Jaegermann, axp-list, 23 Jan 2003)]
=== swriteboot ===
''swriteboot'' writes aboot (''bootlx'') to the start of a disk and updates the boot block: [(>[[https://github.com/alphalinux/aboot/blob/master/sdisklabel/swriteboot.c|sdisklabel/swriteboot.c]], aboot 2.0)] [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)]
swriteboot [-f1-8] [-c1-8] [-v] disk bootfile [kernel]
swriteboot -c2 /dev/sda /boot/bootlx
* The target is the whole disk (e.g. ''/dev/sda''), not a partition. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-October.mbox#L268|"Re: aboot install fails"]], Steve Langasek, debian-alpha, 1 Oct 2004)]
* The space before the first partition must be free; starting the first partition at 1 MiB leaves enough room for aboot. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)] If a partition overlaps aboot, ''swriteboot'' stops with "bootcode overlaps with partition #//n//. If you really want this, use -f//n//". [(>[[https://github.com/alphalinux/aboot/blob/master/sdisklabel/swriteboot.c|sdisklabel/swriteboot.c]], aboot 2.0)] On a disklabel with a whole-disk ''c'' partition, which ''parted'' does not create, ''-f3'' is needed. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)] ''-f'' can be given more than once. [(>[[https://github.com/alphalinux/aboot/blob/master/sdisklabel/swriteboot.c|sdisklabel/swriteboot.c]], aboot 2.0)] Alternatively, a small first partition can reserve the space, with aboot written over it using ''-f1''. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1998-September.mbox#L22583|"Re: aboot problems with AlphaStation 200"]], Maciej W. Rozycki, axp-list, 15 Sep 1998)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2005-May.mbox#L1908|"Re: swriteboot vs debian installer wrt Tru64 disklabel"]], Steve Langasek, debian-alpha, 4 May 2005)]
* ''-c'' sets the partition that holds ''/etc/aboot.conf''. Without it, ''swriteboot'' keeps the setting of an aboot already on the disk. [(>[[https://github.com/alphalinux/aboot/blob/master/sdisklabel/swriteboot.c|sdisklabel/swriteboot.c]], aboot 2.0)]
* A kernel given as the third argument is written directly after aboot, and can be booted as partition ''0''. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1996-October.mbox#L31540|"Re: Boot via SRM on poweron"]], Michael Schwingen, axp-list, 21 Oct 1996)] Such a kernel must be an uncompressed ELF image. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]], aboot 0.9, 25 Oct 2001)]
* On a disk shared with Tru64 UNIX, installing aboot makes the first and third partitions unusable, since they must start at offset 0. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)]
=== abootconf ===
''abootconf'' //disk// [//partition//] shows or sets the partition that aboot searches for ''/etc/aboot.conf''. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/abootconf.sgml|abootconf(8)]], aboot 2.0)] The device is the drive, e.g. ''/dev/sda'', and the setting is stored in the aboot image on the disk. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2003-July.mbox#L9993|"Re: AW: installing kernel-image"]], Tyson Whitehead, debian-alpha, 15 Jul 2003)] ''swriteboot -c'' does the same. A newly built aboot searches partition 1. [(>[[https://github.com/alphalinux/aboot/blob/master/include/config.h|include/config.h]], aboot 2.0)] [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]], aboot 0.9, 25 Oct 2001)]
=== CDs ===
''isomarkboot'' //image// //bootlx// [//root.bin//] makes an ISO 9660 image bootable, which works because files on ISO 9660 are contiguous. [(>[[https://github.com/alphalinux/aboot/blob/master/tools/isomarkboot.c|tools/isomarkboot.c]], aboot 2.0)] For example, a rescue CD: [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-February.mbox#L5894|"Re: equivalent of mkrescue for the alpha ??? rescue CDs"]], Steve Langasek, debian-alpha, 19 Feb 2004)]
cp -L /vmlinuz /initrd.img /boot/bootlx iso-root/
cp /etc/aboot.conf iso-root/etc/
mkisofs -r -J -o rescue.iso iso-root/
isomarkboot rescue.iso /bootlx
=== Floppies ===
''e2writeboot'' writes aboot as a contiguous file on an ext2 floppy and points the boot block at it, [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/e2writeboot.8|e2writeboot(8)]], aboot 2.0)] and ''srmbootfat'' does the same for a file on a FAT floppy. [(>[[https://github.com/alphalinux/aboot/blob/master/srmbootfat/srmbootfat.sgml|srmbootfat(1)]], aboot 2.0)]
==== Booting ====
aboot takes its arguments from the SRM ''boot'' command: [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)] [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
>>> boot dka0 -file 1/vmlinuz -flags "root=/dev/sda3 console=ttyS0"
>>> boot dka0 -flags 0
>>> boot dka0 -flags "1:1 single"
>>> boot dka0 -flags i
* **''-file'' //partition///''path'':** the partition is a digit from 1 to 8, corresponding to BSD partitions ''a'' to ''h''. It can be omitted on a floppy or CD. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1998-October.mbox#L58087|"Re: SRM unplugged"]], Xenophon Fenderson, axp-list, 5 Oct 1998)] [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/aboot.conf.sgml|aboot.conf(5)]], aboot 2.0)] Partition ''0'' is a kernel written directly after aboot. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
* **''-flags'' with kernel arguments** passes them to the kernel. The quotes are required when there are spaces. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1997-March.mbox#L22902|"RE: Alpha Server 2000:Up and Running:THANKS!!"]], Jay Estabrook, axp-list, 20 Mar 1997)]
* **''-flags'' //n//** boots entry //n// from ''/etc/aboot.conf'' on the configured partition. **''-flags'' //p//'':''//n//** reads ''aboot.conf'' from partition //p// instead. Extra kernel arguments can follow after a space. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] Some SRM versions allow only 8 or 16 characters in the option string, so keeping the kernel arguments in ''aboot.conf'' and only the entry number in the flags is more robust. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1998-October.mbox#L58087|"Re: SRM unplugged"]], Xenophon Fenderson, axp-list, 5 Oct 1998)]
* **''-flags i''**, or empty flags, starts the interactive prompt. If a kernel fails to load, aboot also falls back to the prompt. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
* **Unattended booting** is set up with the SRM variables described in [[documentation:installation#booting_the_installed_system|Installation: Booting the installed system]]. [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)] Pressing C-c repeatedly during startup returns to the SRM prompt. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1997-June.mbox#L1499|"Re: Getting out of aboot in SRM?"]], Jay Estabrook, axp-list, 2 Jun 1997)]
=== aboot.conf ===
aboot searches the configured partition for ''/etc/aboot.conf'', ''/aboot.conf'', ''/etc/aboot.cfg'', and ''/aboot.cfg'', in that order. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] Each line is a single-character label, a colon, a partition and path, and kernel arguments. A ''#'' starts a comment, and a line starting with ''-'' ends the file. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/aboot.conf.sgml|aboot.conf(5)]], aboot 2.0)]
Paths are relative to the root of the partition. In the following example, ''/boot'' is a separate first partition, so the file is ''/boot/etc/aboot.conf'' and a kernel installed as ''/boot/vmlinuz'' is given as ''1/vmlinuz'', with the root file system on partition 3: [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/aboot.conf.sgml|aboot.conf(5)]], aboot 2.0)]
0:1/vmlinuz root=/dev/sda3 console=ttyS0
1:1/vmlinuz root=/dev/sda3 console=ttyS0 single
2:1/vmlinuz.old root=/dev/sda3 console=ttyS0
3:1/vmlinuz initrd=/initrd.img root=/dev/sda3 console=ttyS0
aboot.conf has no default entry. The default is chosen with the SRM variable ''boot_osflags''. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1999-September.mbox#L15878|"Re: SRM vs. AlphaBIOS"]], Michal Jaegermann, axp-list, 8 Sep 1999)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2003-July.mbox#L8817|"Re: installing kernel-image"]], Ionut Georgescu, debian-alpha, 15 Jul 2003)]
=== Interactive mode ===
The interactive prompt accepts these commands: [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
^ Command ^ Description ^
| ''h'', ''?'' | Display the command summary |
| ''q'' | Halt and return to SRM |
| ''p'' //1-8// | Use this partition for ''aboot.conf'' and kernels |
| ''l'' | List the entries in ''aboot.conf'' |
| ''d'' //dir// | List a directory |
| ''b'' //file// //args// | Boot a kernel with arguments; ''-'' for a kernel written after aboot |
| ''i'' //file// | Use a file as the initial ramdisk |
| ''0''-''9'' | Boot an ''aboot.conf'' entry |
For example, ''b 1/vmlinuz root=/dev/sda3 single''. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004)]
=== initrd ===
An initial ramdisk is given with ''initrd=''//path// in the flags, or with the ''i'' command. It is loaded from the same partition as the kernel, as high in memory as possible. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] The option must be inside the ''-flags'' string, e.g.: [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2002-December.mbox#L16134|"Re: boot failures"]], Jay Estabrook, axp-list, 12 Dec 2002)]
>>> boot dka0 -file 1/vmlinuz -flags "initrd=/initrd.img root=/dev/sda3 console=ttyS0"
=== Kernel images ===
aboot loads a kernel that is a 64-bit little-endian Alpha ELF executable, such as the kernel's ''vmlinux'', either uncompressed or compressed with gzip. [(>[[https://github.com/alphalinux/aboot/blob/master/aboot.c|aboot.c]], aboot 2.0)] [(>[[https://github.com/alphalinux/aboot/blob/master/zip/misc.c|zip/misc.c]], aboot 2.0)] ''make boot'' in the kernel tree builds the gzip-compressed ''arch/alpha/boot/vmlinux.gz''. [(>[[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/Makefile?h=v7.3-rc1|arch/alpha/Makefile]], Linux 7.3)] aboot first tries a file as uncompressed ELF and then as gzip, except that a file whose name ends in ''.gz'' is only tried as gzip. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)] Other compression formats, such as bzip2 or xz, are not supported, and fail with "unknown compression method". [(>[[https://github.com/alphalinux/aboot/blob/master/zip/misc.c|zip/misc.c]], aboot 2.0)] A kernel written directly after aboot must be uncompressed (see [[#swriteboot|swriteboot]]).
=== Network booting ===
SRM fetches a network boot image itself with BOOTP and TFTP, e.g. ''boot ewa0 -protocols bootp''. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1998-April.mbox#L45126|"Re: Remote boot Multia..."]], Maciej W. Rozycki, axp-list, 27 Apr 1998)] Setting ''ewa0_protocols'' to ''bootp'' makes BOOTP the default instead of MOP. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2006-February.mbox#L12364|"Re: Debugging Multia boot problems: take one"]], Jay Estabrook, debian-alpha, 17 Feb 2006)] The image is not an ordinary kernel. aboot builds one, containing aboot, a compressed kernel, an initrd, and default arguments, with ''netabootwrap'': [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/netabootwrap.sgml|netabootwrap(1)]], aboot 2.0)]
netabootwrap -t netboot.img -k vmlinux.gz -i initrd.gz -a "root=/dev/sda3 console=ttyS0"
Debian built all its netboot installer images this way. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2007-August.mbox#L3772|"Re: [BUG] 2.6.23-rc3 won't boot on alpha (fwd)"]], Steve Langasek, debian-alpha, 21 Aug 2007)] The kernel can also build a BOOTP image without aboot, with ''make bootpfile'' or, compressed, ''make bootpzfile'', which produce ''arch/alpha/boot/bootpfile'' and ''bootpzfile''. [(>[[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/Makefile?h=v7.3-rc1|arch/alpha/Makefile]], Linux 7.3)] Setting the make variable ''INITRD'' to a file appends it as an initrd. [(>[[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/alpha/boot/Makefile?h=v7.3-rc1|arch/alpha/boot/Makefile]], Linux 7.3)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2007-August.mbox#L1139|"Re: [BUG] 2.6.23-rc3 won't boot on alpha (fwd)"]], Jay Estabrook, debian-alpha, 16 Aug 2007)]
The server side needs a DHCP or BOOTP server that gives the system an address, the TFTP server's address, and the image's file name, and a TFTP server that serves the image. With ISC dhcpd, for example: [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2006-February.mbox#L12228|"Re: Debugging Multia boot problems: take one"]], Steve Langasek, debian-alpha, 17 Feb 2006)]
host alpha {
hardware ethernet 08:00:2B:E7:94:9B;
fixed-address alpha.example.org;
filename "netboot.img";
next-server 192.168.1.1;
}
dnsmasq can provide both servers. It answers BOOTP requests only from hosts given a fixed address with ''dhcp-host'' (unless ''bootp-dynamic'' is set), and needs a ''dhcp-range'' to enable its DHCP server; with ''enable-tftp'', ''dhcp-boot'' needs only the file name, which is served from ''tftp-root'': [(>[[https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html|dnsmasq(8)]], dnsmasq 2.90)]
dhcp-range=192.168.1.100,192.168.1.200
dhcp-host=08:00:2b:e7:94:9b,192.168.1.50,alpha
dhcp-boot=netboot.img
enable-tftp
tftp-root=/srv/tftp
The system then boots with ''boot ewa0 -flags ""'', taking the file name from the DHCP server. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2006-February.mbox#L12228|"Re: Debugging Multia boot problems: take one"]], Steve Langasek, debian-alpha, 17 Feb 2006)]
==== File systems ====
^ File system ^ Notes ^
| ext2 | |
| ext3 | Read as ext2, without replaying the journal. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2003-March.mbox#L7212|"Re: Couple quick questions 164Lx milo/aboot/ext3 AlphaBIOS versus SRM"]], Falk Hueffner, debian-alpha, 19 Mar 2003)] |
| ext4 | Extents stored in the inode only; see below. [(>[[https://github.com/alphalinux/aboot/commit/2ab0cfd|"fs: Add ext4 support"]], alphalinux/aboot)] [(>[[https://github.com/alphalinux/aboot/commit/707f7af|"ext4: add initial ext4 support with 64-bit group descriptors and multi-extent reads"]], alphalinux/aboot)] |
| ISO 9660 | Rock Ridge long names and symbolic links are supported. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2000-May.mbox#L2892|"aboot 0.7 released"]], David Huggins-Daines, axp-list, 2 May 2000)] [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]], aboot 0.9, 25 Oct 2001)] |
| UFS (BSD FFS) | "Not well exercised and may be broken". [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)] |
| XFS | Versions 4 and 5. [(>[[https://github.com/alphalinux/aboot/commit/89ced1f|"Initial XFSv5 suppport"]], alphalinux/aboot)] |
aboot does not read Btrfs, FAT, ReiserFS, or Tru64 AdvFS. [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
aboot 2.0 refuses ext4 file systems with features it cannot read safely, including ''meta_bg'', ''bigalloc'', ''quota'', and more than 2^32 blocks. It only reads extents stored directly in the inode, not deeper extent trees, so a kernel file split into more than four extents cannot be loaded. [(>[[https://github.com/alphalinux/aboot/blob/master/fs/ext2.c|fs/ext2.c]], aboot 2.0)] [(>[[https://github.com/alphalinux/aboot/commit/707f7af|"ext4: add initial ext4 support with 64-bit group descriptors and multi-extent reads"]], alphalinux/aboot)] aboot then prints "Extent tree depth //n// not supported" or "//n// extents exceeds the 4 that fit inline". [(>[[https://github.com/alphalinux/aboot/blob/master/fs/ext2.c|fs/ext2.c]], aboot 2.0)] The number of extents in a file can be checked beforehand with ''filefrag'' from e2fsprogs, e.g. ''filefrag /boot/vmlinuz''; ''-v'' gives more detail. [(>[[https://manpages.debian.org/filefrag.8|filefrag(8)]], manpages.debian.org)] ext2 and ext3 file systems, which map blocks through indirect blocks instead of extents, do not have this limit. [(>[[https://github.com/alphalinux/aboot/blob/master/fs/ext2.c|fs/ext2.c]], aboot 2.0)]
==== Recovering an unbootable disk ====
If aboot starts but the kernel fails, ''boot'' with ''-flags i'' gives aboot's prompt, from which another ''aboot.conf'' entry, or a kernel with different arguments, can be booted (see [[#interactive_mode|Interactive mode]]). If SRM instead reports that block 0 of the disk "is not a valid boot block", [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2001-December.mbox#L3925|"Re: RH6.2 cd install"]], G.L. Grobe, axp-list, 4 Dec 2001)] the disk has no boot block pointing to aboot (see [[#how_it_works|How it works]]), and aboot has to be written again:
- Boot the installation CD (see [[documentation:installation#booting_the_installer|Installation: Booting the installer]]) and get to a shell, e.g. the rescue mode of the installer. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2001-July.mbox#L38559|"SGI XFS Red Hat 7.1 Installer for Alpha"]], Martin K. Petersen, axp-list, 30 Jul 2001)]
- Mount the file system that holds ''bootlx'', or mount the installed system and ''chroot'' into it. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-May.mbox#L17595|"Re: Alpha installation"]], sammyg, debian-alpha, 24 May 2004)] ''swriteboot'' does not have to run inside the installed system: it only copies ''bootlx'', which is the same file on every installation, to the start of the disk. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2007-March.mbox#L381|"Re: Installing aboot ?"]], Steve Langasek, debian-alpha, 2 Mar 2007)]
- Run ''swriteboot'' on the whole disk, with ''-c'' naming the partition that holds ''aboot.conf'' (see [[#swriteboot|swriteboot]]). With the layout from [[documentation:installation#partitioning|Installation: Partitioning]], where ''/boot'' is partition 1, this is ''mount /dev/sda1 /mnt'' followed by ''swriteboot -c1 /dev/sda /mnt/bootlx''.
- Check ''aboot.conf'' on that partition, and correct the kernel paths and ''root='' arguments if needed. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-May.mbox#L17595|"Re: Alpha installation"]], sammyg, debian-alpha, 24 May 2004)] If aboot is present but looks for ''aboot.conf'' on the wrong partition, ''abootconf'' changes the setting without rewriting aboot. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2007-March.mbox#L381|"Re: Installing aboot ?"]], Steve Langasek, debian-alpha, 2 Mar 2007)] [(>[[https://github.com/alphalinux/aboot/blob/master/doc/man/abootconf.sgml|abootconf(8)]], aboot 2.0)]
==== Known issues ====
* **"unknown compression method":** aboot first tries to load a kernel uncompressed, then compressed, and prints this if both fail, whatever the actual cause. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2004-December.mbox#L2652|"New Red Hat 7.2 Alpha install on DEC PWS 600au"]], Jim McCarthy, axp-list, 11 Dec 2004)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/1999-November.mbox#L1928|"Re: Jensen DECPC150 install!"]], Sebastian Moeller, debian-alpha, 15 Nov 1999)]
* **Serial console:** aboot writes through the SRM console, so with the SRM ''console'' variable set to ''serial'' its messages and prompt appear on the serial port and nothing appears on the screen. [(>[[https://github.com/alphalinux/aboot/blob/master/cons.c|cons.c]], aboot 2.0)] [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2001-July.mbox#L29944|"Re: aboot gives no output on SX164"]], Falk Hueffner, axp-list, 23 Jul 2001)] Linux needs ''console=ttyS0'' in its arguments to use the same port, or ''console=srm'' on the Marvel systems (ES47, ES80, and GS1280); see [[documentation:srm#serial_console|Using the SRM Console: Serial console]].
* **UFS and network booting:** the aboot 2.0 README describes both as "not well exercised and may be broken". Reading ''aboot.conf'' from UFS can hang if the entry is not found. [(>[[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]], aboot 2.0)]
* **SRM without support for the boot controller:** aboot can only boot from devices that SRM can read. Alternatives are a network boot, or aboot and the kernel on a disk on a supported controller. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-October.mbox#L4288|"Re: howto boot alpha via SRM without supported SCSI controller"]], Måns Rullgård, debian-alpha, 15 Oct 2004)]
==== How it works ====
The SRM console does not read file systems or partition tables. The first sector of the disk holds the size of the secondary boot loader in 512-byte blocks at offset 480, its starting sector at offset 488, a flag word at offset 496, and a checksum of the first 63 quadwords at offset 504. SRM loads the loader at virtual address 0x20000000 and jumps to it. [(>[[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1, 14 Feb 2004, "Loading The Secondary Bootstrap Loader")] ''swriteboot'' writes aboot starting at sector 2. [(>[[https://github.com/alphalinux/aboot/blob/master/sdisklabel/swriteboot.c|sdisklabel/swriteboot.c]], aboot 2.0)]
aboot then:
- switches from the console PALcode to the OSF/1 PALcode, [(>[[https://github.com/alphalinux/aboot/blob/master/utils.c|utils.c]], aboot 2.0)]
- reads the boot device, file, and flags from the SRM environment, [(>[[https://github.com/alphalinux/aboot/blob/master/aboot.c|aboot.c]], aboot 2.0)]
- reads the disk through the SRM console callbacks, [(>[[https://github.com/alphalinux/aboot/blob/master/cons.c|cons.c]], aboot 2.0)]
- finds the partition in the BSD disklabel, mounts its file system, and loads the kernel and initrd, [(>[[https://github.com/alphalinux/aboot/blob/master/disk.c|disk.c]], aboot 2.0)]
- and jumps to the kernel.
aboot does no low-level hardware setup of its own and relies entirely on the SRM console's services. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1999-November.mbox#L18895|"Re: Boot failure on AS2100"]], Richard Henderson, axp-list, 7 Nov 1999)] Errors such as ''c000000000000000'' when opening the boot device therefore come from SRM, not aboot. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2001-March.mbox#L35715|"RE: installing rh 7.0"]], Will Woods, axp-list, 27 Mar 2001)] Because SRM hides the differences between systems, a single aboot binary works on every SRM system. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1996-May.mbox#L2538|"Re: The aboot - Jensen saga"]], David Mosberger-Tang, axp-list, 6 May 1996)]
==== History ====
aboot is based on the kernel's own SRM boot loader in ''arch/alpha/boot'', extended by David Mosberger and Michael Schwingen with a prompt for arguments and the ''/etc/aboot.conf'' file. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]], aboot 0.9, 25 Oct 2001)] Mosberger added file system support, Schwingen the default command line handling, and Dave Larson network booting. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/ChangeLog|ChangeLog]], aboot)] The ISO 9660 code came from MILO. [(>[[https://github.com/alphalinux/aboot/blob/master/fs/iso.c|fs/iso.c]], aboot 2.0)] David Huggins-Daines merged the patches carried by Red Hat, Debian, and SuSE in version 0.6 in March 2000. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/ChangeLog|ChangeLog]], aboot 0.6, 6 Mar 2000)] Will Woods maintained aboot from 2001 to 2004; his last snapshot was 1.0_pre20040408, and there was never a final 1.0. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/ChangeLog|ChangeLog]], aboot)] The [[https://github.com/alphalinux/aboot|alphalinux/aboot]] repository added cross-compilation, ext4 support (first added in 2017, and extended by Magnus Lindholm with 64-bit group descriptors and multi-extent reads), [(>[[https://github.com/alphalinux/aboot/commit/2ab0cfd|"fs: Add ext4 support"]], alphalinux/aboot)] and XFS support by Jan-Jaap van der Heijden and Lindholm, and was tagged as version 2.0 in September 2026. [(>[[https://github.com/alphalinux/aboot/commit/707f7af|"ext4: add initial ext4 support with 64-bit group descriptors and multi-extent reads"]], alphalinux/aboot)] [(>[[https://github.com/alphalinux/aboot/commit/6658725|"Add support for XFS to aboot"]], alphalinux/aboot)] [(>[[https://github.com/alphalinux/aboot/commit/357dccb|"Bump version to 2.0"]], alphalinux/aboot)]
=== Versions ===
^ Version ^ Date ^ Changes ^
| 0.9b | November 2002 | Builds with GCC 3 and newer glibc. [(>[[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/2002-November.mbox#L9112|"aboot 0.9b"]], Will Woods, axp-list, 13 Nov 2002)] |
| 1.0_pre20040408 | April 2004 | Extra kernel arguments after an ''aboot.conf'' entry. [(>[[https://github.com/alphalinux/aboot/blob/c91a39e9a735/ChangeLog|ChangeLog]], aboot)] |
| 2.0 | September 2026 | ext4, XFS, cross-compilation. [(>[[https://github.com/alphalinux/aboot/commit/357dccb|"Bump version to 2.0"]], alphalinux/aboot)] |
==== Conflicting information ====
The following sources conflict with each other or with the account given above. They are listed here for further investigation.
* **Space to reserve before the first partition**
* [[https://github.com/alphalinux/aboot/blob/master/doc/man/swriteboot.8|swriteboot(8)]]: "It is therefore suggested to reserve the first 512 sectors of a harddisk for boot purposes."
* [[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1: "We suggest that the disk be partitioned such that the first partition starts at an offset of 2048 sectors."
* [[https://github.com/alphalinux/mailing-list-archives/blob/main/axp-list-mbox/1996-October.mbox#L30392|"Re: Boot via SRM on poweron"]], Jay Estabrook, axp-list, 20 Oct 1996: "aboot fits fine in front of partition 1 if you offset the start of partition 1, say 512-1024 sectors"
* **Whether the kernel position limit was fixed**
* [[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]], aboot 0.9: "Failure to boot when kernel was past the 2GB boundary on ext2 fs fixed"
* [[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2004-July.mbox#L1865|"aboot size limitation in Woody"]], Bob Lindell, debian-alpha, 12 Jul 2004: "I could get aboot to fail to read either the /etc/aboot.conf file or the kernel images if they were too far into the 20GB partition."
* **Whether aboot reads ReiserFS**
* [[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2001-October.mbox#L3683|"reiserfs on all my SRM-alpha drives: how I did it"]], James D. Freels, debian-alpha, 27 Oct 2001: "aboot does not understand reiserfs"
* [[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2001-November.mbox#L800|"Re: need help with milo and repartitioning"]], James D. Freels, debian-alpha, 2 Nov 2001: "Therefore, the aboot has read the kernel from a reiserfs."
* **Whether network booting works**
* [[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1: "Netboot using the aboot sources is currently broken"
* [[https://github.com/alphalinux/mailing-list-archives/blob/main/debian-alpha-mbox/2007-August.mbox#L3772|"Re: [BUG] 2.6.23-rc3 won't boot on alpha (fwd)"]], Steve Langasek, debian-alpha, 21 Aug 2007, describes ''netabootwrap'' images as what Debian used for all its netboot installer images.
==== Documentation ====
^ Document ^ Part number ^ Date ^
| [[https://github.com/alphalinux/aboot/blob/master/doc/faq/SRM-HOWTO.sgml|SRM Firmware Howto]], v0.8.1 by Rich Payne and David Huggins-Daines, in the aboot repository | | February 2004 |
| [[https://github.com/alphalinux/aboot/tree/master/doc/man|Man pages]] for aboot, aboot.conf, abootconf, swriteboot, e2writeboot, isomarkboot, netabootwrap, and sdisklabel | | |
| [[https://github.com/alphalinux/aboot/blob/master/README.md|README.md]] (aboot 2.0) | | |
| [[https://github.com/alphalinux/aboot/blob/c91a39e9a735/ChangeLog|ChangeLog]] and [[https://github.com/alphalinux/aboot/blob/c91a39e9a735/README|README]] from before aboot 2.0, with the history of versions 0.1 to 1.0_pre20040408 | | |
See also [[software:firmware:srm#booting_linux|SRM console: Booting Linux]].
{{tag>software boot_loader linux}}