Difference between revisions of "Category:Hard drive Installation"


From Knoppix Documentation Wiki
Jump to: navigation, search
m
Line 19: Line 19:
 
Nowadays you can do it as follows: Boot with the Knoppix-CD/DVD using the cheatcode
 
Nowadays you can do it as follows: Boot with the Knoppix-CD/DVD using the cheatcode
 
  knoppix tohd=/dev/sda1
 
  knoppix tohd=/dev/sda1
 +
 +
If you want to boot this installation using GRUB2, do also as follows:
 +
su
 +
mount /media/sr0
 +
cp /media/sr0/boot/isolinux/linux /media/sr0/boot/isolinux/minirt.gz \
 +
  /mnt-system/KNOPPIX/
 +
 
Knoppix will create a folder called "KNOPPIX" in the partition you chose and you will be asked to create persistent memory. The used disk partition can be a Linux format such as EXT3 but can also be FAT32 or NTFS (pre Windows 8).
 
Knoppix will create a folder called "KNOPPIX" in the partition you chose and you will be asked to create persistent memory. The used disk partition can be a Linux format such as EXT3 but can also be FAT32 or NTFS (pre Windows 8).
  
Line 24: Line 31:
 
  knoppix fromhd=/dev/sda1
 
  knoppix fromhd=/dev/sda1
  
Otherwise if you are using GRUB as bootloader, copy the kernel and initramfs to the hard drive
+
Otherwise if you are using GRUB2 as bootloader, start your operating system - for example Debian - and edit '/etc/grub.d/40_custom'
cp /mnt-system/boot/isolinux/linux /mnt-system/isolinux/minirt.gz \
+
/media/sda1/KNOPPIX/
+
and create an entry within '/boot/grub/menu.lst' (GRUB legacy)
+
title Knoppix
+
kernel (hd0,0)/KNOPPIX/linux (.. other boot-parameter ..)
+
initrd (hd0,0)/KNOPPIX/minirt.gz
+
or edit '/etc/grub.d/40_custom' (GRUB 2)
+
 
  menuentry "Knoppix" {
 
  menuentry "Knoppix" {
  set root=(hd0,1)
+
  set root='(hd1,1)'
 
  linux /KNOPPIX/linux (.. other boot-parameter ..)
 
  linux /KNOPPIX/linux (.. other boot-parameter ..)
 
  initrd /KNOPPIX/minirt.gz
 
  initrd /KNOPPIX/minirt.gz
 
  }
 
  }
to boot the Knoppix installation. Instead of "(.. other boot-parameter ..)" use the parameters as you need or as you can see in the "APPEND"-lines of '/mnt-system/boot/isolinux/isolinux.cfg'.
+
Don't forget "update-grub"!
  
'''Important note:'''"sda1" is only as an example; use your own value! "(hd0,0)" means first hard drive and first partition if you use GRUB legacy; with GRUB 2 take "(hd0,1)" for first hard drive and first partition.
+
Instead of "(.. other boot-parameter ..)" use the parameters as you need or as you can see in the "APPEND"-lines of '/mnt-system/boot/isolinux/isolinux.cfg'.
 +
 
 +
'''Important note:''' In this example Knoppix has been installed to 2nd device in the first partition of it (hd1,1). "(hd0,1)" means first hard drive and first partition with GRUB 2.
  
 
===HD Install===
 
===HD Install===
Line 45: Line 47:
  
 
'''Important note:''' Read "Help" of the installation tool first!
 
'''Important note:''' Read "Help" of the installation tool first!
 +
 +
===ISO Install to HD===
 +
Copy the whole Knoppix ISO to a harddrive. In my example I copied it to an extern harddrive (1st partition of it) to the folder '/ISO/' and renamed the Knoppix ISO
 +
mv -f /media/sdb1/ISO/KNOPPIX.....DE.iso /media/sdb1/ISO/KNX.iso
 +
 +
To boot this ISO installation to HD you need again a Knoppix CD/DVD or a boot-only Knoppix-CD with the same Kernel version; at boot prompt type:
 +
