Skip to content

Installing HD image on physical media

toncho11 edited this page Aug 21, 2022 · 39 revisions

One way to install ELKS on physical media is to use the HD images. Let's take the hd32mbr-fat.img. This is a fat image with MBR. A physical media could be a USB card reader with micro SD card or IDE/SATA attached USB drive that you are going to use as ELKS boot device.

Method 1

The procedure is:

  • write the image to a physical media (the one you are going to use as a hard drive for your computer)
  • boot from floppy on the target computer and adjust the CHS (Cylinders/Heads/Sectors)

Example writing to micro SD card from Windows:

  • You can use the dd command for Windows. First list your drives with dd --list. Find the ID of your drive. It should be something like \\?\Device\HarddiskVolume66 and marked as "removeable media". Then use the command: dd if=.\hd32mbr-fat.img of=\\?\Device\HarddiskVolume66 bs=1024 --size --progress. If you see an error then first format the drive as fat32 and remove the assigned drive letter and try again. Next connect your physical media to the target computer. Alternatively on Windows try win32diskimager.
  • Boot ELKS from floppy with your physical hard drive attached. You need to set the geometry CHS of the image you have had written to the correct one. This is done with the makeboot command. Execute the command: makeboot /dev/hda1
  • reboot

You should have a bootable ELKS installation from your hard drive. Method 1 has been tested and known to work at lest one time.

Method 2

The procedure is:

  • boot ELKS from floppy and check the CHS of your hard drive using the text output of the kernel (CHS can be detected in various manners)
  • configure the CHS in ELKS kernel menu config and generate new HD images of ELKS (this way you should have a compatible image for your hdd)
  • finally write your newly compiled HDD image to your physical media and boot from it

Please note that reporting of CHS might not be reliable on old systems. That is why there are two reports "BIOS" and "IDE".

  • bioshd: hda BIOS CHS 610,16,63
  • bioshd: hda IDE CHS 993,16,63

The "IDE" one is enabled in the kernel config menu in: Kernel & hardware -> Drivers -> Block Device Drivers -> IDE hard drive CHS probe. It might be more reliable than the "BIOS" one on old systems. If they are different, try both. On very old systems (that do not use IDE) enabled "IDE probing" can prevent the kernel from booting.