Boot a Linux Live CD
Install to a hard disk or memory stick for single or dual boot
Run under a virtualisation system
Most versions of Linux have live CDs
Boot from the CD and you have a running Linux
You cannot save to the CD, so any changes are either lost on close, or you need to mount a writable medium and save to that
See UNetbootin for a good site for building lots of different distros onto USB sticks, either from ISO files or IMG files
Many virtualisation systems such as Oracle's VirtualBox or VMWare will run Linux on top of Mac, Windows or Linux
Download VirtualBox from http://www.virtualbox.org/wiki/Linux_Downloads and install as it asks. (Local Windows copy here
Under Ubuntu, run from "Applications -> System tools -> Oracle VM VirtualBox"
Add a new O/S and install it from the Linux installation disk in the same way as installing to IDE/SATA disk
I usually download the ISO file and then create the new guest VM from that.
Installing Linux means
Partitioning a hard disk
Building file systems on the disk
Copy the Linux s/w to the appropriate file systems
Setup the boot process to invoke the Linux boot command
A disk is divided into disk partitions e.g. the disk /dev/sda can be divided into partitions /dev/sda1, /dev/sda2, ...
Partitions can be primary or extended, which means they can contain other secondary partitions
Limitations in BIOS s/w limit you to 4 primary or extended partitions
If you want lots of partitions then you need to have an extended partition with the extra ones inside that
The command fdisk
in both Linux and Windows
allows you to inspect and change partitions
fdisk -l
lists all disks
Start fdisk on a disk by e.g. fdisk /dev/sda
Typical commands are
p - print the partition table
d - delete a partition
n - add a partition
t - change a partition type
l - list partition types
q - quit without writing
w - write new partition table and exit
m - help
parted
is an alternative
Each partition has a type (a hex integer) usually related to an O/S. Linux knows about more types than M/S does
6 - FAT16
0xb - W95 FAT32
0x83 - Linux
0x82 - Linux swap space
0x86 - NTFS
If you have an existing Windows installation and you want to preserve it, you may need to resize the Windows NTFS partition to something smaller
The tool gparted can do this
It is part of the Ubuntu Live CD, under "System -> Admin -> Partition editor"
It isn't in Fedora Core
You can download a bootable image from http://sourceforge.net/project/showfiles.php?group_id=115843
The command mkfs -t type device
will make
a file system on your disk partition
mkfs -t ext3 /dev/sda1
will make a Linux ext3 file system on partition 1 of
SCSI disk 1
A configuration on a single disk might be
NTFS for existing Windows system on sda1: 40Gb
One Linux system (e.g. Ubuntu 11.10) with ext4 filesystem on sda2: 10Gb
Alternative Linux system (e.g. Fedora 16) with ext4 filesystem on sda3: 10Gb
Linux swap space on sda5: 2Gb
/home
(Linux user files) with ext4 filesystem
on sda6: 80Gb
A distro on CD/DVD will normally give you a menu or button to install
At some points you will be given a choice of disk formatting options. You can let the distro decide, or setup your own partitioning
During this you will be given a choice of filesystems e.g. ext3, ext4, etc
Then the rest will be done for you, including installing software and boot loader
The ISO you download will normally be the Live CD image
This can be installed to a USB stick using
unetbootin
which selects an
ISO and a USB stick
unetbootin
Follow the normal install process as to a normal SATA/IDE hard disk, but keep selecting the USB device (e.g. /dev/sdb)
Needs 4Gb+ for each install, omitting office s/w
Format e.g. 200Mb swap space, 3.7Gb ext3 and 3.9Gb ext3
Install Fedora Core on the larger partition, omitting Office productivity, adding Software development and server (for this course).
Install Ubuntu to smaller partition. Be careful to install boot on Ubuntu partition, not on your hard disk (requires selecting advanced partitioning)
Ubuntu should boot okay, Fedora didn't on my system: fix Fedora by editing Ubuntu: /boot/grub/menu_lst and changing Fedora entry to the right boot disk and partition
FC8 used 2.9Gb, Ubuntu used 2.1Gb
Disks are known as /dev/sda, /dev/sdb, etc
If you add in a new disk or change the jumper settings then the disks may get their device ids altered
To avoid this, disk partitions can have a label such as "Part 1"
Redhat grub.conf would then have a line such as
so that it was easier to get the right disk
root=LABEL=Part 1
Commands such as e2label
can be used
to set the label
Two partitions could be given the same label which is bad
Volumes also have a UUID (unique user id)
which can be managed by
vol_id
or /lib/udev/vol_id
grub.conf now contains lines such as
root=UUID=...
See Paranoid Penguin - Customizing Linux Live CDs, Part I by Mick Bauer in Linux Journal, May, 2008
Suse have announced a system to make it easy to create live CDs at SUSE Studio Launch
Logical volumes are kind of like virtual memory applied to disks
A "logical volume" may be mapped onto multiple partitions of multiple disks
Logical volumes can be resized, have physical partitions added or removed
Logical volumes are now the default file system in Fedora
See description at
http://tldp.org/HOWTO/LVM-HOWTO/.
The package with LVM tools is lvm2