Booting with "fromiso"
For normal use we recommend the ext3 file system. It is the default file system for sidux and well maintained.
With this cheatcode you can start from an iso out of a partition ,(ext2/3), which is much faster then from a CD (HD installations with "fromiso" only takes a fraction of time).
'fromiso' is of course much faster then from the CD- /DVD-drive and keeps the drive available. As an alternative you could use virtualbox-ose or QEMU.
Requirements:
* a functioning grub (on a floppy, a HD-Installation or the Live-CD)
* a sidux ISO Image e.g.: sidux.iso and a Linux file system like ext2/3. (If you rename your image to sidux.ISO instead of sidux.iso you will need to alter the commands accordingly as a unix file naming system is case sensitive.)
Process:
Choose a place for the iso and 2 files we need, so we get shorter names. Therefore create a base-directory: for example "/media/sdaX", (sda1 or, 2, or 5, or 6, or whatever, for example) create the directory "sidux" and copy the iso into it:
$ sux mkdir -p /media/sdaX/sidux mv sidux.iso /media/sdaX/sidux
Now mount the ISO image (Alternatively mc [midnight commander] can be used, as it transparently auto-mounts .iso files and lets you copy out the files needed.):
mount -t iso9660 -o loop,ro /media/sdaX/sidux/sidux.iso /mnt
Now copy the vmlinuz and initrd.img files from the mounted iso image to the directory and the HD is YOUR known variable::This is an example only :
cp /mnt/boot/vmlinuz* /media/sda5/sidux/vmlinuz cp /mnt/boot/initrd.img* /media/sda5/sidux/initrd.img umount /mnt
Next you have to customise grub. Therefore edit the file /boot/grub/menu.lst and add the following lines AFTER the ### END DEBIAN AUTOMAGIC KERNELS LIST: NOTE no wildcards on grub line for filenames allowed! The HD is YOUR known variable::This is an example only:
### ISO boot title sidux 32bit from ISO kernel (hd0,4)/sidux/vmlinuz boot=fll quiet vga=791 fromiso=/sidux/sidux.iso initrd (hd0,4)/sidux/initrd.img
With next boot you have a new menu item in grub to start the iso image. Should you upgrade your sidux.iso, vmlinuz and intird.img files with later releases, grub's menu.lst does not need to be altered.
fromiso and persist
You can have a persistent live system on a writable disc by combining a fromiso setup with the persist cheatcode.
sidux uses aufs to enable what is known as "copy on write" over your cd to allow you to write new files and folders and update existing ones by keeping the new files in memory. With the persist cheatcode, will store your new files on the same hard drive partition as you use to store your fromiso cd image.
Using persist gives you a live system which performs all the automatic features of the sidux live cd. This has the benefit of doing things like automatically configuring the hardware but it also means that it will recreate the same files each time you boot up..
For example it will not store your X (video card, keyboard, mouse) configuration or your network interfaces file which makes it ideal for using on more then one computer, but can help if you need to configure some of these features
Perhaps the ideal use of persistence is in conjunction with the install-usb-gui tool to create your own bootable flash drive with your files and the software you need.
Your files will be stored in a subfolder on your drive. This subfolder is created if it does not exist when the fromiso and persist cheatcodes are used together.
persist on a FAT filesystem, as commonly used for dos/Windows 9x installations and usually found by default on flash devices, requires you to create a single large file to use as a loop device, you then format this file.
On USB sticks, ext2 and vfat are the recomended file systems and most likely to give better cross platform ability for data rescue when needed most. Rewrites to flash type drives are contingent on the specifications of your USB stick.
This file should be named sidux-rw. Assuming the disc you want to use is mounted and writable on /media/sdb1 and you want to create a 1GB file to use as your persistent drive you could use the following commands (no need for root if you can write to the file).
disc="/media/sdb1"
size=1024
mkdir /media/sdb1/sidux
dd if=/dev/zero of=${disc}/sidux/sidux-rw bs=1M count=${size} && echo 'y' | /sbin/mkfs.ext3 ${disc}/sidux/sidux-rw
NTFS partitions, commonly used for Windows NT/2000/XP (TM) installations, CANNOT be used at all for persistence.
Full Installation of sidux on a USB-device
To do an installation of sidux on a USB-Stick or a USB-HD is as easy as a normal HD-Install. Just follow this simple guideline.
Two kinds of installation to USB
1) - fromiso
2) - full (the full installation to a USB stick behaves as normal HD installation and is done through the normal installer).
USB fromiso Installation
The fromiso installation is done through install-usb-gui.bash and is mostly directed to install 'fromiso' on the first partition the USB stick.
Pre format your device with ext2 or fat32 before proceeding.
Data persist is possible and the full partition will be used with ext2. When vfat is used, persistance is made through a file that can be maximum 2GB but not less than 100MB (as it would be of no use).
To start the install-sidux-to-usb go to the submenu System under Kmenu, or use the button that exists on the first screen in the standard HD installer
To create a bootable USB from an installed system you need to have a sidux iso.
Full installation (behaves as normal HD installation)
The recommended mininmum size of a usb stick is:
sidux "LITE" needs 1.2gig PLUS you need data space,
sidux "FULL" needs 2.1gig PLUS you need data space
Pre format your device with ext2 or fat32 before proceeding.
Start with a normal installation and choose the partition on the USB-device, where sidux is to be installed - we speak of "sda1" here, but this is valid for any other partition on a USB-disk or device.
To start the install-sidux-to-usb go to the submenu System under Kmenu, or use the button that exists on the first screen in the standard HD installer
Now you can boot from your USB-HD. 'Boot from USB' must be enabled in your BIOS.
Installing sidux with VirtualBox
VirtualBox-ose is ideal for 32bit machines. For 64bit use QEMU.
- 1. create a harddiskimage for VirtualBox
- 2. boot the iso with VirtualBox
- 3. install on the image
Requirements
Recommended ram: 1 gig : Ideally 512 MB for the guest and 512 MB for the host. (it can be run on less, but do not expect to have good performance).
Hard disk space: While VirtualBox itself is very lean (a typical installation will only need about 30 MB of hard disk space), the virtual machines will require fairly huge files on disk to represent their own hard disk storage. So, to install MS Windows XP (TM), for example, you will need a file that will easily grow to several GB in size. To have sidux in VirtualBox you need to allocate a 5 gig image plus a swap allocation.
Make sure to dist-upgrade before you install virtual machine modules after installing a new kernel, or you'll get a gcc mismatch, failed module build error.(This applies to any external module)
The mechanism:
Install the virtualbox package Click Applications > System Tools >InnoTek VirtualBox - Virtual Machine Make a VM, use an ISO or an Operating System-CD and install and reboot
Installation:
apt-get update apt-get install virtualbox-ose m-a a-i virtualbox-ose
Then you store the information identifying the current operating system in the structure:
virtualbox-ose-module-$(uname -r)
You will need to do the following:
adduser <username> vboxusers
Installing sidux to the virtual machine
Use virtualbox's wizard to create a new virtual machine for sidux. then follow the instructions for a regular sidux-installation.
VirtualBox has a comprehesive PDF Help, that you can download
Installing sidux with QEMU
- 1. create a harddiskimage for QEMU
- 2. boot the iso with QEMU
- 3. install on the image
Creating the hard disk image
To run qemu you will probably need a hard disk image. This is a file which stores the contents of the emulated hard disk.
Use the command:
qemu-img create -f qcow sidux.qcow 3G
To create the image file named "sidux.qcow". The "3G" parameter specifies the size of the disk - in this case 3 GB. You can use suffix M for megabytes (for example "256M"). You shouldn't worry too much about the size of the disk - the qcow format compresses the image so that the empty space doesn't add up to the size of the file.
Installing the operating system
This is the first time you will need to start the emulator. One thing to keep in mind: when you click inside qemu window, the mouse pointer is grabbed. To release it press :
Ctrl+Alt
If you need to use a bootable floppy, run Qemu with:
qemu -floppy sidux.iso -net nic -net user -m 512 -boot d sidux.qcow
If your CD-ROM is bootable, run Qemu with:
qemu -cdrom sidux.iso -net nic -net user -m 512 -boot d sidux.qcow
Now install sidux as if you were going to install it on a real HD
Running the system
To run the system simply type:
qemu [hd_image]
A good idea is to use overlay images. This way you can create hard disk image once and tell Qemu to store changes in external file. You get rid of all the instability, because it is so easy to revert to previous system state.
To create an overlay image, type:
qemu-img create -b [[base''image]] -f qcow [[overlay''image]]
Substitute the hard disk image for base_image (in our case sidux.qcow). After that you can run qemu with:
qemu [overlay_image]
The original image will be left untouched. One hitch, the base image cannot be renamed or moved, the overlay remembers the base's full path.
Using any real partition as the single primary partition of a hard disk image
Sometimes, you may wish to use one of your system partition from within qemu (for instance, if you wish booting both your real machine or qemu using a given partition as root). You can do this using software RAID in linear mode (you need the linear.ko kernel driver) and a loopback device: the trick is to dynamically prepend a master boot record (MBR) to the real partition you wish to embed in a qemu raw disk image.
Suppose you have a plain, unmounted /dev/sdaN partition with some filesystem on it you wish to make part of a qemu disk image. First, you create some small file to hold the MBR:
dd if=/dev/zero of=/path/to/mbr count=32
Here, a 16 KB (32 * 512 bytes) file is created. It is important not to make it too small (even if the MBR only needs a single 512 bytes block), since the smaller it will be, the smaller the chunk size of the software RAID device will have to be, which could have an impact on performance. Then, you setup a loopback device to the MBR file:
losetup -f /path/to/mbr
Let's assume the resulting device is /dev/loop0, because we wouldn't already have been using other loopbacks. Next step is to create the "merged" MBR + /dev/sdaN disk image using software RAID:
modprobe linear mdadm --build --verbose /dev/md0 --chunk=16 --level=linear --raid-devices=2 /dev/loop0 /dev/sdaN
The resulting /dev/md0 is what you will use as a qemu raw disk image (don't forget to set the permissions so that the emulator can access it). The last (and somewhat tricky) step is to set the disk configuration (disk geometry and partitions table) so that the primary partition start point in the MBR matches the one of /dev/sdaN inside /dev/md0 (an offset of exactly 16 * 512 = 16384 bytes in this example). Do this using fdisk on the host machine, not in the emulator: the default raw disc detection routine from qemu often results in non kilobyte-roundable offsets (such as 31.5 KB, as in the previous section) that cannot be managed by the software RAID code. Hence, from the the host:
fdisk /dev/md0
There, create a single primary partition corresponding to /dev/sdaN, and play with the 's'ector command from the 'x'pert menu until the first cylinder (where the first partition starts), matches to the size of the MBR. Finally, 'w'rite the result to the file: you are done. You now have a partition you can mount directly from your host, as well as part of a qemu disk image:
qemu -hdc /dev/md0 [...]
You can of course safely set any bootloader on this disk image using qemu, provided the original /boot/sdaN partition contains the necessary tools.
Using the QEMU Accelerator Module
The developers of qemu have created an optional kernel module to accelerate qemu to sometimes near native levels. This should be loaded with the option
major=0
to automate the creation of the required /dev/kqemu device. The following command
echo "options kqemu major=0" >> /etc/modules
This will amend modprobe.conf to ensure that the module option is added every time the module is loaded.
qemu [...] -kernel-kqemu
This enables full virtualization and thus improves speed considerably.
To activate qemu:
qemu -cdrom /tmp/pkg/sidux-debug.iso -net nic -net user -m 512

Search online - offline