PDA

View Full Version : Useful tip: Run LiveCD and eject CD



henrique
08-25-2004, 05:50 PM
do this at the command line :wink:

$sudo umount -l /cdrom
$sudo eject /dev/cdrom


be careful to not open any new program
to open a new application that's not yet opened put the livecd back on the drive and do

$mount /dev/cdrom

j.drake
08-25-2004, 09:31 PM
:shock: Now why in the world would you want to do that when you have the options of the tohd, fromhd and bootfrom cheatcodes???

jd

henrique
08-25-2004, 09:39 PM
my hd is full and I have only one cd-rom drive :D

someone could do this in a hd-less computer, small is beautiful :roll:

paradocs
08-29-2004, 05:31 AM
Hi henrique

I like working with anad exploring the advantages of
using knoppix from the cd with no hard drive.

I like you idea. Now could you have two remasters that
are the same -- except make some programs are different?

If you could swap disks, without bothering the kernel ;-)
you could break the 700 limit for content. You would have
a 2 CD version of knoppix.

Each disk may have to have the same files -- but some
file could be place holder files, taking only a few bytes.
Of course you could not use a program on disk A
with a program on disk B, so logical coordination
would be needed.

Let me know when you have this working.

Best Wishes
paradocs

j.drake
08-29-2004, 10:25 PM
OK, cool.

Cuddles
09-01-2004, 06:44 AM
henrique,

Interesting...

I know a lot of people have been asking about "releasing" the CD-ROM from a Knoppix Live CD boot, so, here comes the questions - If I see any other posts on this issue, I will be sure to "pass on" what the answers come down too...

( 1 ) I take it, that, if a person wants to play an Audio CD, in the only CD-ROM they have, which was used by Knoppix to boot off of, that the person would fire up the CD Player program, and then umount the /dev/cdrom device, insert there Audio CD, and then press "play" in the player program... ( will this work? )

( 2 ) If the above will work, then take a second example: the booted CD-ROM drive is a DVD drive, and the person wants to view a DVD from that same drive... Would they be able to load the DVD Player program, umount the /dev/cdrom device, insert the DVD disc, press "play"...

In both the examples above, when the person was done, they would, of course, remove the "playing" media from the device, re-insert the Knoppix Live CD, and re-mount /dev/cdrom...

Most of the questions being posted into the "General Forum", and, once in a while, in "The Lounge" -=- usually fall into the two issues above, and if this works, ( though I would have never thought to umount the cdrom in the first place ), it would help a lot of people out...

For some people, they don't want to put "anything" on there system, but want to "see" what Knoppix can do - not much, when the cdrom is dedicated to the booting of Knoppix, and this would allow them to "see" a lot more of the OS, working, and "in action", without having to install anything.

Ms. Cuddles

