www.knoppix.net
 Permission to use these pages kindly granted by www.knoppix.net.
 These pages are a static version of those available at www.knoppix.net. Please check there for the latest information. Converted on 9/5/2003.
 Thanks to the many contributors to www.knoppix.net!

 Hd Based How To

Boot KNOPPIX from harddisk (this is not about installing!)

With this installation method you (only) copy the compressed Knoppix filesystem from the CD or ISO to your HD.

Pros:

But...

Knoppix will run as if it were from a physical CD, so you cannot install anything, unless you do a 'normal' install. Everytime you boot, the hardware will recognised new, so you can use this harddisk like a CD and plug it into new PCs. This is handy for preinstalling Knoppix on PCs/Laptops without CD-ROM.

This is different from FaqInstall, in the way that FaqInstall describes how to install Knoppix so it will run on a (single) PC like a normal GNU/Linux installation. If you want to install software, you should consider a real harddisk install.

Note: The compressed filesystem is NOT the ISO(!), if you downloaded one.



WARNING, YOU SHOULD KNOW WHAT YOUR ARE DOING !!!

If you are NOT USED with GNU/LINUX and LILO
nor you have a virgin PC, only for JUST PLAYING:

THIS FAQ IS NOT FOR YOU.

Please ask a friend, experienced with GNU/LINUX,
or use KNOPPIX only from CD-ROM

Backups, Learning/Reading and talking with friends are
always a good ideas before trying new things.
Like KNOPPIX itself, these ideas are to use on your own risk.



Okay, now you have read the warnings we can proceed with the real thing :-)

To run Knoppix from HD as it were from CD you can choose to:

1.1. Run Knoppix, copy it to HD & make the hd-copy bootable with a bootfloppy
1.2. Run Knoppix, copy it to HD & make the hd-copy bootable with LILO on HD
1.3. Run hd-based GNU/Linux, copy Knoppix additional to HD and configure LILO
1.4. Run Microsoft Windows, copy Knoppix to HD & make it bootable with a bootfloppy 2. Boot the Knoppix ISO directly
3. Boot with PXE via network
4. Boot from smartdisk, usb-stick, ROM....


1.1. Run Knoppix, copy it to HD & make the hd-copy bootable with bootfloppy

mkfs -t ext2 /dev/hdXX

mkdir -p /mnt/staging && mount /dev/hdXX /mnt/staging

md5sum -c Knoppix-new.iso.md5

mkdir -p /mnt/newknoppix
mount -t iso9660 -o loop,ro /mnt/staging/Knoppix-new.iso /mnt/newknoppix

cd /mnt/newknoppix
cp -a * /mnt/staging

dd if=/mnt/newknoppix/KNOPPIX/boot.img of=/dev/fd0

Assuming everything went fine so far, we are ready to boot from the floppy. There should be no other filesystem on the machine with a valid KNOPPIX directory that come earlier in the search order.

sync
umount /mnt/staging/

shutdown -r now

As it boots the KNOPPIX directory should be discovered and booted into a full fledged Knoppix system as though running from CD. If it fails you will be thrown into a small recovery shell. If this happens, revisit the earlier steps, read the man pages for all the commands, fix any errors, come back and update this procedure.

I hope this is useful to you.


1.2. Run Knoppix, copy it to HD & make the hd-copy bootable with LILO on HD

Note: the short and detailed version seem to be different... uhm?

