Copy Install Image to Internal Drive

Obsolete info with AstLinux 1.2.5 and later. Use the ISO Installer Image on a USB flash drive.

There are situations where the internal flash storage is not removable (eg. Thin Clients), or is removable but you may not have adapters to directly write to the storage (eg. mSATA SSD).

The following procedure outlines the steps to create a standard USB flash drive with the install image, and then copy it to the installed internal flash storage. The USB flash drive is only used temporarily in the process and is not a permanent part of the installation.

When completed, the standard new installation procedure should be followed.

Note → This procedure is for advanced users, comfortable with the Linux command line.

Create USB Flash Drive

Download the appropriate astlinux-XXX.img.gz file from the AstLinux website. 1)

Transfer the raw image to a USB flash drive using one of the following:

  • On Linux or *BSD use dd to transfer the image, where sdX is your USB flash drive
    $ gunzip astlinux-XXX.img.gz
    $ dd if=astlinux-XXX.img of=/dev/sdX
  • On Mac OS X boxes, use os-x-cf-write.
  • On Windows boxes, use physdiskwrite.

Boot from USB

Set the BIOS to determine the boot order, first from USB and second from your desired internal flash storage.

It is assumed that your desired internal flash storage is also installed.

Power on your device and boot from the attached USB flash drive, in a few seconds you should see the following on your console:

##################################
#  RUNNIX - AstLinux bootloader  #
##################################

 runnix)  RUNNIX boot (default)

  shell)  Run shell instead of booting

    ssh)  Run shell and enable ssh instead of booting

xrunnix)  Use previous RUNNIX image (if any)

memtest)  Run Memtest86+


boot: shell

At the boot prompt type, shell, followed by a return.

Tip → Hit the space bar at the boot prompt to allow more time before typing shell.

Copy Install Image

From the runnix# prompt, a few commands are issued to prepare and copy the image from the USB flash drive to the internal flash storage.

Note → Be very careful with your typing, the /dev/sda and /dev/sdb may be different from the following example.

Determine your source drive:

runnix# df /mnt/base
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb1               261772     96012    165760  37% /mnt/base

This indicates that /dev/sdb is the source drive.

Next, display all available drives:

runnix# fdisk -l
Disk /dev/sda: nnnn MB, ...
...
Disk /dev/sdb: nnnn MB, ...
...

You should see your destination /dev/sda drive, make sure things look correct by the disk sizes.

The next step is to erase (write 0's to) the destination drive:

runnix# dd if=/dev/zero of=/dev/sda bs=64k
dd: writing '/dev/sda': No space left on device
15641+0 records in
15639+1 records out

Note → This can take a long time, a few minutes for each GB of destination drive size.

You should see the same results except the number of records depends on the destination storage size.

Next, unmount the source drive:

runnix# umount /mnt/base

Finally, copy the first 256 MB (plus some margin) of the source drive to the destination drive:

runnix# dd if=/dev/sdb of=/dev/sda bs=64k count=4400
4400+0 records in
4400+0 records out

This will be quicker than erasing the drive, but can still take awhile.

Lastly, stop RUNNIX:

runnix# poweroff -f

Finish

Remove the USB flash drive.

Continue with the New Installation instructions, jumping to item #3…

New Installation → 3. Boot your new AstLinux system

1) Various images are available, built for specific hardware. If you are unsure which to download, use the geni586 image.