dreday202
09-03-2004, 03:43 AM
I tried doing this, and I was able to eject the knoppix cd and put in a blank cd, but how would I go about backing up data using K3B this way? I tried to burn a data cd (containing mp3's and some word documents) but it said it could not write the iso file this way. Is there any way of doing this? I don't have another cd rom drive, and my system is NFTS

thanks a lot

Andre

henrique
09-04-2004, 08:38 PM
I tried doing this, and I was able to eject the knoppix cd and put in a blank cd, but how would I go about backing up data using K3B this way? I tried to burn a data cd (containing mp3's and some word documents) but it said it could not write the iso file this way. Is there any way of doing this? I don't have another cd rom drive, and my system is NFTS

thanks a lot

Andre

I do not tried to burn a backup data cd before but I always burn isos downloaded from the net using this tip. Try to make an iso before ejecting cd or experiment another burner as gcombust (only the main executable needed)

Fabianx
09-04-2004, 11:03 PM
I have yet to see a much more useful tip.

I have been searching for something like that for a _looong_ time ...

cu

Fabian

PS: That means we can do: tohd and changetohd _while_ running from CD.

Thank you. Thank you. Thank you !!!

drmarathe
09-05-2004, 12:58 AM
I tried doing this on Notebook Toshiba using the 2.6 Kernal
First I had logged in as a Root shell and tried doing it. But it didn't work, so next I tried at the $ prompt.
So I guess the /cdrom was already unmounted.
But the eject didn't work

knoppix@ttyp2[knoppix]$ sudo umount -l /cdrom
umount: /cdrom: not mounted
knoppix@ttyp2[knoppix]$ sudo eject /dev/cdrom
eject: unable to find or open device for: `/dev/cdrom'
knoppix@ttyp2[knoppix]$ mount /dev/cdrom
mount: mount point /mnt/auto/cdrom does not exist

I am exactly in the situation mentioned. MY HD controller has crashed and have no HD, but would like to play audio and video cds under knoppix.

Please Help! Thanks

Fabianx
09-05-2004, 03:12 AM
knoppix@ttyp2[knoppix]$ sudo umount -l /cdrom
umount: /cdrom: not mounted
knoppix@ttyp2[knoppix]$ sudo eject /dev/cdrom
eject: unable to find or open device for: `/dev/cdrom'
knoppix@ttyp2[knoppix]$ mount /dev/cdrom
mount: mount point /mnt/auto/cdrom does not exist


2.6 in Knoppix 3.4 had some problems:

sudo eject /dev/scd0 or /dev/hdX should work though.

cu

Fabian

Fabianx
09-05-2004, 05:07 AM
Hi,

this is really really cool.

Now we can copy to HD / RAM while running from CD, which basically also allows changing the applications that run from the CD! Changing is just limited by the number of cloop devices, which is sad :-/ due to a bug (?) in cloop ...



# copy to HD
mount /mnt/hda6
rsync -avP /cdrom/KNOPPIX /mnt/hda6/

# load from HD
losetup /dev/cloop1 /mnt/hda6/KNOPPIX/KNOPPIX
mount /dev/cloop1 /KNOPPIX

# remove CD
umount -l /cdrom
eject /dev/cdrom

# fill in /cdrom again (optional)
# either through --move or --bind
mount --bind /mnt/hda6 /cdrom



Thats it.

Possibilities are of course again unlimited. This could create an ISO on the fly from the CD and then insert it, copy to NTFS partitions and whatever you have not even thought of.

I'm still working on a solution to put out the CD cleanly without risking cloop to not be able to read some blocks ... (when you can't change to another backing device)

Possibly you could just copy (e.g. videoplayer) whats necessary to ramdisk and then run from there ...

cu

Fabian

drmarathe
09-06-2004, 08:46 AM
Fabien,

That worked. i.e.
#sudo eject /dev/scd0

It looks like I have to start the video/audio playing program beforehand and then eject the Knoppix CD, put a video/music Cd. Which is ok.

But I tried to remount the Knoppix CD
with
# mount /mnt/cdrom
or
#mount /dev/scd0

But the first gives an error saing no valid fstab entry. Doue he umount remove this entry or what? How can I remount the Knoppix CD after finishing playing a music/video CD.

Thanks

Fabianx
09-06-2004, 03:56 PM
Fabien,

That worked. i.e.
#sudo eject /dev/scd0

It looks like I have to start the video/audio playing program beforehand and then eject the Knoppix CD, put a video/music Cd. Which is ok.

But I tried to remount the Knoppix CD


Just use:



sudo mount /dev/scd0 /cdrom


cu

Fabian

bfree
09-18-2004, 06:08 PM
NOTE: All the instructions in this seem to be superceeded by my discovery of bootfrom, I'd done it and written it though so I'm posting them just in case they are useful to anyone!

Of course instead of copying tohd, if you already have the iso on your hd you can just loop mount that, even if the iso is sitting on NTFS!



knoppix@ttyp0[knoppix]$ sudo su -
# replace /dev/hda2 with the device holding your iso
root@ttyp0[~]# mount /mnt/hda2
root@ttyp0[~]# mkdir /locdrom
# loopback mount the iso
root@ttyp0[~]# mount -o loop /mnt/hda2/1bfree/2burn/knoppix_3.7_PC-Welt.iso /locdrom/
# setup and mount the cloop
root@ttyp0[~]# losetup /dev/cloop1 /locdrom/KNOPPIX/KNOPPIX
root@ttyp0[~]# mount -o ro /dev/cloop1 /KNOPPIX
# now you can umount the cd and eject it
root@ttyp0[~]# umount -l /cdrom
root@ttyp0[~]# eject /dev/scd0
# (optional) fill the /cdrom back in so everything shoudl appear correct
root@ttyp0[~]# mount --bind /locdrom/ /cdrom


Now of course I just have to remember to unmount it all again (but of course it is only mounted read only :-) So it means any poor soul with a machine fully formatted to ntfs and only one cd/dvd drive can download knoppix to the ntfs drive from the devils OS (or if they get a cd can they use rawrite under xp to copy it across? or what other free tool would there be), burn it, boot it, swap in the on-ntfs iso and then eject the cd. Of course I now realise you could just as easily burn it (or stick a cd in the drive) and then copy out the KNOPPIX folder under windows and use fromhd, but where's the fun in that (and it means using double the disc space or deleting the iso)!

Perhaps knoppix-autoconfig should have an option like "fromhd=iso:/dev/hda2" ... wait, when did bootfrom arrive (it's in 3.6 anyway) :-) Looks like all I really needed instead of all the above was "bootfrom=/dev/hda2/1bfree/2burn/k*.iso". It seems Fabian is way ahead of me as always :-) I'll have to look at how bootfrom works! Next stop allowing it to load multiple cloops from cheatcodes (though I guess there is no point until someone builds a suitable second image to load).

Perhaps this post will help someone else realise bootfrom is what they need! I just went and tried it and it boots off the cd, switches to the iso and releases the cd drive (so you can eject the cd), magic!

A. Jorge Garcia
09-19-2004, 04:50 PM
What about toram?

I can do this on some of my PCs which have about 1GB of RAM. However, most PCs I use won't be able to handle this.

Does anyone know if Damn Small Linux does toram? DSL is a lot like KNOPPIX as its a pared-down remaster that only takes a 50MB ISO! I have used it on occassion on the road to access my DEBIAN server at school so I can use all the apps I want. I never tried toram with DSL. I burn DSL on the 210MB 8cm CDRs, but it could even fit on one of those Business Card or Credit Card sized CDRs.

Just my 2 cents,
AJG

firebyrd10
09-19-2004, 07:10 PM
What about toram?

I can do this on some of my PCs which have about 1GB of RAM. However, most PCs I use won't be able to handle this.

Does anyone know if Damn Small Linux does toram? DSL is a lot like KNOPPIX as its a pared-down remaster that only takes a 50MB ISO! I have used it on occassion on the road to access my DEBIAN server at school so I can use all the apps I want. I never tried toram with DSL. I burn DSL on the 210MB 8cm CDRs, but it could even fit on one of those Business Card or Credit Card sized CDRs.

Just my 2 cents,
AJG

Yea, it has toram. Omly takes a few minutes too.

If it could support my computer I would buy a copy (A. to Help devoplement. B. Because I want one of those creditcard cds that I can't find anywhere.)

A. Jorge Garcia
09-19-2004, 11:52 PM
I know, the only place I've seen the Business Card CDRs is:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=21890&item=5123929535&rd=1

Regards,
AJG

OErjan
09-21-2004, 06:08 PM
hmmm, i ordered some 50Mb Cd's this summer from
http://www.clasohlson.se/
perhaps you could get from there.
EDIT i found some 30Mb (Verbatim ) here
http://www.dataprince.se/webshop/shop.asp?group=512&view=2&query_type=&maxhits=&query=&article=43027
/EDIT

dolzenko
01-23-2005, 04:52 PM
killer! thanks a lot for a tip. this "lazy" umount seems to discard "in use" thing.
P.S. the same situation here - hd crashed, and now it seems i could go well without it ;)

dolzenko
01-24-2005, 01:19 PM
me again.
i could eject cd and keep programs working, but whenever i place some different cd it doesn't mount correctly. directory /mnt/auto/cdrom is empty or showing contents of one folder from CD with 8.3 names. i tried to mount cdrom manually and automatically (cd'ing to folder /mnt/auto/cdrom).
i've tried different combinations of 2.4, 2.6 kernel, and atapicd mode. (knoppix 3.7)

Brian H
02-16-2005, 08:24 PM
Useful hint! I like the bootfrom, too.

But if anyone wants a low-hassle longer term solution, I have pre-installed Knoppix 3.7 on 40/80 GB HDs for $75/$85, + shipping, respectively. Just starting this out as a personal venture. Send HW setup info if you want some pre-tailoring to your needs, but Knoppix is pretty competent in that regard anyway, as you know.

satch
10-13-2009, 07:15 AM
I realise this is a very old posting, however I just came across it today through a google search, so there is a good chance many others in a similar predicament may stumble across it also.

Won't help everyone, but its worth noting that your CD/DVD drive may well mount under /dev/hdc on many systems (this one is a Toshiba Satellite laptop).

In my case I had removed a prior disk (I'm on a HD installation of Knoppix) and inserted another. It took me a couple of minutes messing about before I discovered that it was hdc, not cdrom or similar.

'eject /dev/hdc' did the trick just fine.

Hope this helps someone!

David