Re: [Dorset] Identifying the drive containing a CD
On Tuesday 04 Jan 2011, Andrew R Paterson wrote: Pardon if this is irrelevant (because the cd isnt actually mounted!) but if its mounted, surely mount |grep iso should give you a line to parse providing the cd device (unless you have more than 1 cd drive - I have:) - they are both mounted - unlikely) As it happens, Tiny Core always mounts the live disk from /dev/cdrom, regardless of which mount point it is mapped to. Also, we know which loop device the files are going to end up being mounted on, so we umount that, then umount the CD device and then eject it. Thanks for all the suggestions. -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Identifying the drive containing a CD
You might think about editing the initrd/initramfs, it's really just a gzipped ext2 image / squashfs image usually. Just make a new one with the stuff in there, add your stuff and remake your CD! Job done! -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
[Dorset] Identifying the drive containing a CD
Hi, We're still playing with Tiny Core Linux and are now exploring more ways of adding our own data to the running system from the original CD. You might recall that I was asking some time ago how to write data to the ISO image and rewrite it from a DOS Box. We have found a way to do this, but it has it's own problems because the permissions supported by a Windows machine are less than those in Linux. This makes it difficult to write files into the compressed data that eventually gets written to initrd during boot up. Plan B was always to write the files to the ISO but outside the initrd data and then copy them to the running system after boot up. The problem with this is that we need to be able to identify which drive the CD is sitting in. For the most part this is hdc with Tiny Core systems, but it can be different depending on the type of drive electronics and the number of drives on the system. Is there a way to easily identify the drive that contains the CD once the system has booted? We use a system where everything in the live part of the disc is written to initrd, so the drive is unmounted once booting is complete. However, we still need to know where to look. Terry Coles -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Identifying the drive containing a CD
Hi Terry, Plan B was always to write the files to the ISO but outside the initrd data and then copy them to the running system after boot up. Â The problem with this is that we need to be able to identify which drive the CD is sitting in. Â For the most part this is hdc with Tiny Core systems, but it can be different depending on the type of drive electronics and the number of drives on the system. Is there a way to easily identify the drive that contains the CD once the system has booted? Does ls -l /dev/disk/* show anything interesting if the CD is in the drive? Perhaps the CD can have a label or UUID. You should at least see the CD drive in by-id although that won't be useful as part numbers change. Cheers, Ralph. -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Identifying the drive containing a CD
On 04 January 2011 at 13:34 Ralph Corderoy ra...@inputplus.co.uk wrote: Does ls -l /dev/disk/* show anything interesting if the CD is in the drive? Perhaps the CD can have a label or UUID. You should at least see the CD drive in by-id although that won't be useful as part numbers change. That comes back with 'No such file or directory'. However: ls -l /dev/cdrom* on this machine comes back with: lrwxrwxrwx 1 root root 8 Jan 4 12:33 /dev/cdrom - /dev/hdc Which at least tells me the device that is available here, but there is no difference when I put a disc in the hole. I also tried the technique on a machine with two DVD drives, but this was quite confusing because it indicated that the cdrom was hdd, but the TC Mount Tool thought that the CD was in hdc! The TC Mount Tool may well give sufficient clues though because it seems to be able to work out what drives the machine has and also the volume names of each disc in each drive. Maybe the source code for this will let us into the secret. Terry Coles -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue
Re: [Dorset] Identifying the drive containing a CD
On Tuesday 04 Jan 2011, Tim wrote: Today 17:46:16 Re: [Dorset] Identifying the drive containing a CD From: Tim To: Dorset Linux User Group dorset@mailman.lug.org.uk On Tuesday 04 January 2011 17:44:25 Tim wrote: On Tuesday 04 January 2011 14:27:44 d-...@hadrian-way.co.uk wrote: I was just in the process of replying with a query about that :-) -- Terry Coles 64 bit computing with Kubuntu Linux -- Next meeting: Crown Hotel, Blandford Forum, Tuesday 2011-01-11 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectively: http://goo.gl/4Xue