Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Trying to mount an encrypted partition in Knoppix 5.1 so I can rescue my data as my GUI (X server?) no longer works and dpkg-reconfigure xserver-xorg doesn't seem to help: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97

    knoppix 5.1-- how to mount an encrypted partition?


    Trying to mount an encrypted partition in Knoppix 5.1 so I can rescue my data as my GUI (X server?) no longer works and dpkg-reconfigure xserver-xorg doesn't seem to help:

    # mount -t ext3 /dev/hdb5 /media/hdb5=
    Code:
    mount: wrong fs type, bad option, bad superblock on /dev/hdb5,
           missing codepage or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    # dmesg | tail=
    Code:
    VFS: Can't find ext3 filesystem on dev hdb5
    I know this partition is ext3 file system. Is there an extra step or different procedure for mounting an encrypted partition in Knoppix?

    Thank you! and best regards from (smoky) Northern California USA

    bezdomny

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    678
    It may be possible, but we will need to know how the partition was encrypted before we can give you specific instructions.

    The mount command will fail because it will not automatically detect encrypted partitions and you aren't giving it any options that tell it to expect one. All it can see is the encrypted data dumped on a partition that makes no sense.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97

    knoppix 5.1-- how to mount an encrypted partition?

    Thanks, Chris. It's been awhile since I setup this installation. I only know that during installation I chose one of the encryption options and when I logon, I'm prompted for the "LUKS passphrase". Does that help? Thanks again!

  4. #4
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    678
    That should be enough for us to try and fix this.

    Code:
    cryptsetup luksOpen /dev/hdb5 enc
    <Should ask for passphrase here>
    mount /dev/mapper/enc /media/hdb5
    If that doesn't work then post the output of the commands here. It would also help if you could tell us what you were installing when it asked you, then we can look up default settings for it's encrypted partitions.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  5. #5
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97

    knoppix 5.1-- how to mount an encrypted partition?

    Thanks, Chris! I think we're almost there.

    cryptsetup luksOpen /dev/hdb5 enc=
    Code:
    Enter LUKS passphrase: [note-- passphrase entered-- bezdomny]
    key slot 0 unlocked.
    Command successful.
    mount /dev/mapper/enc /media/hdb5=
    Code:
    mount: you must specify the filesystem type
    Chris, I could swear this was ext3 but maybe I'm wrong. At any rate, I should be able to boot into the command line after the LUKS passphrase and run a command to identify the filesystem type, correct?

    Looking forward to hearing from you!

    best regards from (smoky) Northern California,

    bezdomny

  6. #6
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    678
    That should have done it. Try this then.

    Code:
    mount -t ext3 /dev/mapper/enc /media/hdb5
    If that doesn't work then this should tell you what the filesystem is.

    Code:
    file -s /dev/mapper/enc
    Then use whatever it tells you as the filesystem type for the mount command.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  7. #7
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97
    Thanks again, Chris.

    # mount -t ext3 /dev/mapper/enc /media/hdb5=
    Code:
    mount: wrong fs type, bad option, bad superblock on /dev/mapper/enc,
           missing codepage or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    #dmesg | tail=
    Code:
    Mobile IPv6
    eth0: no IPv6 routers present
    device-mapper: ioctl: 4.10.0-ioctl (2006-09-14) initialised: dm-devel@redhat.com
    kjournald starting.  Commit interval 5 seconds
    EXT3-fs: mounted filesystem with ordered data mode.
    e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex
    eth0: no IPv6 routers present
    EFS: 1.0a - http://aeschi.ch.eu.org/efs/
    VFS: Can't find ext3 filesystem on dev dm-0.
    VFS: Can't find ext3 filesystem on dev dm-0.
    So I'm going to log off of knoppix, log into the hdd, enter the passphrase and then run
    Code:
    file -s /dev/mapper/enc
    at the command line.

    I'll let you know how it goes.

    best regards as always from (smoky) northern California USA,

    bezdomny

  8. #8
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97

    Knoppix 5.1: how to mount an encrypted partition

    Code:
    file -s /dev/mapper/enc
    erred out complaining of no such file or directory. So I ran the command on the directories that are present at /dev/mapper:

    Code:
    file -s /dev/mapper/bezdomny-root
    =
    Code:
    Linux rev1.0 ext3 filesystem (needs journal recovery) (large files)
    Code:
    file -s /dev/mapper/hdb5_crypt
    =
    Code:
    LVM2 (Linux Logical Volume manager) UUID kPFhUCUJ4riuB0s2caSXwl00SLgYi6RS
    Hope this helps!

    best regards from (smoky) Northern California USA,

    bezdomny

  9. #9
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    678
    That does help, kind of. The stack goes:

    Code:
    ext3
    lvm
    cryptsetup
    disk
    I wasn't expecting the lvm bit of that which is why the mount -t ext3 isn't working. Unfortunately my knowledge of lvm is almost non existent. I'm reading the LVM Howto to try and find out what you need to do to mount the volume, but it will take a little time to figure out. Perhaps someone with more experience than I can help us both out.

    In the meantime, if you can boot your system can you not do a backup from the command line?

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  10. #10
    Just Joined! bezdomny's Avatar
    Join Date
    Apr 2007
    Location
    North-Central California
    Posts
    97

    Knoppix 5.1: how to mount an encrypted partition?

    Chris, thanks. Did I tell you I got my Xserver back? However, I'm still interested in solving this for future reference-- I'm sure it will come up again, if not with me, with someone I'm assisting.

    At any rate, I don't know what you mean by backup from the command line. Backup what? Could you please indulge my poor understanding of Linux and be more specific?

    Thanks!

    best regards,

    bezdomny

Page 1 of 2 1 2 LastLast

Posting Permissions

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