PDA

View Full Version : Installing Knoppix on USB HDD



darkkterror
01-25-2007, 07:00 AM
Basically, what I want to do is install Knoppix on an external USB harddrive and have it be bootable. What I don't want is just to have the Live CD copied to the harddrive as I've seen suggested in other threads. I want Knoppix installed on my USB hard drive and have it perform just as it would on a regular internal drive. I want to be able to install new packages, save settings, and all that just as I would if it was regularly installed on an internal drive.

This is for my laptop which has a small 60GB internal drive that is pretty much full (if it wasn't, I would probably just dual boot). Since I don't want to touch that internal drive I want to install Knoppix on the external hard drive. Now, I have already attempted to do this, but when I try to boot the USB hard drive I get a grub error 22 at Stage 1.5.

onemyndseye
01-25-2007, 07:30 AM
**SNIP Grub error codes**

22 : "Must load Multiboot kernel before modules"

This error is returned if the module load command is used before loading a Multiboot kernel. It only makes sense in this case anyway, as GRUB has no idea how to communicate the presence of location of such modules to a non-Multiboot-aware kernel.

***SNIP END*****


It sounds to me like there is possibly something wrong with your menu.lst. I run Knoppix in the same way you are planning...
Here is my menu.lst:


color black/cyan yellow/cyan
timeout 30
#splashimage (hd0,0)/boot/coffee.bmp
default saved

title Knoppix Default
kernel (hd0,0)/boot/vmlinuz-2.6.19 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us
initrd (hd0,0)/boot/linux/initrd.img-2.6.19
savedefault
boot

title Knoppix Text Mode
kernel (hd0,0)/boot/vmlinuz-2.6.19 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us 2
initrd (hd0,0)/boot/linux/initrd.img-2.6.19
savedefault
boot

title Knoppix 2.6.20-rc5
kernel (hd0,0)/boot/vmlinuz-2.6.20-rc5 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us
initrd (hd0,0)/boot/initrd.img-2.6.20-rc5
savedefault
boot

title Knoppix 2.6.20-rc5 Text Mode
kernel (hd0,0)/boot/vmlinuz-2.6.20-rc5 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us 2
initrd (hd0,0)/boot/initrd.img-2.6.20-rc5
savedefault
boot



If grub is install to your USB drive... make sure your Knoppix partition is marked "Active" ....also I think anytime grub is booted from a drive, the boot drive is called as (hd0,0)

Also... if you have problems booting with grub.. it may help to create a small FAT32 partition on the drive somewhere are make it MSDOS bootable. Boot into DOS and use grub4dos or loadlin to boot your system. I use both methods for mine.. Grub is install and is used if the machine I'm booting CAN boot from USB.. if not I have a BOOTCD with a custom MSDOS bootdisk written to it... That way I can boot the system into MSDOS with the cd and use grub or loadlin


Good luck.... youll enjoy this setup VERY much once you get it going,
-Justin
One Mynds Eye

darkkterror
01-25-2007, 08:44 PM
Didn't work. I used your exact same menu.lst and made sure the first partition on my USB-HDD was Active. I get the same error 22.

kirol
01-25-2007, 09:39 PM
The stock knoppix startup mniroot does not include USB drivers; youl'll need Gilles' version, see here (http://www.knoppix.net/forum/viewtopic.php?p=110240#110240).
From the livecd, copy the minirt*.gz to /media/sda1/boot and adjust your menu.lst accordingly.

darkkterror
01-25-2007, 11:09 PM
Still doesn't work. I get the same Error 22.

Here is my current menu.lst:



color black/cyan yellow/cyan
timeout 30
#splashimage (hd0,0)/boot/coffee.bmp
default saved

title Knoppix Default
kernel (hd0,0)/boot/vmlinuz-2.6.19 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us
initrd (hd0,0)/boot/minirt_511.gz
savedefault
boot

title Knoppix Text Mode
kernel (hd0,0)/boot/vmlinuz-2.6.19 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us 2
initrd (hd0,0)/boot/minirt_511.gz
savedefault
boot

title Knoppix 2.6.20-rc5
kernel (hd0,0)/boot/vmlinuz-2.6.20-rc5 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us
initrd (hd0,0)/boot/minirt_511.gz
savedefault
boot

title Knoppix 2.6.20-rc5 Text Mode
kernel (hd0,0)/boot/vmlinuz-2.6.20-rc5 root=/dev/sda1 init=/etc/init vga=791 quiet noapm nomce noresume lang=us 2
initrd (hd0,0)/boot/minirt_511.gz
savedefault
boot


I tried both the minirt.gz on the livecd (or liveusbflashdrive, in my case) and the minirt_511.gz from the link in kirol's post.

onemyndseye
01-26-2007, 06:15 AM
yeah.......as I said... you might have to use grub4dos or loadlin...

(This is how I boot my system)



Good Luck :)
-Justin
One Mynds Eye

kirol
01-26-2007, 09:53 AM
Something similar only worked for me after I switched to the alternate minirt - but I am booting directly from the ISO image rather than a real HD installation.

If you want to try re-installing grub, you can boot to console mode using "knoppix 2" , then issue

# mount /media/sda1
# grub-install --root-directory=/media/sda1 /dev/sda
I don't think that's the issue, though, as grub seems to start but then encounter some error i have not met myself.
Just to understand: why do you have two versions of the kernel referenced? Do these come come with the 5.1.1 DVD?
The minirt version you use contains kernel modules and will only work for one particular kernel release...

onemyndseye
01-26-2007, 11:08 AM
I think he copied these entrys from me: title Knoppix 2.6.20-rc5 Text Mode

and kirol is correct in saying that you wont have much luck in booting this kernel (though it probably doesnt even exist for you since its a kernel image that I have compiled custom) with the minirt.gz that your are using.

I dont think reinstalling grub is a bad idea.... might correct some problem with the stage files that isnt obvious.... still the easiest way to boot this system is loadlin <kernel> initrd=<minitrt.gz> root=/dev/YOURROOT blah blah blah... though grub4dos is probably the best bet as I have had some trouble with recent kernels and initrd's loading with loadlin..... for examples look to guiles' dongle setups using loadlin and grub

or use grub4dos with your current menu.lst .... though it may take some editing.

I persnally use both methods as some PC's are still very buggy about booting from a USB device.... grub is infact installed and working and mrrors my menu.lst from grub4dos that I use to start the system when the machine in question cant grub boot from a USB device.

Take Care,
-Justin
One Mynds Eye

darkkterror
01-26-2007, 03:08 PM
Oook...made a wee bit of progress here (emphasis: wee bit).

So I reinstalled grub from the knoppix command line. No more error 22! However, since being able to just boot right into Knoppix would be too good to be true, there's a new error!

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

:(

onemyndseye
01-30-2007, 08:43 AM
Im guessing it cant find the USB device.

Send me a PM with your email adress and I will email you a new kernel and initrd to use that should get you going..

Take Care,
-Justin
One Mynds Eye