-
Senior Member
registered user
Fool-proof multi-boot PC with Knoppix 6.2.1 run from HD as deault boot option.
I've just gone through these steps with a laptop (Dell Vostro 1710) setup from scratch.
1. Replace the original HD with a new, blank and possibly bigger one. Store the old one in case it is to be used the "normal" way again later. Skip partition resizing and all that kind of fiddling.
2. Run Knoppix from a USB stick. Use plain old fdisk to partition the new HD. For defensive system setup, you'll need one NTFS partition for Windows, one FAT32 partition for exchange of data with Windows plus evt KNOPPIX directory, one big Unix partition for more permanent storage, at least one system Unix partition and swap. If you intend to install several Unix variants, you'll need at least one partition for each. Separate /home and /usr/local might be useful, but they will interfere with Knoppix setup, so I skip them for now.
3. Format the exchange partition (here /dev/sda2) to FAT32 and the system and storage partitions to your file system of choice. I used ext3:
Code:
mkfs.vfat -F 32 /dev/sda2
mkfs.ext3 /dev/sda7
mkfs.ext3 /dev/sda11
4. Install Windows (in my case Vista Home) on partition 1 (in my case /dev/sda1.) Why? Well, just check out the reports of problems with network in recent Knoppix versions, and you will realize it's good to have a backup solution. Just to mention one thing.
5. Running Knoppix from the USB again. download an ISO of a current non-Knoppix Linux distro to the storage area, and burn it to CD. Why? Again, to have backup solutions available. And to check against. I used Mandriva 2010 with KDE, but the choice shouldn't matter much at all.
6. Install the Linux distro to the system partition (here /dev/sda7), let GRUB take over the booting from WIndows. But don't care too much about what works and what doesn't in this distro at first. The existence of a Linux backup solution on disk, and the GRUB install, are the essential things here.
7. Running Knoppix from the USB again, install a second USB medium and use the install-to-flash option (preferences) to make a copy on that medium. This is for avoiding any mess with a living system when you setup the system on the HD. Plus, it's a backup. So, if you were wise and already had a backup, yuou could use that.
8. Mount the FAT32 partitions. Copy the Knoppix structure from the backup (here /dev/sdc1) to the partition. (For simplicity, here I copy just everything.)
Code:
su
mount /dev/sda2 /media/sda2.
mount /dev/sdc1 /media/sdc1
cp -ar /media/sdc1/* /media/sda2
Now you have a runnable Knoppix 6.2.1 on your hard disk. You could check if it works by starting Knoppix with the fromhd cheatcode: knoppix fromhd=/dev/sda2
9. Next step is setting up GRUB to boot Knoppix as default. The safest way to avoid trouble, is to make separate boot subdirectories for each booting option, and leave the existing setup untouched. You have to mount the system partition, which in ordinary use will be left unmounted - that's also a defensive measure. Then create a subdirectory for Knoppix, copy the actual booting files there, and modify GRUB's init file /boot/grub/menu.lst. I used emacs, of course any good editor would do.
Code:
mount /dev/sda7 /media/sda7
cd /media/sda7/boot
mkdir knx621
cd knx621
cp -a /mnt-system/boot/* .
cd ../grub
emacs menu.lst &
The modification of menu.lst is very simple in this case. Just insert a new booting option as the first. That will be used as default.
Code:
title Knoppix 6.2.1
kernel (hd0,6)/boot/knx621/linux ramdisk_size=100000 lang=en vt.default_utf8=0 apm=power-off vga=791 nomce quiet no3d loglevel=0 tz=localtime
initrd (hd0,6)/boot/knx621/minirt.gz
Here you can fill in with Knoppix cheat codes. I had to use the no3d option because Compiz doesn't get the resolution thing right on the 1920x1200 display. You could use the fromhd= option too, but in this case, the Knoppix init process finds the correct option and runs that.
10. If you haven't got it exactly right with GRUB, so GRUB won't boot Knoppix, you can still boot from USB. But, please, don't try anything fancy. You don't have to change the device.map file, you should NOT use the chainloader option etc here. Just give GRUB the kernel and the minirt.gz to chew on, and everything will run just fine. BTW, this is a great way to try out modifications. Just make more boot subdirectories for the alternatives, and you can try other kernel options, make new minirt.gz versions etc. Without breaking anything that is up and running. If you issue a df command after booting, you will not find /dev/sda7. It's not mounted. That's very nice: It's just used for booting up, you have no chance of damaging i accidentally afterwards. But /dev/sda2 is mounted as /mnt-system.
11. Now is the time to look at rc.local, for permanent setup tweaks. I tend to be very conservative and not start services that are not needed, mount volumes that aren't regularly used etc. Mine looks like this:
Code:
#!/bin/bash
#
# rc.local
#
# Start local services after hardware detection
SERVICES="cups"
for i in $SERVICES; do
[ -x /etc/init.d/"$i" ] && /etc/init.d/"$i" start >/dev/null 2>&1
done
# Bug in initial 6.2.1 loop devices created wrong! Only one, create the rest
mknod -m660 /dev/loop/1 b 7 1
mknod -m660 /dev/loop/2 b 7 2
mknod -m660 /dev/loop/3 b 7 3
mknod -m660 /dev/loop/4 b 7 4
mknod -m660 /dev/loop/5 b 7 5
mknod -m660 /dev/loop/6 b 7 6
mknod -m660 /dev/loop/7 b 7 7
# Mounting extra persistent storage + creating directories
mkdir /store
mkdir /store/local
mkdir /store/var
mkdir /store/share
mount -o loop /mnt-system/KNOPPIX/knoppix-data2.img /store/share
mount -o loop /mnt-system/KNOPPIX/knoppix-data3.img /store/var
mount /dev/sda11 /store/local
export GDK_NATIVE_WINDOWS=1
exit 0
I have set up two additional volumes of persistent storage that get loop-mounted, as /store/share and /store/var, and the big harddisk volume is mounted on startup. Nothing more. I try to stay away from the NTFS volume. But there are a few bugs that have to be fixed, like the missing loop devices, and that is done in rc.local.
That's it. I'm writing this on the fresh install, using wifi that works right out of the box. Buliding on a Knoppix that was set up on an entirely different machine, just copying over the vmware virtual machines to the harddisk here etc. The machines could also be run from USB harddsik, but that's less efficient.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
HP Z840 Workstation Intel Xeon E5-2637v3 3.5GHz 32GB RAM 512GB SSD W10P Nvidia
$225.00
HP Z440 WORKSTATION XEON E5-1603V3 @ 2.80GHz, 16GB RAM 250 GB SSD Win 11
$119.99
Dell Precision 3420 Tower, Intel Xeon E3 -1225v5 3.3GHz,8GB Ready to build
$67.49
Matched Pair __ Intel Xeon Gold 6152 2.1Ghz 22-Core 140W CPU SR3B4
$209.95
Intel Xeon E5-2680 v4 SR2N7 14 Core 2.4 GHz Server Processor
$15.45
SR1XP Intel Xeon E5-2680 v3 12 Core 30MB 2.5GHz LGA 2011-3 Grade A Processor
$4.23
Intel Xeon E5-2697 V4 2.30 GHz 18C 2011-3 2400MHz 45MB 145W SR2JV CPU Processor
$49.99
Intel Xeon E5-2697A v4 SR2K1 2.60GHz 40MB 16-Core LGA2011-3 CPU Processor
$39.99
HP Z230 Workstation Towers Xeon E3-1231 V3 3.20ghz 8GB Ram NO HDD
$39.96
HP Z820 Workstation 2x Xeon E5-2690 2.9ghz 16-Cores / 128gb Ram / 1Tb HD / Win10
$419.99