knoppix bootfrom=/dev/sdb1/ISO/KNX.iso
 +
'''Important note:''' "sdb1" is only as an example; use your own value!
 +
 +
Otherwise if you are using GRUB2 as bootloader, start your operating system - for example Debian - and edit '/etc/grub.d/40_custom'
 +
menuentry "Knoppix ISO" {
 +
loopback loop (hd1,1)/ISO/KNX.iso
 +
linux (loop)/boot/isolinux/linux bootfrom=/dev/sdb1/ISO/KNX.iso (.. other boot-parameter ..)
 +
initrd (loop)/boot/isolinux/minirt.gz
 +
}
 +
Don't forget "update-grub"!
 +
 +
Instead of "(.. other boot-parameter ..)" use the parameters as you need or as you can see in the "APPEND"-lines of '/mnt-system/boot/isolinux/isolinux.cfg'.
 +
 +
'''Important note:''' In this example Knoppix has been installed to 2nd device in the first partition of it (hd1,1). "(hd0,1)" means first hard drive and first partition with GRUB 2.
  
 
===Persistent memory===
 
===Persistent memory===

Revision as of 21:24, 19 August 2013

The main strength of Knoppix is its ability to be run from memory as a Live Linux CD. To boot the CD/DVD Isolinux is used. The advantage to this is that you can take the CD/DVD with you. However, it is possible to install Knoppix on other mediums.

Flash disk Install

Boot with Knoppix CD/DVD and select 'Knoppix/ Install KNOPPIX to flash disk' (since Knoppix 7.1, respectively "experimental version" in Knoppix 7.05). There are two options to choose from:

  • Installation on FAT32 with (optional) overlay file < 4GB
  • Installation on FAT32 with additional overlay partition

In the first case you will get an installation of compressed filesysten Image and the persistent memory all within '/dev/sda1' (FAT32 formatted).

In the other case you will get an installation of compressed filesystem Image to '/dev/sda1' (FAT32 formatted) and the persistent memory in '/dev/sda2' (ReiserFS formatted).

Both these installations uses Syslinux to boot. At the end of the installation you will be asked to encrypted or not the persistent memory.

Flash disk Install to HD

You can use 'Knoppix/ Install KNOPPIX to flash disk' and do the installation not on an flash device but on a (external) hard drive.

Poor man's install

In earlier days there have been many descriptions how to copy the compressed filesystem Image to hard drive, how to boot these installations and they have been called like poor man's install, PMI, poor man's install to HD, basic poor man's install ...

Nowadays you can do it as follows: Boot with the Knoppix-CD/DVD using the cheatcode

knoppix tohd=/dev/sda1

If you want to boot this installation using GRUB2, do also as follows:

su
mount /media/sr0
cp /media/sr0/boot/isolinux/linux /media/sr0/boot/isolinux/minirt.gz \
  /mnt-system/KNOPPIX/

Knoppix will create a folder called "KNOPPIX" in the partition you chose and you will be asked to create persistent memory. The used disk partition can be a Linux format such as EXT3 but can also be FAT32 or NTFS (pre Windows 8).

To boot this poor man's install you need again a Knoppix CD/DVD or a boot-only Knoppix-CD with the same Kernel version; at boot prompt type:

knoppix fromhd=/dev/sda1

Otherwise if you are using GRUB2 as bootloader, start your operating system - for example Debian - and edit '/etc/grub.d/40_custom'

menuentry "Knoppix" {
set root='(hd1,1)'
linux /KNOPPIX/linux (.. other boot-parameter ..)
initrd /KNOPPIX/minirt.gz
}

Don't forget "update-grub"!

Instead of "(.. other boot-parameter ..)" use the parameters as you need or as you can see in the "APPEND"-lines of '/mnt-system/boot/isolinux/isolinux.cfg'.

Important note: In this example Knoppix has been installed to 2nd device in the first partition of it (hd1,1). "(hd0,1)" means first hard drive and first partition with GRUB 2.

HD Install

