Question about Knoppix
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Question about Knoppix

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    13

    Question about Knoppix

    Why for example when I want to copy the SAM and system files to a thumbdrive using a Knoppix boot-up disc, must I type out all those commands like cd /mnt/hda1, then cd windows etc?
    Why is it not possible to simply do cd /mnt/hda1/windows/system32/config
    or maybe cd windows/system32/config

    and I usually get only the SAM and system files, but I have to execute two commands for that. Is it possible to copy the in one line like cp SAM, system /mnt/sda1 , or something similar.
    Sorry, I'm a real command line noob, and even more so using Knoppix.

    Help appreciated

  2. #2
    Regal Making Handler
    Join Date
    Jun 2002
    Posts
    1,668
    Why not just navigate to the required files and right click and choose copy to???
    What happens if a big asteroid hits the Earth? Judging from realistic simulations involving a sledge hammer and a common laboratory frog, we can assume it will be pretty bad. - Dave Barry

  3. #3
    Junior Member
    Join Date
    Jul 2004
    Posts
    4
    lol....i use knoppix myself.....it rock's for sure....as for the required pathname ect to do what u asked...it's kinda obvious isnt it???/ Kudo's for the frog hammer response though...funny.
    nice to meat you

  4. #4
    Member
    Join Date
    Aug 2003
    Posts
    44
    I'm not sure, but I think your problem might be case sensitivity. The linux command line distinguses between upper and lower case. This means that Windows is different from windows , and System32 is different from system32. Hope this helps!

  5. #5
    Senior Member
    Join Date
    Mar 2004
    Location
    Colorado
    Posts
    421

    Re: Question about Knoppix

    Originally posted here by Kezman
    Why for example when I want to copy the SAM and system files to a thumbdrive using a Knoppix boot-up disc, must I type out all those commands like cd /mnt/hda1, then cd windows etc?
    Why is it not possible to simply do cd /mnt/hda1/windows/system32/config
    or maybe cd windows/system32/config

    and I usually get only the SAM and system files, but I have to execute two commands for that. Is it possible to copy the in one line like cp SAM, system /mnt/sda1 , or something similar.
    Sorry, I'm a real command line noob, and even more so using Knoppix.

    Help appreciated
    It's simple really.
    since your mount point is /mnt/hda1
    you would only be able to type cd windows/system32/config if your pwd "present working directory" was /mnt/hda1 to start.

    If you are starting in / or /home/user then how is UNIX supposed know where you want to start from?
    UNIX is very literal.

    just do this

    cp /mnt/hda1/windows/system32/config/file1 file2 file3 file4 /location/of/copy/to/be

  6. #6
    Senior Member
    Join Date
    Jun 2002
    Posts
    394
    Is it possible to copy them in one line like cp SAM, system /mnt/sda1 , or something similar.
    as a new user, you'll read and hear people tell you to use the man command.

    append any other command to the man command and your screen will magically display a manual for that command.

    man cp will tell you that you can

    Code:
           cp [OPTION]... SOURCE DEST
           cp [OPTION]... SOURCE... DIRECTORY
           cp [OPTION]... --target-directory=DIRECTORY SOURCE...
    so you could

    cp --target-directory=/home/me file1 file2 file3
    Hmm...theres something a little peculiar here. Oh i see what it is! the sentence is talking about itself! do you see that? what do you mean? sentences can\'t talk! No, but they REFER to things, and this one refers directly-unambigeously-unmistakably-to the very sentence which it is!

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    174
    You guys... I think he's asking why he can't just go cd /mnt/hda1/windows/system32/config . Instead, he has to change directory to /mnt/hda1, and then change go windows/system32/config.

    The answer, while I'm not positive, is because Knoppix doesn't actually have the device /dev/hda1 mounted by default. So when you're trying to go to /mnt/hda1/windows, that windows directory isn't there yet. When you change to /mnt/hda1 however, Knoppix automounts hda1 (command: mount /dev/hda1 /mnt/hda1), and you can then access the windows directory. Like I said, I'm not sure if that's the case with Knoppix in particular, but one other live distro that I've used does this. If you want to speed things up make yourself a bash script, and store it on the thumb drive. Something like:
    (Assuming you've already mounted /dev/sda1)
    !#/bin/bash
    mount /dev/hda1 /mnt/hda1
    cp /mnt/hda1/windows/system32/config/* /mnt/sda1/

    -----------
    Save it, and execute by typing bash ./[filename], or save it with a .sh extension, and just type ./[filename].sh, assuming it's chmod-ed for execution.
    That should mount the drive and copy all the files to /mnt/sda1, retaining the original names.

    Or maybe not. I'm no *nix guru.

    -M
    I\'m back.

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    57
    Kezman,

    Seperate your commands with a ; and Linux should execute them one after another:

    "mount /dev/hda1;mount /dev/sda2;cp /dev/hda1/windows/syatem32/config/* /dev/sda2/.;umount /dev/hda1;umount /dev/sda2"

    That should get it from one to the other and you can modify the path as necessary to your particular set up or configuration of the drives and how each one is recognized by Knoppix.

    Also I assumed sda2 for the thumb drive as sda1 was the CD???? Anyway that should at least get you started.

    You have to mount the drives first since you are booting up from the ISO. The hard drive and the thumb drive are not mounted by default. You could also make a shell script that is on the thumb drive and then just mount it and run the script. The script could mount the harddrive and then copy the files and unmount both drives.

    If you want a short term project you could make your own ISO on the thumb drive, set the bios to boot from the thumb drive. Set it up to run a script to do all of these things as part of the boot up sequence, and then shut down. The end result would be you walk up power down the computer, plug in the thumb drive, enter bios setup on boot, configure to boot from USB, run script and then shut down. All you do is power up and configure the bios, everything else is scripted. I have seen floppy disks that do this to pull password files.
    \"If you take a starving dog in off the street and make him prosperous he will not bite you, this is the principle difference between a dog and a man\" - Mark Twain

  9. #9
    it's pretty simple: the GUI that you see is for user KNOPPIX, and since he can not mount things by itself (no rights) for RW (Read-Write), thats why you have to (re)mount it using root, and the only way to get root to remount it is by opening a shell and run the su command to become root.
    and this is the reason why you'd have to do it yourself.
    Knoppix does mount by itself, but only for reading, not for writing...

  10. #10
    Senior Member
    Join Date
    Jun 2002
    Posts
    174
    Originally posted here by Gump
    Kezman,

    Seperate your commands with a ; and Linux should execute them one after another:

    "mount /dev/hda1;mount /dev/sda2;cp /dev/hda1/windows/syatem32/config/* /dev/sda2/.;umount /dev/hda1;umount /dev/sda2"
    You have to specify a mount point, ie:

    mount [device] [place where it will be mounted]

    Also, you should then copy files off the mount point, not the device (cp /mnt/hda1/[whateverDir]/* /mnt/sda1/)

    Also, I think Knoppix actually has a device called /dev/cdrom, so /dev/sda1 would be the thumbdrive.

    White Scorpion, he's only mounting windows directory to read, so none of that gibberish. Also, I assume the reason he wanted to know the command-line version is because he is, indeed, in the command line (Knoppix-text), which throws you a root shell by default.

    Kezman, I'm assuming this is for some... school project or something? CompSec? Kudos to you, (kez)man.



    SO yeah. As for the rest of you, great answers, but I don't think a-one of you read the question.

    Wait... neither did I....damn....
    I\'m back.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •