creating symbolic links


Forum: Other Help Topics
Topic: creating symbolic links
started by: clacker

Posted by clacker on Sep. 08 2004,18:43
Is it possible to create a symbolic link on the ramdisk to a directory on the cdrom?  I think it must be but I can't do it.  I tried:

cd /home/dsl
link /cdrom/KNOPPIX KNOPPIX

and got

link: cannot create link 'KNOPPIX' to '/cdrom/KNOPPIX': Invalaid cross device link

If I could do that, then when I was remastering, I wouldn't need to copy the KNOPPIX directory if I wasn't going to change anthing.  Then destroy the links when the iso is made.  I thought it might help in cases of low memory remastering.

Posted by mikshaw on Sep. 08 2004,18:57
You might try "ln -s" instead of "link"...i don't really know what the difference is, though.
Posted by clacker on Sep. 08 2004,20:52
thanks, mikshaw, that did it.  I was able to remaster making a link to /cdrom/KNOPPIX in my newcd directory, and using the -f switch in mkisofs to save a lot of room on the ramdisk.
Posted by clivesay on Sep. 08 2004,21:30
clacker -

Do you mind taking a minute to explain what you are doing? I have never messed with symbolic links before.

Thanks

Chris

Posted by clacker on Sep. 08 2004,22:33
"Do you mind taking a minute to explain what you are doing?"

A link is a reference to another file, but it only contains the location of the other file so it's small.  It's the Linux equivalent of a windows shortcut file.

I wanted to tell someone how to remaster dsl 0.8.0 using a minimum amount of drive space and RAM.  So at first I thought copy everything you need into the newcd directory, change the things in the boot directory you need to, use mkisofs with the billion switches you need, and you're done.  The problem is you wind up with a 50 Meg newcd directory and a 50 Meg iso file.

Then I realized that I'm copying a rather large file (/cdrom/KNOPPIX/KNOPPIX), and wouldn't it be better if I could put a link to the big file in the newcd directory, and when mkisofs needed to read it, it could read it from the cdrom.  It does this if you use the -f switch.  Since you use the KNOPPIX file on the cdrom, you only need about half the room.

It would also be a good technique for remasterings where you only want to add an optional directory, but didn't want to burn a multisession CD.  It's not good when you actually want to change things in the KNOPPIX directory.

I posted the method < here >

Posted by clivesay on Sep. 08 2004,23:12
Thank you for the explanation!
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.