Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (4) </ [1] 2 3 4 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Live / Embeddedness< Next Oldest | Next Newest >
Fordi Offline





Group: Members
Posts: 90
Joined: April 2004
Posted: Dec. 23 2004,00:22 QUOTE

Ok, I've been experimenting again.

I think it may be possible, with a small patch to linuxrc, to have a live/embedded CD.

QEMU appears to have the ability to have a kernel and initrd start at boot.  I've tested this successfully, and it appears to start, but can't find the CD.  That's fine.  If mounted into QEMU with "-hda path/to/KNOPPIX", it is available.

The only thing missing is a hack to linuxrc to check if /dev/hda *IS* in fact our KNOPPIX image, and mount it.  This should probably be done first ("insmod modules/cloop.o file=/dev/hda" will fail if /dev/hda isn't a cloop image), checked and if working, mounted as /cdrom.

Think about it... pop in a DSL disc and have DSL running inside windows without reboot (and able to access the remote computer..  in fact, using the -append parameter, you could pass the host ip to linuxrc, which could in turn add it to the hosts file as systemhost).  Pop in the SAME disc and reboot, and DSL runs all the faster!

Add to that that the USB and USB-Embedded images could be merged, and you've got a pretty nice idea, don't you think?
Back to top
Profile PM 
Fordi Offline





Group: Members
Posts: 90
Joined: April 2004
Posted: Dec. 23 2004,00:24 QUOTE

Why I haven't done this already and am posting with an idea rather than a new copy of linuxrc:

Shell scripting, as I've said before, is not my forte.  linuxrc scares me, to be honest.  I'm getting better, good enough to modify things like mountci, but not THAT much better.
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Dec. 23 2004,01:34 QUOTE

I agree.

It's a great idea.  I had been thinking about an "embedded" CD-R disk, but I never thought about an embedded/livecd combo.

The "append" idea is also cool.  It allows the user to access the host machine without knowing the raw ip address.  I suppose if you want to take things a step further, you could provide both the ipaddress AND the true hostname of your systemhost computer and the user could talk to it by name.
Back to top
Profile PM 
Fordi Offline





Group: Members
Posts: 90
Joined: April 2004
Posted: Dec. 23 2004,03:53 QUOTE

Just a note:
For space's sake, use upx to compress the QEMU binary; it's small, yeah, but smaller is better, and uncompressed data on the base CD == 2x data within KNOPPIX
Back to top
Profile PM 
Fordi Offline





Group: Members
Posts: 90
Joined: April 2004
Posted: Dec. 23 2004,04:54 QUOTE

I know I said I wasn't doing this, but I figured I'd go in and trudge about with my so-far-limited shell scripting knowledge, and here's the results.

Inserted at line 528 of linuxrc from dsl 0.9.1:
Code Sample
# last ditch - try to mount KNOPPIX ci file from /dev/hda
if test -n "$FOUND_KNOPPIX"
then
else
echo "${BLUE}Assuming you're running from QEMU${NORMAL}"
echo "${BLUE}Performing last-ditch effort to use ${MAGENTA}/dev/hda${BLUE}...${NORMAL}"
echo "${BLUE}I'm not being clean or silent here, so there'll be an error or two..."
# try to mount /dev/hda as a cloop
$INSMOD modules/cloop.o file=/dev/hda
if mount -t iso9660 /dev/cloop /KNOPPIX
then
FOUND_KNOPPIX="/dev/hda"
echo "${GREEN}Success!${NORMAL}"
else
# try one more time, this time directly trying to mount /dev/hda
if mount -t iso9660 /dev/hda /KNOPPIX
then
FOUND_KNOPPIX="/dev/hda"
echo "${GREEN}Success!${NORMAL}"
else
echo "${RED}Failed..."
fi
fi
fi

This will, after checking EVERYTHING else, try loading from /dev/hda, thus assuming that you're booting from QEMU.
And, yes, I've tested it.  And yes, it does boot.  All three (Embedded under linux, embedded under windows, and naitive as a liveCD) ways.  Go me. ^_^

OH!

the qemu stuff.

starting from ~/dsldisc/ as root (mounted from the test iso), the tree and QEMU commands:

Code Sample
Tree:
autorun.inf - 23
index.html - 391
qemu.bat - 198
qemu.sh - 194
./KNOPPIX
./KNOPPIX/KNOPPIX - 50,158,212 bytes
./boot
./boot/isolinux
./boot/isolinux/
./boot/isolinux/boot.cat - 2,048
./boot/isolinux/boot.msg - 110
./boot/isolinux/f2 - 1,592
./boot/isolinux/f3 - 796
./boot/isolinux/german.kbd - 256
./boot/isolinux/isolinux.bin - 9,404
./boot/isolinux/isolinux.cfg - 1,993
./boot/isolinux/linux24 - 994,807
./boot/isolinux/logo.16 - 36,649
./boot/isolinux/minirt24.gz - 798,277
./qemu
./qemu/qemu - 1,085,736
./qemu/qemu.exe - 237,568
./qemu/SDL.dll - 122,368
./qemu/vgabios-cirrus.bin - 30,868
./qemu/linux_boot.bin - 512
./qemu/bios.bin - 65536


Code Sample
qemu.bat listing:
@echo off
qemu\qemu.exe -L qemu/ -kernel boot/isolinux/linux24 -initrd boot/isolinux/minirt24.gz -hda KNOPPIX/KNOPPIX -append "ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=788 quiet"


Code Sample
qemu.sh listing:
#!/bin/sh
qemu/qemu -L qemu/ -kernel boot/isolinux/linux24 -initrd boot/isolinux/minirt24.gz -hda KNOPPIX/KNOPPIX -append "ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=788 quiet"


Code Sample
autorun.inf listing:
[autorun]
open=qemu.bat


Please note that both qemu binaries have been compressed with upx --best
Couldn't tell you why the windows version is smaller, but bonus on that.  Still, the resulting CD is 51.172M in size.  Hope y'all can fix that with a remaster.  I'm not so inclined at the moment, as I've got a bunch of shiny new 3" CDs.

Meanwhile, test it out for yourself.  It'll be fun!
Back to top
Profile PM 
15 replies since Dec. 23 2004,00:22 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (4) </ [1] 2 3 4 >/
reply to topic new topic new poll
Quick Reply: Live / Embeddedness

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code