(rhk) I'm trying to do this, without success so far. I'll put some notes (in italics) at the place(s) where I have questions (maybe only one place at first. For information, I am trying to install Knoppix 3.1.

LILO can't boot ISO files, so it is neccessary to copy the Knoppix ISO content to hd. Also copy the content of boot.image to /boot. Because the Knoppix-boot-skript is not used, read about the CheatCodes and add the one you need to your lilo.conf under append="..."

To learn more about Lilo, read the httpLILO-mini-HOWTO.

In short:

mount /dev/hda3 /mnt/hda3
cp -R /dev/cdrom /mnt/hda3

(rhk) When I run the above command, the only thing that is copied/created in /mnt/hda3 is a 9 byte link to /dev/scd0. This is not what I expected -- I thought the entire ISO or something should be copied? Maybe the entire 730 MB file /cdrom/KNOPPIX/KNOPPIX? I may try some experimenting -- I may try cp /cdrom/KNOPPIX/KNOPPIX /mnt/hda3 and dd if=/dev/cdrom of=/mnt/hda3/<something>, but I don't feel very comfortable here because I'm shooting in the dark. What do I need to put on /mnt/hda3, and where/what filename should it have? Hmm, maybe I need cp -R /cdrom /mnt/hda3?

mkdir /mnt/floppy-loop
mkdir /mnt/hda3/boot/
cp /boot/System.map /mnt/hda3/boot/
mount /cdrom/KNOPPIX/boot-en.img /mnt/floppy-loop -o loop -t vfat
cp /mnt/floppy-loop/* /mnt/hda3/boot
cp /etc/lilo.conf /mnt/hda3/boot
vi /mnt/hda3/boot/lilo.conf
ln -sf /mnt/hda3/boot/ /
lilo -C /mnt/hda3/boot/lilo.conf
(or lilo -C /boot/lilo.conf)

With comments, step by step:

mount /dev/hda3 /mnt/hda3
cp -R /dev/cdrom /mnt/hda3
mkdir /mnt/floppy-loop
mount /cdrom/KNOPPIX/boot-en.img /mnt/floppy-loop -o loop -t vfat

mkdir /mnt/hda3/boot/
cp /mnt/floppy-loop/* /mnt/hda3/boot

cp /etc/lilo.conf /mnt/hda3/boot

vi /mnt/hda3/boot/lilo.conf

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)'
lba32
boot=/dev/hda #This hd will use lilo to write into the MBR
delay=200 #Time in ms to chooce the lilo-menue
timeout=200 #Time in ms to choose with lilo-menue
vga=0 #You can choose other modis here

default=Knoppix #The default boot-profile

#Start of boot-profile 1

image=/boot/KNOPPIX-3.1-DE/vmlinuz # The kernel

append="lang=de ramdisk_size=100000 init=/etc/init apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=KNOPPIX-3.10-DE/miniroot.gz nomce quiet BOOT_IMAGE=knoppix" #add initrd path to miniroot.gz

(rhk) I changed my append line to look like the above, but I get a bunch of errors when I try to run lilo, including things like KNOPPIX-3.1 not found. Maybe the errors are all due to the problem with the cp -R command, but I probably need some more explanation of what needs to be changed in lilo.conf.

label="Knoppix"# label of your profil
root=/dev/hda3 # partiton where lilo can found the directory /boot
read-only
initrd=/boot/KNOPPIX-3.1-DE/miniroot.gz

ln -sf /mnt/hda3/boot/ /
lilo -C /mnt/hda3/boot/lilo.conf

LILO should say what's added. If you have an error here, check the steps before. (alternative you can use lilo -C /boot/lilo.conf)


Two things we still need to solve:

(rhk) Below, Henk Poley asks if this German section is still required -- I think it is, although English would be better. I'm not sure I understand the questions -- do we want read/write access to the partition we are booting knoppix from? Is that in order to store data files and install other programs? I haven't read all the other FAQs yet, but it seems there are FAQs on putting your /home directory on the hard drive, and booting with something like Knoppix.sh for "persistent options" -- maybe those solve the problems?

Ideas how to do this:

probono am 10.02.2003

Ich habe den Ordner KNOPPIX mit dem 700 MB File knoppix auf eine ext3-Partition (bei mir hda2) kopiert und ein bereits vorhandenes LILO so konfiguriert, dass Knoppix von HD gebootet wird.

Desweiteren habe ich in meiner knoppix.sh stehen:
mount /dev/hda2 /cdrom -o remount,rw

Jetzt habe ich von Knoppix heraus auch Schreibzugriff auf die ext3-Partition!

Idee: Ich hatte zufaellig schon eine bestehende LILO-Installation. Koennte man aber nicht auf diese Weise Knoppix "from scratch" auf eine leere HD aufspielen: 1. ext3 formatieren 2. Knoppix komprimiert draufkopieren 3. LILO von Knoppix aus einrichten 4. remount,rw in die knoppix.sh schreiben 5. /home/knoppix abaendern, so dass es auf die HD zeigt ---> fertig! Was denkt ihr?

pr0ct0man 10.02.2003

Klingt eigentlich recht logisch, probono... Let's try it !

Ich probier jetzt erstmal dein mount /dev/hda5/cdrom -o remount,rw in der knoppix.sh

Wo hast Du das eingetragen ? Meine sieht wie folgt aus:

#!/bin/sh
[ "`id -u`" = "0"] || { echo "You need root privileges to modify the system!" >&2 ; exit 1; }
[ -d "$1"] && CONFIGS="$1/configs.tbz"
[ -f "$CONFIGS"] || CONFIGS="/cdrom/KNOPPIX/configs.tbz"
[ -f "$CONFIGS"] || CONFIGS="/mnt/floppy/configs.tbz"
if [ -f "$CONFIGS"]; then
echo " [1mExtracting config archive $CONFIGS... [0m"
tar -jpPtf "$CONFIGS" | while read i; do rm -f "$i"; done
tar -jpPxf "$CONFIGS" ; chown -R knoppix.knoppix /home/knoppix
fi

Grüsse, pr0ct0man


1.3. Run hd-based GNU/Linux, copy Knoppix additional to HD and configure lilo

Still to be written.

Basicaly, take the steps from 1.1 or 1.2


1.4. Run Microsoft Windows, copy Knoppix to HD & make it bootable with bootfloppy

Also called "poormans install" ;-)

E:\KNOPPIX\>mkdir D:\KNOPPIX
E:\KNOPPIX\>copy KNOPPIX D:\KNOPPIX\
1 files(s) copied

E:\KNOPPIX\>mkfloppy


2. Boot the Knoppix ISO directly

(Whoever wrote this, please check your grammar)
I know no running solution. Just some ideas about it:
So image to have the iso on one ext3 partition like
/mnt/hda3/Knoppix.iso
the knoppix boot.img can be mounted like

mount boot.img /mnt/floppy.loop -o loop -t vfat
cp /mnt/floppy.loop/* /mnt/hda3

I would copy /etc/lilo.conf to /mnt/hda3/lilo.conf
what is needed to change in lilo.conf to boot Knoppix.iso?

then

lilo -C /mnt/hda3/lilo.conf

Other option

Create a mini boot image and mount the ISO at /mnt2/Knoppix.iso/ then mount the appropriate filesystem image from inside the ISO and mount or link the dirs inside. I guess doing a chroot (replace / ) will foobar things, that's why I try to mount the ISO at /mnt2/...


3. Boot with PXE via network

This is not by the PCs own HD ;), but see: FaqPXE

Would be nice to boot via TCP/IP and get the ISO from FTP-server.
Only for installing, not for daily use - please mirror Knoppix localy!


5. Boot from smartdisk, usb-stick, ROM...

Please write about your experiences to boot from your MP3-Player, or what ever...


Questions

Q:Does this work with any file system or does it need FAT?

A: Yes, it will work on any filesystem supported by the Knoppix build of the Linux kernel. Which means about all filesystem types you'll ever find on a IDE or SCSI harddisk.


Feedback

If you have questions, comments, ideas about this wiki-page, and you don't want to write it directly in this page, please write it here as feedback:

Variations:

By Henk Poley
Is the german discussion still needed on this page? Is it solved?

Last edited on April 20, 2003 7:46 pm.