Announcement

Collapse
No announcement yet.

linux file question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • linux file question

    Just curious...

    You know how you can pull a Windows HDD out of a machine, place it in another machine, and read all of the files on it?

    Can you do that with a linux HDD?

  • #2
    Yes.

    Comment


    • #3
      Re: linux file question

      Originally posted by Kooldino
      Just curious...

      You know how you can pull a Windows HDD out of a machine, place it in another machine, and read all of the files on it?

      Can you do that with a linux HDD?
      To elaborate on my last post:

      if (a) the drive uses an interface that is supported by the machine (IDE, SCSI ... );
      and (b) the partitions on the drive are formatted with filesystems (FAT, VFAT, NTFS, ext2, ext3, XFS, ReiserFS ... ) that the second machine has support for (either as modules or built into the kernel)

      then the second machine can mount and read the files on the disk.

      - Steve

      PS: note that if the drive is formatted with NTFS, then it will only work with NT/2K/XP - Win95/98/me won't read it.

      edit:
      PPS: note that you can likely put the Windows drive in a Linux machine, and be able to read the files on it.

      Comment


      • #4
        Reading files from an NTFS partition in linux can be done. Writing to a NTFS partition from linux is still a little risky.



        If you happen to be trying to access files on a drive that has a linux OS installed from another linux OS. You may run into this problem.

        Having two HDs, each with there own install of redhat (only tried version 9), will cause booting problems. To get them to work together you have to boot them individually and change the LABEL references in /etc/fstab and /boot/grub/grub.conf (can't remember which file to change for LILO) to there physical location on the controller e.g. (LABEL=/boot to /dev/hda1, LABEL=/ to /dev/hda2).

        What happens is that there are two drives with the same LABEL and the boot loader can't tell which one to use.
        I should have bought an ATI.

        Comment


        • #5
          Originally posted by piaxVirus
          ...(can't remember which file to change for LILO)...
          That would be /etc/lilo.conf, and you have to run lilo or /sbin/lilo for the changes to take effect. Presumably you should do this before installing the second drive.
          Blah blah blah nick blah blah confusion, blah blah blah blah frog.

          Comment


          • #6
            So is there a way to secure directories in linux so that it can't be read? or do i just tar it with a password?

            Comment


            • #7
              Originally posted by Kooldino
              So is there a way to secure directories in linux so that it can't be read? or do i just tar it with a password?
              That's built in, with one caveat.

              The permissions on the file or directory will determine who can and can't read the files. If you always log in as root, then all files will always be visible (so you'd want to do some passwording/tar-ing/gzipping)
              This brings up an interesting point. If you take a hard drive from one installation and put it into a box with a different install which has different users, the permissions will be screwy for everyone except root (I think). Here's my reasoning (I'd love it if someone would correct me):
              Each system has its own set of usernames and their associated userid.
              The filesystem saves ownership as a userid / groupid in the dentry (directory entry) for the file, not as the user/group name.
              The two machines may have different userid's, even if the same people have accounts. (This is not true for root, which is always userid 0)
              An example of the userids: on machine 1, an account for spadnos is created first, then kooldino. spadnos gets userid 101 (or 501, or whatever), kooldino gets 102. On machine 2, kooldino's account is created first, so he has userid 101, and spadnos has 102.
              Now, put hard drive from machine 2 into machine 1, but still boot from machine 1 hard drive. spadnos has access to userid 101 files on each drive, which means spadnos' files on drive 1, and kooldino's files on drive 2.

              Even better is if machine 2 has UltraSecureAndImportantUser as userid 101. Now, put that drive in my machine and muahahahahahah - full access!!!
              (of course, the security isn't too good if I can grab the hard drive out of UltraSecureCorp's machine anyway )

              Hmmm.

              - Steve

              Comment


              • #8
                See, that's what i thought, since it's exclusively based on the UID #, which you can manually specify, btw.

                Comment

                Working...
                X