PDA

View Full Version : USB Thumbdrive/keychain NTFS ISO boot/Poor Man's Install



semreh
09-08-2004, 05:15 PM
I'm really impressed with Knoppix, but would like to be able to use the CD-RW/DVD-ROM drive in my (work provided) laptop with Knoppix.

I've mastered using the bootfrom 'cheat' code, so I can remove the CD after booting, but it would be nice to dispense with the CD and boot from a USB thumbdrive/keychain flash disk. The laptop can boot from USB (its in the BIOS).

Luckily, my work has partitioned the laptop's hard-drive so that one NTFS partition holds the OS (XP) and one NTFS patition holds all the non-OS data, so I put the ISO onto the OS partition, as that partition is not accessible once I've used the bootfrom 'cheat' code to boot off an (Knoppix 3.4) ISO placed on that partition.

I'v successfully installed GRUB on the USB thumbdrive, and it boots to the GRUB menu, but being a relative noob, I'm a bit stuck after that. I moved /isolinux onto the USB thumb drive, but setting root & kernel then booting gets to a kernel panic after ?hardware detection?. I'm off the edge of my knowledge/capability now.

I think I'll need to partition the thumbdrive, so I boot off one partition, access the .ISO, then use the other thumbdrive partition as my permanent home. I'm not allowed to repartition my laptop's hard drive.

What I'm aiming for is to stick the thumbdrive in the USB port, and boot from a .ISO on the laptop hardrive, retaining access to the data in the second laptop hardrive partition (RO as I don't yet truct the NTFS RW drivers), using the other partition in the thumbdrive as a permanent home, and use it (or possibly a third partition) to data share with XP when I boot the laptop in XP.

I've spelunked around with Google, and got very confused with people talking about using SYSLINUX and Dam Small Linux etc etc. I think 'all' I need to do is modify the boot image under /isolinux to get it to read from the USB device rather than CDROM. I should then get to a point where I can 'bootfrom' the .ISO on the laptop hard drive - all without needing to have the CD.

Can anyone give me some pointers on (a) what changes need to me made and (b) how to do them? I think I need to grab a boot image off the CD, uncompress it, mount it, add some USB drivers and possibly edit a script, recompress and put onto the thumb drive, then write my own GRUB boot menu.

Many thanks,

semreh

j.drake
09-08-2004, 08:20 PM
Take a look at these threads. I pursued this for a while, and some people had some good ideas.

http://www.knoppix.net/forum/viewtopic.php?p=53064#53064
http://www.knoppix.net/forum/viewtopic.php?p=52847#52847

jd

semreh
09-12-2004, 10:59 PM
Thanks jd,

I took a good look at those threads, and this one:

http://www.knoppix.net/forum/viewtopic.php?t=11796

and I'm about half a step further on.

To summarize:

o I've got GRUB onto a USB keychain/thumbdrive
o I've copied the contents of /isolinux onto the same drive.
o When the keychain/thumbdrive is attached, the laptop boots up into GRUB.
o grub.conf looks like this:

# For booting Knoppix off the hard disk
#
title Boot Knoppix from *.iso on hard disk

kernel (hd0,0)/boot/isolinux/linux24 lang=uk keyboard=gb xkeyboard=gb <line continues...> bootfrom=/dev/hda1/Knoppix_V36/KNOPPIX_V3.6-2004-08-16-EN.iso

initrd (hd0,0)/boot/isolinux/minirt24.gz

o Note that although GRUB sees the USB flash disk as hd0, the kernel independently looks for devices and the internal hard drive (with the two ntfs partitions on it) is discovered as /dev/hda1 and /dev/hda2, which explains why I've set bootfrom to look at hda1.

o The laptop loads and runs the kernel from the flashdrive, and the ramdrive, finds the hard disk, but fails to locate the .iso (it is where I said it was - I checked) The boot sequence is a little odd, as the pretty picture of Tux doesn't appear, and the laptop screen is treated as 80x24 (booting from CD, Tux shows up, and the text font size is considerably smaller).

I suspect it's got something to do with the startup scripting (I unpacked ?init.rc from the ramdisk image), but I can't see a simple way to change it.

I think it would be *really useful* to be able to put a bootloader onto a keychain/thumbdrive/usb flash device so that people without CD burners could download the ISO (or even just the KNOPPIX file) and grub+kernel+initial ramdisk to copy to a flash drive and boot to Knoppix without the CD. [The boot process for Debian on m68k Macintoshes is similar, except the bootloader resides on the hard drive, rather than external USB device. A small executable clears out MacOS and boots into linux]

I think this would be a really useful addition to the distribution - unfortunately, I don't have the skills to produce it right now. :(

Anyone else get any further?

Regards

semreh

eco2geek
09-13-2004, 04:33 AM
I'm disappointed -- I have two USB thumbdrives and can't get my computer to boot off either one of them!

Rats. :cry:

So, good for you.

wslkevin
09-15-2004, 10:07 AM
o grub.conf looks like this:

# For booting Knoppix off the hard disk
#
title Boot Knoppix from *.iso on hard disk

kernel (hd0,0)/boot/isolinux/linux24 lang=uk keyboard=gb xkeyboard=gb <line continues...> bootfrom=/dev/hda1/Knoppix_V36/KNOPPIX_V3.6-2004-08-16-EN.iso

initrd (hd0,0)/boot/isolinux/minirt24.gz


Can I copy the folder isolinux from the ISO file to C:\boot, and the ISO file stored in C:\?

Then I use GRUB to boot from my hard disk with the config file:

kernel (hd0,0)/boot/isolinux/linux24 lang=uk keyboard=gb xkeyboard=gb <line continues...> bootfrom=/dev/hda1/KNOPPIX_V3.6-2004-08-16-EN.iso

Can I do that?

Thank you very much for your help.