Boot with Knoppix CD/DVD and select 'Knoppix/ KNOPPIX HD install' in a free partiton you chose. You will get a Debian-style installation in your partiton (ReiserFS formatted) and the option to use GRUB legacy as bootmanager.

Important note: Read "Help" of the installation tool first!

ISO Install to HD

Copy the whole Knoppix ISO to a harddrive. In my example I copied it to an extern harddrive (1st partition of it) to the folder '/ISO/' and renamed the Knoppix ISO

mv -f /media/sdb1/ISO/KNOPPIX.....DE.iso /media/sdb1/ISO/KNX.iso

To boot this ISO installation to HD you need again a Knoppix CD/DVD or a boot-only Knoppix-CD with the same Kernel version; at boot prompt type:

knoppix bootfrom=/dev/sdb1/ISO/KNX.iso

Important note: "sdb1" is only as an example; use your own value!

Otherwise if you are using GRUB2 as bootloader, start your operating system - for example Debian - and edit '/etc/grub.d/40_custom'

menuentry "Knoppix ISO" {
loopback loop (hd1,1)/ISO/KNX.iso
linux (loop)/boot/isolinux/linux bootfrom=/dev/sdb1/ISO/KNX.iso (.. other boot-parameter ..)
initrd (loop)/boot/isolinux/minirt.gz
}

Don't forget "update-grub"!

Instead of "(.. other boot-parameter ..)" use the parameters as you need or as you can see in the "APPEND"-lines of '/mnt-system/boot/isolinux/isolinux.cfg'.

Important note: In this example Knoppix has been installed to 2nd device in the first partition of it (hd1,1). "(hd0,1)" means first hard drive and first partition with GRUB 2.

Persistent memory

This is one of the most useful features in Knoppix, and together with unionfs, makes Knoppix very versatile indeed. The entire unionfs can be saved, so that configuration changes, settings, user data, packages which have been downloaded and installed etc can all be saved and will be available at subsequent sessions.

With "Flash disk Install" and the option overlay file you'll get an image file '/KNOPPIX/knoppix-data.img' respectively '/KNOPPIX/knoppix-data.aes' in case of encryption. At the next boot, Knoppix will scan for any image file named knoppix-data.img or knoppix-data.aes. If you use "df -h" you can see the values of the persistent memory at the line "/dev/loop ... ".

With "Flash disk Install" and the option overlay partition you can create persistent memory (encrypted or not) in a separate partition '/dev/sda2' and without the limitation of maximum size of 4 GB. At the next boot, Knoppix will scan for the file '/mnt-system/KNOPPIX/knoppix-data.inf', which contains the line "2 KNOPPIX_DATA reiserfs". If you use "df -h" you can see the values of the persistent memory at the line "/dev/sd. ... KNOPPIX_DATA".

UNIONFS

One of the limitations of a Live CD is that most of the system area is read-only – in particular, '/usr' where most executable programs are kept. Some programs can run from '/home', which is writable, but many programs need to change and access components into standard locations like '/lib' or '/usr/lib' are read-only. Fortunately there are solutions.

Unionfs is another important development introduced into Knoppix from Version 3.8 onwards. Unionfs is a virtual filesystem. It creates a writable system file area in ram with all the system directories such as '/etc', '/usr' and so on. This is then seamlessly merged with the read-only system files on the CD. A very readable description of unionfs can be found here: Kyle Rankin on unionfs

With unionfs, it becomes possible to "write" to the system area. Knoppix can then be treated almost like it is installed on a writable media. You can do install programs with apt-get, aptitude or synaptic, download and install .deb packages, compile and install new drivers, edit config files in '/etc' and so on.

Of course, you may still download an incompatible package which upsets Knoppix's delicate balance and break Knoppix, just like in a hard disk install. But this is a Live CD! The problems go away at the next reboot.

On the other hand, if you installed something which works well, you will not have to do it again. You can save it and it can be made available at the next session.

If you decide to do a HD installation of Knoppix, please read HD Install Warning not to do it first.

Return to Main Page of the Wiki

Pages in category "Hard drive Installation"

The following 3 pages are in this category, out of 3 total.