This is an old revision of the document!
Table of Contents
dCore Install from ISO to Hard Drive Without Pre-Existing Boot Loader
Installation Type
A manual persistent dCore install from a <20 MB dCore ISO via USB or CD/DVD to hard drive. Using primarily built-in tools (eg. dd, fdisk, mkfs, vi) to prepare a hard drive, copy over dCore files and install the Grub legacy boot loader. This will install a stand-alone dCore system without the need for an *installer* or pre-existing Linux system.
Requirements
- Working computer to prepare installation media on CD/DVD or USB (Linux system not required).
- Blank CD/DVD or USB device for the installation media.
- Reliable wired ethernet connection preferred to download and install a boot loader. If attempting this install with only a wireless connection a dCorePlus ISO should be used as it provides wireless support.
- A hard drive that can be wiped, used to install dCore.
- For those unfamiliar, willingness to learn applications like fdisk and vi.
- Patience and persistence to complete a manual install, take your time, enjoy the accomplishment!
Hardware Utilized
Circa 1999 Pentium 800 MHz, 256 MB RAM, 32 MB Geforce2 graphics, 6 GB hard drive, ethernet connection. The system has a BIOS with MBR partitioning. PLOP boot manager was used, as the motherboard can not natively boot from USB (these additional steps not noted). Setting up a swap partition, outlined below, is recommended for systems with < 512 MB RAM.
Prepare Installation Media
From an existing working system (Linux, Windows or Apple) download desired dCore ISO file (most <20 MB), which contains the dCore-*.gz (base filesystem), vmlinuz-* (Linux kernel) and isolinux boot files. This install example uses Ubuntu-based dCore-wily. Stable release dCore ISO files can be downloaded from http://tinycorelinux.net/dCore/x86/release/.
Prepare either CD/DVD or USB installation media:
1. CD/DVD: Burn ISO to CD/DVD using favourite burn software. Ensure burn software is set to burn the ISO contents as a bootable disc (ie. burned disc must contain a /boot directory containing the vmlinuz and dCore-*.gz files plus the isolinux directory). If the burned CD/DVD contains only a single ISO file it was not burned correctly and will not work.
2. USB: Linux users insert the USB device and run a command like sudo fdisk -l
or sudo ls -l /dev/disk/by-id/*usb*
to determine the correct USB device. Then use the dd
command to transfer the ISO data to USB installation media. The dd
command used in this dCore-wily example: sudo dd if=/tmp/dCore-wily.iso of=/dev/sdb bs=4M
.
Note:
- The target device (eg. of=/dev/sdb) does NOT use a trailing number, uses the entire device.
- The dd command is destructive, backup any data beforehand and don't specify the wrong target device!
- Windows users may try using dd for Windows or Win32 Disk Imager.
- UNetbootin likely not supported.
Boot System to dCore Live
Insert installation media (burned CD/DVD or USB device) and boot computer.
Ensure BIOS is set to boot from either CD/DVD or USB depending on installation media used.
Computer should load a dCore boot screen, press F2, F3 and F4 keys to review boot options then just press Enter to boot dCore. Depending on hardware and installation media speed, this may take a few moments to load and boot, be patient. Once dCore is installed performance is very fast.
Will get dCore user prompt, successful dCore live boot running from RAM! This will boot to commandline only. Feel free to explore the system before proceeding. The Shift-PageUp/Down keys can be used to scroll up/down from screen to screen and Ctrl-c can be used to break out of any running program.
Partition Hard Drive
The fdisk utility is built-in and will be used to partition and prepare the hard drive. All data on the hard drive will be lost. Although fdisk may appear daunting, it is straightforward. When running fdisk press the 'm' key at any time to review commands and 'p' to print the partition table to monitor progress.
Note:
- Various alternative partitioning software is available, such as cfdisk or GParted.
- If using alternative software, prepare the hard drive partitions beforehand and skip to the 'Copy dCore Files to Hard Drive' section below.
This example will set up a single small 6 GB hard drive with three partitions, an ~3 GB partition for the /boot directory and dCore, an ~2 GB partition for data (helps keep mydata.tgz backup file small) and an ~1 GB swap partition (low RAM system). Modify the partition scheme to suit hardware and needs. Systems with > 2-4 GB RAM may not need a swap partition. Large hard drives may benefit from additional data partitions, selectively mounting only what is required during runtime.
Prior to proceeding run the sudo fdisk -l
command for an overview of all attached storage drives. This example installs dCore-wily onto /dev/sda1.
Reset Partition Table and Create First Partition (/dev/sda1) for Boot Files and dCore Extensions
Enter sudo fdisk /dev/sda
to begin fdisk, will get a 'Command (m for help):' prompt.
Press the 'm' key to familiarize with the various options.
Press 'o' (letter 'o') to create a new DOS partition table.
Press 'w' to write the table to disk, this exits fdisk.
Enter sudo fdisk /dev/sda
again to re-enter fdisk.
Enter 'n' to add a new partition.
Enter 'p' for primary partition (can create up to 4 primary partitions per drive, not including extended partitions).
Enter '1' (number one) for first primary partition.
At first cylinder (default 1) prompt press Enter to select the default, meaning first new partition will begin at the start of the disk.
At last cylinder prompt enter desired cylinder number to determine first partition size. In this example, a value of 392 was entered as the fdisk prompt indicates the 6 GB hard drive has a total of 784 cylinders and the intention is to use ~1/2 the drive (~3GB) for /boot and tce directory/dCore files. Note, as per fdisk instructions a specific MB value may also be entered.
Enter 'p' to print the partition table to monitor progress.
Create Second Partition (/dev/sda2) for Data
Enter 'n' to add a second partition for data.
Enter 'p' for primary partition.
Enter '2' for second primary partition.
At first cylinder prompt enter desired cylinder number. In this example default was 393 (second partition starts where first partition ends), so press Enter to accept default.
At last cylinder prompt enter desired cylinder number. In this example default was 784 (end of the drive). This is not desired as extra space will still be needed for the third swap partition. With ~3 GB left on the drive, the goal is to have ~2/3 of this space for data and the remainder for swap. In this example, a value of 653 was entered. Basic math: 784-393 = 391 cylinders remaining; 391 x 2/3 = 260 cylinders to be used for second data partition; 393 (start position) + 260 (partition size) = 653.
Enter 'p' to print the partition table to monitor progress.
Create Third Partition for Swap
Enter 'n' to add a third partition for Linux swap.
Enter 'p' for primary partition.
Enter '3' for third primary partition.
At first cylinder prompt enter desired cylinder number. In this example default was 654 (third partition starts where second partition ends), so press Enter to accept default.
At last cylinder prompt enter desired cylinder number. In this example default was 784 (end of the drive). The goal is to use the entire drive and no other partitions are planned, so press Enter to finish creating the third partition.
Enter 'p' to review the partition table, from the example above:
Device Boot Start End Blocks Id System /dev/sda1 1 392 3148708+ 83 Linux /dev/sda2 393 653 2096482+ 83 Linux /dev/sda3 654 784 1052257+ 83 Linux
Create Boot Flag and Update Swap Partition Id
Enter 'l' (small letter l) to list partition types, notice Linux swap is Id #82.
Enter 't' to change a partition's system Id.
Enter '3' (partition 3 will be used for swap).
At Hex code prompt, enter 82 (Linux swap Id).
Enter 'a' to toggle bootable flag.
Enter '1' to make first partition bootable (will contain boot files and Grub).
Enter 'p' to review the partition table, from the example above:
Device Boot Start End Blocks Id System /dev/sda1 * 1 392 3148708+ 83 Linux /dev/sda2 393 653 2096482+ 83 Linux /dev/sda3 654 784 1052257+ 82 Linux swap
Enter 'w' to write table to disk and exit (otherwise all your work will be lost).
Enter sudo reboot
to reboot system.
Use earlier instructions to reboot into dCore live.
Create Hard Drive File Systems
The new partitions still require file systems. Using the built-in mkfs utility the following will prepare ext2 file systems on the first and second partition and swap in the third swap partition. Note the mkfs.ext3
and mkfs.ext4
commands can be substituted as desired.
Enter sudo mkfs.ext2 /dev/sda1
to install a file system on the first partition.
Enter 'y' (yes) to proceed if any warning prompts received.
Enter sudo mkfs.ext2 /dev/sda2
to install a file system on the second partition.
Enter sudo mkswap /dev/sda3
to prepare the swap partition.
Enter sudo rebuildfstab
to refresh fstab data with the new file systems.
Enter cat /etc/fstab
to confirm the newly created ext2 and swap partitions.
Enter sudo reboot
to reboot system.
Use earlier instructions to reboot into dCore live.
Copy dCore Files to Hard Drive
After rebooting into dCore live, run cat /etc/fstab
to confirm the new partitions and filesystems.
Enter mount /dev/sda1
to mount the new dCore installation partition.
Enter mount /dev/sdb
to mount USB installation media (whatever device contains the install media).
Run mount | grep sd
to confirm these devices mounted.
Run sudo mkdir /mnt/sda1/boot
to create a boot directory on the first hard drive partition.
Enter cd /mnt/sdb/boot
to change to the installation media /boot directory (whatever device has the installation media, this boot directory should contain the dCore*.gz and vmlinuz* files).
Enter sudo cp dCorewily.gz /mnt/sda1/boot/
to copy the dCore base file system to the new hard drive /boot directory (substitute file name with your dCore version).
Enter sudo cp vmlinuxwily /mnt/sda1/boot/
to copy the dCore kernel to the new hard drive /boot directory (substitute file name with your dCore version).
Enter ls /mnt/sda1/boot/
to confirm the two files were successfully copied.
Setup dCore TCE Drive For Persistence
Enter tce-setdrive
and select /mnt/sda1 to set up the dCore TCE directory, which will provide a persistent system to install SCE extensions.
Enter ls /mnt/sda1/
to verify the /tce directory has been set up. Explore the directory as desired. Note the /sce sub-directory will be empty as no SCE extensions have been imported yet.
Import, Configure and Initiate Grub Boot Loader
Enter sce-import -o grub
(small letter o) to import the Grub legacy boot loader OnDemand (network connection required). Select 'grub' from the menu (not grub2 or other variations), this will import Grub legacy, your first installed extension! Note OnDemand is adequate for the Grub install as it will not likely be needed again after this setup.
Enter ls /mnt/sda1/tce/sce to confirm grub.sce is present.
sce-load grub
Enter to load Grub into RAM for use.
sudo mkdir /mnt/sda1/boot/grub' to create a Grub configuration directory.
Enter
Enter sudo vi /mnt/sda1/boot/grub/menu.lst
and use built-in vi to create the following Grub configuration file. This is a decent vi quickstart tutorial, there are numerous tutorials online. Note on most systems the arrow keys can be used for navigation during editing. Alternatively import and load the more intuitive nano editor (sce-import -b nano, sce-load nano). Substitute dCore file names (ie. vmlinuzwily, dCorewily.gz) with your dCore installation version:
default 0 timeout 10 title dCore-wily root=(hd0,0) <- no spaces !!! kernel /boot/vmlinuzwily nozswap showapps tce=sda1 <- enter desired space seperated boot codes here initrd /boot/dCorewily.gz
Run cat /mnt/sda1/boot/grub/menu.lst
to confirm the configuration file has been properly created.
Enter sudo grub-install –recheck –root-directory=/mnt/sda1 /dev/sda
to setup Grub. If re-running this command in the future a '-f' (force) switch may be required at the end of the command to overwrite.
Enter ls /mnt/sda1/boot/grub
to confirm the directory is populated with various Grub files.
First dCore Boot from New Hard Drive Install
Remove installation media (CD/DVD or USB device).
Enter sudo reboot
and ensure BIOS is set to boot from first hard drive.
Boot into newly installed dCore!
This will boot dCore from hard drive very quickly, ~15 seconds from Grub to dCore prompt on ancient hardware, using ~40 MB RAM. Commandline only until graphics and additional extensions are installed. Follow the dCore Desktop Quicky guide to quickly and easily upgrade a console-based installation to a graphic desktop (FLWM and wbar like Tiny Core). Enter backup
if changing any data or configurations. Enter sudo poweroff
to shutdown. Explore the dCore wiki or post on the forum for assistance.