Dual boot TOS/TT SVR4

Tips and tricks on HDDRIVER/Tipps und Tricks zu HDDRIVER
uweseimet
Site Admin
Posts: 408
Joined: 10 Jan 2010, 15:39

Dual boot TOS/TT SVR4

Post by uweseimet »

If you are using both TOS and Atari's SVR4 (ASV) you probably installed these systems on two separate drives or memory cards. Sometimes it can be convenient to have them both on the same drive. When booting you can then choose which OS to launch with a keystroke. Note that some expert knowledge is required to get this setup right. Ensure that you have a backup of your data!

First of all ensure that there is an explicit boot preference configured in the NVRAM. In HDDRUTIL's "Boot Parameters" dialog you can set the preference to the operating system to be booted by default. Set it to either "TOS" or "TT SVR4". Do not set it to "None", because this will always boot from the first bootable partition. In order to later boot the non-default OS just hold down the left [Shift] key when booting until either the HDDRIVER or ASV boot message appears. Note that with HDDRIVER releases older than 11.12 the key to press may be different or an OS selection may not be possible at all. If in doubt refer to the HDDRIVER manual.

Partitioning the target drive is next. In addition to your TOS partitions you have to create a single partition for ASV. The partition ID must be "UNX", which you have to enter in HDDRUTIL's partitioning dialog explicitly. It is recommended to use the first partition for ASV, because in this case you can later clone an existing ASV drive into the disk space allocated for this partition. The ASV partition should have start sector 1, which you can enter after switching to sector mode. The partition size (end sector) has to be at least the size of your existing ASV installation. Since it is cumbersome to enter partition data in sectors you may define all of your partitions in MiB mode first and then switch into sector mode in order to adjust the start and end sector of the "UNX" partition.

After partitioning, in order to clone an existing ASV installation into the "UNX" partition you can copy the ASV drive contents to the space allocated by the "UNX" partition with HDDRUTIL. Note that the start sectors for this copy operation must be 1 and not 0, because the root sector must not be copied. Adjust (decrement) the sector count for the copy operation by 1, in order not to damage the first TOS partition by copying one sector too much.

The ASV partition must be marked as bootable. In order to do so modify the partition's boot mask, which corresponds to the boot preference setting in the NVRAM. The boot mask for TOS partitions is $80, for ASV partitions it is $40. HDDRUTIL does not yet support editing the mask (future versions will), but the disk tool (e.g. DISKUS (German only)) does. With other disk tools you may have to edit the sector data directly. The boot mask is contained in the byte directly preceding the partition ID "UNX" in the root sector. Setting this byte to $41 marks the partition as a bootable ASV partition, in contrast to $81 for a bootable TOS partition.

The ASV setup is now complete. Next you can install HDDRIVER and your TOS software on the TOS partitions as usual. Note that the ASV boot mask must have been set before installing HDDRIVER, because changing the mask invalidates the checksum required for an executable root sector.

That's it! Now you have a dual boot system and control with a keystroke which operating system to launch.

You might wonder why there is only a single ASV partition in the root sector, but within ASV you see several UNIX partitions. This is because ASV has a partition table of its own, located inside the "UNX" partition. These data are effectively hidden from TOS and are managed by ASV tools, e.g. partinit or setvtoc.