| Early Macintosh Image LoadEr | |||
|
|
Summary
This page describes how to:
Howto
You can find floppy image from the package
emile-rescue
Under linux, the command to dump image to floppy is:
# dd if=emile-rescue-x.y.bin of=/dev/fd0 bs=512 conv=syncthen, you can eject floppy with: # eject /dev/fd0If you are using MacOS, use MakeDebianFloppy AppleScript (you must use a floppy image with a size of exactly 1474560 bytes). If you are neither using linux, nor MacOS, please refer to rawrite page
You need tools from package
emile-tools
The command to set kernel boot arguments is emile-set-cmdline:
emile-set-cmdline <image> <cmdline>
# emile-set-cmdline floppy.img "root=/dev/sda4"
To set root filesystem on ramdisk
# emile-set-cmdline floppy.img "root=/dev/ramdisk ramdisk_size=2048"To set root filesystem on NFS # emile-set-cmdline floppy.img \You can also read current boot arguments from floppy: # emile-set-cmdline -r /dev/fd0 Current command line: "root=/dev/ramdisk ramdisk_size=2048"
You need tools from package
emile-tools, objcopy from binutils package and
a kernel.
You can add a ramdisk if you have one (you can try mine). You can compress kernel with gzip (bzip2 is not supported by EMILE): # gzip -9 vmlinuxYou can copy first and second level bootloader and kernel to floppy: # emile-install -f first -s second -k vmlinux.gz /dev/fd0And finally, you can set kernel boot arguments: # emile-set-cmdline /dev/fd0 "root=/dev/sda4"If you have a ramdisk, the two last steps become: # emile-install -f first -s second -k vmlinux.gz \ -r ramdisk.gz /dev/fd0 # emile-set-cmdline /dev/fd0 "root=/dev/ramdisk ramdisk_size=2048"
first of all:
USE WITH CAUTION AND AT YOUR OWN RISKS !!!!!
These operations will modify properties of your partition map (if you haven't got HFS partition) or the bootblock of your HFS partition (if exists).
If you generate binaries from sources package, you must:
# cp emile/tools/emile /sbin # mkdir /boot/emile # cp first/first_scsi /boot/emile # cp second/second_scsi /boot/emileThe first operation to do is to show the state of your partition map: emile2:~# emile --scanbus -v /dev/sda: block size: 512, blocks number: 528808 (258.207 MB) Drivers 0: base: 64 size: 19 type: 1 <2: Macintosh [Apple_Driver43]> Partitions /dev/sda1 : Apple [Apple_partition_map] base: 1, count: 63 (31.500 kB) flags: 0x00000037 /dev/sda2 : Macintosh [Apple_Driver43 ] * base: 64, count: 32 (16.000 kB) flags: 0x0000007f /dev/sda3 : A/UX Root [Apple_UNIX_SVR2 ] base: 182864, count: 345944 (168.917 MB) flags: 0x00000037 /dev/sda4 : Swap [Apple_UNIX_SVR2 ] base: 150096, count: 32768 (16.000 MB) flags: 0x00000037 /dev/sda5 : MacOS [Apple_HFS ] <Apple bootblock> base: 96, count: 150000 (73.242 MB) flags: 0x000000b7The aim of the operation is to install the EMILE bootblock on the first HFS partition of the disk and to set information in it to find the second level boot block. Then we set information in second level to find the kernel. All is done automatically by emile. But you need a kernel... you can use the one provided with your Debian. You can test operation without modifying anything with parameter "--test". emile2:~# emile --test --kernel /boot/vmlinux-2.2.20 ERROR: there is already a bootblock on "/dev/sda5" you must use "--backup" to save it partition: /dev/sda5 first: /boot/emile/first_scsi second: /boot/emile/second_scsi kernel: /boot/vmlinux-2.2.20 append: root=/dev/sda3As we try to avoid to lose the Apple bootblock, EMILE checks it and does nothing if you don't explicitly backup it. Now, we can really install EMILE: emile2:~# emile --kernel /boot/vmlinux-2.2.20 --backup Bootblock backup successfully done. partition: /dev/sda5 first: /boot/emile/first_scsi second: /boot/emile/second_scsi kernel: /boot/vmlinux-2.2.20 append: root=/dev/sda3Note: by default, EMILE installs bootblock on first HFS partition, and set "root=" to the partition where is stored second_level. You can specify all parameters, see emile usage: emile2:~# emile --help Usage: emile [OPTION] Update and install EMILE stuff on your SCSI disk. EMILE allows to boot linux directly from linux partition -h, --help display this text -v, --verbose active verbose mode -t, --test active test mode (don't write to disk) --scanbus display information about all disks and partitions -f, --first PATH set path of EMILE first level -s, --second PATH set path of EMILE second level -k, --kernel PATH set path of kernel -a, --append ARG set kernel command line -p, --partition DEV define device where to install boot block --restore[=FILE] save current boot block from FILE --backup[=FILE] save current boot block to FILE --set-hfs set type of partition DEV to Apple_HFS (needed to be bootable)If you want to boot MacOS again (sure ?), you must restore the Apple bootblock with: emile2:~# emile --restore Bootblock restore successfully done."--backup" saves by default bootblock in "/boot/emile/bootblock.backup" But remember, to be bootable, a disk must have:
Last week, at my office, I install netboot server to boot and install linux from network.
It's very pleasant to use. I think it should be fun if we could do same thing on a mac 68k But, as macintosh doesn't manage PXE, we must at least boot a kernel from a floppy. What you need is:
imac:~# dpkg -l |grep dhcp ii dhcp-client 2.0pl5-19.1 DHCP Client ii dhcp3-common 3.0.1-1 Common files used by all the dhcp3* packages ii dhcp3-server 3.0.1-1 DHCP server for automatic IP address assignm imac:~# dpkg -l |grep nfs ii nfs-common 1.0.6-3.1 NFS support files common to client and serve ii nfs-kernel-ser 1.0.6-3.1 Kernel NFS server supportOn the boot server, download root.bin and put files in a directory we will mount by NFS: imac:~# wget \ ftp://ftp.fr.debian.org/debian/dists/woody/main/disks-m68k/current/mac/root.bin imac:~# mv root.bin root.bin.gz imac:~# gzip -d root.bin.gz imac:~# mkdir mnt imac:~# mount root.bin mnt -o loop imac:~# cd mnt imac:~# mkdir -p /debian-installer/m68k/2.2 imac:~/mnt# find . | cpio -p /debian-installer/m68k/2.2 6159 blocks imac:~/mnt# cd .. imac:~# umount mntThen, you can configure your NFS server to export this directory: imac:~# vi /etc/exports /debian-installer/m68k/2.2 *(rw,async,no_root_squash,insecure) imac:~# /etc/init.d/nfs-kernel-server reload Re-exporting directories for NFS kernel daemon...done.And configure your DHCP server to answer to emile-netboot and to provide the root of the NFS directory:
imac:~# vi /etc/dhcp3/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.0.0 {
server-name chartreuse;
option domain-name "dyndns.org";
# default gateway
option routers 192.168.100.254;
option subnet-mask 255.255.0.0;
option domain-name-servers 192.168.100.254;
range dynamic-bootp 192.168.100.128 192.168.100.255;
default-lease-time 21600;
max-lease-time 43200;
# debian installer network boot
option root-path "/debian-installer/m68k/2.2";
}
imac:~# invoke-rc.d dhcp3-server restart
Stopping DHCP server: dhcpd3.
Starting DHCP server: dhcpd3.
you should replace my IP addresses by IP addresses of your network.And then, you can boot on the emile-netboot floppy... it should load kernel from floppy, ask for an IP address to the DHCP server and boot from NFS. |
||
|
|||