...making Linux just a little more fun!
By Jim Dennis, Jason Creighton, Chris G, Karl-Heinz, and... (meet the Gang) ... the Editors of Linux Gazette... and You!
From Ben Okopnik
Answered By: Kapil Hari Paranjape, Robos, John Karns, and a very useful webpage by Matthias Müller
Hi, all -
Got a curious Linux problem here that I'm trying to puzzle out, and after struggling with it for a bit, I remembered that I'd heard of this thing called The Answer Gang... :)
I'm trying to boot Linux on my fiancee's laptop, a Sony VAIO F590K - something that she'd be quite happy to see, since her opinion is that Micr0s0ft should have stopped when the going was good - i.e., DOS5.0 Simple, right? Uh, well... the only problem is that it's got a dead CD-ROM drive. She's going to order a new one soon, but until then...
The VAIO doesn't support booting from USB. However, I've managed to load Puppy Linux onto a 1GB USB FlashDrive and burn the appropriate disk image (provided by Puppy) to a floppy - it's an ingenious system (the floppy boots FreeDOS, which searches for and boots the FlashDrive) that could probably be easily adapted to boot other distros... if I only understood exactly what to tweak and how. I'm afraid that I've met my match (at least for the moment) in trying to understand the whole shebang.
I've looked at many LiveCD distros in the past few days. A number of them can be run from USB - but require that the machine boot from the USB, not an option here. I've even carefully studied the "Booting Knoppix from USB" HOWTO, which assumes the same thing, to see if I could somehow mingle Puppy's floppy boot and Knoppix on a USB stick... no luck.
[Kapil] Use Knoppix boot.img on a floppy and copy the KNOPPIX directory to the USB stick. This should work provided the kernel+initrd on the boot.img supports USB---I think it does but there may be a kernel boot option.
The Knoppix boot mechanism is:
- Recognise possible hardware where the KNOPPIX hardware may reside.
- Look on all block devices for the KNOPPIX directory and under it the
- Transfer control to the cloop stuff. The remaining hardware detection
I think puppy uses Xorg and also possibly the vesa driver only. You may have better luck with Knoppix.
Oh, and PXE booting is out as well: the F590K does support network booting... however, PXE does not (yet) speak PCMCIA.
So, given all of the above - what do you folks think? Have any of you had experience in booting something like this, or do you have any ideas that I've perhaps missed?
Argh. So much for writing email while talking on the phone and being derailed in the midst of it all by questions about tea selection (from a large number of options, I might add - Kat and I are both heavily into tea. I think I'll try her kelp tea this time... or maybe the hibiscus...)
Puppy failed to recognize the video hardware in the VAIO. Key factor I neglected to mention.
Ben tries Kapil's knoppix solution, but... -- Heather
Ooops. Seems like Knoppix stopped using "boot.img" at v3.4 (I've got 3.7) - they use "isolinux" these days. There seems to be a bit of discussion on the Net that mentions using the "boot.img" from the v3.3 CDs - I've seen reports that it Just Works - but I don't have one available, and won't be able to download 3.3 until I get to a high-speed connection. Would anyone here happen to have such a thing handy?
If someone happens to have a Knoppix 3.3 image, let me save you a bit of time (obviously, you'll have to change the ISO image name to whatever it actually is, and "/mountpoint" to some existing directory that you don't mind using as a mountpoint for a few seconds.)
# Mount the image mount KNOPPIX_V3.4.iso /mountpoint -o loop # Flip the image to me mutt -s "boot image" -a /mountpoint/KNOPPIX/boot.img email@example.com # You're done! umount /mountpoint
I knew there had to be a reason I kept that old thing around. Actually, at first it was paranoia, but then I realized that Klaus Knopper's push to support the bleeding edge hardware from his pocket disc was giving plainer PCs headaches. So now I try to keep the spare older versions too. For the record the image linked above is from Knoppix 3.3, 2004-02-16, english edition, with an md5sum of a761779c73e01185585e879c800ddede. -- Heather
(re hardware detection) Man, this sounds very cool. I'll be very happy if it works...
I'll definitely report the results as soon as I've had a chance to try it out. For now, it's after midnight, and I'm off to bed.
Didier Heyden actually got Ben his diskette... and sent its md5sum with it, just to be sure. -- Heather
[laugh] I should have asked that people respond on the list first; I've had at least three people send me the images, and at ~2MB apiece, my poor little cellphone connection is groaning. Thanks, all who responded.
[Didier] Let us know how it goes!
Not too wonderful. The floppy boots the Knoppix miniroot, scans a bunch of devices in /dev, and says
Can't find KNOPPIX filesystem, sorry. Dropping you to a (very limited) shell. Press reset button to quit.
However, examining /modules on that miniroot image gives me a clue: it's full of SCSI modules but no USB modules. I'll "unwrap" that image file, yank the miniroot out of it, mount that, and see about replacing the SCSI modules with the USB ones; hopefully, Knoppix will be able to recognize the USB FlashDrive as a result. The only thing I wonder about is if the scanned devices in /dev need to be specified somewhere... I'll look in the various .cfg files to make sure.
This does sound quite promising. Thanks for the hints and the help, everyone - I'll report more as I know more!
[Kapil] The enclosed write-up (from http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb) should help. (Note: his KNOPPIX/boot.img is probably your floppy image).
See attached rz-obrian.rz.uni-karlsruhe.de_knoppix-usb.html
I have now "rebuilt" boot.img - a very interesting and educational process, actually (in fact, I've hacked a script that I found on the Net to do it all for me, since I had to do it repeatedly.) However, I have left the USB pendrive with my fiancee for the week - she's in New York while I'm teaching a class in San Francisco; I have no floppy drive on my machine, and thus no way to experiment with it until I get back.
Thank you, everyone, and Kapil in particular for your help with this - I'm beginning to feel like I actually understand that booting process (as contrasted against the "standard" one.) Again, I'll report the results as soon as I have some - that will be sometime after this weekend.
[Robos] Well, if you only want to show her the livecd, how about you use and emulator? Lately I've been using qemu a lot and it works like hell! Fabrice Bellard is really a god. Ah, and if she has winblows on that machine, how about this link:
Ah. BitTorrent, I'd guess - which I know almost nothing about.
[Robos] Short intro into bittorrent: data is packed into small chunks. You download a chunk on your machine and the next user that wants also this chunk downloads it from your machine, thus relieving the main server of the high load since the load is spread over all downloading (and uploading) clients. The download doesn't have to be sequential, packets come in from different downloading and uploading parties. Even after you got everything your machine keeps uploading for others - this is one thing to watch out for.
Presumably, this would download a Knoppix ISO onto her machine? That's not a problem; our laptops are Ethernetted together. Although it's good to see that 3.8 is out (<clickety-click><download>...)
As we go to press I have a Knoppix 3.9 DVD here. Mind you, a lot of machines for "just trying out" might not have a DVD drive to boot from. Time marches on :) -- Heather
[Robos] Well, I tried qemu once -- screenshot here: http://vobcopy.org/pictures/fun_with_qemu.jpg
Hey, it's got exactly the same message as I was getting!
[Robos] and the folks that made the .bat file made some errors IMHO: -m should be more in the range of 128 (smaller than what shm has, whatever that means on winblows) and I think the error message in the pic also came from an error of theirs but hey, it's close.
Well, I guess (haven't looked at this again) that the japanese knoppix developers that made this image made some config error somewhere. I mean, you essentially have the knoppix image, it's only still on the cd... And you have qemu. On linux this works then like this:
qemu -cdrom=/dev/cdrom -boot d
and there you go. Where is the device under win? That's the problem there. You did notice that I ran the knoppix in an emulated win session? :)
BTW: qemu with kqemu (the kernel module he has now on linux) gives really a speedup to ~70% native cpu speed. Awesome (that's why win4lin pro uses qemu underneath)
I'm not sure - but I'll be back in NYC this Saturday, and will have time to play with computer stuff a few days later, after we get back to St. Augustine. But I'll give it a shot if the current pre-programmed solution (the modified Knoppix boot floppy, the preparation of which was so superbly aided by Kapil's suggestions) doesn't work. If it does work, I've built a great script that automates the somewhat painful process of creating it, and I'll definitely publish it as well.
[John] Hmm, that name sounds familiar ...
Bellard was born in 1972 in Grenoble, France. He went to school in Joffre (Montpellier), where he already created a widely known program, the executable compressor LZEXE.
Ahh, that's it. He must have been all of 17 or 18 years old when he wrote that, as I remember it from 1989 or '90. I think he sold the idea to Phil Katz who incorporated it into his product. It was an algorithm that would uncompress a DOS executable, transparent to DOS, after being loaded by the program loader, before being executed. Handy for saving space in the days of 40 MB disk drives.
[Robos] If you take a look at his page: http://fabrice.bellard.free.fr
and look at his projects - you can't be anything but impressed to the max. Winner of obfuscated c contest and such. Also take a look at his "old projects page". Such people are inpiring to me.
gpg --recv-keys --keyserver blackhole.pca.dfn.de 6EEADA09